quanto-ruby 0.0.9 → 0.0.10

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: aaefc38ba80f8cf60d46b3d6796d9b6bf985422f
4
- data.tar.gz: cf1cc24452ec14de6a0f10d0ec962e9d223f5abc
3
+ metadata.gz: 3b0b2421490e6e7576d41ff5a5a97c134946af60
4
+ data.tar.gz: c8a52bac55b8e48da94a8cbe0216b9a8c04d1565
5
5
  SHA512:
6
- metadata.gz: 71e48811edd1d6f44791acca0927a61c68984c3db8391eb3ef4db1857ef2a7aa14a86c919c4bacc50dced5fab744f2b74f6eddab6caea12472df67f440cf27c5
7
- data.tar.gz: 7f6308591668ae31537c1b2d9a2deb9f1a7e6e59c010828d24a44e1513fbc75a7db4f8cc02ab93f17aa72406053827c071f548b058bc5e67e5e1d726d5118abf
6
+ metadata.gz: 634d4ac35a850cfd1ff367c3bb4f6852161c0f11e013d7f26b43aadfb6f9d12ad1fb09b4d8ba173b31c94e46a4452aa33e1ec6e45cc119ea1fa6e128a7be88b3
7
+ data.tar.gz: f65a0080fdc5b229d409d57a3464326837733698cb687bd3bcda17e00f35a5c098fa792dc96d7f503b46fa0d1a931f3c67041df799b2c51ee07fa080ee466392
@@ -18,6 +18,10 @@ module Quanto
18
18
  attributes["url"]
19
19
  end
20
20
 
21
+ def metrics
22
+ get('/plugin/metrics')
23
+ end
24
+
21
25
  end
22
26
 
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Quanto
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -12,17 +12,17 @@ describe Quanto::Client do
12
12
  let(:client) { Quanto::Client.new(consumer_key, consumer_secret, options) }
13
13
 
14
14
  it 'constructs an OAuth2 consumer' do
15
- OAuth2::Client.should_receive(:new)
15
+ expect(OAuth2::Client).to receive(:new)
16
16
  Quanto::Client.new(consumer_key, consumer_secret)
17
17
  end
18
18
 
19
19
  it 'passes consumer credentials' do
20
- OAuth2::Client.should_receive(:new).with(consumer_key, consumer_secret, anything)
20
+ expect(OAuth2::Client).to receive(:new).with(consumer_key, consumer_secret, anything)
21
21
  Quanto::Client.new(consumer_key, consumer_secret)
22
22
  end
23
23
 
24
24
  it 'passes the quanto URL' do
25
- OAuth2::Client.should_receive(:new) do |key, secret, options|
25
+ expect(OAuth2::Client).to receive(:new) do |key, secret, options|
26
26
  expect(options[:site]).to eq('http://quanto.herokuapp.com')
27
27
  end
28
28
  Quanto::Client.new(consumer_key, consumer_secret)
@@ -48,15 +48,13 @@ describe Quanto::Client do
48
48
  let(:options) { { access_token: 'token' } }
49
49
 
50
50
  it 'creates an access token' do
51
- OAuth2::AccessToken.should_receive(:new)
51
+ expect(OAuth2::AccessToken).to receive(:new)
52
52
  client.send(:access_token)
53
53
  end
54
54
 
55
55
  it 'passes the consumer' do
56
- OAuth2::AccessToken
57
- .should_receive(:new)
58
- .with(anything, options[:access_token])
59
- client.stub(:consumer).and_return(double('OAuth2::Client'))
56
+ expect(OAuth2::AccessToken).to receive(:new).with(anything, options[:access_token])
57
+ allow(client).to receive(:consumer).and_return(double('OAuth2::Client'))
60
58
  client.send(:access_token)
61
59
  end
62
60
 
@@ -70,13 +68,13 @@ describe Quanto::Client do
70
68
  let(:token) { double('OAuth2::AccessToken') }
71
69
 
72
70
  before(:each) do
73
- client.stub(:access_token).and_return(token)
71
+ allow(client).to receive(:access_token).and_return(token)
74
72
  end
75
73
 
76
74
  it 'prepends /api/v1' do
77
75
  path = 'foo'
78
76
  prefix = "/api/v1/"
79
- token.should_receive(:post).with("#{prefix}#{path}", anything)
77
+ expect(token).to receive(:post).with("#{prefix}#{path}", anything)
80
78
  client.send(:post, path, {})
81
79
  end
82
80
 
data/spec/spec_helper.rb CHANGED
@@ -8,7 +8,6 @@
8
8
  require 'quanto'
9
9
 
10
10
  RSpec.configure do |config|
11
- config.treat_symbols_as_metadata_keys_with_true_values = true
12
11
  config.run_all_when_everything_filtered = true
13
12
  config.filter_run :focus
14
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quanto-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rasmus Rygaard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-07 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2