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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6f4a2145417269d91fb5af909112fc156acedd3
4
- data.tar.gz: 239d92f6a514118ed89f5aef198e83bd241e9d9e
3
+ metadata.gz: 53153cf352f2c866e92f780540a077aa72cdd1b5
4
+ data.tar.gz: 6804ad691e2863f8b403563c962b2de1f5e73bf4
5
5
  SHA512:
6
- metadata.gz: f96fe76be982ddb17d8461b713f83be0cd69c8e566656c41d6727eac05222a7acff7ff1ece6021129837ecaaa40766b8d4fcf9a9e284333da348f827bd38959d
7
- data.tar.gz: efc8c9a69b4c5d8a443f5a095b7c4893f75df7c9a2160a40109e44c7497f717a308e5db3d9f0f40e7f121b0e6aa1d5de10928480ce77b0d40a6b46200bc346c2
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 = fix_bad_encoding( hash[:stompBody] )
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 nil if string.nil?
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")
@@ -1,5 +1,5 @@
1
1
  module NebulousStomp
2
2
 
3
3
  # Nebulous version number
4
- VERSION = "3.0.6"
4
+ VERSION = "3.0.7"
5
5
  end
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.6
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-30 00:00:00.000000000 Z
11
+ date: 2019-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler