blockstream_satellite 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 8d1135b391797f323b91a479490743a7a96a0894a69871c286031532c6274cff
4
- data.tar.gz: 9cd0355f530d00d3c1aa4ff8d1591f9e87b0952d1e05aa09b29019fea6283ac9
3
+ metadata.gz: 280fa5945dce4d9b6661132d5f9e48ad790982af5a7ba3e517285417fd97b3cf
4
+ data.tar.gz: be8be0603aa918030ada9aad3e6c7000681bbd3380c79d8a3581e20fdcebfde7
5
5
  SHA512:
6
- metadata.gz: c2ebbd8285cd42e435476db3973fe50ff79e9d28599a058fbdc9378485ed3b6f06c8183ae51b3e892e761a54178c5a8441240ba0c7ccf03998d2e5f2026e8292
7
- data.tar.gz: 49e0bbf5ab6fd068f8c712d36408e1bc57c162be08b22dcfc9e4b362952ed47de2fa838bdaf608af2ea1e2e1691a77507c1bb13f0d6028c8f9e0cde96b6e2712
6
+ metadata.gz: 3e80d0b4fd404dfbf24792e37776fb4145548c8e6464f91982e8864ecd9184e391681c5efdcb4daf2659bc59c346d8ea18310bd01c825e51735f43ff08b4bb55
7
+ data.tar.gz: 2bdc33ad96157b3fe851eb284b9658c36ba57727530fdc478d432657295f4802eee4a21457e7a9ecc4ed404de90372d6a3bfd2cfb062a7eb14939cce11b3f175
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["hello@michaelbumann.com"]
11
11
 
12
12
  spec.summary = %q{API client for the Blockstream satellite}
13
- spec.description = %q{API clent to interact with the Blockstream satellite}
13
+ spec.description = %q{API client to interact with the Blockstream satellite}
14
14
  spec.homepage = "http://github.com/bumi/blockstream_satellite"
15
15
  spec.license = "MIT"
16
16
 
@@ -15,7 +15,6 @@ module BlockstreamSatellite
15
15
  end
16
16
 
17
17
  def post(path, body = nil, &block)
18
- puts body.inspect
19
18
  request(:post, path, nil, body, &block)
20
19
  end
21
20
 
@@ -7,7 +7,7 @@ require 'securerandom'
7
7
  module BlockstreamSatellite
8
8
  class Order
9
9
 
10
- attr_accessor :attributes
10
+ attr_accessor :attributes, :file
11
11
 
12
12
  def initialize(attributes)
13
13
  self.attributes = attributes.with_indifferent_access
@@ -37,7 +37,7 @@ module BlockstreamSatellite
37
37
  options[:file] = UploadIO.new(options[:file], 'text/plain')
38
38
  response = BlockstreamSatellite.client.post('order', options)
39
39
  if response.success?
40
- Order.new(response.body)
40
+ Order.new(response.body).tap { |o| o.file = options[:file] }
41
41
  else
42
42
  response
43
43
  end
@@ -59,8 +59,12 @@ module BlockstreamSatellite
59
59
  end
60
60
 
61
61
  def pay
62
- BlockstreamSatellite.client.pay(self.payreq)
63
- self.refresh
62
+ response = BlockstreamSatellite.client.pay(self.payreq)
63
+ if response.payment_error == ''
64
+ self.refresh
65
+ else
66
+ response
67
+ end
64
68
  end
65
69
 
66
70
  def bump(bid_increase)
@@ -1,3 +1,3 @@
1
1
  module BlockstreamSatellite
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockstream_satellite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bumann
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 5.0.1
111
- description: API clent to interact with the Blockstream satellite
111
+ description: API client to interact with the Blockstream satellite
112
112
  email:
113
113
  - hello@michaelbumann.com
114
114
  executables: []