Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Use latest gherkin for faster installs #447

Merged
merged 1 commit into from
Apr 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Gemfile.lock
.rvmrc
/.bundle/
/tags
binstubs/
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ gem 'foodcritic', :path => '.'

group :test do
gem 'aruba', '~> 0.5'
gem 'cucumber', '~> 1.3'
gem 'cucumber', '>= 2'
gem 'minitest', '~> 5.3'
gem 'simplecov', '~> 0.8'
end
Expand Down
1 change: 0 additions & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
require 'aruba/cucumber'
require 'foodcritic'

require 'minitest/autorun'
require 'minitest/spec'

MiniTest::Spec.new(nil)
Expand Down
2 changes: 1 addition & 1 deletion foodcritic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.executables << 'foodcritic'
s.required_ruby_version = ">= 2.0.0"
s.add_dependency('gherkin', '~> 2.11')
s.add_dependency('cucumber-core', '>= 1.3')
s.add_dependency('nokogiri', '>= 1.5', '< 2.0')
s.add_dependency('rake')
s.add_dependency('treetop', '~> 1.4')
Expand Down
2 changes: 1 addition & 1 deletion lib/foodcritic.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'pathname'
require 'gherkin'
require 'cucumber/core'
require 'treetop'
require 'ripper'
require 'yajl'
Expand Down
8 changes: 4 additions & 4 deletions lib/foodcritic/domain.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'gherkin/tag_expression'
require 'cucumber/core/gherkin/tag_expression'

module FoodCritic
# A warning of a possible issue
Expand Down Expand Up @@ -95,9 +95,9 @@ def tags

# Checks the rule tags to see if they match a Gherkin (Cucumber) expression
def matches_tags?(tag_expr)
Gherkin::TagExpression.new(tag_expr).evaluate(tags.map do |t|
Gherkin::Formatter::Model::Tag.new(t, 1)
end)
Cucumber::Core::Gherkin::TagExpression.new(tag_expr).evaluate(
tags.map { |tag| Cucumber::Core::Ast::Tag.new(nil, tag) }
)
end

# Returns a string representation of this rule.
Expand Down
6 changes: 3 additions & 3 deletions spec/foodcritic/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def parse_ast(str)
end

describe "#checks_for_chef_solo?" do
let(:ast) { ast = MiniTest::Mock.new }
let(:ast) { MiniTest::Mock.new }
it "raises if the provided ast does not support XPath" do
lambda{api.checks_for_chef_solo?(nil)}.must_raise(ArgumentError)
end
Expand Down Expand Up @@ -459,7 +459,7 @@ def parse_ast(str)
end

describe "#literal_searches" do
let(:ast) { ast = MiniTest::Mock.new }
let(:ast) { MiniTest::Mock.new }
it "returns empty if the AST does not support XPath expressions" do
api.literal_searches(nil).must_be_empty
end
Expand Down Expand Up @@ -1642,7 +1642,7 @@ def str_to_atts(str)
end

describe "#searches" do
let(:ast) { ast = MiniTest::Mock.new }
let(:ast) { MiniTest::Mock.new }
it "returns empty if the AST does not support XPath expressions" do
api.searches('not-an-ast').must_be_empty
end
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
warn 'warning: simplecov gem not found; skipping coverage'
end

require 'minitest/autorun'
require 'minitest/pride'
require 'minitest/spec'

Expand Down