house_style 1.0.0 → 1.1.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: 95d2d734013eac78dd85fa204f113c669c57c5ea
4
- data.tar.gz: ac316b7c54461412bece3b4b79bce33fcce5bb2f
3
+ metadata.gz: 19abb33473a8588b70fc5840ae216fee7a5e6b21
4
+ data.tar.gz: 6578948af32ea270be3580f4400bad01530896a6
5
5
  SHA512:
6
- metadata.gz: c56037fa21bffbe8cb809d957b0d0dbfc4911759eb3541f3566ba203b7da68d776b880836653947d918696bda673aabbd99847604add23da10fb5c5c198470d6
7
- data.tar.gz: cfbad3cf9fa1595b8f3c19a11cef60cdbcf25b4af7b9ed6916e15fa76c669af0aca0fa60949e2f3c6b29457dad2ee892ab6aa0c612f5b219881c3dc6ef679eb3
6
+ metadata.gz: 4e22d50ce4fc6fff035a3b4b84f2b120dec15666c6c0c9d3852d2db90d686ce3ddaf3bff5f08ee3ffb1ff4bfcf0266fbe9e8e0679b62bc8c5cd426858479acc8
7
+ data.tar.gz: a899492697b23ef304cfeb4bab80250f0f00386617139cff5130ca8db69278adca37a476b1f4d55ce98e930d418689cdee2a672df1f81b4845dfd0ae000303bc
data/.hound.yml ADDED
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.0
4
+
5
+ - Hound-CI uses the default rubocop configuration. It will now comment on pull requests only if code is committed that conflicts with the house style. [#11]
6
+ - The generator will no longer create `db/migrate/.rubocop.yml` if the Rails `db/` is not present. [#10]
7
+ - Updated rubocop to 0.41.2 and rubocop-rspec to 1.5. This has some consequences:
8
+ - a `TargetRubyVersion` is no longer needed, as rubocop defaults to using `.ruby-version` for identifying which version of ruby to parse against. When upgrading, it is safe to remove those lines from the host application's `.rubocop.yml` file.
9
+ - a new `RSpec/ExampleLength` cop is disabled for now. Nice idea, but if it's a choice between long examples and not being able to deploy because of a style issue, we should take the long examples.
10
+
3
11
  ## 1.0.0
4
12
 
5
13
  - 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.
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 = '1.0.0'
7
+ spec.version = '1.1.0'
8
8
  spec.authors = ['Scott Matthewman']
9
9
  spec.email = ['scott@altmetric.com']
10
10
 
@@ -13,11 +13,18 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'https://github.com/altmetric/house_style'
14
14
  spec.license = 'MIT'
15
15
 
16
+ spec.post_install_message = <<-ENDOFMESSAGE
17
+ If you are updating house_style from version 1.0.0 or older, note that you can
18
+ now remove any reference to TargetRubyVersion in your project's .rubocop.yml
19
+ file. You should specify a .ruby-version file for your entire project, and that
20
+ will be taken into account by rubocop also.
21
+ ENDOFMESSAGE
22
+
16
23
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
24
  spec.require_paths = ['lib']
18
25
 
19
- spec.add_dependency 'rubocop', '~> 0.37.2'
20
- spec.add_dependency 'rubocop-rspec', '~> 1.4'
26
+ spec.add_dependency 'rubocop', '~> 0.41.2'
27
+ spec.add_dependency 'rubocop-rspec', '~> 1.5'
21
28
 
22
29
  spec.add_development_dependency 'bundler', '~> 1.10'
23
30
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -8,7 +8,7 @@ module HouseStyle
8
8
  end
9
9
 
10
10
  def create_root_rubocop_yml
11
- template 'rubocop.yml', '.rubocop.yml', assigns: { ruby_version: ruby_version }
11
+ template 'rubocop.yml', '.rubocop.yml'
12
12
  end
13
13
 
14
14
  def create_rspec_rubocop_yml
@@ -16,14 +16,13 @@ module HouseStyle
16
16
  end
17
17
 
18
18
  def create_db_migrate_rubocop_yml
19
- template 'db_migrate_rubocop.yml', 'db/migrate/.rubocop.yml'
19
+ template 'db_migrate_rubocop.yml', 'db/migrate/.rubocop.yml' if Dir.exist?(db_path)
20
20
  end
21
21
 
22
22
  private
23
23
 
24
- def ruby_version
25
- major, minor, _ = RUBY_VERSION.split('.')
26
- "#{major}.#{minor}"
24
+ def db_path
25
+ File.join(Rails.root, 'db')
27
26
  end
28
27
  end
29
28
  end
@@ -1,5 +1,2 @@
1
- AllCops:
2
- TargetRubyVersion: <%= ruby_version %>
3
-
4
1
  inherit_gem:
5
2
  house_style: rails/rubocop.yml
data/rspec/rubocop.yml CHANGED
@@ -6,8 +6,10 @@ Metrics/LineLength:
6
6
  Enabled: false
7
7
  Metrics/ModuleLength:
8
8
  Enabled: false
9
+ RSpec/ExampleLength:
10
+ Enabled: false
9
11
  RSpec/NotToNot:
10
- AcceptedMethod: to_not
12
+ EnforcedStyle: to_not
11
13
  Style/BlockDelimiters:
12
14
  Exclude:
13
15
  - spec/factories/**/*.rb
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: 1.0.0
4
+ version: 1.1.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-02-26 00:00:00.000000000 Z
11
+ date: 2016-07-13 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.37.2
19
+ version: 0.41.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.37.2
26
+ version: 0.41.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.4'
33
+ version: '1.5'
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.4'
40
+ version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -75,6 +75,7 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
+ - ".hound.yml"
78
79
  - ".rubocop.yml"
79
80
  - ".travis.yml"
80
81
  - CHANGELOG.md
@@ -102,7 +103,11 @@ homepage: https://github.com/altmetric/house_style
102
103
  licenses:
103
104
  - MIT
104
105
  metadata: {}
105
- post_install_message:
106
+ post_install_message: |
107
+ If you are updating house_style from version 1.0.0 or older, note that you can
108
+ now remove any reference to TargetRubyVersion in your project's .rubocop.yml
109
+ file. You should specify a .ruby-version file for your entire project, and that
110
+ will be taken into account by rubocop also.
106
111
  rdoc_options: []
107
112
  require_paths:
108
113
  - lib