Skip to content

Commit f35ded6

Browse files
committed
Cleanup
1 parent b89dfc3 commit f35ded6

47 files changed

Lines changed: 756 additions & 220 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

8 KB
Binary file not shown.

.rubocop.yml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require:
66
AllCops:
77
NewCops: enable
88
EnabledByDefault: true
9-
TargetRubyVersion: 2.7.2
9+
TargetRubyVersion: 3.0.0
1010
Exclude:
1111
- 'db/schema.rb'
1212
- vendor/bundle/**/*
@@ -18,10 +18,67 @@ Style/Copyright:
1818
Enabled: false
1919

2020
Style/MissingElse:
21-
Exclude:
22-
- './config/models.rb'
23-
- './config/environment_variables.rb'
21+
Enabled: false
2422

2523
Style/MethodCallWithArgsParentheses:
2624
Exclude:
2725
- 'spec/**/*'
26+
27+
Style/StringHashKeys:
28+
Exclude:
29+
- app.rb
30+
- spec/**/*
31+
32+
RSpec/NestedGroups:
33+
Max: 5
34+
35+
Layout/LineLength:
36+
Max: 125
37+
IgnoredPatterns: ['(\A|\s)#']
38+
39+
Layout/SpaceBeforeBrackets:
40+
Exclude:
41+
- 'db/migrate/*'
42+
43+
Metrics/BlockLength:
44+
Max: 40
45+
Exclude:
46+
- 'spec/**/*'
47+
- 'app.rb'
48+
49+
Lint/ToJSON:
50+
Exclude:
51+
- app/serializers/**/*
52+
53+
RSpec/ExpectInHook:
54+
Enabled: false
55+
56+
RSpec/MessageExpectation:
57+
Enabled: false
58+
59+
RSpec/StubbedMock:
60+
Enabled: false
61+
62+
RSpec/MessageSpies:
63+
Enabled: false
64+
65+
RSpec/MultipleMemoizedHelpers:
66+
Max: 10
67+
68+
Style/AsciiComments:
69+
Enabled: false
70+
71+
Metrics/AbcSize:
72+
Max: 30
73+
74+
Metrics/MethodLength:
75+
Max: 15
76+
77+
Naming/VariableNumber:
78+
Enabled: false
79+
80+
Metrics/CyclomaticComplexity:
81+
Max: 10
82+
83+
Metrics/PerceivedComplexity:
84+
Max: 10

Gemfile

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,62 @@
22

33
source 'https://rubygems.org'
44

5+
ruby '3.0.0'
6+
57
# Routing Tree Web Toolkit.
68
gem 'roda', '>= 3.38'
79

10+
# Use Puma as the app server.
11+
gem 'puma', '~> 5.2'
12+
13+
# A make-like build utility for Ruby.
14+
gem 'rake'
15+
816
# Sequel: The Database Toolkit for Ruby.
917
gem 'sequel', '>= 5.38'
1018

1119
# Faster SELECTs when using Sequel with pg.
1220
gem 'sequel_pg', '>= 1.14'
1321

14-
# Rack Application that reloads application files if changed, unloading constants first.
15-
gem 'rack-unreloader'
16-
1722
# A runtime developer console and IRB alternative with powerful introspection capabilities.
1823
gem 'pry'
1924

2025
# Ruby internationalization and localization (i18n) solution.
2126
gem 'i18n'
2227

23-
# Coercion and validation for data structures.
24-
gem 'dry-schema'
25-
2628
# YARD is a Ruby Documentation tool. The Y stands for "Yay!"
2729
gem 'yard'
2830

31+
# A fast JSON parser and Object marshaller as a Ruby gem.
32+
gem 'oj'
33+
34+
# A toolkit of support libraries and Ruby core extensions extracted from the Rails framework.
35+
gem 'activesupport', '>= 6.0.3.4'
36+
37+
# bcrypt-ruby is a Ruby binding for the OpenBSD bcrypt() password hashing algorithm, allowing you to easily store a secure hash of your users' passwords.
38+
gem 'bcrypt'
39+
40+
# Validation library with type-safe schemas and rules.
41+
gem 'dry-validation'
42+
43+
# A powerful logger for Roda with a few tricks up it's sleeve.
44+
gem 'roda-enhanced_logger'
45+
46+
# A library for generating fake data such as names, addresses, and phone numbers.
47+
gem 'faker'
48+
49+
# Organize your code into reusable components.
50+
gem 'dry-system'
51+
52+
group :development do
53+
# Preview mail in the browser instead of sending.
54+
gem 'letter_opener'
55+
end
56+
2957
group :development, :test do
58+
# A library for setting up Ruby objects as test data.
59+
gem 'factory_bot'
60+
3061
# A Ruby gem to load environment variables from `.env`.
3162
gem 'dotenv'
3263

@@ -47,4 +78,7 @@ group :development, :test do
4778

