Skip to content

Commit b1516f4

Browse files
committed
Updating project files
1 parent d48dd38 commit b1516f4

24 files changed

+210
-166
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ updates:
33
- package-ecosystem: bundler
44
directory: "/"
55
schedule:
6-
interval: daily
6+
interval: monthly
77
open-pull-requests-limit: 10

.github/workflows/specs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Specs
2+
permissions:
3+
contents: read
24
on:
35
- pull_request
46
jobs:
57
specs:
6-
name: appraisal
8+
name: specs
79
runs-on: ubuntu-latest
810
strategy:
911
fail-fast: false
@@ -15,7 +17,5 @@ jobs:
1517
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0
1618
with:
1719
ruby-version: ${{ matrix.ruby }}
18-
- run: bundle check || bundle install
19-
- run: ./bundle_install_each_appraisal.sh
20-
- name: appraisal
21-
run: bundle exec appraisal rspec
20+
- run: ./specs.sh
21+
- run: ./quality.sh

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.idea
21
*.gem
32
*.rbc
43
/.config
@@ -41,6 +40,7 @@ build-iPhoneSimulator/
4140

4241
## Environment normalization:
4342
/.bundle/
43+
/coverage/
4444
/vendor/bundle
4545
/lib/bundler/man/
4646

@@ -55,5 +55,19 @@ build-iPhoneSimulator/
5555

5656
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
5757
# .rubocop-https?--*
58+
/.idea/.gitignore
59+
/.idea/ferrum-har.iml
60+
/.idea/misc.xml
61+
/.idea/modules.xml
62+
/.idea/vcs.xml
63+
/target/
64+
.idea
65+
.ruby-version
5866
/spec/internal/log/
5967
/.rspec_status
68+
/pkg
69+
_site
70+
.sass-cache
71+
.jekyll-metadata
72+
/log
73+
.rspec_status

.reek.yml

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
22
detectors:
33
Attribute:
4-
enabled: false
5-
exclude: []
4+
enabled: true
65
BooleanParameter:
76
enabled: false
87
exclude: []
98
ClassVariable:
10-
enabled: false # Rubocop already handles this
9+
enabled: true
1110
exclude: []
1211
ControlParameter:
13-
enabled: false
12+
enabled: true
1413
exclude: []
1514
DataClump:
1615
enabled: true
@@ -22,18 +21,17 @@ detectors:
2221
max_calls: 3
2322
allow_calls: []
2423
exclude:
25-
- spec # Specs contain a lot of duplication (better way?)
26-
- expect # Specs contain a lot of duplication (better way?)
27-
- logger # Calling logger often is a good thing
24+
- spec # Specs contain a lot of duplication
25+
- expect # Specs contain a lot of duplication
2826
FeatureEnvy:
2927
enabled: false
3028
IrresponsibleModule:
31-
enabled: false # We don't need Ruby comments for all modules
29+
enabled: false
3230
exclude: []
3331
LongParameterList:
3432
enabled: true
3533
exclude: []
36-
max_params: 4 # 4 is used across our codebase
34+
max_params: 4
3735
overrides:
3836
initialize:
3937
max_params: 5
@@ -54,7 +52,7 @@ detectors:
5452
ignore_iterators:
5553
- tap
5654
NilCheck:
57-
enabled: false # Didn't appear helpful
55+
enabled: false
5856
exclude: []
5957
RepeatedConditional:
6058
enabled: true
@@ -112,35 +110,8 @@ detectors:
112110
enabled: true
113111
public_methods_only: true
114112
exclude:
115-
- Concern # Concerns will frequently appear to have utility functions
116-
- Helper # Lots of helper methods do things like hash manipulation
117-
- "#change"
118-
- "#up"
119-
- "#down"
120-
- "#run"
121-
- "#work_message"
113+
- job_args_from_db_row
122114

