right_agent 2.3.6 → 2.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/right_agent/command/command_serializer.rb +0 -32
- data/right_agent.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91d5d8547541bbd98d984a5c1184d71b07084f8c
|
4
|
+
data.tar.gz: 8c3086185d5a8a53928ec75bac6f6d1d1d6fce90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27c6c6608be0826bcd72656df7e39252f1da90bd20fb4e5d064d1088a508a9c16840a3b3e0ebc88ee2b46e78d528037e9d6c564ec2c99f61f902e0d5bb885200
|
7
|
+
data.tar.gz: a97f221ee6484c8d6585f6cb4bf764e9107beeb3311dfbb7f348cb79080857043cc55620b49d37bd118c8a8ef95e71334c74ac0b5b1770e033928edd2e78ae3f
|
@@ -37,12 +37,6 @@ module RightScale
|
|
37
37
|
# === Return
|
38
38
|
# data(String):: Corresponding serialized data
|
39
39
|
def self.dump(command)
|
40
|
-
# Set the encoding before serialization otherwise YAML will serialize
|
41
|
-
# UTF8 characters as binary data. This can cause some quirks we'd rather
|
42
|
-
# avoid, such as the deserialized binary data having no encoding on
|
43
|
-
# deserialization
|
44
|
-
set_encoding(command)
|
45
|
-
|
46
40
|
data = YAML::dump(command)
|
47
41
|
data += SEPARATOR
|
48
42
|
end
|
@@ -58,10 +52,6 @@ module RightScale
|
|
58
52
|
# === Raise
|
59
53
|
# (RightScale::Exceptions::IO): If serialized data is incorrect
|
60
54
|
def self.load(data)
|
61
|
-
# Data coming from eventmachine is cleaned of it's encoding, so set it
|
62
|
-
# to UTF-8 manually before deserializing or you'll throw transcode errors.
|
63
|
-
set_encoding(data)
|
64
|
-
|
65
55
|
command = YAML::load(data)
|
66
56
|
|
67
57
|
raise RightScale::Exceptions::IO, "Invalid serialized command:\n#{data}" unless command
|
@@ -72,27 +62,5 @@ module RightScale
|
|
72
62
|
raise RightScale::Exceptions::IO, "Invalid serialized command: #{e.message}\n#{data}"
|
73
63
|
end
|
74
64
|
|
75
|
-
private
|
76
|
-
# Force set encodings on ruby strings.
|
77
|
-
#
|
78
|
-
# === Parameters
|
79
|
-
# obj(Object):: String, or Hash/Array of Strings
|
80
|
-
#
|
81
|
-
# === Return
|
82
|
-
# (nil):: Returns nothing, edits object in place
|
83
|
-
def self.set_encoding(obj, encoding = "UTF-8")
|
84
|
-
if obj.is_a?(Hash)
|
85
|
-
obj.each do |k,v|
|
86
|
-
set_encoding(v, encoding)
|
87
|
-
end
|
88
|
-
elsif obj.is_a?(Array)
|
89
|
-
obj.each do |v|
|
90
|
-
set_encoding(v, encoding)
|
91
|
-
end
|
92
|
-
elsif obj.is_a?(String) && !obj.frozen?
|
93
|
-
obj.force_encoding(encoding) if obj.respond_to?(:force_encoding)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
65
|
end
|
98
66
|
end
|
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.3.
|
29
|
-
spec.date = '2014-
|
28
|
+
spec.version = '2.3.7'
|
29
|
+
spec.date = '2014-08-05'
|
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.3.
|
4
|
+
version: 2.3.7
|
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-
|
14
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: right_support
|