house_style 0.2.2 → 1.0.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
  SHA1:
3
- metadata.gz: bcabc44f82f66793565b2f2b254107fa249cb939
4
- data.tar.gz: 50a45ad11f91645d955a69c758c8fe5970bb57d5
3
+ metadata.gz: 95d2d734013eac78dd85fa204f113c669c57c5ea
4
+ data.tar.gz: ac316b7c54461412bece3b4b79bce33fcce5bb2f
5
5
  SHA512:
6
- metadata.gz: f87abc7fc4429838399898ff1c8fab7ab7acd87b724e0dcd3f4f50fdb5781cff39be63c56b6655fffae0f7fd8cf93e3a3befd396a057d41c0c9eef871ace271d
7
- data.tar.gz: 187bb131325771a26a916d7ea65c2fce1fecbb79791b708c519f513bb5092117dbccfafd3b9efd47e925fe0b5ffa5d5360af07788c5183744855ba78170f5f36
6
+ metadata.gz: c56037fa21bffbe8cb809d957b0d0dbfc4911759eb3541f3566ba203b7da68d776b880836653947d918696bda673aabbd99847604add23da10fb5c5c198470d6
7
+ data.tar.gz: cfbad3cf9fa1595b8f3c19a11cef60cdbcf25b4af7b9ed6916e15fa76c669af0aca0fa60949e2f3c6b29457dad2ee892ab6aa0c612f5b219881c3dc6ef679eb3
data/CHANGELOG.md CHANGED
@@ -1,8 +1,21 @@
1
- # 0.2.1
1
+ # CHANGELOG
2
+
3
+ ## 1.0.0
4
+
5
+ - Increases dependency to Rubocop 0.37.2, which changes how to specify Rails cops and introduces the requirement of a Ruby version in each project's `.rubocop.yml` file. A working value for this value will be inserted when `rails generate house_style:install` is run.
6
+ - Support for turning off cops in the Rails `db/migrate/` folder is improved to a system that should actually work.
7
+ - New cop `Style/FrozenStringLiteralComment` is disabled by default.
8
+ - New cop `Style/SignalException` is supported, using the `semantic` default to best match existing practice.
9
+
10
+ ## 0.2.2
11
+
12
+ - [FIX] Revert gemspec file selection, as replacement was not correctly including the essential rubocop `.yml` files.
13
+
14
+ ## 0.2.1
2
15
 
3
16
  - [FIX] Rename generator template files so they are included in gem release.
4
17
 
5
- # 0.2.0
18
+ ## 0.2.0
6
19
 
7
20
  - New defaults for `db/migrate` folders in Rails projects.
8
21
  - Rails projects using `house_style` can now use a Rails generator to install the relevant house style configurations:
@@ -10,10 +23,10 @@
10
23
  - `{Rails.root}/spec/.rubocop.yml` loads tweaked config for RSpec folders, including use of the `rubocop-rspec` plugin
11
24
  - `{Rails.root}/db/migrate/.rubocop.yml` ignores key rules for compatibility with Rails-generated migrations, etc.
12
25
 
13
- # 0.1.1
26
+ ## 0.1.1
14
27
 
15
28
  - New `rspec/rubocop.yml` defaults.
16
29
 
17
- # 0.1.0
30
+ ## 0.1.0
18
31
 
19
32
  - Initial release
data/house_style.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'house_style'
7
- spec.version = '0.2.2'
7
+ spec.version = '1.0.0'
8
8
  spec.authors = ['Scott Matthewman']
9
9
  spec.email = ['scott@altmetric.com']
10
10
 
@@ -16,8 +16,8 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_dependency 'rubocop', '~> 0.35.1'
20
- spec.add_dependency 'rubocop-rspec', '~> 1.3.1'
19
+ spec.add_dependency 'rubocop', '~> 0.37.2'
20
+ spec.add_dependency 'rubocop-rspec', '~> 1.4'
21
21
 
22
22
  spec.add_development_dependency 'bundler', '~> 1.10'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -8,15 +8,22 @@ module HouseStyle
8
8
  end
9
9
 
