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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/steppy.rb +9 -3
- data/lib/steppy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b128da90504e724d13b80d528e0b2a6ae30ca2e4c66e4cdd73469fd39ada2d7
|
|
4
|
+
data.tar.gz: 0a0a54f5c5998e49b36dc72dfae5187e3a091d2196cb3480cb4b24208127c6c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3fff21268b6b4c85f470ff3bf15560a33431c76b4ef18cc587253d2a011e3d1934d6264ca064724aca96385f38081065b833ce6a2907f44a453aaf70e3c30b30
|
|
7
|
+
data.tar.gz: 243916f06fcd329bd99ce81969a24d2ba38abe2da50c62d1f48f9d918b9862a75c474be08a851fb8f9825af1ea6ca731aa79c5829588aa3d4d41b3a230599ba7
|
data/Gemfile.lock
CHANGED
data/lib/steppy.rb
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
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)
|
data/lib/steppy/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2018-08-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|