cookstyle 1.1.1 → 1.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
  SHA1:
3
- metadata.gz: 2c22a0342a1add4ca1e07bd68802af514190f5c2
4
- data.tar.gz: e699b658a9de604009727f73572cbf6b6cfc51a3
3
+ metadata.gz: 8c56119ca74e509ed6974159f8d803695e5a1386
4
+ data.tar.gz: 01c8f3aef8e2ae28dbe378e8c9113e058afb3bca
5
5
  SHA512:
6
- metadata.gz: dfe866ab130b3d39eaeb60badc944baa79ea0342f97a98e97fdc0c97f2e7cc022698f248d8b52a6a4ea420d9fd6d8da9930e7406543ecb7ec117db2dcb0a5c96
7
- data.tar.gz: 01bd086b44545b563dba557a5b29d60203e4b42563d0fcfdcb800bfec21b81fd6d2316564f97634e935c1aa11696636b1076d9f517290f5c28f7474989768aef
6
+ metadata.gz: 331fcfe4d7e8be43448f841451b05e4745c6d3e91e8fc05e0f11fe5989ad889e30f52b10eb4ea58d0fcb13adb6ff6e6c99ae607adaefd0b76802c7ee7a7b0c5c
7
+ data.tar.gz: e9a0775ab1793a1608f276e4dae1abcafa1cb6870eb40e2689d7128dddf96f0ab168399593c8b01a0b080a9d58ad977d7dd62f0cb14da56d3254179d48a651e0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Cookstyle Changelog
2
2
 
3
+ ## 1.2.0 (2017-01-19)
4
+
5
+ - Change Style/NumericPredicate to use comparisons. We found that cookstyle autocorrecting code from foo == 0 to foo.zero? was breaking a lot of cookbooks. Additionally .zero? is significantly slower than just using foo == 0.
6
+
3
7
  ## 1.1.1 (2016-12-22)
4
8
 
5
9
  - Properly disabled the correct cop to avoid warning on InSpec matchers: Lint/AmbiguousRegexpLiteral
data/config/cookstyle.yml CHANGED
@@ -90,18 +90,19 @@ Style/EachForSimpleLoop:
90
90
  Style/EmptyCaseCondition:
91
91
  Enabled: true
92
92
 
93
- # helpers are easiest to read
93
+ # == 0 is more performant than .zero? and .zero? also introduced several regressions
94
94
  Style/NumericPredicate:
95
95
  Enabled: true
96
+ EnforcedStyle: comparison
96
97
 
97
98
  # this is bad %w(something another_thing one_more)
98
99
  Style/SpaceInsideArrayPercentLiteral:
99
100
  Enabled: true
100
101
 
101
- # disable this until there's an autocorrect
102
+ # disable this until there's an autocorrect (0.47 has one)
102
103
  Bundler/OrderedGems:
103
104
  Enabled: false
104
105
 
105
106
  # There's no reason to have a gem listed twice
106
107
  Bundler/DuplicatedGem:
107
- Enabled: true
108
+ Enabled: true
@@ -1,4 +1,4 @@
1
1
  module Cookstyle
2
- VERSION = "1.1.1".freeze
2
+ VERSION = "1.2.0".freeze
3
3
  RUBOCOP_VERSION = "0.46.0".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-23 00:00:00.000000000 Z
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.6.7
116
+ rubygems_version: 2.5.2
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Rubocop configuration for Chef cookbooks