kappa-maki 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kappa-maki.rb +14 -1
  3. metadata +7 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9c401433affdd403569ede3fd7ed8b479287a38
4
- data.tar.gz: ca73d9232c90b1668ccfa1eb0ab637a5e48b1b1c
3
+ metadata.gz: cbbb506acdf9ff2e5949a64dfffe1c12a81e7de8
4
+ data.tar.gz: 68344585d1017e097b2b058a2ee9b3fedd206a7f
5
5
  SHA512:
6
- metadata.gz: cc27dc25bbbc5eab5d262216818ab7c03d85a1c4a72076206fdb31d300662db3ca3024d945d91526f14e1ff16965dfdc75b9bf95c12d8d3a9f146a3286b25947
7
- data.tar.gz: 3c9ddf63fc26aff9e74f655939abc71a8af21375f2e4a205ab8ebe50c9cfa48803ef68b95e96c2c598063a046b302161c623e928512f79cb11a37c981ea26719
6
+ metadata.gz: 30d20a3a6d1e9f8513714eaafe9687b74e423d35736d19e3a27024ce2325f29f5fba55143a95547b6ac8d32faf10567184fa66f6e2ad7a06369ea150fd7849bb
7
+ data.tar.gz: 622df01534ca0f835c9c8439a869673207aaba9d490915ceed1fd7a189726575a9948b4262f651694866aadb2ce3ac855f8c1e2c20b57a47b1e928c6f7640648
@@ -56,6 +56,7 @@ module Cucumber
56
56
  end
57
57
 
58
58
  module SupportCode_NamespacedSteps
59
+ # Override Cucumber's find_match method.
59
60
  def find_match(test_step)
60
61
  feature_name = test_step.source.first.short_name
61
62
 
@@ -64,7 +65,7 @@ module SupportCode_NamespacedSteps
64
65
 
65
66
  # Instantiate the feature steps class for the duration of the scenario, if not already.
66
67
  # Instance variables will be scoped therein, and only usable for the life of the scenario.
67
- if Cucumber::Features.const_defined?(feature_namespace)
68
+ match = if Cucumber::Features.const_defined?(feature_namespace)
68
69
  feature_class = Cucumber::Features.const_get(feature_namespace)
69
70
  @feature ||= feature_class.new
70
71
 
@@ -77,11 +78,23 @@ module SupportCode_NamespacedSteps
77
78
  else
78
79
  super
79
80
  end
81
+
82
+ @configuration.notify Cucumber::Events::StepMatch.new(test_step, match)
83
+
84
+ # Need to copy Cucumber's dry-run check because the super method may never
85
+ # be called in the case where the step is locally namespaced.
86
+ if @configuration.dry_run?
87
+ return Cucumber::SkippingStepMatch.new
88
+ end
89
+ match
80
90
  end
81
91
  end
82
92
 
83
93
  module Cucumber
84
94
  class Runtime
95
+ # TODO: the find_match method has been moved to out of SupportCode and into
96
+ # Filters::ActivateSteps in Cucumber 2.2.0. It will need to be moved for
97
+ # kappa-maki as well.
85
98
  class SupportCode
86
99
  prepend SupportCode_NamespacedSteps
87
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kappa-maki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allan Tokuda
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
+ - - <
21
+ - !ruby/object:Gem::Version
22
+ version: 2.2.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.0'
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: 2.2.0
27
33
  description: Provide Cucumber users the ability to create locally scoped step definitions
28
34
  and methods such that they are only usable from within one feature. In the style
29
35
  of Spinach.