itbit 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- itbit (0.0.4)
4
+ itbit (0.0.5)
5
5
  activesupport
6
- rest_client
6
+ rest-client
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -20,11 +20,14 @@ GEM
20
20
  diff-lcs (1.2.5)
21
21
  i18n (0.6.9)
22
22
  json (1.8.1)
23
+ mime-types (1.25.1)
23
24
  minitest (5.3.5)
24
- netrc (0.7.9)
25
25
  rake (10.3.2)
26
- rest_client (1.8.2)
27
- netrc (~> 0.7.7)
26
+ rdoc (4.2.0)
27
+ json (~> 1.4)
28
+ rest-client (1.6.8)
29
+ mime-types (~> 1.16)
30
+ rdoc (>= 2.4.2)
28
31
  rspec (3.0.0)
29
32
  rspec-core (~> 3.0.0)
30
33
  rspec-expectations (~> 3.0.0)
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "activesupport"
23
- spec.add_dependency "rest_client"
23
+ spec.add_dependency "rest-client"
24
24
 
25
25
  spec.required_ruby_version = '>= 1.9.3'
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
@@ -7,7 +7,9 @@ module Itbit
7
7
  # The symbol ticker conveniently formatted as a ruby Hash with
8
8
  # symbolized keys.
9
9
  def self.ticker
10
- raw_ticker = JSON.parse(RestClient.get("#{Api.api_url}/markets/#{symbol.upcase}/ticker"))
10
+ url = "#{Api.api_url}/markets/#{symbol.upcase}/ticker"
11
+ rest_cl = RestClient::Request.execute :method => :get, :url => url, :ssl_version => 'SSLv23'
12
+ raw_ticker = JSON.parse(rest_cl)
11
13
  raw_ticker.reduce({}) do |ticker, pair|
12
14
  key = pair.first.underscore.to_sym
13
15
  value = case key
@@ -40,10 +42,11 @@ module Itbit
40
42
  end
41
43
 
42
44
  # @visibility private
43
- def self.old_request(path, options = { })
45
+ def self.old_request(path, options = { })
44
46
  url = "https://www.itbit.com/api/v2#{path}"
45
47
  url << "?#{options.to_query}" if options.any?
46
- JSON.parse(RestClient.get(url))
48
+ rest_cl = RestClient::Request.execute :method => :get, :url => url, :ssl_version => 'SSLv23'
49
+ JSON.parse(rest_cl)
47
50
  end
48
51
  end
49
52
 
@@ -1,3 +1,3 @@
1
1
  module Itbit
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-05 00:00:00.000000000 Z
13
+ date: 2015-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -29,7 +29,7 @@ dependencies:
29
29
  - !ruby/object:Gem::Version
30
30
  version: '0'
31
31
  - !ruby/object:Gem::Dependency
32
- name: rest_client
32
+ name: rest-client
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  none: false
35
35
  requirements: