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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 139490e673ffe7aabfc0336ebb5ac94d6841129c
4
- data.tar.gz: d1028a7c66aaab258495e9353839303f95562e52
3
+ metadata.gz: 016858cd256536862a6f4942021dc1b013cbaacc
4
+ data.tar.gz: 4cb428343484df4c14c5576579e02eb01c1bc215
5
5
  SHA512:
6
- metadata.gz: 511bd404dba880d7943d2e6d39b9ed073298953c12ff8893dc84209e01a4c6405414a094f2f091969bb93e343e5e76da1a6a9913dc060e2fdcc5b6ce56710ca5
7
- data.tar.gz: 2f0dc0d4dd1fc2ec015fe6dfe16ff655bac8db4bad3738de0c3bcca6dd38ee49b4eb44d1e2520c5575f33c506c34f28d57e0d15560816819b7eb084baa50a8c2
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.0.2)
8
- atomic (1.0.2-java)
9
- bourne (1.4.0)
10
- mocha (~> 0.13.2)
11
- bson (1.8.3)
12
- bson (1.8.3-java)
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
- metaclass (0.0.1)
18
- mocha (0.13.3)
19
- metaclass (~> 0.0.1)
20
- multi_json (1.7.1)
21
- rake (10.0.3)
22
- resilient_socket (0.4.0)
23
- semantic_logger
24
- ruby_doozer (0.5.0)
25
- gene_pool
26
- resilient_socket
27
- ruby_protobuf
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.0.0)
31
- sync_attr
32
- thread_safe
33
- shoulda (3.4.0)
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 (~> 1.0, >= 1.4.1)
36
- shoulda-context (1.0.2)
37
- shoulda-matchers (1.5.4)
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
- bourne (~> 1.3)
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 EchoService
49
- include RubySkynet::Base
49
+ class Echo < RubySkynet::Client
50
+ self.skynet_name = "EchoService"
50
51
  end
51
52
 
52
- client = EchoService.new
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::Logger.default_level = :trace
66
- SemanticLogger::Logger.appenders << SemanticLogger::Appender::File.new('skynet.log')
66
+ SemanticLogger.default_level = :info
67
+ SemanticLogger.add_appender('skynet.log')
67
68
 
68
- class EchoService
69
- include RubySkynet::Base
69
+ class Echo < RubySkynet::Client
70
+ self.skynet_name = "EchoService"
70
71
  end
71
72
 
72
- client = EchoService.new
73
+ client = Echo.new
73
74
  p client.echo(:hello => 'world')
74
75
  ```
75
76
 
@@ -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
- if previous_klass = @@services[klass.skynet_name] && (previous_klass.name != klass.name)
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
@@ -1,3 +1,3 @@
1
1
  module RubySkynet #:nodoc
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.0
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-04-04 00:00:00.000000000 Z
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.2
164
+ rubygems_version: 2.0.3
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Skynet Ruby Client