refinerycms-authentication-devise 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/refinery/authentication/devise/devise_generator.rb +19 -0
- data/lib/refinery/authentication.rb +55 -0
- data/lib/refinery/authentication/devise.rb +4 -1
- data/lib/refinery/authentication/devise/engine.rb +1 -1
- data/lib/refinerycms-authentication-devise.rb +1 -0
- data/refinerycms-authentication-devise.gemspec +1 -1
- metadata +3 -2
- data/lib/generators/refinery/authentication/devise/generator.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 823da86975ad68f17aa44db2bad3d1c5921612f1
|
4
|
+
data.tar.gz: 464a8939c7ac8c49a9f342ffa470f8d230240a86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1d7f23fc9e210bc0770b39eb10593aaec32bf842b48f1fb1423dc48f46339fb2c45fdf2477a937f036c61ab45be19abb17548e5b7bddbdac3142faffa7c434d
|
7
|
+
data.tar.gz: 89fca6296c44a26f40e6ad0eea6b79373f7ea3ecc66b2b0a8bee2d9f94cff126545065de3fba34ea4ce49f4eb960d2378527e8ab77b9eb14fd9609e4e662e605
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/base'
|
3
|
+
|
4
|
+
module Refinery
|
5
|
+
module Authentication
|
6
|
+
class DeviseGenerator < Rails::Generators::Base
|
7
|
+
source_root File.expand_path("../templates", __FILE__)
|
8
|
+
|
9
|
+
def rake_db
|
10
|
+
rake "refinery_authentication_devise:install:migrations"
|
11
|
+
end
|
12
|
+
|
13
|
+
def generate_authentication_devise_initializer
|
14
|
+
template "config/initializers/refinery/authentication/devise.rb.erb",
|
15
|
+
File.join(destination_root, "config", "initializers", "refinery", "authentication", "devise.rb")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Refinery
|
2
|
+
module Authentication
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def configure(&block)
|
6
|
+
Refinery.deprecate(
|
7
|
+
'Refinery::Authentication#configure',
|
8
|
+
when: '1.1 of refinerycms-authentication-devise',
|
9
|
+
replacement: 'Refinery::Authentication::Devise#configure'
|
10
|
+
)
|
11
|
+
|
12
|
+
Refinery::Authentication::Devise.configure(&block)
|
13
|
+
end
|
14
|
+
|
15
|
+
def superuser_can_assign_roles
|
16
|
+
Refinery.deprecate(
|
17
|
+
'Refinery::Authentication#superuser_can_assign_roles',
|
18
|
+
when: '1.1 of refinerycms-authentication-devise',
|
19
|
+
replacement: 'Refinery::Authentication::Devise#superuser_can_assign_roles'
|
20
|
+
)
|
21
|
+
|
22
|
+
Refinery::Authentication::Devise.superuser_can_assign_roles
|
23
|
+
end
|
24
|
+
|
25
|
+
def superuser_can_assign_roles=(value)
|
26
|
+
Refinery.deprecate(
|
27
|
+
'Refinery::Authentication#superuser_can_assign_roles=',
|
28
|
+
when: '1.1 of refinerycms-authentication-devise',
|
29
|
+
replacement: 'Refinery::Authentication::Devise#superuser_can_assign_roles='
|
30
|
+
)
|
31
|
+
|
32
|
+
Refinery::Authentication::Devise.superuser_can_assign_roles = value
|
33
|
+
end
|
34
|
+
|
35
|
+
def email_from_name
|
36
|
+
Refinery.deprecate(
|
37
|
+
'Refinery::Authentication#email_from_name',
|
38
|
+
when: '1.1 of refinerycms-authentication-devise',
|
39
|
+
replacement: 'Refinery::Authentication::Devise#email_from_name'
|
40
|
+
)
|
41
|
+
|
42
|
+
Refinery::Authentication::Devise.email_from_name
|
43
|
+
end
|
44
|
+
|
45
|
+
def email_from_name=(value)
|
46
|
+
Refinery.deprecate(
|
47
|
+
'Refinery::Authentication#email_from_name=',
|
48
|
+
when: '1.1 of refinerycms-authentication-devise',
|
49
|
+
replacement: 'Refinery::Authentication::Devise#email_from_name='
|
50
|
+
)
|
51
|
+
|
52
|
+
Refinery::Authentication::Devise.email_from_name = value
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -4,11 +4,12 @@ require 'devise'
|
|
4
4
|
require 'friendly_id'
|
5
5
|
|
6
6
|
module Refinery
|
7
|
-
autoload :AuthenticationDeviseGenerator, 'generators/refinery/authentication/devise/authentication_generator'
|
8
7
|
autoload :AuthenticationSystem, 'refinery/authenticated_system'
|
9
8
|
|
10
9
|
module Authentication
|
11
10
|
module Devise
|
11
|
+
autoload :Generator, 'generators/refinery/authentication/devise_generator'
|
12
|
+
|
12
13
|
require 'refinery/authentication/devise/engine'
|
13
14
|
require 'refinery/authentication/devise/configuration'
|
14
15
|
|
@@ -24,3 +25,5 @@ module Refinery
|
|
24
25
|
end
|
25
26
|
end
|
26
27
|
end
|
28
|
+
|
29
|
+
# require 'generators/refinery/authentication/devise_generator'
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = %q{refinerycms-authentication-devise}
|
5
|
-
s.version = %q{1.0.
|
5
|
+
s.version = %q{1.0.3}
|
6
6
|
s.summary = %q{Devise based authentication extension for Refinery CMS}
|
7
7
|
s.description = %q{A Devise authentication extension for Refinery CMS}
|
8
8
|
s.homepage = %q{http://refinerycms.com}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-authentication-devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Arndt
|
@@ -163,8 +163,9 @@ files:
|
|
163
163
|
- db/migrate/20120301234455_add_slug_to_refinery_users.rb
|
164
164
|
- db/migrate/20130805143059_add_full_name_to_refinery_users.rb
|
165
165
|
- db/migrate/20150503125200_rename_tables_to_new_namespace.rb
|
166
|
-
- lib/generators/refinery/authentication/devise/
|
166
|
+
- lib/generators/refinery/authentication/devise/devise_generator.rb
|
167
167
|
- lib/generators/refinery/authentication/devise/templates/config/initializers/refinery/authentication/devise.rb.erb
|
168
|
+
- lib/refinery/authentication.rb
|
168
169
|
- lib/refinery/authentication/devise.rb
|
169
170
|
- lib/refinery/authentication/devise/authorisation_adapter.rb
|
170
171
|
- lib/refinery/authentication/devise/authorisation_manager.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
module Authentication
|
3
|
-
module Devise
|
4
|
-
class Generator < Rails::Generators::Base
|
5
|
-
source_root File.expand_path("../templates", __FILE__)
|
6
|
-
|
7
|
-
def rake_db
|
8
|
-
rake "refinery_authentication:install:migrations"
|
9
|
-
end
|
10
|
-
|
11
|
-
def generate_authentication_devise_initializer
|
12
|
-
template "config/initializers/refinery/authentication/devise.rb.erb",
|
13
|
-
File.join(destination_root, "config", "initializers", "refinery", "authentication.rb")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|