paypoint-blue 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paypoint/blue/utils.rb +2 -4
- data/lib/paypoint/blue/version.rb +1 -1
- data/lib/paypoint/blue.rb +4 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6078c16111c929c837584fee6e2d5011242697c3
|
4
|
+
data.tar.gz: 86dc6770b39136f5fa3e27dd1a07c0aa1991ab6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a39bc9d49936d4bed1a21fc36dd4cb5246a8cdea160e9d9bfc2c97542f8805d0617bd9b991e7878d708755067fd3666830dd0fd7d7c6095af76631405df6aff2
|
7
|
+
data.tar.gz: bf1cc6dfe2c41012d6d50d24d5dabbcce6d76cf2a7b400610d0ec63f455690fe4cad4a999ba0715454f14416590dc8256d9bcb3fc1987a9890593a4221a70e7d
|
data/lib/paypoint/blue/utils.rb
CHANGED
@@ -7,7 +7,7 @@ module PayPoint
|
|
7
7
|
def snakecase_and_symbolize_keys(hash)
|
8
8
|
case hash
|
9
9
|
when Hash
|
10
|
-
hash.each_with_object({}
|
10
|
+
hash.each_with_object({}) do |(key, value), snakified|
|
11
11
|
snakified[snakecase(key)] = snakecase_and_symbolize_keys(value)
|
12
12
|
end
|
13
13
|
when Enumerable
|
@@ -20,7 +20,7 @@ module PayPoint
|
|
20
20
|
def camelcase_and_symbolize_keys(hash)
|
21
21
|
case hash
|
22
22
|
when Hash
|
23
|
-
hash.each_with_object({}
|
23
|
+
hash.each_with_object({}) do |(key, value), camelized|
|
24
24
|
camelized[camelcase(key)] = camelcase_and_symbolize_keys(value)
|
25
25
|
end
|
26
26
|
when Enumerable
|
@@ -30,8 +30,6 @@ module PayPoint
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
private
|
34
|
-
|
35
33
|
def snakecase(original)
|
36
34
|
string = original.is_a?(Symbol) ? original.to_s : original.dup
|
37
35
|
string.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2')
|
data/lib/paypoint/blue.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.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-08-
|
11
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -208,4 +208,3 @@ signing_key:
|
|
208
208
|
specification_version: 4
|
209
209
|
summary: API client for PayPoint Blue
|
210
210
|
test_files: []
|
211
|
-
has_rdoc:
|