steppy 0.7.0 → 0.8.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
  SHA256:
3
- metadata.gz: a9fa807ba5d30abc006adf68842988e5fb4fb48a77407fc3b34ba92494a375ba
4
- data.tar.gz: 79da4b077d8c45dcd60486831bd29242446533cb7d7f3a9b32d351ef47683d88
3
+ metadata.gz: 0b128da90504e724d13b80d528e0b2a6ae30ca2e4c66e4cdd73469fd39ada2d7
4
+ data.tar.gz: 0a0a54f5c5998e49b36dc72dfae5187e3a091d2196cb3480cb4b24208127c6c4
5
5
  SHA512:
6
- metadata.gz: d080019e5966955f4278671c4ec3400268048781c4c3b7c2e2b67fea2fbe3e8c953583f0848cb3c7a2f7eb086b8d99c72d6f3042e0c7cadaafb6e55743796db3
7
- data.tar.gz: b3466168ec557ce684a226b1bc516f54736dc2d9f80d062ee599199e943b637dfa2921f20b849a52d2265edc3ee8578f7279b9e5cf8438816d7479a17d655cf8
6
+ metadata.gz: 3fff21268b6b4c85f470ff3bf15560a33431c76b4ef18cc587253d2a011e3d1934d6264ca064724aca96385f38081065b833ce6a2907f44a453aaf70e3c30b30
7
+ data.tar.gz: 243916f06fcd329bd99ce81969a24d2ba38abe2da50c62d1f48f9d918b9862a75c474be08a851fb8f9825af1ea6ca731aa79c5829588aa3d4d41b3a230599ba7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- steppy (0.7.0)
4
+ steppy (0.8.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,6 +21,8 @@ module Steppy
21
21
  args[:condition] = -> { !steppy_run_condition(args.delete(:unless)) }
22
22
  end
23
23
 
24
+ args[:prefix] = :step unless args.key?(:prefix)
25
+
24
26
  if method.is_a?(Proc)
25
27
  block = method
26
28
  method = nil
@@ -45,7 +47,7 @@ module Steppy
45
47
  )
46
48
  self
47
49
  end
48
- alias stepy_return step
50
+ alias step_return step
49
51
 
50
52
  def step_if(condition, &block)
51
53
  steppy_cache[:steps].push(condition: condition, block: block)
@@ -90,7 +92,7 @@ module Steppy
90
92
  def step(method = nil, args = {}, &block) # rubocop:disable Airbnb/OptArgParameters
91
93
  steppy_run_step Steppy.parse_step({ method: method, args: args, block: block })
92
94
  end
93
- alias stepy_return step
95
+ alias step_return step
94
96
 
95
97
  def step_if(condition, &block)
96
98
  steppy_run_condition_block condition, block
@@ -166,7 +168,11 @@ module Steppy
166
168
  end
167
169
 
168
170
  def steppy_run_step(method:, args:, block:)
169
- return unless steppy_run_condition(args[:condition])
171
+ if !steppy_run_condition(args[:condition]) || (
172
+ steppy_cache[:prefix] != args[:prefix]
173
+ )
174
+ return steppy_result
175
+ end
170
176
 
171
177
  result = if block
172
178
  instance_exec(steppy_attributes, &block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Steppy
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steppy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-17 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler