From 4fce7a68d2bf5b3ed225c3edf2d465b124a191f6 Mon Sep 17 00:00:00 2001 From: Ernest Surudo Date: Sun, 9 Dec 2018 18:16:54 +0100 Subject: [PATCH 1/4] Allow faraday < 0.16.0 --- podio.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/podio.gemspec b/podio.gemspec index 26f26131..ba98c5dc 100644 --- a/podio.gemspec +++ b/podio.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.has_rdoc = false - s.add_dependency('faraday', ['>= 0.8.0', '< 0.10.0']) + s.add_dependency('faraday', ['>= 0.8.0', '< 0.16.0']) s.add_dependency('multi_json') if RUBY_VERSION < '1.9.3' From b5acf508b034d2dcaa22676faf5ad02ca0a8e291 Mon Sep 17 00:00:00 2001 From: Ernest Surudo Date: Sun, 22 Sep 2019 14:21:40 +0200 Subject: [PATCH 2/4] Fix deprecations warnings --- lib/podio/client.rb | 4 ++-- podio.gemspec | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/podio/client.rb b/lib/podio/client.rb index a7b8bd46..b6f4db58 100644 --- a/lib/podio/client.rb +++ b/lib/podio/client.rb @@ -188,11 +188,11 @@ def configure_connection builder.use Middleware::OAuth2, :podio_client => self builder.use Middleware::Logger, :podio_client => self - builder.adapter(*default_adapter) - # first response middleware defined get's executed last builder.use Middleware::ErrorResponse builder.use Middleware::JsonResponse + + builder.adapter(*default_adapter) end end diff --git a/podio.gemspec b/podio.gemspec index ba98c5dc..ec7a3c4b 100644 --- a/podio.gemspec +++ b/podio.gemspec @@ -17,8 +17,6 @@ Gem::Specification.new do |s| s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ['lib'] - s.has_rdoc = false - s.add_dependency('faraday', ['>= 0.8.0', '< 0.16.0']) s.add_dependency('multi_json') From 4c4f5e473e5e22916f71e1cc3748943e535109e5 Mon Sep 17 00:00:00 2001 From: Ernest Surudo Date: Sun, 22 Sep 2019 14:58:07 +0200 Subject: [PATCH 3/4] Fix error when running specs (there is another error to fix, so this doesn't actually get them running) --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index e4d61ea5..beb9950a 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ task :default => [:test] desc 'Run tests' Rake::TestTask.new(:test) do |t| - t.ruby_opts = ["-rubygems"] if defined? Gem + t.ruby_opts = ["-r rubygems"] if defined? Gem t.libs << "lib" << "test" t.pattern = 'test/**/*_test.rb' t.verbose = true From e266440249bddd6cc4402e1ea88507d8749adec9 Mon Sep 17 00:00:00 2001 From: Ernest Surudo Date: Sun, 22 Sep 2019 14:58:30 +0200 Subject: [PATCH 4/4] Remove use of `show_feature?` method, since it isn't defined anywhere --- lib/podio/client.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/podio/client.rb b/lib/podio/client.rb index fa5a8698..659123f5 100644 --- a/lib/podio/client.rb +++ b/lib/podio/client.rb @@ -107,18 +107,16 @@ def authenticate_with_sso(attributes) end # Sign in with SAML SSO - if show_feature?(:sso_saml) - def authenticate_with_saml(attributes) - response = @oauth_connection.post do |req| - req.url '/oauth/token', :grant_type => 'saml', :client_id => SETTINGS.podio_api.default_client.api_key, :client_secret => SETTINGS.podio_api.default_client.api_secret - req.body = attributes - end - @oauth_token = OAuthToken.new(response.body) - configure_oauth - @oauth_token + def authenticate_with_saml(attributes) + response = @oauth_connection.post do |req| + req.url '/oauth/token', :grant_type => 'saml', :client_id => SETTINGS.podio_api.default_client.api_key, :client_secret => SETTINGS.podio_api.default_client.api_secret + req.body = attributes end + @oauth_token = OAuthToken.new(response.body) + configure_oauth + @oauth_token end - + # Sign in with an OpenID, only available for Podio def authenticate_with_openid(identifier, type) response = @trusted_connection.post do |req|