zeta 0.12.5 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +3 -0
- data/lib/zeta/version.rb +1 -1
- data/lib/zeta.rb +20 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0155ad2d59bf9bd09b7929fe2bca4a9b00875d98
|
4
|
+
data.tar.gz: a19961bfc8f992ccabaf43cf63874afca151cf83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f72ba4f9b57ca0b4bc15f59aafd7a4206b560d4450cc1ee093b3b43df16d1832bd7676fafa34c30c148100ee8dce4cb76dbd6bedcd2b061eb8916c9c04f7d2d
|
7
|
+
data.tar.gz: 00aee49999fc568aab89471b74a59f58d61a0d1c3880eed645fdb8b19cd2e416e18ea69583f96086f01deda26caac5f0a86fdf0c968afaadc2356ceea15fd87c
|
data/CHANGELOG.markdown
CHANGED
data/lib/zeta/version.rb
CHANGED
data/lib/zeta.rb
CHANGED
@@ -4,26 +4,32 @@ require 'zeta/instance'
|
|
4
4
|
|
5
5
|
class Zeta
|
6
6
|
include Zeta::Instance
|
7
|
-
|
7
|
+
LOCK = Monitor.new
|
8
8
|
|
9
9
|
def self.instance
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
LOCK.synchronize do
|
11
|
+
if @instance.nil?
|
12
|
+
create_instance
|
13
|
+
end
|
14
|
+
@instance
|
15
|
+
end
|
16
|
+
end
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
+
def self.create_instance(options = {verbose: true})
|
19
|
+
LOCK.synchronize do
|
20
|
+
# Create a Zeta instance
|
21
|
+
@instance = new(verbose: true)
|
18
22
|
|
19
|
-
|
20
|
-
|
21
|
-
# runtime
|
22
|
-
@instance.convert_all!
|
23
|
+
# Copy the current service's specifications to cache dir
|
24
|
+
@instance.update_own_contracts
|
23
25
|
|
24
|
-
|
26
|
+
# Convert current service's specifications so published and
|
27
|
+
# consumed objects of this service can be validated at
|
28
|
+
# runtime
|
29
|
+
@instance.convert_all!
|
30
|
+
|
31
|
+
@instance
|
25
32
|
end
|
26
|
-
@instance
|
27
33
|
end
|
28
34
|
|
29
35
|
# Not using the SingleForwardable module here so that, when
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jannis Hermanns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|