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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -1
- data/README.md +1 -1
- data/app/controllers/g5_authenticatable/failure_app.rb +22 -0
- data/config/initializers/devise.rb +4 -4
- data/lib/g5_authenticatable/version.rb +1 -1
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7098ea50ca9cdaa0ffefa42a0fe47d45fb087b1
|
4
|
+
data.tar.gz: ff8f79d3caa16d549db587bd9b01db5038e701a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 437258a28abe7308db839bf6c2c64257b45bcf7f74fae81d5502dc46fb414ba9dd1ca81c2f240b753f87a496c833523e405db27d589944072585b79b8c913869
|
7
|
+
data.tar.gz: f9747b13d67c6559d8df0e74498a62fc2cd3722d59e6eeb55ecfba1bde51a36601930b30885f6f0baddd5bbbf892bcbfc62ba9e65632f97e97fc380f27b19013
|
data/CHANGELOG.md
CHANGED
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.
|
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
@@ -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
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
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
|
@@ -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.
|
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.
|
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.
|
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-
|
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
|