4879
# Rack::Test is a layer on top of Rack's MockRequest similar to Merb's RequestHelper.
4980
gem 'rack-test'
81+
82+
# A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
83+
gem 'timecop'
5084
end

Gemfile.lock

Lines changed: 101 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,36 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4+
activesupport (6.1.1)
5+
concurrent-ruby (~> 1.0, >= 1.0.2)
6+
i18n (>= 1.6, < 2)
7+
minitest (>= 5.1)
8+
tzinfo (~> 2.0)
9+
zeitwerk (~> 2.3)
10+
addressable (2.7.0)
11+
public_suffix (>= 2.0.2, < 5.0)
412
ast (2.4.1)
13+
bcrypt (3.1.16)
514
coderay (1.1.3)
615
concurrent-ruby (1.1.7)
716
diff-lcs (1.4.4)
817
dotenv (2.7.6)
9-
dry-configurable (0.11.6)
18+
dry-auto_inject (0.7.0)
19+
dry-container (>= 0.3.4)
20+
dry-configurable (0.12.0)
1021
concurrent-ruby (~> 1.0)
11-
dry-core (~> 0.4, >= 0.4.7)
12-
dry-equalizer (~> 0.2)
22+
dry-core (~> 0.5, >= 0.5.0)
1323
dry-container (0.7.2)
1424
concurrent-ruby (~> 1.0)
1525
dry-configurable (~> 0.1, >= 0.1.3)
16-
dry-core (0.4.10)
26+
dry-core (0.5.0)
1727
concurrent-ruby (~> 1.0)
1828
dry-equalizer (0.3.0)
1929
dry-inflector (0.2.0)
2030
dry-initializer (3.0.4)
21-
dry-logic (1.0.8)
31+
dry-logic (1.1.0)
2232
concurrent-ruby (~> 1.0)
23-
dry-core (~> 0.2)
24-
dry-equalizer (~> 0.2)
33+
dry-core (~> 0.5, >= 0.5)
2534
dry-schema (1.5.6)
2635
concurrent-ruby (~> 1.0)
2736
dry-configurable (~> 0.8, >= 0.8.3)
@@ -30,91 +39,154 @@ GEM
3039
dry-initializer (~> 3.0)
3140
dry-logic (~> 1.0)
3241
dry-types (~> 1.4)
42+
dry-struct (1.3.0)
43+
dry-core (~> 0.4, >= 0.4.4)
44+
dry-equalizer (~> 0.3)
45+
dry-types (~> 1.3)
46+
ice_nine (~> 0.11)
47+
dry-system (0.18.1)
48+
concurrent-ruby (~> 1.0)
49+
dry-auto_inject (>= 0.4.0)
50+
dry-configurable (~> 0.11, >= 0.11.1)
51+
dry-container (~> 0.7, >= 0.7.2)
52+
dry-core (~> 0.3, >= 0.3.1)
53+
dry-equalizer (~> 0.2)
54+
dry-inflector (~> 0.1, >= 0.1.2)
55+
dry-struct (~> 1.0)
3356
dry-types (1.4.0)
3457
concurrent-ruby (~> 1.0)
3558
dry-container (~> 0.3)
3659
dry-core (~> 0.4, >= 0.4.4)
3760
dry-equalizer (~> 0.3)
3861
dry-inflector (~> 0.1, >= 0.1.2)
3962
dry-logic (~> 1.0, >= 1.0.2)
40-
i18n (1.8.5)
63+
dry-validation (1.6.0)
4164
concurrent-ruby (~> 1.0)
65+
dry-container (~> 0.7, >= 0.7.1)
66+
dry-core (~> 0.4)
67+
dry-equalizer (~> 0.2)
68+
dry-initializer (~> 3.0)
69+
dry-schema (~> 1.5, >= 1.5.2)
70+
factory_bot (6.1.0)
71+
activesupport (>= 5.0.0)
72+
faker (2.15.1)
73+
i18n (>= 1.6, < 2)
74+
i18n (1.8.7)
75+
concurrent-ruby (~> 1.0)
76+
ice_nine (0.11.2)
77+
launchy (2.5.0)
78+
addressable (~> 2.7)
79+
letter_opener (1.7.0)
80+
launchy (~> 2.2)
4281
method_source (1.0.0)
82+
minitest (5.14.3)
83+
nio4r (2.5.4)
84+
oj (3.11.2)
4385
parallel (1.20.1)
44-
parser (2.7.2.0)
86+
parser (3.0.0.0)
4587
ast (~> 2.4.1)
88+
pastel (0.8.0)
89+
tty-color (~> 0.5)
4690
pg (1.2.3)
4791
pry (0.13.1)
4892
coderay (~> 1.1)
4993
method_source (~> 1.0)
94+
public_suffix (4.0.6)
95+
puma (5.2.0)
96+
nio4r (~> 2.0)
5097
rack (2.2.3)
5198
rack-test (1.1.0)
5299
rack (>= 1.0, < 3)
53-
rack-unreloader (1.7.0)
54100
rainbow (3.0.0)
55-
regexp_parser (2.0.0)
101+
rake (13.0.3)
102+
regexp_parser (2.0.3)
56103
rexml (3.2.4)
57-
roda (3.38.0)
104+
roda (3.40.0)
58105
rack
106+
roda-enhanced_logger (0.3.0)
107+
roda (>= 3.19.0)
108+
tty-logger (>= 0.3, < 1.0)
59109
rspec (3.10.0)
60110
rspec-core (~> 3.10.0)
61111
rspec-expectations (~> 3.10.0)
62112
rspec-mocks (~> 3.10.0)
63-
rspec-core (3.10.0)
113+
rspec-core (3.10.1)
64114
rspec-support (~> 3.10.0)
65-
rspec-expectations (3.10.0)
115+
rspec-expectations (3.10.1)
66116
diff-lcs (>= 1.2.0, < 2.0)
67117
rspec-support (~> 3.10.0)
68-
rspec-mocks (3.10.0)
118+
rspec-mocks (3.10.1)
69119
diff-lcs (>= 1.2.0, < 2.0)
70120
rspec-support (~> 3.10.0)
71-
rspec-support (3.10.0)
72-
rubocop (1.5.2)
121+
rspec-support (3.10.1)
122+
rubocop (1.8.1)
73123
parallel (~> 1.10)
74-
parser (>= 2.7.1.5)
124+
parser (>= 3.0.0.0)
75125
rainbow (>= 2.2.2, < 4.0)
76126
regexp_parser (>= 1.8, < 3.0)
77127
rexml
78128
rubocop-ast (>= 1.2.0, < 2.0)
79129
ruby-progressbar (~> 1.7)
80-
unicode-display_width (>= 1.4.0, < 2.0)
81-
rubocop-ast (1.3.0)
130+
unicode-display_width (>= 1.4.0, < 3.0)
131+
rubocop-ast (1.4.0)
82132
parser (>= 2.7.1.5)
83-
rubocop-performance (1.9.1)
133+
rubocop-performance (1.9.2)
84134
rubocop (>= 0.90.0, < 2.0)
85135
rubocop-ast (>= 0.4.0)
86-
rubocop-rspec (2.0.1)
136+
rubocop-rspec (2.1.0)
87137
rubocop (~> 1.0)
88138
rubocop-ast (>= 1.1.0)
89139
rubocop-thread_safety (0.4.2)
90140
rubocop (>= 0.53.0)
91-
ruby-progressbar (1.10.1)
92-
sequel (5.39.0)
141+
ruby-progressbar (1.11.0)
142+
sequel (5.40.0)
93143
sequel_pg (1.14.0)
94144
pg (>= 0.18.0, != 1.2.0)
95145
sequel (>= 4.38.0)
96-
unicode-display_width (1.7.0)
97-
yard (0.9.25)
146+
timecop (0.9.2)
147+
tty-color (0.6.0)
148+
tty-logger (0.6.0)
149+
pastel (~> 0.8)
150+
tzinfo (2.0.4)
151+
concurrent-ruby (~> 1.0)
152+
unicode-display_width (2.0.0)
153+
yard (0.9.26)
154+
zeitwerk (2.4.2)
98155

