etherscan_api 0.3.0 → 0.4.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
  SHA256:
3
- metadata.gz: 94ca4f583b2c81087814b37c99b1821f2eee522b88677c122a660e7d76d7ede1
4
- data.tar.gz: 59bc3c44379ac3095ebfae93f74485bf963f8411c980ed03257a6fa8c2ac5a46
3
+ metadata.gz: 36a6d6ef1ed9b47148eaf83bc0bb294f30033982afc161b062607f24193946d3
4
+ data.tar.gz: 2b606924deb7c17081ca690211ed6086740b573654eb35d97d873e0334cf3f16
5
5
  SHA512:
6
- metadata.gz: 77c303ba5ce6866f580ff7913a0377804257e3b14076103c28eb8ccdf48cd6526384f646d51b984a0da87fa689845e6279a8e7e22722ddfc1d1434b0433708ee
7
- data.tar.gz: '09a2dbe36b771b4f1b843a5d48bd9479f5848aaf4286f0374f6ba76fa597de7834557d1ed38d4163537f714c91bce1df7bee67d2015e4d5be1d635ca5a7b64fc'
6
+ metadata.gz: 2dd80f5769104c428452ce6c254dfc44c14bae272f023e11fc739a6974964187d10b34e7c06104e860e2e627db86af9d790897aea7a9e1b05d87b5500c06ff00
7
+ data.tar.gz: 789b7f07bb14853c9669c97f3d45a68bd08fa4de4a2981f2d847d36be66ee7a79e6bdf18f4f57aac23b0e4bb274d10f17de95e3cac2f15f0b7ff36d0db89fce1
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'faraday'
4
+ gem 'json', '~> 2.1'
4
5
 
5
6
  group :development do
6
- gem 'json', '~> 2.1'
7
7
  gem 'rspec', '~> 3.0'
8
8
  gem 'shoulda', '>= 0'
9
9
  gem 'rdoc', '~> 6.0.3'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: etherscan_api 0.3.0 ruby lib
5
+ # stub: etherscan_api 0.4.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "etherscan_api".freeze
9
- s.version = "0.3.0"
9
+ s.version = "0.4.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -53,7 +53,7 @@ Gem::Specification.new do |s|
53
53
 
54
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
55
  s.add_runtime_dependency(%q<faraday>.freeze, [">= 0"])
56
- s.add_development_dependency(%q<json>.freeze, ["~> 2.1"])
56
+ s.add_runtime_dependency(%q<json>.freeze, ["~> 2.1"])
57
57
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.0"])
58
58
  s.add_development_dependency(%q<shoulda>.freeze, [">= 0"])
59
59
  s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.0.3"])
@@ -1,4 +1,5 @@
1
1
  require 'faraday'
2
+ require 'json'
2
3
 
3
4
  module Etherscan
4
5
  class Client
@@ -22,13 +23,13 @@ module Etherscan
22
23
  def get(params = {})
23
24
  endpoint = 'api'
24
25
  merged_params = params.merge({apikey: key})
25
- response = conn.get(url) do |req|
26
+ response = conn.get(endpoint) do |req|
26
27
  req.headers = headers
27
28
  req.params = merged_params
28
29
  end
29
30
  fail Etherscan::Exception, response if raise_exceptions? && response.status != 200
30
31
 
31
- response
32
+ JSON(response.body)
32
33
  end
33
34
 
34
35
  def conn
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etherscan_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Paluy
@@ -31,7 +31,7 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.1'
34
- type: :development
34
+ type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements: