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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c806baccc97f2a671627bb9988a5019e1827f0ecad6781b4936adb9dfeaa8337
4
- data.tar.gz: 65786f392d68aa7213a25a46d25c9b5fcdca2161a8ba1647c925fca63e2c885b
3
+ metadata.gz: 74fdedebcc116bb5764720b16d3baa21c017a6a64a815a9df5c9c249dab901be
4
+ data.tar.gz: d752901505d14e4964aaaf606773e84f1464a8028f87d1d4d0a7bd6bb3bf3853
5
5
  SHA512:
6
- metadata.gz: 963769f03216f645f0454512eb671eca21d6525967e88179c974dd1cc66a35f9c1be0460288c0fc74f0816037931d93a679d32b019f13aaba156aaa49b518b16
7
- data.tar.gz: fbb55a02c5bf9a385a469da241863c0f2f327183075f02061c59f250f1df3428b9201457c1139cd4f3007ca28b6b0ca4df1cf32588514114645b50e5424f10fc
6
+ metadata.gz: 2f4c932846abc13daff98dca10dc79082f1837b232b09720ad24c9898dfc96ce3f245cafbe597dc42ecebae6e8da419a5977b84de932c644d09b7adf5e3799a4
7
+ data.tar.gz: 1ad6fc938f287e24822b7d86dabbe6ca361e8d3ba9e0d2f6bb8f72dd1031fc8f056c97feb5946a67d2e54e289c53516220328eb4e8cafbfa244069cfd77f2900
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree (1.0.40)
4
+ ree (1.0.42)
5
5
  commander (~> 5.0.0)
6
6
 
7
7
  GEM
@@ -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
@@ -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(**kwargs)")
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 + " obj_links = #{links.map(&:as).inspect}")
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 + " super(**kwargs).#{object.factory}")
92
+ eval_list.push(indent + " super.#{object.factory}")
95
93
  else
96
- eval_list.push(indent + " super(**kwargs)")
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(**kwargs).#{object.factory}")
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(**kwargs)")
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} = kwargs[:#{_.as}] || #{obj.klass}.new(**kwargs)")
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ree
4
- VERSION = "1.0.40"
4
+ VERSION = "1.0.42"
5
5
  end
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.40
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
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Ree::DomainError < StandardError
4
- end