pochette_toshi 0.1.5 → 0.1.7

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: d94fc52b7fbde52ebf81780eeba1129d08e04509
4
- data.tar.gz: 0b0989fd55bce6a3634ed042c629629d59adb907
3
+ metadata.gz: 9f0a9d36533de58e18765f1f045d12b4dd5af3aa
4
+ data.tar.gz: b966fd2ecb0edfe78fdf2aa38ce09b63e0fb14d1
5
5
  SHA512:
6
- metadata.gz: dac782e6fc161c1423701f31cf2229e3b4b64748a58a791651d83d3f564d259eca788664c45c1d01b49ed3a5783eb6c106a86b4d3db6f64a60e59850d46b2663
7
- data.tar.gz: 7e09707da001fa2e13738b3e7a53139b7feccd3fbbc77d4050d1e9077ce5bcd0df5d533ac8adff60d262186f8276e2e1c9554e9237cdad554a4fd7dc5e53fbe3
6
+ metadata.gz: da2ff00eefcf576a2e032d7c7edddb9b787ab05a85f3fa84dc3daafa1ce9c23f52e302aaa1a1a879b51ae6e915b743413e28331d1f1402e35cf9c1b7016d50a2
7
+ data.tar.gz: a38c5937a9c17cf3dde9bef73a8b368a15befec26778b7ce5f08db36f107a4334f379ec55e193d377feb9cb4accc0eb4a062708cdc78e5d8aa8b4dd14ea4b583
@@ -1,3 +1,3 @@
1
1
  module PochetteToshi
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -3,7 +3,7 @@ require "active_support"
3
3
  require "active_support/core_ext"
4
4
  require "pg"
5
5
  require 'pochette'
6
- require 'net/http'
6
+ require 'rest-client'
7
7
  require 'uri'
8
8
  require 'oj'
9
9
 
@@ -216,8 +216,8 @@ class Pochette::Backends::Toshi
216
216
 
217
217
  def pushtx(hex)
218
218
  domain = Pochette.testnet ? 'testnet3' : 'bitcoin'
219
- uri = URI.parse("https://#{domain}.toshi.io/api/v0/transactions")
220
- response = Oj.load(Net::HTTP.post_form(uri, {"hex" => hex}).body)
219
+ response = RestClient.post "https://#{domain}.toshi.io/api/v0/transactions",
220
+ {"hex" => hex}.to_json, content_type: :json, accept: :json
221
221
  response['hash']
222
222
  end
223
223
 
@@ -16,9 +16,10 @@ 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.1.5"
19
+ spec.add_dependency "pochette", "~> 0.1.7"
20
20
  spec.add_dependency "pg", "~> 0.17"
21
21
  spec.add_dependency "activesupport", "~> 4.2"
22
+ spec.add_dependency "rest-client", "~> 1.8.0"
22
23
 
23
24
  spec.add_development_dependency "bundler", "~> 1.9"
24
25
  spec.add_development_dependency "rake", "~> 10.0"
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.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nubis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-30 00:00:00.000000000 Z
11
+ date: 2015-10-01 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.1.5
19
+ version: 0.1.7
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.1.5
26
+ version: 0.1.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rest-client
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.8.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.8.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement