right_agent 0.9.9 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -109,6 +109,11 @@ module RightScale
109
109
 
110
110
  # Undefine warn to prevent Kernel#warn from being called
111
111
  undef warn
112
+
113
+ # And on the eigenclass
114
+ class <<self
115
+ undef warn
116
+ end
112
117
 
113
118
  def initialize
114
119
  # Was log ever used?
@@ -28,11 +28,10 @@ module RightScale
28
28
 
29
29
  module ClassMethods
30
30
 
31
- # Redirect class methods to singleton instance
31
+ # Redirect missing class methods to singleton instance.
32
32
  def method_missing(meth, *args, &blk)
33
33
  self.instance.__send__(meth, *args, &blk)
34
34
  end
35
-
36
35
  end
37
36
 
38
37
  # Upon inclusion, also include standard Singleton mixin
@@ -664,7 +664,6 @@ module RightScale
664
664
  # :tags(Array):: Tags that must all be associated with a target for it to be selected
665
665
  # :scope(Hash):: Scoping to be used to restrict routing
666
666
  # :account(Integer):: Restrict to agents with this account id
667
- # :deployment(Integer):: Restrict to agents with this deployment id
668
667
  # :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
669
668
  # ones with no shard id
670
669
  # :selector(Symbol):: Which of the matched targets to be selected, either :any or :all,
@@ -699,7 +698,6 @@ module RightScale
699
698
  # :tags(Array):: Tags that must all be associated with a target for it to be selected
700
699
  # :scope(Hash):: Scoping to be used to restrict routing
701
700
  # :account(Integer):: Restrict to agents with this account id
702
- # :deployment(Integer):: Restrict to agents with this deployment id
703
701
  # :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
704
702
  # ones with no shard id
705
703
  # :selector(Symbol):: Which of the matched targets to be selected, either :any or :all,
@@ -737,7 +735,6 @@ module RightScale
737
735
  # :tags(Array):: Tags that must all be associated with a target for it to be selected
738
736
  # :scope(Hash):: Scoping to be used to restrict routing
739
737
  # :account(Integer):: Restrict to agents with this account id
740
- # :deployment(Integer):: Restrict to agents with this deployment id
741
738
  # :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
742
739
  # ones with no shard id
743
740
  #
@@ -769,7 +766,6 @@ module RightScale
769
766
  # :tags(Array):: Tags that must all be associated with a target for it to be selected
770
767
  # :scope(Hash):: Scoping to be used to restrict routing
771
768
  # :account(Integer):: Restrict to agents with this account id
772
- # :deployment(Integer):: Restrict to agents with this deployment id
773
769
  # :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
774
770
  # ones with no shard id
775
771
  #
@@ -963,7 +959,6 @@ module RightScale
963
959
  # :tags(Array):: Tags that must all be associated with a target for it to be selected
964
960
  # :scope(Hash):: Scoping to be used to restrict routing
965
961
  # :account(Integer):: Restrict to agents with this account id
966
- # :deployment(Integer):: Restrict to agents with this deployment id
967
962
  # :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
968
963
  # ones with no shard id
969
964
  # :selector(Symbol):: Which of the matched targets to be selected, either :any or :all,
@@ -1020,7 +1015,6 @@ module RightScale
1020
1015
  # :tags(Array):: Tags that must all be associated with a target for it to be selected
1021
1016
  # :scope(Hash):: Scoping to be used to restrict routing
1022
1017
  # :account(Integer):: Restrict to agents with this account id
1023
- # :deployment(Integer):: Restrict to agents with this deployment id
1024
1018
  # :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
1025
1019
  # ones with no shard id
1026
1020
  #
@@ -1093,12 +1087,12 @@ module RightScale
1093
1087
  if s = target[:scope]
1094
1088
  if s.is_a?(Hash)
1095
1089
  s = SerializationHelper.symbolize_keys(s)
1096
- if ([:account, :deployment, :shard] & s.keys).empty? && !s.empty?
1097
- raise ArgumentError, "Invalid target scope (#{t[:scope].inspect}), choices are :account, :deployment, and :shard allowed"
1090
+ if ([:account, :shard] & s.keys).empty? && !s.empty?
1091
+ raise ArgumentError, "Invalid target scope (#{t[:scope].inspect}), choices are :account and :shard allowed"
1098
1092
  end
1099
1093
  t[:scope] = s
1100
1094
  else
1101
- raise ArgumentError, "Invalid target scope (#{t[:scope].inspect}), must be a hash of :account, :deployment, and/or :shard"
1095
+ raise ArgumentError, "Invalid target scope (#{t[:scope].inspect}), must be a hash of :account and/or :shard"
1102
1096
  end
1103
1097
  elsif (s = t[:selector]) && allow_selector
1104
1098
  s = s.to_sym
@@ -24,8 +24,8 @@ require 'rubygems'
24
24
 
25
25
  Gem::Specification.new do |spec|
26
26
  spec.name = 'right_agent'
27
- spec.version = '0.9.9'
28
- spec.date = '2012-04-05'
27
+ spec.version = '0.9.11'
28
+ spec.date = '2012-04-16'
29
29
  spec.authors = ['Lee Kirchhoff', 'Raphael Simon', 'Tony Spataro']
30
30
  spec.email = 'lee@rightscale.com'
31
31
  spec.homepage = 'https://github.com/rightscale/right_agent'
@@ -216,7 +216,6 @@ describe RightScale::Sender do
216
216
  lambda { @instance.send_push('/foo/bar', nil, "tags" => "tags") }.should be_true
217
217
  lambda { @instance.send_push('/foo/bar', nil, :tags => "tags", :scope => {:shard => 1}) }.should be_true
218
218
  lambda { @instance.send_push('/foo/bar', nil, "scope" => {:shard => 1, "account" => 1}) }.should be_true
219
- lambda { @instance.send_push('/foo/bar', nil, :scope => {:deployment => 1}) }.should be_true
220
219
  lambda { @instance.send_push('/foo/bar', nil, :scope => {}) }.should be_true
221
220
  lambda { @instance.send_push('/foo/bar', nil, :selector => :all) }.should be_true
222
221
  lambda { @instance.send_push('/foo/bar', nil, "selector" => "any") }.should be_true
@@ -402,7 +401,6 @@ describe RightScale::Sender do
402
401
  lambda { @instance.send_retryable_request('/foo/bar', nil, "tags" => "tags") }.should be_true
403
402
  lambda { @instance.send_retryable_request('/foo/bar', nil, :tags => "tags", :scope => {:shard => 1}) }.should be_true
404
403
  lambda { @instance.send_retryable_request('/foo/bar', nil, "scope" => {:shard => 1, "account" => 1}) }.should be_true
405
- lambda { @instance.send_retryable_request('/foo/bar', nil, :scope => {:deployment => 1}) }.should be_true
406
404
  lambda { @instance.send_retryable_request('/foo/bar', nil, :scope => {}) }.should be_true
407
405
  lambda { @instance.send_retryable_request('/foo/bar', nil, :selector => :all) }.should raise_error(ArgumentError)
408
406
  lambda { @instance.send_retryable_request('/foo/bar', nil, 1) }.should raise_error(ArgumentError)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_agent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 45
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 9
10
- version: 0.9.9
9
+ - 11
10
+ version: 0.9.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lee Kirchhoff
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-04-05 00:00:00 -07:00
20
+ date: 2012-04-16 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency