From 36e2297cf06ef4293b48ede9f25ac1f13c2df6df Mon Sep 17 00:00:00 2001 From: Zach Margolis Date: Fri, 18 Aug 2017 14:21:49 -0700 Subject: [PATCH 1/3] Rails 5 compat: replace before_filter with before_action **How**: ``` git grep -l before_filter | \ xargs perl -p -i -e 's/before_filter/before_action/g' -- ``` --- README.md | 2 +- app/controllers/saml_idp/idp_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index afeffeea..ca3cdef5 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ end To generate the SAML Response it uses a default X.509 certificate and secret key... which isn't so secret. You can find them in `SamlIdp::Default`. The X.509 certificate is valid until year 2032. Obviously you shouldn't use these if you intend to use this in production environments. In that case, -within the controller set the properties `x509_certificate` and `secret_key` using a `prepend_before_filter` +within the controller set the properties `x509_certificate` and `secret_key` using a `prepend_before_action` callback within the current request context or set them globally via the `SamlIdp.config.x509_certificate` and `SamlIdp.config.secret_key` properties. diff --git a/app/controllers/saml_idp/idp_controller.rb b/app/controllers/saml_idp/idp_controller.rb index a7dea911..a5300407 100644 --- a/app/controllers/saml_idp/idp_controller.rb +++ b/app/controllers/saml_idp/idp_controller.rb @@ -5,7 +5,7 @@ class IdpController < ActionController::Base unloadable unless Rails::VERSION::MAJOR >= 4 protect_from_forgery - before_filter :validate_saml_request, only: [:new, :create] + before_action :validate_saml_request, only: [:new, :create] def new render template: "saml_idp/idp/new" From 4dd28b78cc33b2d3370eefc7224ee19b2b79bdf9 Mon Sep 17 00:00:00 2001 From: Zach Margolis Date: Fri, 18 Aug 2017 14:23:08 -0700 Subject: [PATCH 2/3] Update version in source control --- lib/saml_idp/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/saml_idp/version.rb b/lib/saml_idp/version.rb index f0aa579a..9d418e1a 100644 --- a/lib/saml_idp/version.rb +++ b/lib/saml_idp/version.rb @@ -1,4 +1,4 @@ # encoding: utf-8 module SamlIdp - VERSION = '0.4.0' + VERSION = '0.4.3-18f' end From 25551f730a2d4018268693dac045fedf83873746 Mon Sep 17 00:00:00 2001 From: Zach Margolis Date: Fri, 18 Aug 2017 14:37:02 -0700 Subject: [PATCH 3/3] Remove ruby-2.0.0 from CI because nokogiri 1.8.0 is incompatible --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c033aa11..0bc81148 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ rvm: - - 2.0.0 - 2.3.1 - 2.3.3 notifications: