justexchangerates 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
- checksums.yaml.gz.sig +3 -1
- data.tar.gz.sig +0 -0
- data/lib/justexchangerates.rb +15 -15
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8103ad3c7e9e32737fae9535b6b10d3d832dade5fa2da615a9fd7f1f8ef6d646
|
4
|
+
data.tar.gz: 10373ee12ed1c673e2d58421da6187f77d0b0f79bb25ea12d5a798b6c9f3ce24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d32a946890cc15941752ee4aa375e04a9da9b51661b55e0f674805c99546cfdd21625c34b10a3a24562829d5843f039664faf6f6bd3709b6d475a4b1db3a698c
|
7
|
+
data.tar.gz: 9554e5d8f4aa8dd217eb40f36cb4e7468b61dab9048312bd25b346cd5866158e86316fa08e0509eb7ba536f1d81d1447d55c65debba27e9312535982b7b4459a
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
�
|
1
|
+
M��q����6�vd�H�1F���Ž��|�)��?���7T���T�]9�,J�/�
|
2
|
+
�?��yG��HxB�9���)d����8��Ιq|���ey��7d��[؝P�i�9�(Y�Ոi�����
|
3
|
+
2��Bin[D@A��D�۶�o\�J���Ύ�8D���X;���U�U}�y}���G���d��$�IKLL?)c�Q��y�Q,w6#b��Q��G�=v!ShU2w�=�s�o�M
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/justexchangerates.rb
CHANGED
@@ -86,6 +86,20 @@ class JustExchangeRates
|
|
86
86
|
end
|
87
87
|
|
88
88
|
class JustExchangeRatesPlus < JustExchangeRates
|
89
|
+
|
90
|
+
def self.fetch_app_id(reg)
|
91
|
+
|
92
|
+
decipher = ->(lookup_file, s) {
|
93
|
+
DynarexPassword.new.reverse_lookup(s, lookup_file)
|
94
|
+
}
|
95
|
+
|
96
|
+
key = 'hkey_apps/justexchangerates'
|
97
|
+
e = reg.get_key(key)
|
98
|
+
lookup_file = e.text('lookup_file').to_s
|
99
|
+
|
100
|
+
app_id = decipher.call(lookup_file, e.text('app_id').to_s)
|
101
|
+
|
102
|
+
end
|
89
103
|
|
90
104
|
|
91
105
|
def initialize(reg, base: 'USD', cache_refresh: '1 week', cache_path: '.', \
|
@@ -93,25 +107,11 @@ class JustExchangeRatesPlus < JustExchangeRates
|
|
93
107
|
|
94
108
|
@debug = debug
|
95
109
|
|
96
|
-
|
97
|
-
e = reg.get_key(key)
|
98
|
-
@lookup_file = e.text('lookup_file').to_s
|
99
|
-
|
100
|
-
app_id = decipher(e.text('app_id').to_s)
|
101
|
-
|
102
|
-
if @debug then
|
103
|
-
puts app_id.inspect
|
104
|
-
end
|
110
|
+
app_id = JustExchangeRatesPlus.fetch_app_id(reg)
|
105
111
|
|
106
112
|
super(base: 'USD', cache_refresh: '1 week', cache_path: '.', \
|
107
113
|
debug: debug, app_id: app_id)
|
108
114
|
end
|
109
115
|
|
110
116
|
|
111
|
-
private
|
112
|
-
|
113
|
-
def decipher(s)
|
114
|
-
DynarexPassword.new.reverse_lookup(s, @lookup_file)
|
115
|
-
end
|
116
|
-
|
117
117
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: justexchangerates
|
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
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
7DV4V4ArjIvHVPFk1NBNtMTP9/u5jcFbnXRm0K1puvzAOu94LU7xzQj+eRmUCOiL
|
36
36
|
Egnradf17FANvSHDTppAf9Pz
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2021-05-
|
38
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dynarex-password
|
metadata.gz.sig
CHANGED
Binary file
|