99156
PLATFORMS
100157
ruby
158+
x86_64-darwin-20
159+
x86_64-linux
101160

102161
DEPENDENCIES
162+
activesupport (>= 6.0.3.4)
163+
bcrypt
103164
dotenv
104-
dry-schema
165+
dry-system
166+
dry-validation
167+
factory_bot
168+
faker
105169
i18n
170+
letter_opener
171+
oj
106172
pry
173+
puma (~> 5.2)
107174
rack-test
108-
rack-unreloader
175+
rake
109176
roda (>= 3.38)
177+
roda-enhanced_logger
110178
rspec
111179
rubocop
112180
rubocop-performance
113181
rubocop-rspec
114182
rubocop-thread_safety
115183
sequel (>= 5.38)
116184
sequel_pg (>= 1.14)
185+
timecop
117186
yard
118187

188+
RUBY VERSION
189+
ruby 3.0.0p0
190+
119191
BUNDLED WITH
120-
2.1.4
192+
2.2.3

Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: bundle exec puma -C config/puma.rb
2+
release: rake db:migrate

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This boilerplate includes the things I need most when starting a new project.
1010
- RSpec setup
1111
- I18n setup
1212
- Continuous integration with Github Actions
13-
- Params validation with `dry-schema`
13+
- Params validation with `dry-validation`
1414
- Documentation using `yard`.
1515

1616
# Setup Database

0 commit comments

Comments
 (0)