netki 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b46bd547721cf1146a0dce0eba95249933d8056
4
- data.tar.gz: 09e6f59dc21c074e9da4e75be99c8a1e506582ac
3
+ metadata.gz: 1a7751ae647deb4dff59fef801691193a52bec58
4
+ data.tar.gz: e49e407b3940f6520d0f803d030f25131a804ca3
5
5
  SHA512:
6
- metadata.gz: 383f430939a557a70a7acb1217b5e8ee1ee6393cf2318cf44b01633446eae7ffcaccac817e550574ccc2ba0ba806a17ca9eca369f19acf2d60c2a782ba979db0
7
- data.tar.gz: d2d780844ae8d36506ad457f9139692027022dc1ead9d304f56fc75985c1a182724654aae6d71592c0067078dba506f1db795187ec02b58bf9383f38cef70e4e
6
+ metadata.gz: b021b365b8943226acbfef1ab1d5db4c1781e28f798e8f7a517f7939ff0b17122a54a1e4a675b61fc5d201e217dde9c0cb2047eb4cd63f33ce3c0b4f72d2522d
7
+ data.tar.gz: 49cd38fbf1b58921f827bbb454d70b4248ecad8341be86891bac582df326adf1be82c0d959284103984bb01e71f7fb161aaedeaf23624dd8617692a0a1d202b5
data/lib/netki/netki.rb CHANGED
@@ -117,7 +117,7 @@ module Netki
117
117
 
118
118
  # Set the address or URI for the given currency for this wallet name
119
119
  def set_currency_address(currency, address)
120
- @wallets[currency][:address] = address
120
+ @wallets[currency] = { address: address }
121
121
  end
122
122
 
123
123
  # Remove a used currency from this wallet name
@@ -156,7 +156,7 @@ module Netki
156
156
  }
157
157
 
158
158
  wn_api_data = {}
159
- wn_api_data['wallet_names'] = [wn_data,]
159
+ wn_api_data['wallet_names'] = [wn_data]
160
160
 
161
161
  if @id
162
162
  wn_data['id'] = @id
@@ -167,7 +167,9 @@ module Netki
167
167
 
168
168
  unless @id
169
169
  response['wallet_names'].each do |wn|
170
- if response['success'] && wn['domain_name'] == @domain_name && wn['name'] == @name
170
+ if (response['success'] &&
171
+ wn['domain_name'] == @domain_name &&
172
+ wn['name'] == @name)
171
173
  @id = wn['id']
172
174
  else
173
175
  raise 'Success, but invalid response received!'
@@ -182,7 +184,7 @@ module Netki
182
184
  raise 'Unable to Delete Object that Does Not Exist Remotely' unless @id
183
185
 
184
186
  wn_api_data = {
185
- wallet_names: [{domain_name: @domain_name, id: @id}]
187
+ wallet_names: [ { domain_name: @domain_name, id: @id } ]
186
188
  }
187
189
 
188
190
  Netki.process_request(@api_key, @partner_id, "#{@api_url}/v1/partner/walletname", 'DELETE', JSON.dump(wn_api_data))
@@ -266,12 +268,11 @@ module Netki
266
268
  # Returns a list of Hashes, each containing current status for each domain
267
269
  #
268
270
  def get_domain_status(domain_name=nil)
269
-
270
271
  uri="#{@api_url}/v1/partner/domain"
271
272
  uri << "/#{domain_name}" unless domain_name.nil?
272
273
 
273
274
  response = Netki.process_request(@api_key, @partner_id, uri, method='GET')
274
- response['domains']
275
+ response['domains'] || response
275
276
  end
276
277
 
277
278
  ##
data/lib/netki/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Netki
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt David
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient