alchemy-devise 4.5.0 → 4.6.0

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
  SHA256:
3
- metadata.gz: 4c558baf798de77b122ba7e53c5facb2e57a5a72ae351f2b0d967104fe945c04
4
- data.tar.gz: e27c4781ec9348d8bdcbc77abeed7584e64fe8facfbd943b133fb5e362bf1701
3
+ metadata.gz: 6217ebc5ce12c866ae9b27e1d80a181c302e96f0accced11e0ef9a3df2fdc4be
4
+ data.tar.gz: c05e0c5d4a260926f293073c00d440b9968dba46a10ea0326f4068ee19065bff
5
5
  SHA512:
6
- metadata.gz: 789bc60a8330c5690a4641ecdb558e4268bec99f6e92cdded7e9a0edd25f478201974ef9091b9571bff777ae3a76cd093dfbf0069ba8e58c1c7e0dd0c9b5c619
7
- data.tar.gz: a469f6d79fdb3bde9edeff1e2d077006e46a1c998b78d4f3515ead33fe462fdcadc0069de50a6f07e4c70aefc3584dd45d4d2ec89e2b0c7a4691a5521614f631
6
+ metadata.gz: 0dc57c2c68c836f3ce8f7f1e8c029dc8a8e6ff5ade4a052e1d0b99dcd1cd901d08215b22d046da3d089a950a8b18c5b0d69a95d665ae70803d559bb3040ccdcd
7
+ data.tar.gz: 033e220a727c0727975b90df7c589b2ecb4a9aefd8bc90e37046ce63be666cebf47a5583780fad2afab4ceffb12aa953aae4c134a4d6aee05a92fa955abbc6d5
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## Devise based authentication for AlchemyCMS 4.2
1
+ ## Devise based authentication for AlchemyCMS
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/AlchemyCMS/alchemy-devise.svg?branch=master)](http://travis-ci.org/AlchemyCMS/alchemy-devise)
4
4
 
@@ -12,7 +12,7 @@ Just put the gem into your projects `Gemfile`.
12
12
 
13
13
  ```ruby
14
14
  # Gemfile
15
- gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '4.2-stable'
15
+ gem 'alchemy-devise'
16
16
  ```
17
17
 
18
18
  and run `bundle install`.
data/Rakefile CHANGED
@@ -33,7 +33,9 @@ namespace :alchemy do
33
33
  system <<-BASH
34
34
  cd spec/dummy
35
35
  export RAILS_ENV=test
36
- bin/rake db:create db:environment:set db:migrate
36
+ bin/rake railties:install:migrations
37
+ bin/rake db:drop db:create db:migrate
38
+ bin/rails g alchemy:install --force
37
39
  bin/rails g alchemy:devise:install --force
38
40
  cd -
39
41
  BASH
@@ -3,11 +3,13 @@ module Alchemy
3
3
  class PasswordsController < ::Devise::PasswordsController
4
4
  include Alchemy::Admin::Locale
5
5
 
6
- before_action { enforce_ssl if ssl_required? && !request.ssl? }
6
+ if Alchemy.gem_version <= Gem::Version.new("4.9")
7
+ before_action { enforce_ssl if ssl_required? && !request.ssl? }
8
+ end
7
9
 
8
- helper 'Alchemy::Admin::Base'
10
+ helper "Alchemy::Admin::Base"
9
11
 
10
- layout 'alchemy/admin'
12
+ layout "alchemy/admin"
11
13
 
12
14
  private
13
15
 
@@ -16,7 +18,7 @@ module Alchemy
16
18
  alchemy.admin_login_path
17
19
  end
18
20
 
19
- def admin_edit_password_url(resource, options={})
21
+ def admin_edit_password_url(_resource, options = {})
20
22
  alchemy.admin_edit_password_url(options)
21
23
  end
22
24
 
@@ -27,7 +29,6 @@ module Alchemy
27
29
  alchemy.root_path
28
30
  end
29
31
  end
30
-
31
32
  end
32
33
  end
33
34
  end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_dependency "alchemy/version"
4
+
1
5
  module Alchemy
2
6
  module Admin
3
7
  class UserSessionsController < ::Devise::SessionsController
@@ -5,15 +9,16 @@ module Alchemy
5
9
 
6
10
  protect_from_forgery prepend: true
7
11
 
8
- before_action except: 'destroy' do
9
- enforce_ssl if ssl_required? && !request.ssl?
12
+ if Alchemy.gem_version <= Gem::Version.new("4.9")
13
+ before_action except: "destroy" do
14
+ enforce_ssl if ssl_required? && !request.ssl?
15
+ end
10
16
  end
11
-
12
17
  before_action :check_user_count, :only => :new
13
18
 
14
- helper 'Alchemy::Admin::Base'
19
+ helper "Alchemy::Admin::Base"
15
20
 
16
- layout 'alchemy/admin'
21
+ layout "alchemy/admin"
17
22
 
18
23
  def create
19
24
  authenticate_user!
@@ -23,10 +28,10 @@ module Alchemy
23
28
  redirect_path = admin_dashboard_path
24
29
  else
25
30
  # We have to strip double slashes from beginning of path, because of strange rails/rack bug.
26
- redirect_path = session[:redirect_path].gsub(/\A\/{2,}/, '/')
31
+ redirect_path = session[:redirect_path].gsub(/\A\/{2,}/, "/")
27
32
  end
28
33
  redirect_to redirect_path,
29
- notice: t(:signed_in, scope: 'devise.sessions')
34
+ notice: t(:signed_in, scope: "devise.sessions")
30
35
  else
31
36
  super
32
37
  end
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Devise
3
- VERSION = "4.5.0"
3
+ VERSION = "4.6.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-04 00:00:00.000000000 Z
11
+ date: 2020-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -211,7 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  version: '0'
212
212
  requirements: []
213
213
  rubygems_version: 3.0.3
214
- signing_key:
214
+ signing_key:
215
215
  specification_version: 4
216
216
  summary: Devise based user authentication for AlchemyCMS.
217
217
  test_files: []
218
+ ...