insight_bitpay 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: b1682f3616cc81c7125193fcd78e71878e3aa5c7
4
- data.tar.gz: 32b201edf9bde597148a4b3c597b7738b41675d0
3
+ metadata.gz: 08414d03a117991f4f034c19ebcc556868ef4df1
4
+ data.tar.gz: 223adc9593c3d27170c28328c8082ebd951e4ee1
5
5
  SHA512:
6
- metadata.gz: d33fa3fb71cf798763cf4127c7e642b1dc95fca7f0309cf83c37e1cfcbad338b6eb1d15d03fc73db12bb4011c5309b2272a4cf0f15c9084e860885f0eb6291ef
7
- data.tar.gz: 0cf9dfbea6748e78f9dd318972137323627e02fab139a923a5020b290aecc310e52b8496e95ae5e2863f185f311c71b6444cfcdb9a48d0d22b72df096883f0d4
6
+ metadata.gz: 3c8db4a4d4a397b5bec074b46478ffa1e0a82331ae0d159a0b4829539032b557730ed051790775aad06ca6a206cdde4cf6ded641fdec5bbe214b4a0f17ef1652
7
+ data.tar.gz: 8cd1420b60927c6ec55f8f7e19efb30156d8ffaf736233061ffad3c4d1b3684c4db16e36eedc42db04ca8d49871e006da4890fdf82d1d5d4594e577f2f92dc80
data/lib/insight.rb CHANGED
@@ -7,10 +7,10 @@ module Insight
7
7
 
8
8
  attr_writer :api
9
9
 
10
- BLOCK_CHAIN = 'btc'
10
+ MAIN_CHAIN = 'btc'
11
11
 
12
12
  def self.api
13
- @api ||= API.new(network:BLOCK_CHAIN)
13
+ @api ||= API.new(network: MAIN_CHAIN)
14
14
  end
15
15
 
16
16
  def self.method_missing(sym, *args, &block)
data/lib/insight/api.rb CHANGED
@@ -3,18 +3,18 @@ module Insight
3
3
  attr_reader :network,
4
4
  :api_version
5
5
 
6
- def initialize(network:'btc')
7
- @network = network
6
+ def initialize(network: 'btc', url: nil, api_version: nil)
7
+ @url = url
8
+ self.network = network
8
9
  @api_version = api_version
9
- @connection = Connection.new(url)
10
10
  end
11
11
 
12
12
  def url
13
- if network == 'btc'
14
- 'https://insight.bitpay.com/api'
15
- else
16
- 'https://test-insight.bitpay.com/api'
17
- end
13
+ @url ||= if network == 'btc'
14
+ 'https://insight.bitpay.com/api'
15
+ else
16
+ 'https://test-insight.bitpay.com/api'
17
+ end
18
18
  end
19
19
 
20
20
  def network=(network)
@@ -1,3 +1,3 @@
1
1
  module Insight
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insight_bitpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genaro Madrid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client