foodcritic 6.1.0 → 6.1.1
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 +4 -2
- data/Gemfile +1 -1
- data/features/support/env.rb +0 -1
- data/foodcritic.gemspec +1 -1
- data/lib/foodcritic.rb +1 -1
- data/lib/foodcritic/domain.rb +4 -4
- data/lib/foodcritic/version.rb +1 -1
- data/spec/foodcritic/api_spec.rb +3 -3
- data/spec/spec_helper.rb +0 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92c6cc76262ba7853009c660a393f25c7e0ee336
|
|
4
|
+
data.tar.gz: 4991cf998bdd366b6a25538d21e1b03aa84526c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bae6195a7425033c0ad8339f120a1aa4dba0459b4095686d81e3ca447c515a216ddcd40b1191aa65718e5265db119d84fc74905e4bc224c7b99c44c93237b72
|
|
7
|
+
data.tar.gz: 4c2719ab056e061c0d5f0e7e2a58e949925d940572771d97fc5703d24519aa7ba9c866adf8541901bf39cbba9863a44e8e1aaa8cd8f8ae2de6e6101b06702464
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
##
|
|
2
|
-
|
|
1
|
+
## 6.1.1 (07 April, 2016)
|
|
2
|
+
|
|
3
|
+
- Replace gherkin dev dependency with cucumber-core to avoid slow gherkin installs
|
|
3
4
|
|
|
4
5
|
## 6.1.0 (06 April, 2016)
|
|
5
6
|
|
|
6
7
|
Features:
|
|
7
8
|
- Added Chef 12.8.1 metadata
|
|
8
9
|
- Ship the Rakefile, Gemfile, and gemspec files with the gem for simplified testing
|
|
10
|
+
- Added chef12 tag to FC064 and FC065 since these check for functionality introduced in Chef 12
|
|
9
11
|
|
|
10
12
|
Bugfixes:
|
|
11
13
|
- Fix incorrect instructions for the generation of metadata files
|
data/Gemfile
CHANGED
data/features/support/env.rb
CHANGED
data/foodcritic.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.license = 'MIT'
|
|
12
12
|
s.executables << 'foodcritic'
|
|
13
13
|
s.required_ruby_version = ">= 2.0.0"
|
|
14
|
-
s.add_dependency('
|
|
14
|
+
s.add_dependency('cucumber-core', '>= 1.3')
|
|
15
15
|
s.add_dependency('nokogiri', '>= 1.5', '< 2.0')
|
|
16
16
|
s.add_dependency('rake')
|
|
17
17
|
s.add_dependency('treetop', '~> 1.4')
|
data/lib/foodcritic.rb
CHANGED
data/lib/foodcritic/domain.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require 'gherkin/tag_expression'
|
|
1
|
+
require 'cucumber/core/gherkin/tag_expression'
|
|
2
2
|
|
|
3
3
|
module FoodCritic
|
|
4
4
|
# A warning of a possible issue
|
|
@@ -95,9 +95,9 @@ module FoodCritic
|
|
|
95
95
|
|
|
96
96
|
# Checks the rule tags to see if they match a Gherkin (Cucumber) expression
|
|
97
97
|
def matches_tags?(tag_expr)
|
|
98
|
-
Gherkin::TagExpression.new(tag_expr).evaluate(
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
Cucumber::Core::Gherkin::TagExpression.new(tag_expr).evaluate(
|
|
99
|
+
tags.map { |tag| Cucumber::Core::Ast::Tag.new(nil, tag) }
|
|
100
|
+
)
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
# Returns a string representation of this rule.
|
data/lib/foodcritic/version.rb
CHANGED
data/spec/foodcritic/api_spec.rb
CHANGED
|
@@ -138,7 +138,7 @@ describe FoodCritic::Api do
|
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
describe "#checks_for_chef_solo?" do
|
|
141
|
-
let(:ast) {
|
|
141
|
+
let(:ast) { MiniTest::Mock.new }
|
|
142
142
|
it "raises if the provided ast does not support XPath" do
|
|
143
143
|
lambda{api.checks_for_chef_solo?(nil)}.must_raise(ArgumentError)
|
|
144
144
|
end
|
|
@@ -459,7 +459,7 @@ describe FoodCritic::Api do
|
|
|
459
459
|
end
|
|
460
460
|
|
|
461
461
|
describe "#literal_searches" do
|
|
462
|
-
let(:ast) {
|
|
462
|
+
let(:ast) { MiniTest::Mock.new }
|
|
463
463
|
it "returns empty if the AST does not support XPath expressions" do
|
|
464
464
|
api.literal_searches(nil).must_be_empty
|
|
465
465
|
end
|
|
@@ -1642,7 +1642,7 @@ describe FoodCritic::Api do
|
|
|
1642
1642
|
end
|
|
1643
1643
|
|
|
1644
1644
|
describe "#searches" do
|
|
1645
|
-
let(:ast) {
|
|
1645
|
+
let(:ast) { MiniTest::Mock.new }
|
|
1646
1646
|
it "returns empty if the AST does not support XPath expressions" do
|
|
1647
1647
|
api.searches('not-an-ast').must_be_empty
|
|
1648
1648
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foodcritic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.1.
|
|
4
|
+
version: 6.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Crump
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: cucumber-core
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '1.3'
|
|
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: '
|
|
26
|
+
version: '1.3'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: nokogiri
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -330,5 +330,5 @@ rubyforge_project:
|
|
|
330
330
|
rubygems_version: 2.6.2
|
|
331
331
|
signing_key:
|
|
332
332
|
specification_version: 4
|
|
333
|
-
summary: foodcritic-6.1.
|
|
333
|
+
summary: foodcritic-6.1.1
|
|
334
334
|
test_files: []
|