ruby_skynet 0.7.0 → 0.8.0

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: 09c9a8e2a436c89fd46211dc103f0b55946fbfc2
4
- data.tar.gz: e2683cdb8fae60e831c7793fca87e4f1ae573095
3
+ metadata.gz: 139490e673ffe7aabfc0336ebb5ac94d6841129c
4
+ data.tar.gz: d1028a7c66aaab258495e9353839303f95562e52
5
5
  SHA512:
6
- metadata.gz: 87a5e433d14d3c986c44472f0c19baeebd54a87362e071478d046238217470072fae4712af21ada8b16e771c326c44aa5a7b69ac96b124a0f3bab7e7994f2226
7
- data.tar.gz: 5baff9cf4822187512543ef599f7e6842a5dab2a95744da5a55461a9d711c820f738018b8783672b8f3da12d1903a66c70bfc955395217d2df83db8f8ac5fb15
6
+ metadata.gz: 511bd404dba880d7943d2e6d39b9ed073298953c12ff8893dc84209e01a4c6405414a094f2f091969bb93e343e5e76da1a6a9913dc060e2fdcc5b6ce56710ca5
7
+ data.tar.gz: 2f0dc0d4dd1fc2ec015fe6dfe16ff655bac8db4bad3738de0c3bcca6dd38ee49b4eb44d1e2520c5575f33c506c34f28d57e0d15560816819b7eb084baa50a8c2
data/Rakefile CHANGED
@@ -26,9 +26,10 @@ task :gem do |t|
26
26
  spec.has_rdoc = true
27
27
  spec.add_dependency 'semantic_logger', '>= 2.1.0'
28
28
  spec.add_dependency 'resilient_socket', '>= 0.5.0'
29
- spec.add_dependency 'multi_json', '>= 1.6.1'
30
29
  spec.add_dependency 'bson', '>= 1.5.2'
31
- spec.add_dependency 'ruby_doozer', '>= 0.6.0'
30
+ spec.add_dependency 'gene_pool', '>= 1.3.0'
31
+ spec.add_dependency 'sync_attr', '>= 1.0.0'
32
+ spec.add_dependency 'ruby_doozer', '>= 0.7.0'
32
33
  spec.add_dependency 'gene_pool', '>= 1.3.0'
33
34
  end
34
35
  Gem::Package.build gemspec
@@ -10,8 +10,6 @@ SemanticLogger.add_appender(STDOUT)
10
10
  class EchoService
11
11
  include RubySkynet::Service
12
12
 
13
- skynet_name = "JoeService"
14
-
15
13
  # Methods implemented by this service
16
14
  # Must take a Hash as input
17
15
  # Must Return a Hash response or nil for no response
@@ -1,5 +1,4 @@
1
1
  require 'sync_attr'
2
- require 'multi_json'
3
2
  require 'thread_safe'
4
3
  require 'gene_pool'
5
4
  require 'resolv'
@@ -57,7 +56,7 @@ module RubySkynet
57
56
  @current_revision = doozer.current_revision
58
57
  # Fetch all the configuration information from Doozer and set the internal copy
59
58
  doozer.walk(path, @current_revision) do |path, value|
60
- service_info_changed(relative_path(path), value)
59
+ service_info_changed(relative_key(path), value)
61
60
  end
62
61
  end
63
62
 
@@ -76,7 +75,7 @@ module RubySkynet
76
75
 
77
76
  # Register the supplied service at this Skynet Server host and Port
78
77
  def register_service(name, version, region, hostname, port)
79
- config = {
78
+ self["#{name}/#{version}/#{region}/#{hostname}/#{port}"] = {
80
79
  "Config" => {
81
80
  "UUID" => "#{hostname}:#{port}-#{$$}-#{name}-#{version}",
82
81
  "Name" => name,
@@ -90,7 +89,6 @@ module RubySkynet
90
89
  },
91
90
  "Registered" => true
92
91
  }
93
- self["#{name}/#{version}/#{region}/#{hostname}/#{port}"] = MultiJson.encode(config)
94
92
  end
95
93
 
96
94
  # Deregister the supplied service from the Registry
@@ -148,8 +146,7 @@ module RubySkynet
148
146
  hostname, port = e[3], e[4]
149
147
 
150
148
  if value
151
- entry = MultiJson.load(value)
152
- if entry['Registered']
149
+ if value['Registered']
153
150
  add_server(key, hostname, port)
154
151
  else
155
152
  # Service just de-registered
@@ -1,3 +1,3 @@
1
1
  module RubySkynet #:nodoc
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
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.7.0
4
+ version: 0.8.0
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-03 00:00:00.000000000 Z
11
+ date: 2013-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic_logger
@@ -39,47 +39,61 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.5.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: multi_json
42
+ name: bson
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.6.1
47
+ version: 1.5.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.6.1
54
+ version: 1.5.2
55
55
  - !ruby/object:Gem::Dependency
56
- name: bson
56
+ name: gene_pool
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '>='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.5.2
61
+ version: 1.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.5.2
68
+ version: 1.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: sync_attr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.0
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: ruby_doozer
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - '>='
74
88
  - !ruby/object:Gem::Version
75
- version: 0.6.0
89
+ version: 0.7.0
76
90
  type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - '>='
81
95
  - !ruby/object:Gem::Version
82
- version: 0.6.0
96
+ version: 0.7.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: gene_pool
85
99
  requirement: !ruby/object:Gem::Requirement