cranky 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/cranky/factory.rb +6 -4
- data/lib/cranky/job.rb +1 -1
- data/lib/cranky/version.rb +1 -1
- data/spec/cranky_spec.rb +4 -0
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/cranky/factory.rb
CHANGED
@@ -62,10 +62,6 @@ module Cranky
|
|
62
62
|
@n += 1
|
63
63
|
end
|
64
64
|
|
65
|
-
def inherit(what, overrides={})
|
66
|
-
build(what, overrides.merge(options))
|
67
|
-
end
|
68
|
-
|
69
65
|
# Execute the requested factory method, crank out the target object!
|
70
66
|
def crank_it(what, overrides)
|
71
67
|
if what.to_s =~ /(.*)_attrs$/
|
@@ -86,6 +82,12 @@ module Cranky
|
|
86
82
|
current_job.execute
|
87
83
|
end
|
88
84
|
|
85
|
+
def inherit(what, overrides={})
|
86
|
+
overrides = overrides.merge(options)
|
87
|
+
overrides = overrides.merge(:_return_attributes => true) if current_job.return_attributes
|
88
|
+
build(what, overrides)
|
89
|
+
end
|
90
|
+
|
89
91
|
def current_job
|
90
92
|
@pipeline.last
|
91
93
|
end
|
data/lib/cranky/job.rb
CHANGED
data/lib/cranky/version.rb
CHANGED
data/spec/cranky_spec.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Stephen McGinty
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-10-
|
17
|
+
date: 2011-10-22 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -53,7 +53,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
hash: -
|
56
|
+
hash: -570131409
|
57
57
|
segments:
|
58
58
|
- 0
|
59
59
|
version: "0"
|