house_style 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60dd79ae28c2a1699e7484038e09b801a34f6a61d7657ab7ba64a7cbf70db40d
4
- data.tar.gz: 78084875ed16986c3b8291e356498ec97607454d3364b0532e744d81074af377
3
+ metadata.gz: a1e510d7e4cbc21fa180982b5ee1cd6cbe8e5e2711afba99fb84cf8418cadbcd
4
+ data.tar.gz: eaefe1b0334a00a9740769b3f8ec9b7243e03ed79ea42a491f956bb4161850c7
5
5
  SHA512:
6
- metadata.gz: b3eeb1147984ef9a73d8ec6510dd6df3300e61abc487e66d88ec84c3cc27b00ee00c8bb9756e0283b2ebba06f85ab8fe95980ddae2b9f4fc0cfcf2d916217032
7
- data.tar.gz: 7edfe2d0ebff0553ff58c1c582196e5ef17c80e32dbc9f7805f2fa43fa85d3e9efc6bab11675707218d5a4a4ff0d0b7f64e9c396a6fd95e5feab18de42755214
6
+ metadata.gz: 93e2a39e1731896b2c444188bea2d1fe3086ae115bee2f36c78f31dc74b2ffed803aa5e0064ce67d0ef60099ba89c59e39322a1a931e5f47c297577ee01c4571
7
+ data.tar.gz: f808a69b2945921167811d188069c4861391670a0f173a7607f5079591bec6bf07789fcff74972d97ab5f859d678b803b2d1992db67202a7926f0a6b3688db36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## CURRENT
4
+
5
+ ## 2.2.0
6
+ ### Bug fixes
7
+ - Install db_migrate.yml only if `db/migrate/` folder exists rather than just `db/` folder.
8
+ ### Changes
9
+ - Rails: Move the AllCops to the Ruby one instead of repeating the same block. Disable Rails/SquishedSQLHeredocs and Rails/SkipsModelValidations.
10
+ - RSpec: Disable Spec/ContextWording, RSpec/NestedGroups, RSpec/DescribeClass and Style/BlockDelimiters.
11
+ ### New features
12
+ - Add new configuration for feature tests inside `features/` folder.
13
+
3
14
  ## 2.1.0
4
15
  - Enable NewCops by default
5
16
  - Support Rubocop up to 1.22.x and latest extensions
data/house_style.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'house_style'
6
- spec.version = '2.1.0'
6
+ spec.version = '2.2.0'
7
7
  spec.authors = ['Altmetric', 'Scott Matthewman']
8
8
  spec.email = ['engineering@altmetric.com', 'scott.matthewman@gmail.com']
9
9
 
@@ -12,17 +12,25 @@ module HouseStyle
12
12
  end
13
13
 
14
14
  def create_rspec_rubocop_yml
15
- template 'rspec-rubocop.yml', 'spec/.rubocop.yml'
15
+ template 'rspec_rubocop.yml', 'spec/.rubocop.yml'
16
16
  end
17
17
 
18
18
  def create_db_migrate_rubocop_yml
19
19
  template 'db_migrate_rubocop.yml', 'db/migrate/.rubocop.yml' if Dir.exist?(db_path)
20
20
  end
21
21
 
22
+ def create_features_rubocop_yml
23
+ template 'features_rubocop.yml', 'features/.rubocop.yml' if Dir.exist?(features_path)
24
+ end
25
+
22
26
  private
23
27
 
24
28
  def db_path
25
- File.join(Rails.root, 'db')
29
+ File.join(Rails.root, 'db', 'migrate')
30
+ end
31
+
32
+ def features_path
33
+ File.join(Rails.root, 'features')
26
34
  end
27
35
  end
28
36
  end
@@ -0,0 +1,3 @@
1
+ inherit_from: ../.rubocop.yml
2
+ inherit_gem:
3
+ house_style: features/rubocop.yml
data/rails/rubocop.yml CHANGED
@@ -3,13 +3,6 @@ inherit_from:
3
3
  - ./default_rules.yml
