indium 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/indium.rb +11 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da417d600b6a8b6428b730fda52dea86bde8c70c
4
- data.tar.gz: f452cc3254c9ff6c0b165355d46ce62567e32dbb
3
+ metadata.gz: 4d1b18376be72f4e25187b605745c81c721b0a90
4
+ data.tar.gz: d2d7fc39d2d9a9bcd5a4ebdc6e858ecdb2def394
5
5
  SHA512:
6
- metadata.gz: 5c3377df374901583cc92435712f9f282e0262b18dbc29c0c81ab45ea3c7852a79468a5993331cc0f1dd8a38abcc49fa8fb7978fe670e5554c3fef97d869652a
7
- data.tar.gz: eaddc915158d6d1697a7ab8032375ffc6a32dacc1fb9f7ede7e6d0f70aedce1ab3842cb7154f2fd1f5a97829020f43b801d9bf03c558eea3b1e951b9c5eadf63
6
+ metadata.gz: 88d49684dc04019ea04b916060aae191af4ad5dece33fd029b334056e45a59807aea4a9cd08b61cb0b7355d9a833b6309a146c9fc7a3fd792f1ebfa1f95cf20c
7
+ data.tar.gz: 95ceb7badafe9b8353bc3c7802fec1925c9a076dea467eba35a818cb9c6c18bfab91ad4a27b5ab31c15f1e95b1913be867cd65b29d7cdb2841db51ca5a97c7d4
data/lib/indium.rb CHANGED
@@ -2,13 +2,22 @@ require 'bigchaindb'
2
2
 
3
3
  class Indium
4
4
  attr_reader :asset_id
5
+ attr_reader :ipdb
5
6
 
6
- def initialize(asset_id)
7
+ def initialize(asset_id, ipdb)
7
8
  @asset_id = asset_id
8
- @ipdb = {"url" => "https://test.ipdb.io/api/v1"}
9
+ @ipdb = ipdb
9
10
  end
10
11
 
11
12
  def balance(pubkey)
12
13
  Bdb.balance_asset(@ipdb, public_key, @asset_id)
13
14
  end
15
+
16
+ def self.test(app_id = nil, app_key = nil)
17
+ self.new(test_asset_id, {"url" => "https://test.ipdb.io/api/v1", "app_id" => app_id, "app_key" => app_key})
18
+ end
19
+
20
+ def self.prod(app_id = nil, app_key = nil)
21
+ self.new(prod_asset_id, {"url" => "https://test.ipdb.io/api/v1", "app_id" => app_id, "app_key" => app_key})
22
+ end
14
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nilesh Trivedi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-23 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigchaindb