interactify 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/interactify/dsl/each_chain.rb +10 -4
- data/lib/interactify/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: c0ac09f812f0ad0ef3787c8bba0088bcbf24853e77f054a2751778eb581e7ee2
|
4
|
+
data.tar.gz: e4cbff812c74598c1f6a846b25007ed5058e1ab89b0ad51323e49de847579291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c3c740e8130e66acf52ffb1131f75de98eba440aa5183cc0d8b18390196c0b6ed28e61f0d4df17391c0956fe785bcd3f5d45a41fa65b8b567906b29a11c7fe1
|
7
|
+
data.tar.gz: 1ad479044c68b77f757c99a8fafd51658f99cc0d86ce947ff4ce385fbb5f32345e7cf8d0979fba2a5ddf70d2feb2158cf0fdcab3d89334641ccc670f7f93fda3
|
data/CHANGELOG.md
CHANGED
@@ -25,3 +25,6 @@
|
|
25
25
|
- All internal restructuring/refactoring into domains.
|
26
26
|
- Add support for organize `self.if(:condition, then: A, else: B)` syntax
|
27
27
|
- change location of matchers to `require 'interactify/rspec_matchers/matchers'`
|
28
|
+
|
29
|
+
## [0.4.1] - 2023-12-29
|
30
|
+
- Fix bug triggered when nesting each and if
|
@@ -33,7 +33,7 @@ module Interactify
|
|
33
33
|
end # end
|
34
34
|
|
35
35
|
define_singleton_method(:source_location) do # def self.source_location
|
36
|
-
const_source_location this.evaluating_receiver.to_s
|
36
|
+
const_source_location this.evaluating_receiver.to_s # [file, line]
|
37
37
|
end # end
|
38
38
|
|
39
39
|
define_method(:run!) do # def run!
|
@@ -41,9 +41,7 @@ module Interactify
|
|
41
41
|
context[this.singular_resource_name] = resource # context.package = package
|
42
42
|
context[this.singular_resource_index_name] = index # context.package_index = index
|
43
43
|
|
44
|
-
klasses
|
45
|
-
|
46
|
-
klasses.each do |interactor| # [A, B, C].each do |interactor|
|
44
|
+
self.class.klasses.each do |interactor| # [A, B, C].each do |interactor|
|
47
45
|
interactor.call!(context) # interactor.call!(context)
|
48
46
|
end # end
|
49
47
|
end # end
|
@@ -54,6 +52,14 @@ module Interactify
|
|
54
52
|
context # context
|
55
53
|
end # end
|
56
54
|
|
55
|
+
define_singleton_method(:klasses) do # def self.klasses
|
56
|
+
klasses = instance_variable_get(:@klasses) # @klasses ||= Wrapper.wrap_many(self, [A, B, C])
|
57
|
+
return klasses if klasses
|
58
|
+
|
59
|
+
instance_variable_set(:@klasses, Wrapper.wrap_many(self, this.each_loop_klasses))
|
60
|
+
end
|
61
|
+
|
62
|
+
# "<SomeNamespace::EachPackage iterates_over: [A, B, C]>"
|
57
63
|
define_method(:inspect) do
|
58
64
|
"<#{this.namespace}::#{this.iterator_klass_name} iterates_over: #{this.each_loop_klasses.inspect}>"
|
59
65
|
end
|
data/lib/interactify/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interactify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Burns
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|