pochette_toshi 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pochette_toshi.rb +3 -4
- data/lib/pochette_toshi/version.rb +1 -1
- data/pochette_toshi.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7546dbb072bc052c6e1d7eb61339050eff59faa2
|
4
|
+
data.tar.gz: 7c96c0ae233773fc6843f53c1b90be6f8cb61e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95f66238a3bcc4adb746d6f64f81099207390a58b25a7dce6320c7ff639aa7280302df704b017f5dadf14e2e9463d9fe4e6064e02ecdae7ba8561e2e2898e81c
|
7
|
+
data.tar.gz: 6dd4076fc837600ea18dd0f39f6f65e1a55184daaf1160239e5297dfe894b2f57d63b55bdb6021b018660ecc5b01af50b42fba39b4effa88aa03d0840f668fe4
|
data/lib/pochette_toshi.rb
CHANGED
@@ -12,7 +12,7 @@ require 'oj'
|
|
12
12
|
# Be careful when changing anything, and/or make sure
|
13
13
|
# you can run and assert your changes with a local copy of
|
14
14
|
# a toshi testnet database.
|
15
|
-
class Pochette::Backends::Toshi
|
15
|
+
class Pochette::Backends::Toshi < Pochette::Backends::Base
|
16
16
|
cattr_accessor :db
|
17
17
|
|
18
18
|
def initialize(options)
|
@@ -215,11 +215,10 @@ class Pochette::Backends::Toshi
|
|
215
215
|
query('select max(height) from blocks where branch = 0')[0][0].to_i
|
216
216
|
end
|
217
217
|
|
218
|
-
def
|
218
|
+
def propagate(hex)
|
219
219
|
domain = Pochette.testnet ? 'testnet3' : 'bitcoin'
|
220
|
-
|
220
|
+
RestClient.post "https://#{domain}.toshi.io/api/v0/transactions",
|
221
221
|
{"hex" => hex}.to_json, content_type: :json, accept: :json
|
222
|
-
Oj.load(response)['hash']
|
223
222
|
end
|
224
223
|
|
225
224
|
def query(sql)
|
data/pochette_toshi.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
|
-
spec.add_dependency "pochette", "~> 0.
|
19
|
+
spec.add_dependency "pochette", "~> 0.3.0"
|
20
20
|
spec.add_dependency "pg", "~> 0.17"
|
21
21
|
spec.add_dependency "activesupport", "~> 4.2"
|
22
22
|
spec.add_dependency "sequel", "~> 4.27"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pochette_toshi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nubis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pochette
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pg
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|