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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6cc728376fd613e145e8a5e25260793d42c180fc4371c5ca9fe8e5a2ec813a72
4
- data.tar.gz: 8d6484ee483c96357f473433f3130b8fc716fdbe17416394496df61f6e94f45a
3
+ metadata.gz: 8103ad3c7e9e32737fae9535b6b10d3d832dade5fa2da615a9fd7f1f8ef6d646
4
+ data.tar.gz: 10373ee12ed1c673e2d58421da6187f77d0b0f79bb25ea12d5a798b6c9f3ce24
5
5
  SHA512:
6
- metadata.gz: 5b360cc811faaf3373152083403d5f16eab461c3c206e9781d9b6536fac4df94c1b3619f03550974f1ca3cb8e0f4b19803180ca47012d027bd79f9f17bef6bfa
7
- data.tar.gz: 615440723123c9659e39e4139c99ee1a498a246bf05882f12f998bde735453a5b7cc6eef00059f2ff99df3677c12da808f24483e48c8c0a9ca57e456ace3c688
6
+ metadata.gz: d32a946890cc15941752ee4aa375e04a9da9b51661b55e0f674805c99546cfdd21625c34b10a3a24562829d5843f039664faf6f6bd3709b6d475a4b1db3a698c
7
+ data.tar.gz: 9554e5d8f4aa8dd217eb40f36cb4e7468b61dab9048312bd25b346cd5866158e86316fa08e0509eb7ba536f1d81d1447d55c65debba27e9312535982b7b4459a
checksums.yaml.gz.sig CHANGED
@@ -1 +1,3 @@
1
- 7��.x�O��JMg1 � �!��P��@x���������$]j\e��i�B�)4k7��3��"7�~�9\G�y%߭�پ�����,����Y��4��"64��H ;g���C��G"L������H0ԍ���z[�Cr�b5�����_]�?�������Ӏ�t�;�g���>i|"��J��u��B!A\�֍�I�����.�m�л��{;�� ܔ gؙL/1���4LS-�p|�2ʘ�,�\��.7�U�V��; tB �S6xܑ5Ut0Jo�}T\!�J���NH��8�al|��5�'��Zj.�8D�m��
1
+ M��q����6vdH�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
@@ -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
- key = 'hkey_apps/justexchangerates'
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.0
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-03 00:00:00.000000000 Z
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