4
4
  - ./style.yml
5
5
 
6
- AllCops:
7
- Exclude:
8
- - bin/**/*
9
- - vendor/**/*
10
- - db/*schema.rb
11
- - lib/tasks/cucumber.rake
12
- - Guardfile
13
6
  Rails:
14
7
  Enabled: true
15
8
  Rails/InverseOf:
@@ -21,5 +14,9 @@ Rails/EnvironmentVariableAccess:
21
14
  AllowReads: true
22
15
  Rails/ShortI18n:
23
16
  Enabled: false
17
+ Rails/SquishedSQLHeredocs:
18
+ Enabled: false
19
+ Rails/SkipsModelValidations:
20
+ Enabled: false
24
21
 
25
22
  require: rubocop-rails
data/rails/style.yml CHANGED
@@ -22,10 +22,8 @@ Style/StringLiterals:
22
22
  - config/environments/test.rb
23
23
  - config/initializers/**
24
24
  - config/puma.rb
25
- - config.ru
26
25
  - Rakefile
27
26
 
28
27
  Style/SymbolArray:
29
28
  Exclude:
30
29
  - config/initializers/filter_parameter_logging.rb
31
-
data/rspec/rubocop.yml CHANGED
@@ -14,8 +14,7 @@ Metrics/BlockLength:
14
14
  Metrics/ModuleLength:
15
15
  Enabled: false
16
16
  RSpec/ContextWording:
17
- Exclude:
18
- - spec/support/shared_contexts/rake.rb
17
+ Enabled: false
19
18
  RSpec/ExampleLength:
20
19
  Enabled: false
21
20
  RSpec/MultipleExpectations:
@@ -24,9 +23,12 @@ RSpec/MultipleMemoizedHelpers:
24
23
  Max: 10
25
24
  RSpec/NotToNot:
26
25
  EnforcedStyle: to_not
26
+ RSpec/NestedGroups:
27
+ Enabled: false
28
+ RSpec/DescribeClass:
29
+ Enabled: false
27
30
  Style/BlockDelimiters:
28
- Exclude:
29
- - spec/factories/**/*.rb
31
+ Enabled: false
30
32
  Style/Documentation:
31
33
  Enabled: false
32
34
  Style/SymbolProc:
@@ -6,9 +6,14 @@ AllCops:
6
6
  NewCops: enable
7
7
 
8
8
  Exclude:
9
- - 'bin/**/*'
10
- - 'vendor/**/*'
11
- - 'Guardfile'
9
+ - bin/**/*
10
+ - vendor/**/*
11
+ - Guardfile
12
+ - lib/tasks/cucumber.rake
13
+ - node_modules/**/*
14
+ - tmp/**/*
15
+ - db/*schema.rb
16
+ - config.ru
12
17
 
13
18
  Gemspec/RequiredRubyVersion:
14
19
  Enabled: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: house_style
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Altmetric
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-08 00:00:00.000000000 Z
12
+ date: 2022-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -140,7 +140,8 @@ files:
140
140
  - house_style.gemspec
141
141
  - lib/generators/house_style/install_generator.rb
142
142
  - lib/generators/house_style/templates/db_migrate_rubocop.yml
143
- - lib/generators/house_style/templates/rspec-rubocop.yml
143
+ - lib/generators/house_style/templates/features_rubocop.yml
144
+ - lib/generators/house_style/templates/rspec_rubocop.yml
144
145
  - lib/generators/house_style/templates/rubocop.yml
145
146
  - performance/default_rules.yml
146
147
  - performance/rubocop.yml
@@ -174,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
175
  - !ruby/object:Gem::Version
175
176
  version: '0'
176
177
  requirements: []
177
- rubygems_version: 3.2.22
178
+ rubygems_version: 3.2.33
178
179
  signing_key:
179
180
  specification_version: 4
180
181
  summary: A centralised store of house style rules