paypoint-blue 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 617bb51fe80f9911886c294298720bb7c150286d
4
- data.tar.gz: 9fb48b6b0bba74eaa3e17d136c1f6e3d0f9f54df
3
+ metadata.gz: 196ba7d8670cc9b3596ef38f0c008f9097cdbf45
4
+ data.tar.gz: 43f721a154465801513512613976e36cb6d1067d
5
5
  SHA512:
6
- metadata.gz: b5d26c4e5cc872308c605aa8352fc112a5d20ac5fc105f49fe3f87a0c5ab75ac372f7116a4fee7df941ea4e800e87de6922822f1ef4e86615aaa9480a6f6e2ff
7
- data.tar.gz: f4ee41a5cb74df53e8d83e64fb69aee524ae700ccaa2c6a986891574358f9b1c5da86d5e80a8b4fab9624c68d464be261244eee60018a0596104aabe5e7cad1c
6
+ metadata.gz: ff7818b94e3d54489c54b72371613c5529f4a2c6b9264bdedfc443d90c8705f2722840845de5f88173072447f7e923811ab7f4006126582b12b95f796bcc0a33
7
+ data.tar.gz: 5ce4939d65e3ed259f410e5cf4926151b06f9293601056cf948c62e9a2f4cdc96255c3a30d080fb320f8bccb575cc3ecd6e83bd65676c5cf88e840851f5b24f2
@@ -39,7 +39,7 @@ class FaradayRunscope < Faraday::Middleware
39
39
  end
40
40
 
41
41
  def runscope_host(host)
42
- "#{host.tr('.', '-')}-#{bucket}.runscope.net"
42
+ "#{host.gsub('-', '--').tr('.', '-')}-#{bucket}.runscope.net"
43
43
  end
44
44
 
45
45
  def transform_paths!(enum, path=nil)
@@ -1,5 +1,5 @@
1
1
  module PayPoint
2
2
  module Blue
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
data/lib/paypoint/blue.rb CHANGED
@@ -25,7 +25,11 @@ module PayPoint
25
25
  #
26
26
  # @return [Hashie::Mash] the parsed, snake_cased response
27
27
  def self.parse_payload(json)
28
- payload = JSON.parse(json.is_a?(IO) ? json.read : json.to_s)
28
+ payload = json.respond_to?(:read) ? json.read : json.to_s
29
+ if payload.encoding == Encoding::ASCII_8BIT
30
+ payload.force_encoding 'iso-8859-1'
31
+ end
32
+ payload = JSON.parse(payload)
29
33
  payload = Utils.snakecase_and_symbolize_keys(payload)
30
34
  Hashie::Mash.new(payload)
31
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypoint-blue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laszlo Bacsi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-26 00:00:00.000000000 Z
11
+ date: 2015-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday