nebulous_stomp 3.0.6 → 3.0.7
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 +4 -4
- data/lib/nebulous_stomp/msg/body.rb +9 -3
- data/lib/nebulous_stomp/version.rb +1 -1
- 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: 53153cf352f2c866e92f780540a077aa72cdd1b5
|
4
|
+
data.tar.gz: 6804ad691e2863f8b403563c962b2de1f5e73bf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee8d27f2fc80b9c32a12c22eea38e39b7281136575daca91c61adb4c7cf63ac9cd4249777a4081d5b0b6c08f14d441634902c5ae077ae3054f0d5422c676416e
|
7
|
+
data.tar.gz: 6c02255538ec06fccf4829307944c4c2f7f9bc441060dcfaabd4d424c1376cf2cfb879348ad58bc20b8b0cbe7f9fd2abb5cdf8f6e77ec82d74772e3b2a928a0c
|
@@ -27,13 +27,19 @@ module NebulousStomp
|
|
27
27
|
#
|
28
28
|
def initialize(is_json, hash)
|
29
29
|
@is_json = !!is_json
|
30
|
-
@stomp_body =
|
30
|
+
@stomp_body = hash[:stompBody]
|
31
31
|
@body = hash[:body]
|
32
32
|
@verb = hash[:verb]
|
33
33
|
@params = hash[:parameters] || hash[:params]
|
34
34
|
@desc = hash[:description] || hash[:desc]
|
35
35
|
|
36
36
|
fill_from_stomp
|
37
|
+
|
38
|
+
@stomp_body = fix_bad_encoding(@stomp_body)
|
39
|
+
@body = fix_bad_encoding(@body)
|
40
|
+
@verb = fix_bad_encoding(@verb)
|
41
|
+
@params = fix_bad_encoding(@params)
|
42
|
+
@desc = fix_bad_encoding(@desc)
|
37
43
|
end
|
38
44
|
|
39
45
|
##
|
@@ -44,7 +50,7 @@ module NebulousStomp
|
|
44
50
|
#
|
45
51
|
def to_h
|
46
52
|
{ stompBody: @stomp_body,
|
47
|
-
body: @stomp_body ? nil : body,
|
53
|
+
body: @stomp_body ? nil : @body,
|
48
54
|
verb: @verb,
|
49
55
|
params: @params.kind_of?(Enumerable) ? @params.dup : @params,
|
50
56
|
desc: @desc }
|
@@ -167,7 +173,7 @@ module NebulousStomp
|
|
167
173
|
# solves a lot of use-cases for us.)
|
168
174
|
#
|
169
175
|
def fix_bad_encoding(string)
|
170
|
-
return
|
176
|
+
return string unless string.is_a? String
|
171
177
|
|
172
178
|
unless string.valid_encoding?
|
173
179
|
s = string.encode("UTF-8", "ISO8859-1")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nebulous_stomp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|