cocaine-framework 0.12.0.pre.rc5 → 0.12.0.pre.rc6

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: 78b0582904c597b96068cc74ea07f31a1e3f9640
4
- data.tar.gz: e32ee9d0124b49692aa5af95daed145f039fa8b7
3
+ metadata.gz: fe7ba3ce0e4694bf2b6d8de27c65d9ab78228095
4
+ data.tar.gz: ce289e5e28ede7542c1198c0e4c908af06fb4469
5
5
  SHA512:
6
- metadata.gz: 00e142c6b2dc06c8a5f7b6124ddd7d1916fe2ad35a7c743541356126a9377b1e99714ea123951bb718a95cc5f58688403e16ef6949503e5fcfc500143c9c183e
7
- data.tar.gz: 7be16af00c999afe3a02a429147d3f5ccf57bbd51785fc73c922c965041cdc4e2a44642398b3a81a5672ea14215314178854f07b066e91e65ed53fb082713a21
6
+ metadata.gz: fa3dd76a15e0c83977d7e71dfd4feca569dd8e582b62a8bc2416cf5de92637782a00e2dcf59cf57b1a5e7878fcbd54924b193bd1c7656dcc86a153e123153eb5
7
+ data.tar.gz: 5d39c36e3f75a03a5d313887d42fd5b0da6ea56e76fc958d64d33069076dd1cc9e595f3636be4ac7c9c5cf5f9a6adc332a3c6f3a0f24cf722c29eecf1d4c7b03
@@ -7,7 +7,8 @@ require 'celluloid'
7
7
  require 'celluloid/io'
8
8
 
9
9
  module Cocaine
10
- # For dynamic method creation. [Detail].
10
+ # [Detail]
11
+ # For dynamic method creation.
11
12
  class Meta
12
13
  def metaclass
13
14
  class << self
@@ -22,8 +23,24 @@ module Cocaine
22
23
 
23
24
  module Default
24
25
  module Locator
25
- $host = '::'
26
- $port = 10053
26
+ def host
27
+ @host || '::'
28
+ end
29
+
30
+ def host=(host)
31
+ @host = host
32
+ end
33
+
34
+ def port
35
+ @port || 10053
36
+ end
37
+
38
+ def port=(port)
39
+ @port = port
40
+ end
41
+
42
+ module_function :host, :host=, :port, :port=
43
+
27
44
  API = {
28
45
  0 => [
29
46
  'resolve',
@@ -221,7 +238,7 @@ module Cocaine
221
238
  # [API]
222
239
  class Locator < DefinedService
223
240
  def initialize(host=nil, port=nil)
224
- super :locator, [[host || Default::Locator::host, port || Default::Locator::port]], Default::Locator::API
241
+ super :locator, [[host || Default::Locator.host, port || Default::Locator.port]], Default::Locator::API
225
242
  end
226
243
  end
227
244
 
@@ -395,10 +412,10 @@ module Cocaine
395
412
  end.parse!
396
413
 
397
414
  Cocaine::LOG.debug "Options: #{options}"
398
- Default::Locator::host, sep, Default::Locator::port = options[:locator].rpartition(':')
399
- Default::Locator::port = Default::Locator::port.to_i
415
+ Default::Locator.host, sep, Default::Locator.port = options[:locator].rpartition(':')
416
+ Default::Locator.port = Default::Locator::port.to_i
400
417
 
401
- Cocaine::LOG.debug "Setting default Locator endpoint to: #{Default::Locator::host}:#{Default::Locator::port}"
418
+ Cocaine::LOG.debug "Setting default Locator endpoint to '#{Default::Locator.host}:#{Default::Locator.port}'"
402
419
  return Worker.new(options[:app], options[:uuid], options[:endpoint])
403
420
  end
404
421
  end
@@ -1,3 +1,3 @@
1
1
  module Cocaine
2
- VERSION = '0.12.0-rc5'
2
+ VERSION = '0.12.0-rc6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocaine-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0.pre.rc5
4
+ version: 0.12.0.pre.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Safronov