Skip to content

Commit 3a9bc7c

Browse files
Merge pull request #11 from Crowd9/dependabot/bundler/addressable-2.9.0
Bump addressable from 2.8.4 to 2.9.0
2 parents 64fa5db + 6e09837 commit 3a9bc7c

7 files changed

Lines changed: 43 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: ruby/setup-ruby@v1
14+
with:
15+
ruby-version: .ruby-version
16+
bundler-cache: true
17+
18+
- name: Run RSpec
19+
run: bundle exec rspec

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0.0

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
source 'http://rubygems.org'
22

33
gem 'rake', '>= 10.1'
4+
gem 'ostruct'
5+
gem 'logger'
6+
gem 'base64'
47

58
group :test do
69
gem 'rspec', '>= 3'

Gemfile.lock

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ PATH
44
soundcloud (0.3.4.1)
55
hashie
66
httparty (>= 0.16.4)
7+
logger
78

89
GEM
910
remote: http://rubygems.org/
1011
specs:
11-
addressable (2.8.4)
12-
public_suffix (>= 2.0.2, < 6.0)
12+
addressable (2.9.0)
13+
public_suffix (>= 2.0.2, < 8.0)
14+
base64 (0.3.0)
1315
bigdecimal (4.0.1)
1416
crack (0.4.5)
1517
rexml
@@ -22,10 +24,12 @@ GEM
2224
csv
2325
mini_mime (>= 1.0.0)
2426
multi_xml (>= 0.5.2)
27+
logger (1.7.0)
2528
mini_mime (1.1.5)
2629
multi_xml (0.8.0)
2730
bigdecimal (>= 3.1, < 5)
28-
public_suffix (5.0.1)
31+
ostruct (0.6.3)
32+
public_suffix (7.0.5)
2933
rake (13.0.6)
3034
rexml (3.4.2)
3135
rspec (3.12.0)
@@ -56,12 +60,15 @@ PLATFORMS
5660
ruby
5761

5862
DEPENDENCIES
59-
bundler (~> 2.1)
63+
base64
64+
bundler (>= 2.1)
65+
logger
66+
ostruct
6067
rake (>= 10.1)
6168
rspec (>= 3)
6269
simplecov (>= 0.7)
6370
soundcloud!
6471
webmock (>= 1.13)
6572

6673
BUNDLED WITH
67-
2.1.4
74+
4.0.3

lib/soundcloud/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def authorize_url(options={})
102102
"#{param_name}=#{CGI.escape value}" unless value.nil?
103103
end.compact.join("&")
104104
store_options(options)
105-
"https://#{host}#{AUTHORIZE_PATH}?response_type=code_and_token&client_id=#{client_id}&redirect_uri=#{URI.escape(redirect_uri)}&#{additional_params}"
105+
"https://#{host}#{AUTHORIZE_PATH}?response_type=code_and_token&client_id=#{client_id}&redirect_uri=#{CGI.escape(redirect_uri)}&#{additional_params}"
106106
end
107107

108108
def exchange_token(options={})

soundcloud.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ Gem::Specification.new do |spec|
1717

1818
spec.add_dependency('httparty', '>= 0.16.4')
1919
spec.add_dependency('hashie')
20+
spec.add_dependency('logger')
2021

21-
spec.add_development_dependency('bundler', '~> 2.1')
22+
spec.add_development_dependency('bundler', '>= 2.1')
2223

2324
spec.files = Dir.glob("lib/**/*") + %w(LICENSE.md README.md)
2425
spec.require_path = 'lib'

spec/soundcloud_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,23 @@
140140

141141
describe "#authorize_url" do
142142
it "generates a authorize_url" do
143-
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http://come.back.to/me&")
143+
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http%3A%2F%2Fcome.back.to%2Fme&")
144144
end
145145

146146
it "generates a authorize_url and include the passed display parameter" do
147-
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :display => "popup")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http://come.back.to/me&display=popup")
147+
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :display => "popup")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http%3A%2F%2Fcome.back.to%2Fme&display=popup")
148148
end
149149

150150
it "generates a authorize_url and include the passed state parameter" do
151-
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :state => "hell&yeah")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http://come.back.to/me&state=hell%26yeah")
151+
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :state => "hell&yeah")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http%3A%2F%2Fcome.back.to%2Fme&state=hell%26yeah")
152152
end
153153

154154
it "generates a authorize_url and include the passed scope parameter" do
155-
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :scope => "non-expiring")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http://come.back.to/me&scope=non-expiring")
155+
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :scope => "non-expiring")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http%3A%2F%2Fcome.back.to%2Fme&scope=non-expiring")
156156
end
157157

158158
it "generates a authorize_url and include the passed scope and state parameter" do
159-
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :scope => "non-expiring", :state => "blub")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http://come.back.to/me&state=blub&scope=non-expiring")
159+
expect(subject.authorize_url(:redirect_uri => "http://come.back.to/me", :scope => "non-expiring", :state => "blub")).to eq("https://soundcloud.com/connect?response_type=code_and_token&client_id=client&redirect_uri=http%3A%2F%2Fcome.back.to%2Fme&state=blub&scope=non-expiring")
160160
end
161161
end
162162

0 commit comments

Comments
 (0)