cucumberator 1.0.2 → 1.0.3

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: 5bada171a0b353be632b8f44826e26036b5df6da
4
- data.tar.gz: d38c51ba4b2cbaa67ffbdf832da70ddd3b8214c4
3
+ metadata.gz: 57af3ebaa5a94a143f2db39f1459ab50ced2b09d
4
+ data.tar.gz: 37d87f67e22b3ad1890aca8825cd2caef713609f
5
5
  SHA512:
6
- metadata.gz: c06b94018e982ab635f0fce37e968f3b37f11559bb2a37296c44e2c0f82e279744ccfdb7f92a70d6178c32794ff75546c0cfd7f56c0294ae82de686ba5a0e93e
7
- data.tar.gz: 150db94cb769bbe710e5e2898d429d0b67d6597bd719c68d97d5a6f9fe689b3afbcc6a4775761d1013efdea92e96d210dca195bbeb6785fa36c420946c796879
6
+ metadata.gz: ac44beffabef03028c7c844da2df70bdb0a28fa18472cfeca0893e18fadb278493593e41d9c2b528bc81ccb4b4a159f654249618b11baa6a1e45a67f8cb06d62
7
+ data.tar.gz: 5d886bf17f22deb85a50a02270a72c24f8517edaae303347f8e07431593f3ffc07609ea1370ee86028a901e05283059b04ea2d92101507058cc02f79cf2bafc6
data/README.md CHANGED
@@ -34,27 +34,37 @@ When you're in cucumberator prompt, the following commands are available:
34
34
 
35
35
  If you use bundler (and you should), add to your Gemfile
36
36
 
37
- gem "cucumberator", require: false
37
+ ```ruby
38
+ gem 'cucumberator', require: false
39
+ ```
38
40
 
39
41
  Otherwise, install with
40
42
 
41
- gem install cucumberator
43
+ ```sh
44
+ gem install cucumberator
45
+ ```
42
46
 
43
47
  Then require it in one of your ruby files under features/support (e.g. env.rb)
44
48
 
45
- require 'cucumberator'
49
+ ```ruby
50
+ require 'cucumberator'
51
+ ```
46
52
 
47
53
  Now use special step in any place:
48
54
 
49
- # ...some steps...
50
- Then I will write new steps
51
- # ...can be the end or other steps...
55
+ ```
56
+ # ...some steps...
57
+ Then I will write new steps
58
+ # ...can be the end or other steps...
59
+ ```
52
60
 
53
61
  or put @cucumberize before **last** scenario you want to fill up, for example
54
62
 
55
- @cucumberize
56
- Scenario: check fancy ajax login
57
- Given a user with login of "likeaboss"
63
+ ```
64
+ @cucumberize
65
+ Scenario: check fancy ajax login
66
+ Given a user with login of "likeaboss"
67
+ ```
58
68
 
59
69
  and then run this feature file, watch your console for prompt to show up. Enjoy writing steps on the go!
60
70
 
@@ -65,7 +75,6 @@ Latest cucumberator version supports:
65
75
  * Cucumber >= 1.3
66
76
  * Ruby >= 1.9
67
77
  * JRuby >= 1.7.4 (1.9 mode)
68
- * Rubinius >= 2.0.0.w38 (1.9 mode)
69
78
 
70
79
  Check for compatibility details on [Travis](https://travis-ci.org/vidmantas/cucumberator)
71
80
 
@@ -73,7 +82,9 @@ Check for compatibility details on [Travis](https://travis-ci.org/vidmantas/cucu
73
82
 
74
83
  Fork the project, run tests with:
75
84
 
76
- bundle exec cucumber features
85
+ ```sh
86
+ bundle exec cucumber features
87
+ ```
77
88
 
78
89
  then code, code, code and provide me a pull request <3
79
90
  ...Or just fill in a [ticket](https://github.com/vidmantas/cucumberator/issues)
@@ -1,7 +1,7 @@
1
- require "readline"
1
+ require 'readline'
2
2
  require 'cucumberator/current_step'
3
3
  require 'cucumberator/input'
4
- #require 'pry'
4
+ # require 'pry'
5
5
 
6
6
  After('@cucumberize') do |scenario|
7
7
  Cucumberator::Input.new(self, scenario)
@@ -2,33 +2,29 @@ require 'cucumberator/step_line'
2
2
 
3
3
  module Cucumberator
4
4
  class CurrentStep
5
- attr_accessor :line
5
+ attr_accessor :line, :offset
6
+ attr_reader :environment
6
7
 
7
8
  def initialize(environment)
8
9
  @environment = environment
9
- @scenario_sexp = steps.to_sexp
10
10
  @offset = 0
11
11
  set_line
12
12
  end
13
13
 
14
- def check_for_scenario_outline!
15
- return unless @environment.respond_to?(:scenario_outline)
16
-
17
- @environment = @environment.scenario_outline
18
- end
19
-
20
- def steps
21
- check_for_scenario_outline!
22
- @environment.instance_variable_get(:@steps)
14
+ def scenario_sexp
15
+ @scenario_sexp ||= environment.to_sexp.select { |identificator, _| identificator == :step_invocation }
23
16
  end
24
17
 
25
18
  def increase
26
- @offset += 1
19
+ self.offset += 1
27
20
  set_line
28
21
  end
29
22
 
23
+ def current_sexp
24
+ scenario_sexp[offset]
25
+ end
26
+
30
27
  def set_line
31
- current_sexp = @scenario_sexp[@offset]
32
28
  self.line = Cucumberator::StepLine.new(current_sexp[1]) if current_sexp
33
29
  end
34
30
  end
@@ -1,3 +1,3 @@
1
1
  module Cucumberator
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumberator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vidmantas Kabošis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-02 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -121,9 +121,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.4.3
124
+ rubygems_version: 2.4.5
125
125
  signing_key:
126
126
  specification_version: 4
127
- summary: cucumberator-1.0.2
128
- test_files: []
129
- has_rdoc:
127
+ summary: cucumberator-1.0.3
128
+ test_files:
129
+ - features/cucumberize.feature
130
+ - features/exit_all.feature
131
+ - features/force_save.feature
132
+ - features/help.feature
133
+ - features/last_step.feature
134
+ - features/next.feature
135
+ - features/save.feature
136
+ - features/scenario_outline.feature
137
+ - features/simple_hook.feature
138
+ - features/steps.feature
139
+ - features/support/env.rb
140
+ - features/undo.feature
141
+ - features/where.feature