swish_qr 0.0.1 → 0.0.2
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/swish_qr.rb +2 -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: 93326fd5d9efd57f41c00e3c72d66ae379a7326b
|
|
4
|
+
data.tar.gz: 5fb2b8a6e5d5231f02ed1611f61ec2a247224bf8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21778b12357f0b50ee25a56121beb6d8ec61f25291b662399bff4f02acb83d1983f5bf2ceb3fbab482857d99a35f887fd130abf8bc469e0c9f4dc1e81b4a4187
|
|
7
|
+
data.tar.gz: d9b41f3149996f00179a28e7df6caf94e933e18f2f202639044871690f054a90a7231f75081dc3fe20fbb3ee95b8566e29392349bb22cc7c243be6c49a9427a6
|
data/lib/swish_qr.rb
CHANGED
|
@@ -49,6 +49,7 @@ class SwishQr
|
|
|
49
49
|
@image_format = args[:format]
|
|
50
50
|
@request_hash = get_simple_values_from_args(args)
|
|
51
51
|
@request_hash.merge!(get_complex_values_from_args(args))
|
|
52
|
+
@request_hash.delete(:amount) if @request_hash[:amount] && @request_hash[:amount][:value].to_i == 0
|
|
52
53
|
#puts @request_hash
|
|
53
54
|
@request_hash.to_json
|
|
54
55
|
end
|
|
@@ -60,7 +61,7 @@ class SwishQr
|
|
|
60
61
|
def get_complex_values_from_args(args)
|
|
61
62
|
ret = {}
|
|
62
63
|
COMPLEX_VALUES.each do |k|
|
|
63
|
-
ret[k] = { value: args[k], editable: (args[:editable].include?(k)) } if args[k]
|
|
64
|
+
ret[k] = { value: args[k], editable: ((args[:editable]||[]).include?(k)) } if args[k]
|
|
64
65
|
end
|
|
65
66
|
ret
|
|
66
67
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: swish_qr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Linus Corin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-11-
|
|
11
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|