g5_authenticatable 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 672c382a3f6ba9af8a13de1e701f267a94ff31c5
4
- data.tar.gz: 9049ddf0d5819aeb8f4cd3035b63f3316badb70d
3
+ metadata.gz: d7098ea50ca9cdaa0ffefa42a0fe47d45fb087b1
4
+ data.tar.gz: ff8f79d3caa16d549db587bd9b01db5038e701a1
5
5
  SHA512:
6
- metadata.gz: c3b08a2fdac7f7d52ab884128e56aef9e9c9106db56036ef2cc23113faf68fdb1097ff6a8c3304b1a9fd1f34605c723cb944fa09c41868af013185baa8dd141a
7
- data.tar.gz: 56cb7a3a8dd318d73032742e5fe1a0d7c17acb53729bf47025775605c44a0492a62f3129a3ca2620007318354a3aa79d6eb9b68f2fb08424d10573e01be76398
6
+ metadata.gz: 437258a28abe7308db839bf6c2c64257b45bcf7f74fae81d5502dc46fb414ba9dd1ca81c2f240b753f87a496c833523e405db27d589944072585b79b8c913869
7
+ data.tar.gz: f9747b13d67c6559d8df0e74498a62fc2cd3722d59e6eeb55ecfba1bde51a36601930b30885f6f0baddd5bbbf892bcbfc62ba9e65632f97e97fc380f27b19013
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.4.2 (2015-02-10)
2
+
3
+ * Override `Devise::FailureApp` with fix for compatibility with Rails 4.2
4
+ ([#26](https://github.com/G5/g5_authenticatable/pull/26))
5
+
1
6
  ## v0.4.1 (2015-01-26)
2
7
 
3
8
  * Fix test helpers when strict token validation is enabled during testing
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ source 'https://rubygems.org'
6
6
  gemspec
7
7
 
8
8
  # Gems used by the dummy application
9
- gem 'rails', '4.1.4'
9
+ gem 'rails', '4.2.0'
10
10
  gem 'jquery-rails'
11
11
  gem 'pg'
12
12
  gem 'grape'
@@ -15,6 +15,7 @@ group :test, :development do
15
15
  gem 'rspec-rails', '~> 2.99'
16
16
  gem 'pry'
17
17
  gem 'dotenv-rails'
18
+ gem 'web-console', '~> 2.0'
18
19
  end
19
20
 
20
21
  group :test do
data/README.md CHANGED
@@ -18,7 +18,7 @@ library in isolation.
18
18
 
19
19
  ## Current Version
20
20
 
21
- 0.4.1
21
+ 0.4.2
22
22
 
23
23
  ## Requirements
24
24
 
@@ -0,0 +1,22 @@
1
+ class G5Authenticatable::FailureApp < Devise::FailureApp
2
+ def scope_url
3
+ opts = {}
4
+ route = :"new_#{scope}_session_url"
5
+ opts[:format] = request_format unless skip_format?
6
+
7
+ config = Rails.application.config
8
+
9
+ # See https://github.com/G5/g5_authenticatable/issues/25
10
+ opts[:script_name] = config.relative_url_root if config.try(:relative_url_root)
11
+
12
+ context = send(Devise.available_router_name)
13
+
14
+ if context.respond_to?(route)
15
+ context.send(route, opts)
16
+ elsif respond_to?(:root_url)
17
+ root_url(opts)
18
+ else
19
+ "/"
20
+ end
21
+ end
22
+ end
@@ -235,10 +235,10 @@ Devise.setup do |config|
235
235
  # If you want to use other strategies, that are not supported by Devise, or
236
236
  # change the failure app, you can configure them inside the config.warden block.
237
237
  #
238
- # config.warden do |manager|
239
- # manager.intercept_401 = false
240
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
241
- # end
238
+ config.warden do |manager|
239
+ manager.failure_app = G5Authenticatable::FailureApp
240
+ end
241
+
242
242
 
243
243
  # ==> Mountable engine configurations
244
244
  # When using Devise inside an engine, let's call it `MyEngine`, and this engine
@@ -1,3 +1,3 @@
1
1
  module G5Authenticatable
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -9,7 +9,7 @@ Dummy::Application.configure do
9
9
  config.action_controller.perform_caching = true
10
10
 
11
11
  # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
12
+ config.serve_static_files = false
13
13
 
14
14
  # Compress JavaScripts and CSS
15
15
  config.assets.compress = true
@@ -8,7 +8,7 @@ Dummy::Application.configure do
8
8
  config.cache_classes = true
9
9
 
10
10
  # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
11
+ config.serve_static_files = true
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
14
  # Show full error reports and disable caching
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g5_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - maeve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-26 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise_g5_authenticatable
@@ -62,6 +62,7 @@ files:
62
62
  - app/assets/stylesheets/g5_authenticatable/application.css
63
63
  - app/controllers/g5_authenticatable/application_controller.rb
64
64
  - app/controllers/g5_authenticatable/error_controller.rb
65
+ - app/controllers/g5_authenticatable/failure_app.rb
65
66
  - app/controllers/g5_authenticatable/sessions_controller.rb
66
67
  - app/helpers/g5_authenticatable/application_helper.rb
67
68
  - app/models/g5_authenticatable/user.rb