turnip 1.3.1 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f374c37f9f2fcb45274efc7e2cebfb164a2afbca
4
- data.tar.gz: b99dc0745a12e0cf34dd7883ddd162bfbac073cd
3
+ metadata.gz: e13764190ae64991bef56ee17f874dd70b34a43c
4
+ data.tar.gz: 0194234d5c5560fcae6ed4ec1f98c4127e273473
5
5
  SHA512:
6
- metadata.gz: af3a06dd948d386dde7c022297c7f60fcff8a137548bc64edb2a521576b2b7a8fb294d99f81c4ac734116112c3cd4b35692836d782df477bb918bc4cea49c255
7
- data.tar.gz: 024480e1a6fbe196f41f55f76b70bab698219f30d336f374c7b0e2224f14005f1c3d2ce13c6f8eb568bbad2af59440d7b669b23205e9d6899e7d6a0b3d0a2180
6
+ metadata.gz: 17511f911bcba948491f6cb3f8db9b64492c41c85d497f9f4dc442ba52895a86e34b581e01dfec77a55b2104ba34d8b42ada890af8a3a44066e7083daf10495c
7
+ data.tar.gz: 087b15c4ceddaab438898380f5c20f8cec905a253858275c697d3c634dc291c9adb9a8a85b66f1131b9e4859043894e0413bedc6a68eb5c7390ebf1f0fc2c873
@@ -6,22 +6,23 @@ cache: bundler
6
6
  branches:
7
7
  only:
8
8
  - master
9
+ - 2_0_0_rc1
9
10
 
10
11
  matrix:
11
12
  allow_failures:
12
13
  - gemfile: Gemfile
14
+ - gemfile: gemfiles/Gemfile-rspec-3.2.x
13
15
  - rvm: ruby-head
16
+
14
17
  rvm:
15
- - 2.0.0
16
- - 2.1
17
- - 2.2
18
- - ruby-head
19
- - jruby-19mode
18
+ - 2.0.0
19
+ - 2.1
20
+ - 2.2
21
+ - ruby-head
22
+ - jruby-19mode
23
+
20
24
  gemfile:
21
- - Gemfile
22
- - gemfiles/Gemfile-rspec-2.14.x
23
- - gemfiles/Gemfile-rspec-2.99.x
24
- - gemfiles/Gemfile-rspec-3.0.x
25
- - gemfiles/Gemfile-rspec-3.1.x
26
- - gemfiles/Gemfile-rspec-3.2.x
27
- - gemfiles/Gemfile-rspec-3.3.x
25
+ - Gemfile
26
+ - gemfiles/Gemfile-rspec-3.2.x
27
+ - gemfiles/Gemfile-rspec-3.3.x
28
+ - gemfiles/Gemfile-rspec-3.4.x
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in turnip.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -44,10 +44,30 @@ exist), and add the following line:
44
44
  Pull requests are very welcome (and even better than bug reports)!
45
45
  Please create a topic branch for every separate change you make.
46
46
 
47
- ## Compatibility and support
47
+ ## Compatibility and support policy
48
+
49
+ ### 1. Ruby
50
+
51
+ - Support Ruby 2.x
52
+ - Does not support Ruby 1.9.X
53
+ - Does not work on Ruby 1.8.X
54
+
55
+ ### 2. RSpec
56
+
57
+ In accordance with the RSpec support policy https://github.com/jnicklas/turnip/issues/158#issuecomment-119049054
58
+
59
+ - Support RSpec 3.x **the latest or one version before**
60
+ - Does not support **two version before the latest or earlier**
61
+ - Does not work on **RSpec 2 or earlier**
62
+
63
+ Example `If the latest version is 3.4.x`:
64
+
65
+ - Support `3.4.x`
66
+ - Support `3.3.x`
67
+ - Does not support `3.2.x`
68
+ - Does not support `3.1.x`
69
+ - Does not support `2.x.y`
48
70
 
49
- - Does not work on Ruby 1.8.X.
50
- - Does not support Ruby 1.9.X.
51
71
 
52
72
  ## Usage
53
73
 
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in turnip.gemspec
4
4
  gemspec :path => '..'
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in turnip.gemspec
4
4
  gemspec :path => '..'
