mtgox 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  --color
2
+ --order random
data/Gemfile CHANGED
@@ -1,7 +1,3 @@
1
- source 'http://rubygems.org'
2
-
3
- platforms :mri do
4
- gem 'simplecov'
5
- end
1
+ source 'https://rubygems.org'
6
2
 
7
3
  gemspec
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
- # Ruby wrapper for the Mt. Gox Trade API
1
+ # Ruby wrapper for the Mt. Gox Trade API [![Build Status](https://secure.travis-ci.org/sferik/mtgox.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/sferik/mtgox.png?travis)][gemnasium]
2
2
  Mt. Gox allows you to trade US Dollars (USD) for Bitcoins (BTC) or Bitcoins for
3
3
  US Dollars.
4
4
 
5
+ [travis]: http://travis-ci.org/sferik/mtgox
6
+ [gemnasium]: https://gemnasium.com/sferik/mtgox
7
+
5
8
  ## <a name="installation"></a>Installation
6
9
  gem install mtgox
7
10
 
@@ -16,16 +19,6 @@ typing `btc` in your bash shell simply by setting the following alias:
16
19
 
17
20
  [documentation]: http://rdoc.info/gems/mtgox
18
21
 
19
- ## <a name="ci"></a>Continuous Integration
20
- [![Build Status](https://secure.travis-ci.org/sferik/mtgox.png)][ci]
21
-
22
- [ci]: http://travis-ci.org/sferik/mtgox
23
-
24
- ## <a name="dependencies"></a>Dependency Status
25
- [![Dependency Status](https://gemnasium.com/sferik/mtgox.png)][gemnasium]
26
-
27
- [gemnasium]: https://gemnasium.com/sferik/mtgox
28
-
29
22
  ## <a name="examples"></a>Usage Examples
30
23
  require 'rubygems'
31
24
  require 'mtgox'
@@ -111,7 +104,7 @@ bug report should include a pull request with failing specs.
111
104
  reason, please do so in a separate commit.)
112
105
 
113
106
  ## <a name="versions"></a>Supported Ruby Versions
114
- This library aims to support and is [tested against][ci] the following Ruby
107
+ This library aims to support and is [tested against][travis] the following Ruby
115
108
  implementations:
116
109
 
117
110
  * Ruby 1.9.2
data/lib/mtgox/client.rb CHANGED
@@ -42,6 +42,7 @@ module MtGox
42
42
  Ticker.instance.low = ticker['low'].to_f
43
43
  Ticker.instance.sell = ticker['sell'].to_f
44
44
  Ticker.instance.volume = ticker['vol'].to_f
45
+ Ticker.instance.vwap = ticker['vwap'].to_f
45
46
  Ticker.instance
46
47
  end
47
48
 
@@ -1,7 +1,6 @@
1
1
  require 'faraday'
2
2
  require 'faraday/request/url_encoded'
3
3
  require 'faraday/response/raise_error'
4
- require 'faraday/response/parse_json'
5
4
  require 'faraday/response/raise_mtgox_error'
6
5
  require 'faraday_middleware'
7
6
  require 'mtgox/version'
@@ -23,7 +22,7 @@ module MtGox
23
22
  Faraday.new(options) do |connection|
24
23
  connection.use Faraday::Request::UrlEncoded
25
24
  connection.use Faraday::Response::RaiseError
26
- connection.use Faraday::Response::ParseJson
25
+ connection.use FaradayMiddleware::ParseJson
27
26
  connection.use Faraday::Response::RaiseMtGoxError
28
27
  connection.adapter(Faraday.default_adapter)
29
28
  end
data/lib/mtgox/ticker.rb CHANGED
@@ -5,6 +5,6 @@ module MtGox
5
5
  class Ticker
6
6
  include Singleton
7
7
  include PriceTicker
8
- attr_accessor :buy, :sell, :high, :low, :volume
8
+ attr_accessor :buy, :sell, :high, :low, :volume, :vwap
9
9
  end
10
10
  end
data/lib/mtgox/version.rb CHANGED
@@ -13,7 +13,7 @@ module MtGox
13
13
 
14
14
  # @return [Integer]
15
15
  def self.patch
16
- 2
16
+ 3
17
17
  end
18
18
 
19
19
  # @return [String, NilClass]
data/mtgox.gemspec CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |gem|
9
9
  gem.add_development_dependency 'rake'
10
10
  gem.add_development_dependency 'rdiscount'
11
11
  gem.add_development_dependency 'rspec'
12
+ gem.add_development_dependency 'simplecov'
12
13
  gem.add_development_dependency 'webmock'
13
14
  gem.add_development_dependency 'yard'
14
15
  gem.author = "Erik Michaels-Ober"
@@ -1 +1 @@
1
- {"ticker":{"high":28.678,"low":18.4,"vol":80531,"buy":26.4,"sell":26.6099,"last":26.5}}
1
+ {"ticker":{"high":28.678,"low":18.4,"vol":80531,"buy":26.4,"sell":26.6099,"last":26.5,"vwap":3.81561}}
data/spec/helper.rb CHANGED
@@ -1,5 +1,3 @@
1
- $:.unshift File.expand_path('..', __FILE__)
2
- $:.unshift File.expand_path('../../lib', __FILE__)
3
1
  require 'simplecov'
4
2
  SimpleCov.start
5
3
  require 'base64'
@@ -39,6 +39,7 @@ describe MtGox::Client do
39
39
  ticker.low.should == 18.4
40
40
  ticker.price.should == 26.5
41
41
  ticker.volume.should == 80531.0
42
+ ticker.vwap.should == 3.81561
42
43
  end
43
44
  end
44
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtgox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-02 00:00:00.000000000Z
12
+ date: 2012-01-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
- requirement: &70341100916500 !ruby/object:Gem::Requirement
16
+ requirement: &70153480942260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.7'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70341100916500
24
+ version_requirements: *70153480942260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: faraday_middleware
27
- requirement: &70341100915580 !ruby/object:Gem::Requirement
27
+ requirement: &70153480941760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.7'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70341100915580
35
+ version_requirements: *70153480941760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: multi_json
38
- requirement: &70341100914960 !ruby/object:Gem::Requirement
38
+ requirement: &70153480941300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70341100914960
46
+ version_requirements: *70153480941300
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: json
49
- requirement: &70341100914260 !ruby/object:Gem::Requirement
49
+ requirement: &70153480940920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70341100914260
57
+ version_requirements: *70153480940920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70341100913100 !ruby/object:Gem::Requirement
60
+ requirement: &70153480940460 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70341100913100
68
+ version_requirements: *70153480940460
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdiscount
71
- requirement: &70341100911140 !ruby/object:Gem::Requirement
71
+ requirement: &70153480940040 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70341100911140
79
+ version_requirements: *70153480940040
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &70341100910600 !ruby/object:Gem::Requirement
82
+ requirement: &70153480939620 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,21 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70341100910600
90
+ version_requirements: *70153480939620
91
+ - !ruby/object:Gem::Dependency
92
+ name: simplecov
93
+ requirement: &70153480939200 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70153480939200
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: webmock
93
- requirement: &70341100910040 !ruby/object:Gem::Requirement
104
+ requirement: &70153480938780 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ! '>='
@@ -98,10 +109,10 @@ dependencies:
98
109
  version: '0'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *70341100910040
112
+ version_requirements: *70153480938780
102
113
  - !ruby/object:Gem::Dependency
103
114
  name: yard
104
- requirement: &70341100909260 !ruby/object:Gem::Requirement
115
+ requirement: &70153480938360 !ruby/object:Gem::Requirement
105
116
  none: false
106
117
  requirements:
107
118
  - - ! '>='
@@ -109,7 +120,7 @@ dependencies:
109
120
  version: '0'
110
121
  type: :development
111
122
  prerelease: false
112
- version_requirements: *70341100909260
123
+ version_requirements: *70153480938360
113
124
  description: Ruby wrapper for the Mt. Gox Trade API. Mt. Gox allows you to trade US
114
125
  Dollars (USD) for Bitcoins (BTC) or Bitcoins for US Dollars.
115
126
  email: sferik@gmail.com
@@ -183,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
194
  version: '0'
184
195
  requirements: []
185
196
  rubyforge_project:
186
- rubygems_version: 1.8.10
197
+ rubygems_version: 1.8.15
187
198
  signing_key:
188
199
  specification_version: 3
189
200
  summary: Ruby wrapper for the Mt. Gox Trade API