blockstream_satellite 0.1.0 → 0.1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 280fa5945dce4d9b6661132d5f9e48ad790982af5a7ba3e517285417fd97b3cf
|
4
|
+
data.tar.gz: be8be0603aa918030ada9aad3e6c7000681bbd3380c79d8a3581e20fdcebfde7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
|
@@ -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
|
-
|
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)
|
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.
|
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
|
111
|
+
description: API client to interact with the Blockstream satellite
|
112
112
|
email:
|
113
113
|
- hello@michaelbumann.com
|
114
114
|
executables: []
|