round 0.8.0 → 0.8.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
  SHA1:
3
- metadata.gz: eb0ea3854098e41908e3d476e21df3ce5165dec2
4
- data.tar.gz: f5aac8616931dd4a58c02e3b4f86882e4d716e26
3
+ metadata.gz: 1665ac27a3c3aef155e7a2ff5a5519e161f40a81
4
+ data.tar.gz: 09c9b9b32338f15c5ef44cf83dc92344b2e157b6
5
5
  SHA512:
6
- metadata.gz: ddadccacbd118d36974beb5f899187a7f88999ad2a0302a26bc81a2d031bc3f459f6724453a0a906d548f3d16df21e59706c9a376d222484e260f30d1385b422
7
- data.tar.gz: 6d8edb4aed48f73e8d0a6c9c2bd0c724d631310ed03d76ff9d58d949a066b68d417b31de372aaadf9100103d1bfaead79c3d7918ed62fef26c6f048af8a3d6ff
6
+ metadata.gz: cb24c4eaebfe480b3149608d18623feae8a708778281aab0e0b1c8cbb0797e3325dbf121cc1d64a50698b5a2378bb73826d2ec39e86c04feed8005d4f13fe2f7
7
+ data.tar.gz: 83e16dc65e63d9b339f46333e2065184b9f7085ef72664a9a738a276d0303c5a26042fdc7e1569eacbcab6aed9ca366acbdfdf343bd0c9053edb4c432d163b07
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -40,8 +40,8 @@ The round client is designed to interact with Gem's API to make building blockch
40
40
  * [More about Transactions](docs/advanced.md#transactions-and-payments)
41
41
  * [Subscriptions](docs/advanced.md#subscriptions)
42
42
  * [Integrated 2FA](docs/advanced.md#integrated-2fa)
43
- * [Operational/Custodail wallet models](docs/advanced.md#operationalcustodial-wallets)
44
- * [Operational/Custodial payments](docs/advanced.md#payments)
43
+ * [Operational/Custodial/Business wallet models](docs/advanced.md#operationalcustodial-wallets)
44
+ * [Operational/Custodial/Business payments](docs/advanced.md#payments)
45
45
 
46
46
  ### Introduction
47
47
  This tutorial will have you run through setting up your application and creating your own wallet as a user of your application. By the end of the tutorial, you will have created your User, wallet, account, an address as well as fund it and then make a payment using the bitcoin testnet network.
@@ -23,6 +23,10 @@ module Round
23
23
  users.detect { |u| u.key == key }
24
24
  end
25
25
 
26
+ def account_from_key(user_key, account_key)
27
+ user_from_key(user_key).accounts.detect { |a| a.key == account_key }
28
+ end
29
+
26
30
  def self.hash_identifier
27
31
  'name'
28
32
  end
data/lib/round/base.rb CHANGED
@@ -30,7 +30,7 @@ module Round
30
30
 
31
31
  def self.association(name, klass)
32
32
  define_method(name) do
33
- Kernel.const_get(klass).new(resource: @resource.send(name), client: @client)
33
+ Kernel.const_get(klass).new(resource: @resource.send(name), client: @client).refresh
34
34
  end
35
35
  end
36
36
 
@@ -16,12 +16,13 @@ module Round
16
16
  content = self.content_type.new(options.merge(resource: resource, client: @client))
17
17
  yield content if block
18
18
  self.add(content)
19
- end if @resource.list
19
+ end if @resource.list rescue nil
20
20
  end
21
21
 
22
22
  def refresh(options = {})
23
23
  @collection = []
24
24
  populate_data(options)
25
+ self
25
26
  end
26
27
 
27
28
  def add(content)
data/lib/round/user.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  module Round
2
2
  class User < Round::Base
3
- association :wallets, 'Round::WalletCollection'
4
3
  association :default_wallet, 'Round::Wallet'
5
4
 
6
5
  def self.hash_identifier
@@ -18,7 +17,7 @@ module Round
18
17
  end
19
18
 
20
19
  def wallet
21
- wallets.first
20
+ default_wallet
22
21
  end
23
22
  end
24
23
 
data/lib/round/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Round
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: round
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew King
@@ -31,7 +31,7 @@ cert_chain:
31
31
  tdc4VS7IlSRxlZ3dBOgiigy9GXpJ+7F831AqjxL39EPwdr7RguTNz+pi//RKaT/U
32
32
  IlpVB+Xfk0vQdP7iYfjGxDzUf0FACMjsR95waJmadKW1Iy6STw2hwPhYIQz1Hu1A
33
33
  -----END CERTIFICATE-----
34
- date: 2015-05-28 00:00:00.000000000 Z
34
+ date: 2015-06-12 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: patchboard
@@ -173,6 +173,20 @@ dependencies:
173
173
  - - "~>"
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
+ - !ruby/object:Gem::Dependency
177
+ name: rake
178
+ requirement: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - "~>"
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
176
190
  - !ruby/object:Gem::Dependency
177
191
  name: term-ansicolor
178
192
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file