Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"sqltools.connections": [
{
"mysqlOptions": {
"authProtocol": "default",
"enableSsl": "Disabled"
},
"previewLimit": 50,
"server": "0.0.0.0",
"port": 3307,
"driver": "MySQL",
"database": "reimplementation_development",
"username": "root",
"name": "devexpertiza"
}
]
}
12 changes: 6 additions & 6 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Dangerfile
# Helper to safely read files in UTF-8 and avoid "invalid byte sequence" errors
def safe_read(path)
File.read(path, encoding: "UTF-8", invalid: :replace, undef: :replace)
end

# --- PR Size Checks ---
warn("Pull request is too big (more than 500 LoC).") if git.lines_of_code > 500
Expand All @@ -14,7 +17,7 @@ warn("Pull request has duplicated commit messages.") if duplicated_commits.any?

# --- TODO/FIXME Checks ---
todo_fixme = (git.modified_files + git.added_files).any? do |file|
File.exist?(file) && File.read(file).match?(/\b(TODO|FIXME)\b/i)
File.exist?(file) && safe_read(file).match?(/\b(TODO|FIXME)\b/i)
end
warn("Pull request contains TODO or FIXME comments.") if todo_fixme

Expand All @@ -25,7 +28,6 @@ warn("Pull request includes temp, tmp, or cache files.") if temp_files
# --- Missing Test Checks ---
warn("There are no test changes in this PR.") if (git.modified_files + git.added_files).none? { |f| f.include?('spec/') || f.include?('test/') }


# --- .md File Changes ---
md_changes = git.modified_files.any? { |file| file.end_with?('.md') }
warn("Pull request modifies markdown files (*.md). Make sure you have a good reason.") if md_changes
Expand All @@ -49,11 +51,9 @@ config_files = %w[
changed_config_files = git.modified_files.select { |file| config_files.include?(file) }
warn("Pull request modifies config or setup files: #{changed_config_files.join(', ')}.") if changed_config_files.any?


# --- Shallow Tests (RSpec) ---
# (Rules 37-41 — Shallow tests — assuming you want them included)
shallow_test_files = git.modified_files.select { |file| file.include?('spec/') }
shallow_test_warning = shallow_test_files.any? do |file|
File.exist?(file) && File.read(file).match?(/\bit\b|\bspecify\b/)
File.exist?(file) && safe_read(file).match?(/\bit\b|\bspecify\b/)
end
warn("RSpec tests seem shallow (single `it` blocks or no context). Consider improving test structure.") if shallow_test_warning
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ruby '3.4.5'

gem 'mysql2', '~> 0.5.7'
gem 'sqlite3', '~> 1.4' # Alternative for development
gem 'puma', '~> 5.0'
gem 'puma', '~> 6.4'
gem 'rails', '~> 8.0', '>= 8.0.1'
gem 'mini_portile2', '~> 2.8' # Helps with native gem compilation
gem 'observer' # Required for Ruby 3.4.5 compatibility with Rails 8.0
Expand Down
39 changes: 35 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ GEM
term-ansicolor
thor
crass (1.0.6)
csv (3.3.5)
danger (9.5.3)
base64 (~> 0.2)
claide (~> 1.0)
Expand All @@ -128,6 +129,7 @@ GEM
debug (1.11.0)
irb (~> 1.10)
reline (>= 0.3.8)
delegate (0.4.0)
diff-lcs (1.6.2)
docile (1.4.1)
domain_name (0.6.20240107)
Expand All @@ -149,8 +151,11 @@ GEM
faraday (>= 0.8)
faraday-net_http (3.4.1)
net-http (>= 0.5.0)
faraday-retry (2.3.2)
faraday (~> 2.0)
find_with_order (1.3.1)
activerecord (>= 3)
forwardable (1.3.3)
git (2.3.3)
activesupport (>= 5.0)
addressable (~> 2.8)
Expand Down Expand Up @@ -197,10 +202,13 @@ GEM
mime-types-data (~> 3.2025, >= 3.2025.0507)
mime-types-data (3.2025.0924)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
minitest (5.25.5)
mize (0.6.1)
monitor (0.2.0)
msgpack (1.8.0)
multi_json (1.17.0)
mutex_m (0.3.0)
mysql2 (0.5.7)
bigdecimal
nap (1.1.0)
Expand All @@ -217,7 +225,7 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.5.9)
nokogiri (1.15.2-aarch64-linux)
nokogiri (1.18.10-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.10-arm64-darwin)
racc (~> 1.4)
Expand All @@ -230,6 +238,7 @@ GEM
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
ostruct (0.6.3)
parallel (1.27.0)
parser (3.3.9.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -350,6 +359,7 @@ GEM
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
set (1.1.2)
shoulda-matchers (6.5.0)
activesupport (>= 5.2.0)
simplecov (0.22.0)
Expand All @@ -358,7 +368,10 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
singleton (0.3.0)
spring (4.4.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
stringio (3.1.7)
sync (0.5.0)
term-ansicolor (1.11.3)
Expand Down Expand Up @@ -392,40 +405,58 @@ PLATFORMS
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
arm64-darwin-25
x64-mingw-ucrt
x86_64-linux

DEPENDENCIES
active_model_serializers (~> 0.10.0)
bcrypt (~> 3.1.7)
bigdecimal
bootsnap (>= 1.18.4)
coveralls
csv
danger
database_cleaner-active_record
date
debug
delegate
factory_bot_rails
faker
faraday-retry
find_with_order
forwardable
jwt (~> 2.7, >= 2.7.1)
lingua
mysql2 (~> 0.5.5)
logger
mini_portile2 (~> 2.8)
monitor
mutex_m
mysql2 (~> 0.5.7)
observer
puma (~> 6.0)
ostruct
psych (~> 5.2)
puma (~> 6.4)
rack-cors
rails (~> 8.0, >= 8.0.1)
rspec-rails
rswag-api
rswag-specs
rswag-ui
rubocop
set
shoulda-matchers
simplecov
simplecov_json_formatter
singleton
spring
sqlite3 (~> 1.4)
timeout
tzinfo-data
uri

RUBY VERSION
ruby 3.2.7p253
ruby 3.4.5p51

BUNDLED WITH
2.4.14
Loading
Loading