ree 1.0.36 → 1.0.37
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/ree/rspec_link_dsl.rb +12 -3
- data/lib/ree/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d501b79e7ddc962cae38fd84b12afe374275742acd074dc88596226e857b36b
|
4
|
+
data.tar.gz: 12f3f11d8e463facc2a0843865ab3e83bbd909e817bbe393142f4000b2ac0d24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf7fb8c65cdb57adc82bf645800e80e04d60be0f855d182276199b77afd566fad8d2465b74b01f0c1313165abf080b9b9a7e0ff36739fbb089712993d1829214
|
7
|
+
data.tar.gz: 8d6a0861d463fbd37731ddae4a7d603e93e04c3028d9e8af2717e31959067bb3e0328fd5a3112f61eb001ac186f34428d510101ebd0053fd8b4b3daa2a100323
|
data/Gemfile.lock
CHANGED
data/lib/ree/rspec_link_dsl.rb
CHANGED
@@ -11,19 +11,28 @@ module Ree::RSpecLinkDSL
|
|
11
11
|
|
12
12
|
define_method as do |*args, **kwargs, &proc|
|
13
13
|
if obj.object?
|
14
|
-
obj.
|
14
|
+
if obj.with_caller?
|
15
|
+
obj.klass.new.set_caller(self)
|
16
|
+
else
|
17
|
+
obj.klass.new
|
18
|
+
end
|
15
19
|
else
|
16
|
-
obj.
|
20
|
+
if obj.with_caller?
|
21
|
+
obj.klass.new.set_caller(self).call(*args, **kwargs, &proc)
|
22
|
+
else
|
23
|
+
obj.klass.new.call(*args, **kwargs, &proc)
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
elsif obj_name.is_a?(String)
|
20
28
|
const_list = link_file(from, obj_name, import_proc)
|
29
|
+
|
21
30
|
const_list.each do |const|
|
22
31
|
Object.const_set(const.name, self.const_get(const.name))
|
23
32
|
end
|
24
33
|
else
|
25
34
|
raise Ree::Error.new("Invalid link DSL usage. Args should be Hash or String")
|
26
|
-
end
|
35
|
+
end
|
27
36
|
end
|
28
37
|
|
29
38
|
private
|
data/lib/ree/version.rb
CHANGED