soundcloud 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,13 +127,13 @@ class Soundcloud
127
127
  def api_host; [API_SUBHOST, host].join('.'); end
128
128
 
129
129
  def authorize_url(options={})
130
- display = options.delete(:display)
131
- state = options.delete(:state)
130
+ additional_params = [:display, :state, :scope].map do |param_name|
131
+ value = options.delete(param_name)
132
+ "#{param_name}=#{CGI.escape value}" unless value.nil?
133
+ end.compact.join("&")
134
+
132
135
  store_options(options)
133
- url = "https://#{host}#{AUTHORIZE_PATH}?response_type=code_and_token&client_id=#{client_id}&redirect_uri=#{URI.escape redirect_uri}"
134
- url << "&display=#{CGI.escape display}" if display
135
- url << "&state=#{CGI.escape state}" if state
136
- url
136
+ "https://#{host}#{AUTHORIZE_PATH}?response_type=code_and_token&client_id=#{client_id}&redirect_uri=#{URI.escape redirect_uri}&#{additional_params}"
137
137
  end
138
138
 
139
139
  def exchange_token(options={})
@@ -1,3 +1,3 @@
1
1
  class Soundcloud
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: soundcloud
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.5
5
+ version: 0.2.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Johannes Wagener
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-08 00:00:00 +02:00
13
+ date: 2011-08-23 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency