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 +4 -4
- data/lib/insight.rb +2 -2
- data/lib/insight/api.rb +8 -8
- data/lib/insight/version.rb +1 -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: 08414d03a117991f4f034c19ebcc556868ef4df1
|
4
|
+
data.tar.gz: 223adc9593c3d27170c28328c8082ebd951e4ee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8db4a4d4a397b5bec074b46478ffa1e0a82331ae0d159a0b4829539032b557730ed051790775aad06ca6a206cdde4cf6ded641fdec5bbe214b4a0f17ef1652
|
7
|
+
data.tar.gz: 8cd1420b60927c6ec55f8f7e19efb30156d8ffaf736233061ffad3c4d1b3684c4db16e36eedc42db04ca8d49871e006da4890fdf82d1d5d4594e577f2f92dc80
|
data/lib/insight.rb
CHANGED
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
|
-
@
|
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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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)
|
data/lib/insight/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|