@@ -1,6 +1,6 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in turnip.gemspec
4
4
  gemspec :path => '..'
5
5
 
6
- gem 'rspec', '~> 2.14.0'
6
+ gem 'rspec', '~> 3.4.0'
@@ -2,8 +2,7 @@ require 'capybara/rspec'
2
2
 
3
3
  RSpec.configure do |config|
4
4
  config.before do
5
- current_example = RSpec.current_example if RSpec.respond_to?(:current_example)
6
- current_example ||= example
5
+ current_example = RSpec.current_example
7
6
 
8
7
  if self.class.include?(Capybara::DSL) and current_example.metadata[:turnip]
9
8
  Capybara.current_driver = Capybara.javascript_driver if current_example.metadata.has_key?(:javascript)
@@ -45,8 +45,7 @@ module Turnip
45
45
  step(step)
46
46
  EOS
47
47
  rescue Turnip::Pending => e
48
- # This is kind of a hack, but it will make RSpec throw way nicer exceptions
49
- example = Turnip::RSpec.fetch_current_example(self)
48
+ example = ::RSpec.current_example
50
49
  example.metadata[:line_number] = step.line
51
50
  example.metadata[:location] = "#{example.metadata[:file_path]}:#{step.line}"
52
51
 
@@ -55,11 +54,7 @@ module Turnip
55
54
  raise
56
55
  end
57
56
 
58
- if ::RSpec::Version::STRING >= '2.99.0'
59
- skip("No such step: '#{e}'")
60
- else
61
- pending("No such step: '#{e}'")
62
- end
57
+ skip("No such step: '#{e}'")
63
58
  rescue StandardError, ::RSpec::Expectations::ExpectationNotMetError => e
64
59
  e.backtrace.push "#{feature_file}:#{step.line}:in `#{step.description}'"
65
60
  raise e
@@ -68,14 +63,6 @@ module Turnip
68
63
  end
69
64
 
70
65
  class << self
71
- def fetch_current_example(context)
72
- if ::RSpec.respond_to?(:current_example)
73
- ::RSpec.current_example
74
- else
75
- context.example
76
- end
77
- end
78
-
79
66
  def run(feature_file)
80
67
  Turnip::Builder.build(feature_file).features.each do |feature|
81
68
  instance_eval <<-EOS, feature_file, feature.line
@@ -1,3 +1,3 @@
1
1
  module Turnip
2
- VERSION = '1.3.1'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_runtime_dependency "rspec", [">=2.14.0", "<4.0"]
21
+ s.add_runtime_dependency "rspec", [">=3.0", "<4.0"]
22
22
  s.add_runtime_dependency "gherkin", ">= 2.5"
23
23
  s.add_development_dependency "rake"
24
24
  s.add_development_dependency "pry"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turnip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.14.0
19
+ version: '3.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '4.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 2.14.0
29
+ version: '3.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '4.0'
@@ -113,12 +113,9 @@ files:
113
113
  - examples/tags.feature
114
114
  - examples/with_backticks.feature
115
115
  - examples/with_comments.feature
116
- - gemfiles/Gemfile-rspec-2.14.x
117
- - gemfiles/Gemfile-rspec-2.99.x
118
- - gemfiles/Gemfile-rspec-3.0.x
119
- - gemfiles/Gemfile-rspec-3.1.x
120
116
  - gemfiles/Gemfile-rspec-3.2.x
121
117
  - gemfiles/Gemfile-rspec-3.3.x
118
+ - gemfiles/Gemfile-rspec-3.4.x
122
119
  - lib/turnip.rb
123
120
  - lib/turnip/builder.rb
124
121
  - lib/turnip/capybara.rb
@@ -1,6 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in turnip.gemspec
4
- gemspec :path => '..'
5
-
6
- gem 'rspec', '~> 2.99.0'
@@ -1,6 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in turnip.gemspec
4
- gemspec :path => '..'
5
-
6
- gem 'rspec', '~> 3.0.0'
@@ -1,6 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in turnip.gemspec
4
- gemspec :path => '..'
5
-
6
- gem 'rspec', '~> 3.1.0'