ruby_skynet 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +26 -30
- data/README.md +9 -8
- data/lib/ruby_skynet/server.rb +2 -1
- data/lib/ruby_skynet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 016858cd256536862a6f4942021dc1b013cbaacc
|
4
|
+
data.tar.gz: 4cb428343484df4c14c5576579e02eb01c1bc215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5255162acd54ef3e7123c4034b4495c8d4be16cce0c9e044e08ffe1f40a34367c3940dfa6f8421b4ac7025394eae3ede543967e46f06316fd424bd23b948ccc7
|
7
|
+
data.tar.gz: 8e468e69a39448f6fc0ab61f0fca2cb99740c0d568e4f4950e545bb75b40758f9ab2218ec9a014346aa2eff843a84495e2f609ee4b0857d7fadad9e18afd79bc
|
data/Gemfile.lock
CHANGED
@@ -4,40 +4,36 @@ GEM
|
|
4
4
|
activesupport (3.2.13)
|
5
5
|
i18n (= 0.6.1)
|
6
6
|
multi_json (~> 1.0)
|
7
|
-
atomic (1.
|
8
|
-
atomic (1.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
bson_ext (1.8.3)
|
14
|
-
bson (~> 1.8.3)
|
7
|
+
atomic (1.1.9)
|
8
|
+
atomic (1.1.9-java)
|
9
|
+
bson (1.8.6)
|
10
|
+
bson (1.8.6-java)
|
11
|
+
bson_ext (1.8.6)
|
12
|
+
bson (~> 1.8.6)
|
15
13
|
gene_pool (1.3.0)
|
16
14
|
i18n (0.6.1)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
semantic_logger
|
15
|
+
multi_json (1.7.6)
|
16
|
+
rake (10.0.4)
|
17
|
+
resilient_socket (0.5.0)
|
18
|
+
semantic_logger (>= 2.1)
|
19
|
+
ruby_doozer (0.7.1)
|
20
|
+
gene_pool (>= 1.3.0)
|
21
|
+
multi_json (>= 1.6.1)
|
22
|
+
resilient_socket (>= 0.5.0)
|
23
|
+
ruby_protobuf (>= 0.4.11)
|
24
|
+
semantic_logger (>= 2.1)
|
25
|
+
sync_attr (>= 1.0.0)
|
29
26
|
ruby_protobuf (0.4.11)
|
30
|
-
semantic_logger (2.
|
31
|
-
sync_attr
|
32
|
-
thread_safe
|
33
|
-
shoulda (3.
|
27
|
+
semantic_logger (2.1.0)
|
28
|
+
sync_attr (>= 1.0)
|
29
|
+
thread_safe (>= 0.1.0)
|
30
|
+
shoulda (3.5.0)
|
34
31
|
shoulda-context (~> 1.0, >= 1.0.1)
|
35
|
-
shoulda-matchers (
|
36
|
-
shoulda-context (1.
|
37
|
-
shoulda-matchers (1.
|
32
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
33
|
+
shoulda-context (1.1.2)
|
34
|
+
shoulda-matchers (2.1.0)
|
38
35
|
activesupport (>= 3.0.0)
|
39
|
-
|
40
|
-
sync_attr (0.1.1)
|
36
|
+
sync_attr (1.0.0)
|
41
37
|
thread_safe (0.1.0)
|
42
38
|
atomic
|
43
39
|
|
@@ -53,6 +49,6 @@ DEPENDENCIES
|
|
53
49
|
rake
|
54
50
|
resilient_socket
|
55
51
|
ruby_doozer
|
56
|
-
semantic_logger
|
52
|
+
semantic_logger (>= 2.1)
|
57
53
|
shoulda
|
58
54
|
thread_safe
|
data/README.md
CHANGED
@@ -41,15 +41,16 @@ RubySkynet::Server.start
|
|
41
41
|
```
|
42
42
|
|
43
43
|
Client to call the above Service
|
44
|
+
|
44
45
|
```ruby
|
45
46
|
require 'rubygems'
|
46
47
|
require 'ruby_skynet'
|
47
48
|
|
48
|
-
class
|
49
|
-
|
49
|
+
class Echo < RubySkynet::Client
|
50
|
+
self.skynet_name = "EchoService"
|
50
51
|
end
|
51
52
|
|
52
|
-
client =
|
53
|
+
client = Echo.new
|
53
54
|
p client.echo(:hello => 'world')
|
54
55
|
```
|
55
56
|
|
@@ -62,14 +63,14 @@ calls can be enabled as follows:
|
|
62
63
|
require 'rubygems'
|
63
64
|
require 'ruby_skynet'
|
64
65
|
|
65
|
-
SemanticLogger
|
66
|
-
SemanticLogger
|
66
|
+
SemanticLogger.default_level = :info
|
67
|
+
SemanticLogger.add_appender('skynet.log')
|
67
68
|
|
68
|
-
class
|
69
|
-
|
69
|
+
class Echo < RubySkynet::Client
|
70
|
+
self.skynet_name = "EchoService"
|
70
71
|
end
|
71
72
|
|
72
|
-
client =
|
73
|
+
client = Echo.new
|
73
74
|
p client.echo(:hello => 'world')
|
74
75
|
```
|
75
76
|
|
data/lib/ruby_skynet/server.rb
CHANGED
@@ -48,7 +48,8 @@ module RubySkynet
|
|
48
48
|
def self.register_service(klass)
|
49
49
|
raise InvalidServiceException.new("#{klass.inspect} is not a RubySkynet::Service") unless klass.respond_to?(:skynet_name) && klass.respond_to?(:skynet_version) && klass.respond_to?(:skynet_region)
|
50
50
|
|
51
|
-
|
51
|
+
previous_klass = @@services[klass.skynet_name]
|
52
|
+
if previous_klass && (previous_klass.name != klass.name)
|
52
53
|
logger.warn("Service with name: #{klass.skynet_name} is already registered to a different implementation:#{previous_klass.name}")
|
53
54
|
end
|
54
55
|
@@services[klass.skynet_name] = klass
|
data/lib/ruby_skynet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_skynet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic_logger
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.0.
|
164
|
+
rubygems_version: 2.0.3
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Skynet Ruby Client
|