steppy 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/steppy.rb +6 -4
- 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: e7e6892375006e22092d3a4a3ab249d326bf46084f9d437fb18b8c271e8ecbe4
|
4
|
+
data.tar.gz: 10929d2c331facf37247f56a2f21b54eddfd400ce79297b3e67c6e0a2d4a4e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce420c04b8d064706448a26cd2779eea3619e8d33a749f997ffb0eea74a1561bd2deea7a6f3e61efaab7134fb9cc8dc6ad3e9b7daf10184f71aa2c1fd7ce998f
|
7
|
+
data.tar.gz: 59a2b2dc36b696d4cb52be3fb6124ed7d488887b33f3a67a48a46c53de53ee11c2ca0bb0f24f759a6f482faae561ae12b5a362c388d351bd40a7bb9cee3e5e2d
|
data/Gemfile.lock
CHANGED
data/lib/steppy.rb
CHANGED
@@ -14,6 +14,7 @@ module Steppy
|
|
14
14
|
module ClassMethods
|
15
15
|
if !defined? step
|
16
16
|
def step(method, **args, &block)
|
17
|
+
args[:prefix] ||= :step
|
17
18
|
steppy_add step_method: method, step_args: args, step_block: block
|
18
19
|
end
|
19
20
|
end
|
@@ -96,9 +97,11 @@ module Steppy
|
|
96
97
|
end
|
97
98
|
|
98
99
|
def steppy_step(step_method:, step_args:, step_block:)
|
99
|
-
|
100
|
+
if steppy_if(step_args[:if]) || @steppy_prefix != step_args[:prefix]
|
101
|
+
return
|
102
|
+
end
|
100
103
|
|
101
|
-
|
104
|
+
method_name = "#{@steppy_prefix}_#{step_method}"
|
102
105
|
|
103
106
|
result = if step_block
|
104
107
|
steppy_run_block(step_block, steppy_attributes)
|
@@ -120,8 +123,7 @@ module Steppy
|
|
120
123
|
def steppy_run_block(step_block, steppy_attributes)
|
121
124
|
if step_block.arity > 0
|
122
125
|
instance_exec(steppy_attributes, &step_block)
|
123
|
-
else
|
124
|
-
instance_exec(&step_block)
|
126
|
+
else instance_exec(&step_block)
|
125
127
|
end
|
126
128
|
end
|
127
129
|
|
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.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|