right_agent 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 421bad101c6e1d2b672ae1df2f8f30483a5bcc9f
4
- data.tar.gz: e81a1273f00d14f8df4a0a0fbb5863e0d8870b73
3
+ metadata.gz: 5aa97d267e37f937d75b168f61595f4471ecfa5c
4
+ data.tar.gz: 84807b3fb6847703f579eb823893bfe67cba9a4c
5
5
  SHA512:
6
- metadata.gz: 482f8558a5af82ec62c7b3a9518caa31345582bad51d17cd0c1dabc653c33cf6fc296f4977bc4b85f0ad64d4974bc7bc567d7229ee0ec94643b9346ba3c13a3f
7
- data.tar.gz: 51488276aea8ae3068898ae1671ea6e4064107380a3bb423223d1ed2e5b006e5806488ca50fb2e1796fd4ef5649658d96bea1705388f05f189c4dd1da34cc467
6
+ metadata.gz: 557cff491092e4a661ea21bfa169a7adbe824530eabed61d657ef90ef93fb25ebda7e0d52e49074171c9c554bcb5cf2677150f2b3cea95c845c1310b79ce4098
7
+ data.tar.gz: ed3487e962eb4a1fbdf2199778c9168cc4e58b3a3e988d671b14dab290006c1bdd5c73ead3f08db4aba5bc8ffcac934d43646a9747324d1b75c9bf839f574575
@@ -56,6 +56,10 @@ module RightScale
56
56
  # Instance variables that are not serialized because they are only used locally
57
57
  NOT_SERIALIZED = ["received_at"]
58
58
 
59
+ # Regexp for inserting packet size into msgpack encoded packet
60
+ # For ruby 1.9 size attribute moves from front to back of packet
61
+ PACKET_SIZE_REGEXP = RUBY_VERSION < "1.9.0" ? Regexp.new("size\xC0", nil, "n") : Regexp.new("size\xC0$", nil, "n")
62
+
59
63
  # (Float) Time in seconds in Unix-epoch when message was received
60
64
  attr_accessor :received_at
61
65
 
@@ -106,10 +110,8 @@ module RightScale
106
110
  'size' => nil
107
111
  }.to_msgpack(*a)
108
112
  @size = msg.size
109
- # For ruby 1.9 size attribute moves from front to back of packet
110
- re = RUBY_VERSION < "1.9.0" ? Regexp.new("size\xC0") : Regexp.new("size\xC0$", nil, "n")
111
113
  # For msgpack 0.5.1 the to_msgpack result is a MessagePack::Packer so need to convert to string
112
- msg = msg.to_s.sub!(re) { |m| "size" + @size.to_msgpack }
114
+ msg = msg.to_s.sub!(PACKET_SIZE_REGEXP) { |m| "size" + @size.to_msgpack }
113
115
  msg
114
116
  end
115
117
 
data/right_agent.gemspec CHANGED
@@ -25,8 +25,8 @@ require 'rbconfig'
25
25
 
26
26
  Gem::Specification.new do |spec|
27
27
  spec.name = 'right_agent'
28
- spec.version = '2.4.0'
29
- spec.date = '2014-08-22'
28
+ spec.version = '2.4.1'
29
+ spec.date = '2014-08-25'
30
30
  spec.authors = ['Lee Kirchhoff', 'Raphael Simon', 'Tony Spataro', 'Scott Messier']
31
31
  spec.email = 'lee@rightscale.com'
32
32
  spec.homepage = 'https://github.com/rightscale/right_agent'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Kirchhoff
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-08-22 00:00:00.000000000 Z
14
+ date: 2014-08-25 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: right_support