123-
directories:
124-
"**/spec/**":
125-
UtilityFunction:
126-
enabled: false
127-
DuplicateMethodCall:
128-
enabled: false
129-
"**/jobs/**":
130-
UtilityFunction:
131-
enabled: false
132-
"**/workers/**":
133-
UtilityFunction:
134-
enabled: false
135-
"**/app/controllers/**":
136-
InstanceVariableAssumption:
137-
enabled: false
138-
"**/app/listeners/**":
139-
UtilityFunction:
140-
enabled: false
141-
DataClump:
142-
enabled: false
143-
"**/db/migrate/**":
144-
# Migrations contain generated class names so this reek makes no sense there
145-
UncommunicativeModuleName:
146-
enabled: false
115+
exclude_paths:
116+
- vendor
117+
- gemfiles

.rubocop-global.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
require:
2+
- rubocop-magic_numbers
3+
4+
plugins:
5+
- rubocop-performance
6+
- rubocop-rails
7+
- rubocop-rake
8+
- rubocop-rspec
9+
- rubocop-thread_safety
10+
11+
AllCops:
12+
DisplayCopNames: true
13+
NewCops: enable
14+
SuggestExtensions: false
15+
Exclude:
16+
- 'gemfiles/**/*' # These are automatically generated by appraisal:
17+
- 'vendor/**/*'
18+
- 'target/**/*'
19+
Gemspec/RequiredRubyVersion:
20+
Enabled: false
21+
Gemspec/DevelopmentDependencies:
22+
Enabled: false
23+
Layout/BlockAlignment:
24+
EnforcedStyleAlignWith: start_of_block
25+
Layout/DotPosition:
26+
EnforcedStyle: leading
27+
Layout/EmptyLinesAroundAttributeAccessor:
28+
Enabled: true
29+
Metrics/AbcSize:
30+
Max: 20
31+
Exclude:
32+
- '**/spec/**/*.rb'
33+
Metrics/BlockLength:
34+
Exclude:
35+
- 'Rakefile'
36+
- '**/*.rake'
37+
- '**/*.gemspec'
38+
- '**/spec/**/*.rb'
39+
Layout/LineLength:
40+
Max: 100
41+
Layout/SpaceAroundMethodCallOperator:
42+
Enabled: true
43+
Lint/DeprecatedOpenSSLConstant:
44+
Enabled: true
45+
Lint/RaiseException:
46+
Enabled: true
47+
Lint/StructNewOverride:
48+
Enabled: true
49+
Metrics/MethodLength:
50+
Max: 30
51+
Rails/Delegate:
52+
Enabled: false # Gems aren't Rails
53+
Rails/Output:
54+
Enabled: false # Gems aren't Rails
55+
RSpec/AnyInstance:
56+
Enabled: false
57+
RSpec/ExampleLength:
58+
Max: 50
59+
RSpec/HookArgument:
60+
Enabled: false
61+
RSpec/MessageSpies:
62+
Enabled: false
63+
RSpec/MultipleExpectations:
64+
Max: 5
65+
RSpec/NoExpectationExample:
66+
Enabled: false
67+
RSpec/StubbedMock:
68+
Enabled: false
69+
Style/AccessModifierDeclarations:
70+
Enabled: true
71+
EnforcedStyle: inline
72+
Style/BlockDelimiters:
73+
Enabled: false
74+
Style/ExponentialNotation:
75+
Enabled: true
76+
Style/HashEachMethods:
77+
Enabled: true
78+
Style/HashTransformKeys:
79+
Enabled: true
80+
Style/HashTransformValues:
81+
Enabled: true
82+
Style/SlicingWithRange:
83+
Enabled: true
84+
Style/NumericLiterals:
85+
Enabled: false
86+
Style/RedundantConstantBase:
87+
Enabled: true
88+
Style/TrailingCommaInArguments:
89+
Enabled: false
90+
Style/TrailingCommaInArrayLiteral:
91+
EnforcedStyleForMultiline: comma
92+
Style/TrailingCommaInHashLiteral:
93+
EnforcedStyleForMultiline: comma
94+
Style/Documentation:
95+
Enabled: false
96+
Style/FrozenStringLiteralComment:
97+
Enabled: false
98+
Style/StringLiterals:
99+
EnforcedStyle: double_quotes

.rubocop-project.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Style/RedundantConstantBase:
2+
Enabled: false # We refer to ::ENV in many places to distinguish it

.rubocop.yml

Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,6 @@
1-
require:
2-
- rubocop-rspec
3-
- rubocop-performance
1+
inherit_from:
2+
- .rubocop-global.yml
3+
- .rubocop-project.yml
44

