ree 1.0.40 → 1.0.42
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/core/package_loader.rb +3 -3
- data/lib/ree/object_compiler.rb +7 -18
- data/lib/ree/version.rb +1 -1
- data/lib/ree.rb +0 -1
- metadata +1 -2
- data/lib/ree/dsl/domain_error.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74fdedebcc116bb5764720b16d3baa21c017a6a64a815a9df5c9c249dab901be
|
4
|
+
data.tar.gz: d752901505d14e4964aaaf606773e84f1464a8028f87d1d4d0a7bd6bb3bf3853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f4c932846abc13daff98dca10dc79082f1837b232b09720ad24c9898dfc96ce3f245cafbe597dc42ecebae6e8da419a5977b84de932c644d09b7adf5e3799a4
|
7
|
+
data.tar.gz: 1ad6fc938f287e24822b7d86dabbe6ca361e8d3ba9e0d2f6bb8f72dd1031fc8f056c97feb5946a67d2e54e289c53516220328eb4e8cafbfa244069cfd77f2900
|
data/Gemfile.lock
CHANGED
@@ -35,8 +35,9 @@ class Ree::PackageLoader
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def recursively_load_package(name, loaded_packages)
|
38
|
-
@loaded_packages[name] = true
|
39
38
|
package = @packages_store.get(name)
|
39
|
+
return package if @loaded_packages[name]
|
40
|
+
@loaded_packages[name] = package
|
40
41
|
|
41
42
|
if !package
|
42
43
|
raise Ree::Error.new(
|
@@ -89,7 +90,6 @@ class Ree::PackageLoader
|
|
89
90
|
end
|
90
91
|
|
91
92
|
package.set_schema_loaded
|
92
|
-
|
93
|
-
@loaded_packages[name] = package
|
93
|
+
package
|
94
94
|
end
|
95
95
|
end
|
data/lib/ree/object_compiler.rb
CHANGED
@@ -82,40 +82,29 @@ class Ree::ObjectCompiler
|
|
82
82
|
end
|
83
83
|
|
84
84
|
if object.factory || object.singleton
|
85
|
-
eval_list.push(indent + "def self.new
|
85
|
+
eval_list.push(indent + "def self.new")
|
86
86
|
|
87
87
|
if object.singleton
|
88
88
|
eval_list.push(indent + " SEMAPHORE.synchronize do")
|
89
|
-
eval_list.push(indent + "
|
90
|
-
eval_list.push(indent + " if (obj_links & kwargs.keys).size == 0")
|
91
|
-
eval_list.push(indent + " @__instance ||= begin")
|
89
|
+
eval_list.push(indent + " @__instance ||= begin")
|
92
90
|
|
93
91
|
if object.factory
|
94
|
-
eval_list.push(indent + "
|
92
|
+
eval_list.push(indent + " super.#{object.factory}")
|
95
93
|
else
|
96
|
-
eval_list.push(indent + "
|
97
|
-
end
|
98
|
-
|
99
|
-
eval_list.push(indent + " end")
|
100
|
-
eval_list.push(indent + " else")
|
101
|
-
|
102
|
-
if object.factory
|
103
|
-
eval_list.push(indent + " super(**kwargs).#{object.factory}")
|
104
|
-
else
|
105
|
-
eval_list.push(indent + " super(**kwargs)")
|
94
|
+
eval_list.push(indent + " super")
|
106
95
|
end
|
107
96
|
|
108
97
|
eval_list.push(indent + " end")
|
109
98
|
eval_list.push(indent + " end")
|
110
99
|
else
|
111
|
-
eval_list.push(indent + " super
|
100
|
+
eval_list.push(indent + " super.#{object.factory}")
|
112
101
|
end
|
113
102
|
|
114
103
|
eval_list.push(indent + "end")
|
115
104
|
end
|
116
105
|
|
117
106
|
eval_list.push("\n")
|
118
|
-
eval_list.push(indent + "def initialize
|
107
|
+
eval_list.push(indent + "def initialize")
|
119
108
|
|
120
109
|
indent = inc_indent(indent)
|
121
110
|
|
@@ -126,7 +115,7 @@ class Ree::ObjectCompiler
|
|
126
115
|
|
127
116
|
@packages_facade.load_package_object(pckg.name, obj.name)
|
128
117
|
|
129
|
-
eval_list.push(indent + "@#{_.as} =
|
118
|
+
eval_list.push(indent + "@#{_.as} = #{obj.klass}.new")
|
130
119
|
end
|
131
120
|
|
132
121
|
if object.after_init?
|
data/lib/ree/version.rb
CHANGED
data/lib/ree.rb
CHANGED
@@ -11,7 +11,6 @@ module Ree
|
|
11
11
|
autoload :CLI, 'ree/cli'
|
12
12
|
autoload :Container, 'ree/container'
|
13
13
|
autoload :Contracts, 'ree/contracts'
|
14
|
-
autoload :DomainError, 'ree/dsl/domain_error'
|
15
14
|
autoload :Error, 'ree/error'
|
16
15
|
autoload :ErrorDsl, 'ree/dsl/error_dsl'
|
17
16
|
autoload :FnDSL, 'ree/fn_dsl'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruslan Gatiyatov
|
@@ -140,7 +140,6 @@ files:
|
|
140
140
|
- lib/ree/core/packages_store.rb
|
141
141
|
- lib/ree/core/path_helper.rb
|
142
142
|
- lib/ree/dsl/build_package_dsl.rb
|
143
|
-
- lib/ree/dsl/domain_error.rb
|
144
143
|
- lib/ree/dsl/error_dsl.rb
|
145
144
|
- lib/ree/dsl/import_dsl.rb
|
146
145
|
- lib/ree/dsl/link_import_builder.rb
|
data/lib/ree/dsl/domain_error.rb
DELETED