Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Ruby 3.0 #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 49 additions & 44 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,73 @@ PATH
remote: .
specs:
GiphyClient (1.0.0)
json (~> 1.8, >= 1.8.3)
typhoeus (~> 1.0, >= 1.0.1)
addressable
typhoeus (>= 1.3)

GEM
remote: https://rubygems.org/
specs:
ZenTest (4.11.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
autotest (4.4.6)
ZenTest (>= 4.4.1)
autotest-fsevent (0.2.12)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
autotest (5.0.0)
minitest-autotest (~> 1.0)
autotest-fsevent (0.2.18)
sys-uname
autotest-growl (0.2.16)
autotest-rails-pure (4.1.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
ethon (0.10.1)
ffi (>= 1.3.0)
ffi (1.9.18)
hashdiff (0.3.4)
json (1.8.6)
public_suffix (2.0.5)
crack (0.4.5)
rexml
diff-lcs (1.4.4)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.4)
hashdiff (1.0.1)
minitest (5.14.4)
minitest-autotest (1.1.1)
minitest-server (~> 1.0)
path_expander (~> 1.0)
minitest-server (1.0.6)
minitest (~> 5.0)
path_expander (1.1.0)
public_suffix (4.0.6)
rake (12.0.0)
rspec (3.6.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
safe_yaml (1.0.4)
sys-uname (1.0.3)
ffi (>= 1.0.0)
typhoeus (1.1.2)
rspec-support (~> 3.10.0)
rspec-support (3.10.3)
sys-uname (1.2.2)
ffi (~> 1.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
vcr (3.0.3)
webmock (1.24.6)
addressable (>= 2.3.6)
vcr (6.0.0)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
ruby

DEPENDENCIES
GiphyClient!
autotest (~> 4.4, >= 4.4.6)
autotest-fsevent (~> 0.2, >= 0.2.11)
autotest-growl (~> 0.2, >= 0.2.16)
autotest-rails-pure (~> 4.1, >= 4.1.2)
autotest (>= 4.4.6)
autotest-fsevent (>= 0.2.11)
autotest-growl (>= 0.2.16)
autotest-rails-pure (>= 4.1.2)
rake (~> 12.0.0)
rspec (~> 3.4, >= 3.4.0)
vcr (~> 3.0, >= 3.0.1)
webmock (~> 1.24, >= 1.24.3)
rspec (>= 3.4.0)
vcr (>= 3.0.1)
webmock (>= 1.24.3)

BUNDLED WITH
1.14.6
2.2.31
20 changes: 10 additions & 10 deletions GiphyClient.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ Gem::Specification.new do |s|
s.license = "MPLv2"
s.required_ruby_version = ">= 1.9"

s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'

s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
s.add_runtime_dependency 'typhoeus', '>= 1.3'
s.add_runtime_dependency 'addressable'

s.add_development_dependency 'rspec', '>= 3.4.0'
s.add_development_dependency 'vcr', '>= 3.0.1'
s.add_development_dependency 'webmock', '>= 1.24.3'
s.add_development_dependency 'autotest', '>= 4.4.6'
s.add_development_dependency 'autotest-rails-pure','>= 4.1.2'
s.add_development_dependency 'autotest-growl', '>= 0.2.16'
s.add_development_dependency 'autotest-fsevent', '>= 0.2.11'

s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
s.test_files = `find spec/*`.split("\n")
Expand Down
2 changes: 1 addition & 1 deletion lib/GiphyClient/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def sanitize_filename(filename)
def build_request_url(path)
# Add leading and trailing slashes to path
path = "/#{path}".gsub(/\/+/, '/')
URI.encode(@config.base_url + path)
Addressable::URI.encode(@config.base_url + path)
end

# Builds the HTTP request body
Expand Down
2 changes: 1 addition & 1 deletion lib/GiphyClient/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def base_path=(base_path)

def base_url
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
URI.encode(url)
Addressable::URI.encode(url)
end

# Gets API key (with prefix if set).
Expand Down