55
AllCops:
66
TargetRubyVersion: 3.2
7-
DisplayCopNames: true
8-
NewCops: enable
9-
SuggestExtensions: false
10-
Exclude:
11-
- 'vendor/**/*'
12-
- 'gemfiles/**/*' # These are automatically generated by appraisal
13-
Gemspec/RequiredRubyVersion:
14-
Enabled: true
15-
Gemspec/DevelopmentDependencies:
16-
Enabled: false
17-
Layout/BlockAlignment:
18-
EnforcedStyleAlignWith: start_of_block
19-
Layout/DotPosition:
20-
EnforcedStyle: leading
21-
Layout/EmptyLinesAroundAttributeAccessor:
22-
Enabled: true
23-
Metrics/AbcSize:
24-
Max: 20
25-
Exclude:
26-
- '**/spec/**/*.rb'
27-
Metrics/BlockLength:
28-
Exclude:
29-
- 'Rakefile'
30-
- '**/*.rake'
31-
- '**/*.gemspec'
32-
- '**/spec/**/*.rb'
33-
Layout/LineLength:
34-
Max: 100
35-
Layout/SpaceAroundMethodCallOperator:
36-
Enabled: true
37-
Lint/DeprecatedOpenSSLConstant:
38-
Enabled: true
39-
Lint/RaiseException:
40-
Enabled: true
41-
Lint/StructNewOverride:
42-
Enabled: true
43-
Metrics/MethodLength:
44-
Max: 30
45-
RSpec/AnyInstance:
46-
Enabled: false
47-
RSpec/ExampleLength:
48-
Max: 50
49-
RSpec/HookArgument:
50-
Enabled: false
51-
RSpec/MessageSpies:
52-
Enabled: false
53-
RSpec/MultipleExpectations:
54-
Max: 5
55-
RSpec/NoExpectationExample:
56-
Enabled: false
57-
RSpec/StubbedMock:
58-
Enabled: false
59-
Style/AccessModifierDeclarations:
60-
Enabled: true
61-
EnforcedStyle: inline
62-
Style/BlockDelimiters:
63-
Enabled: false
64-
Style/ExponentialNotation:
65-
Enabled: true
66-
Style/HashEachMethods:
67-
Enabled: true
68-
Style/HashTransformKeys:
69-
Enabled: true
70-
Style/HashTransformValues:
71-
Enabled: true
72-
Style/SlicingWithRange:
73-
Enabled: true
74-
Style/NumericLiterals:
75-
Enabled: false
76-
Style/RedundantConstantBase:
77-
Enabled: false # We refer to ::ENV in many places to distinguish it
78-
Style/TrailingCommaInArguments:
79-
Enabled: false
80-
Style/TrailingCommaInArrayLiteral:
81-
EnforcedStyleForMultiline: comma
82-
Style/TrailingCommaInHashLiteral:
83-
EnforcedStyleForMultiline: comma
84-
Style/Documentation:
85-
Enabled: false
86-
Style/FrozenStringLiteralComment:
87-
Enabled: false
88-
Style/StringLiterals:
89-
EnforcedStyle: double_quotes
90-

Appraisals

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if ::Gem::Version.new(RUBY_VERSION) <= ::Gem::Version.new('3.3')
1+
if ::Gem::Version.new(RUBY_VERSION) <= ::Gem::Version.new("3.3")
22
appraise "rails-6" do
33
gem "psych", "~> 4.0"
44
gem "sqlite3", "~> 1.0"

Gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,18 @@ gemspec
77
gem "net-imap", require: false
88
gem "net-pop", require: false
99
gem "net-smtp", require: false
10+
11+
group :development, :test do
12+
gem "fasterer"
13+
gem "pry-byebug"
14+
gem "rake"
15+
gem "reek"
16+
gem "rspec"
17+
gem "rubocop"
18+
gem "rubocop-magic_numbers"
19+
gem "rubocop-performance"
20+
gem "rubocop-rails"
21+
gem "rubocop-rake", "> 0.7.0" # as plugin
22+
gem "rubocop-rspec", "> 3.5.0" # as plugin
23+
gem "rubocop-thread_safety"
24+
end

0 commit comments

Comments
 (0)