house_style 0.2.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -4
- data/house_style.gemspec +3 -3
- data/lib/generators/house_style/install_generator.rb +10 -3
- data/lib/generators/house_style/templates/rubocop.yml +3 -0
- data/rails/db_migrate.yml +8 -16
- data/rails/rubocop.yml +2 -2
- data/rspec/rubocop.yml +2 -0
- data/ruby/configuration.yml +0 -1
- data/ruby/style.yml +4 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95d2d734013eac78dd85fa204f113c669c57c5ea
|
4
|
+
data.tar.gz: ac316b7c54461412bece3b4b79bce33fcce5bb2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c56037fa21bffbe8cb809d957b0d0dbfc4911759eb3541f3566ba203b7da68d776b880836653947d918696bda673aabbd99847604add23da10fb5c5c198470d6
|
7
|
+
data.tar.gz: cfbad3cf9fa1595b8f3c19a11cef60cdbcf25b4af7b9ed6916e15fa76c669af0aca0fa60949e2f3c6b29457dad2ee892ab6aa0c612f5b219881c3dc6ef679eb3
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,21 @@
|
|
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
|
-
|
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
|
-
|
26
|
+
## 0.1.1
|
14
27
|
|
15
28
|
- New `rspec/rubocop.yml` defaults.
|
16
29
|
|
17
|
-
|
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.
|
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.
|
20
|
-
spec.add_dependency 'rubocop-rspec', '~> 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
|
-
|
11
|
+
template 'rubocop.yml', '.rubocop.yml', assigns: { ruby_version: ruby_version }
|
12
12
|
end
|
13
13
|
|
14
14
|
def create_rspec_rubocop_yml
|
15
|
-
|
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'
|
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
|
data/rails/db_migrate.yml
CHANGED
@@ -1,24 +1,16 @@
|
|
1
1
|
Metrics/ClassLength:
|
2
|
-
|
3
|
-
- db/migrate/*.rb
|
2
|
+
Enabled: false
|
4
3
|
Metrics/LineLength:
|
5
|
-
|
6
|
-
- db/migrate/*.rb
|
4
|
+
Enabled: false
|
7
5
|
Metrics/MethodLength:
|
8
|
-
|
9
|
-
- db/migrate/*.rb
|
6
|
+
Enabled: false
|
10
7
|
Style/BlockDelimiters:
|
11
|
-
|
12
|
-
- db/migrate/*.rb
|
8
|
+
Enabled: false
|
13
9
|
Style/Documentation:
|
14
|
-
|
15
|
-
- db/migrate/*.rb
|
10
|
+
Enabled: false
|
16
11
|
Style/EmptyLineBetweenDefs:
|
17
|
-
|
18
|
-
- db/migrate/*.rb
|
12
|
+
Enabled: false
|
19
13
|
Style/StringLiterals:
|
20
|
-
|
21
|
-
- db/migrate/*.rb
|
14
|
+
Enabled: false
|
22
15
|
Metrics/AbcSize:
|
23
|
-
|
24
|
-
- db/migrate/*.rb
|
16
|
+
Enabled: false
|
data/rails/rubocop.yml
CHANGED
data/rspec/rubocop.yml
CHANGED
data/ruby/configuration.yml
CHANGED
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
40
|
+
version: '1.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|