10
10
  def create_root_rubocop_yml
11
- copy_file 'rubocop.yml', '.rubocop.yml'
11
+ template 'rubocop.yml', '.rubocop.yml', assigns: { ruby_version: ruby_version }
12
12
  end
13
13
 
14
14
  def create_rspec_rubocop_yml
15
- copy_file '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
- copy_file 'db_migrate_rubocop.yml', 'db/migrate/.rubocop.yml'
19
+ template 'db_migrate_rubocop.yml', 'db/migrate/.rubocop.yml'
20
+ end
21
+
22
+ private
23
+
24
+ def ruby_version
25
+ major, minor, _ = RUBY_VERSION.split('.')
26
+ "#{major}.#{minor}"
20
27
  end
21
28
  end
22
29
  end
@@ -1,2 +1,5 @@
1
+ AllCops:
2
+ TargetRubyVersion: <%= ruby_version %>
3
+
1
4
  inherit_gem:
2
5
  house_style: rails/rubocop.yml
data/rails/db_migrate.yml CHANGED
@@ -1,24 +1,16 @@
1
1
  Metrics/ClassLength:
2
- Exclude:
3
- - db/migrate/*.rb
2
+ Enabled: false
4
3
  Metrics/LineLength:
5
- Exclude:
6
- - db/migrate/*.rb
4
+ Enabled: false
7
5
  Metrics/MethodLength:
8
- Exclude:
9
- - db/migrate/*.rb
6
+ Enabled: false
10
7
  Style/BlockDelimiters:
11
- Exclude:
12
- - db/migrate/*.rb
8
+ Enabled: false
13
9
  Style/Documentation:
14
- Exclude:
15
- - db/migrate/*.rb
10
+ Enabled: false
16
11
  Style/EmptyLineBetweenDefs:
17
- Exclude:
18
- - db/migrate/*.rb
12
+ Enabled: false
19
13
  Style/StringLiterals:
20
- Exclude:
21
- - db/migrate/*.rb
14
+ Enabled: false
22
15
  Metrics/AbcSize:
23
- Exclude:
24
- - db/migrate/*.rb
16
+ Enabled: false
data/rails/rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  inherit_from: ../ruby/rubocop.yml
2
2
 
3
- AllCops:
4
- RunRailsCops: true
3
+ Rails:
4
+ Enabled: true
data/rspec/rubocop.yml CHANGED
@@ -6,6 +6,8 @@ Metrics/LineLength:
6
6
  Enabled: false
7
7
  Metrics/ModuleLength:
8
8
  Enabled: false
9
+ RSpec/NotToNot:
10
+ AcceptedMethod: to_not
9
11
  Style/BlockDelimiters:
10
12
  Exclude:
11
13
  - spec/factories/**/*.rb
@@ -2,7 +2,6 @@ AllCops:
2
2
  DisplayCopNames: true
3
3
  DisplayStyleGuide: true
4
4
  ExtraDetails: true
5
- RunRailsCops: false
6
5
  UseCache: true
7
6
 
8
7
  Include:
data/ruby/style.yml CHANGED
@@ -36,6 +36,8 @@ Style/EmptyLineBetweenDefs:
36
36
  AllowAdjacentOneLineDefs: true
37
37
  Style/Encoding:
38
38
  EnforcedStyle: when_needed
39
+ Style/FrozenStringLiteralComment:
40
+ Enabled: false
39
41
  Style/GuardClause:
40
42
  MinBodyLength: 3
41
43
  Style/HashSyntax:
@@ -52,6 +54,8 @@ Style/NonNilCheck:
52
54
  IncludeSemanticChanges: true
53
55
  Style/NumericLiterals:
54
56
  MinDigits: 6
57
+ Style/SignalException:
58
+ EnforcedStyle: semantic
55
59
  Style/StringLiterals:
56
60
  Enabled: false
57
61
  Style/StringMethods:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: house_style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Matthewman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-08 00:00:00.000000000 Z
11
+ date: 2016-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.35.1
19
+ version: 0.37.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.35.1
26
+ version: 0.37.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.1
33
+ version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.1
40
+ version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement