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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af2ffb3271cb4614b58a68322d77be15e6bbc85c
4
- data.tar.gz: 20186cad25e90045c1cdc48255d35a108f31b4c8
3
+ metadata.gz: 7546dbb072bc052c6e1d7eb61339050eff59faa2
4
+ data.tar.gz: 7c96c0ae233773fc6843f53c1b90be6f8cb61e15
5
5
  SHA512:
6
- metadata.gz: 3af451d48b06cad5da5618c7de77b54d2d95ab1cfcde814727824d4105d85b7b38ae54fa6a4e993ef32683299623cce8debd6d9e89a24c7c8eb24014daca515a
7
- data.tar.gz: 575f4027207af6e3f10d7e7c3443afcc7b82a94fb3924806883ac9b2dcbe5c341c81a134c80a36e1f37548179ac0da6ccc96c2c09f61d906a1d70fd169ef60a5
6
+ metadata.gz: 95f66238a3bcc4adb746d6f64f81099207390a58b25a7dce6320c7ff639aa7280302df704b017f5dadf14e2e9463d9fe4e6064e02ecdae7ba8561e2e2898e81c
7
+ data.tar.gz: 6dd4076fc837600ea18dd0f39f6f65e1a55184daaf1160239e5297dfe894b2f57d63b55bdb6021b018660ecc5b01af50b42fba39b4effa88aa03d0840f668fe4
@@ -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 pushtx(hex)
218
+ def propagate(hex)
219
219
  domain = Pochette.testnet ? 'testnet3' : 'bitcoin'
220
- response = RestClient.post "https://#{domain}.toshi.io/api/v0/transactions",
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)
@@ -1,3 +1,3 @@
1
1
  module PochetteToshi
2
- VERSION = "0.2.3"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -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.2.3"
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.2.3
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: 2015-12-18 00:00:00.000000000 Z
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.2.3
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.2.3
26
+ version: 0.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement