proz 0.0.4 → 0.0.5

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: 17ebaa46f749ca43d271be89e94c6cd76d460317
4
- data.tar.gz: 2df566c85c7b2edc8583d22885b10c4d91799a8d
3
+ metadata.gz: 7436134475d4ba3252d82a038d364d72f9b9b721
4
+ data.tar.gz: 567a43ef29460f31f0f3d88d3306547ade11ebc0
5
5
  SHA512:
6
- metadata.gz: 842518c039c3c15cc95641102305ddd14b122db648f5966e2bf16fcde045d96a2a9254b1958a8852eb37ffa6b6e7a501c68cc0e550e71b2d8689fb85f8d0a71f
7
- data.tar.gz: 20e25a4fd5ec07c6821a317d40ad25fd2b1822428bc519d0b89815bc59a24b9affff3fb7c2020b405daf590c315a14bd664bebef483052a9615763552f628a7e
6
+ metadata.gz: bdaab483bf3d52090dfce8c0a626eee92a9bd6c9d6aced42efd923abe3db418601fc3c409a4ef5dc2e8b4658026330185cc4329497087f336d069236af3ee9ea
7
+ data.tar.gz: a8a1050995b696699cf12bc8e11f9613abdd8a17b84df3bf9ecf093eab9be3283b68006e4ee8de3a0737f77d88790b0ae7295f609bdc5a2b5ced42cc6373e861
@@ -12,7 +12,7 @@ module Proz
12
12
  end
13
13
 
14
14
  def link
15
- client.auth_code.authorize_url(:scope => 'proz', :redirect_uri => redirect_uri)
15
+ client.auth_code.authorize_url(:redirect_uri => redirect_uri)
16
16
  end
17
17
 
18
18
  def exchange_code_for_token(code)
@@ -28,13 +28,13 @@ module Proz
28
28
  end
29
29
 
30
30
  def request_new_token_with_refresh_token(refresh_token)
31
- @refreshed_token ||= self.class.post('https://www.proz.com/oauth/token', :body => { :refresh_token => refresh_token, :redirect_uri => redirect_uri, :client_id => client_id, :scope => '', :client_secret => client_secret, :grant_type => 'refresh_token' })
31
+ @refreshed_token ||= self.class.post('https://www.proz.com/oauth/token', :body => { :refresh_token => refresh_token, :redirect_uri => redirect_uri, :client_id => client_id, :client_secret => client_secret, :grant_type => 'refresh_token' })
32
32
  end
33
33
 
34
34
  private
35
35
 
36
36
  def token(code)
37
- @token ||= self.class.post('https://www.proz.com/oauth/token', :body => { :code => code, :redirect_uri => redirect_uri, :client_id => client_id, :scope => '', :client_secret => client_secret, :grant_type => 'authorization_code' })
37
+ @token ||= self.class.post('https://www.proz.com/oauth/token', :body => { :code => code, :redirect_uri => redirect_uri, :client_id => client_id, :client_secret => client_secret, :grant_type => 'authorization_code' })
38
38
  end
39
39
 
40
40
  def client
@@ -1,3 +1,3 @@
1
1
  module Proz
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -19,7 +19,7 @@ RSpec.describe Proz::OAuth do
19
19
 
20
20
  it 'returns a link for the user to authorize the app' do
21
21
  proz = Proz::OAuth.new(client_id: 'abc123xxxxxxxxxxxxxx', client_secret: 'abc123xxxxyyyyy', redirect_uri: 'http://www.example.com')
22
- expect(proz.link).to eq("https://www.proz.com/oauth/authorize?client_id=abc123xxxxxxxxxxxxxx&redirect_uri=http%3A%2F%2Fwww.example.com&response_type=code&scope=proz")
22
+ expect(proz.link).to eq("https://www.proz.com/oauth/authorize?client_id=abc123xxxxxxxxxxxxxx&redirect_uri=http%3A%2F%2Fwww.example.com&response_type=code")
23
23
  end
24
24
 
25
25
  it 'exchanges a code for an access token' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-04 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler