rhapsody 0.1.0 → 0.1.1

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: 6b7471c6ad267c63056f9ee20e4fe2e531714ba1
4
- data.tar.gz: f61e059843f25d80ed6f130fa8548b88bb3f2a3b
3
+ metadata.gz: ad23db6534dd04c827d7c63ad05a2e2751e6bc52
4
+ data.tar.gz: e76bf5e2fa098db5ddfedfc3d84ae80e21822d46
5
5
  SHA512:
6
- metadata.gz: 69d51b4dbba1fd8726cad231a46a75a736bc25a0893b4a2e99eed33bf3dca3b521c7e7b84825b0665d96d6f10f38e16a57c44e60e1a6a5f142c1e587f22544ad
7
- data.tar.gz: 3256714251d7b03247a19b94101dd4279a71d587023b51706f8782db30f5f4c4415619ff01c05a0ab05c37b3d4f064ec0c53f3855b8d5d74742d286490f108d0
6
+ metadata.gz: bd9c6181acbd8a558f5f8241efedc2b50902bd18748e82e0f261cc124ba88a0b093c6726686ab3960f5eb0ec43d75c17d47ed6b35a89c25dc49df5e089743f68
7
+ data.tar.gz: e3f208e3ce01efab24ed418ab7c78bac4daf39b9b0f3e92adf3a9c5f50e0eaa23c87e2fa7e7b7687e15d723cc4e033d820ddb522b8e4c6ea2424dc38c09761af
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  # custom
12
12
  spec/config.yml
13
13
  .DS_Store
14
+ *.gem
data/Gemfile CHANGED
@@ -16,4 +16,7 @@ group :test do
16
16
  gem 'rspec', '~> 3.3.0'
17
17
  gem 'capybara', '~> 2.4.4'
18
18
  gem 'selenium-webdriver', '~> 2.46.2'
19
+
20
+ # Testing state parameter during OAuth 2 flow
21
+ gem 'uuid', '~> 2.3.8'
19
22
  end
@@ -4,6 +4,7 @@ class Rhapsody::Client
4
4
  :redirect_uri,
5
5
  :username,
6
6
  :password,
7
+ :state,
7
8
  :auth_code,
8
9
  :authentication
9
10
 
@@ -20,7 +21,13 @@ class Rhapsody::Client
20
21
  end
21
22
 
22
23
  def authorization_url
23
- Rhapsody::Request::HOST_URL + "/oauth/authorize?client_id=#{@api_key}&redirect_uri=#{@redirect_uri}&response_type=code"
24
+ default = Rhapsody::Request::HOST_URL + "/oauth/authorize?client_id=#{@api_key}&redirect_uri=#{@redirect_uri}&response_type=code"
25
+
26
+ if @state
27
+ default + "&state=#{@state}"
28
+ else
29
+ default
30
+ end
24
31
  end
25
32
 
26
33
  def connect
@@ -1,3 +1,3 @@
1
1
  module Rhapsody
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhapsody
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Kim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-17 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler