red_light 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/TODO +0 -5
- data/lib/generators/red_light/install_generator.rb +17 -0
- data/lib/generators/templates/README +5 -0
- data/lib/generators/templates/red_light.rb +3 -0
- data/lib/red_light.rb +6 -1
- data/lib/red_light/fancy_login.rb +1 -1
- data/lib/red_light/version.rb +1 -1
- metadata +8 -5
data/README.md
CHANGED
@@ -20,7 +20,8 @@ Or install it yourself as:
|
|
20
20
|
[fancy-login](http://fancy-login.herokuapp.com)
|
21
21
|
|
22
22
|
## Usage
|
23
|
-
|
23
|
+
|
24
|
+
$ rails generate red_light:install
|
24
25
|
|
25
26
|
## Contributing
|
26
27
|
|
data/TODO
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module RedLight
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../../templates", __FILE__)
|
5
|
+
|
6
|
+
desc "Copy red light configuration to your application."
|
7
|
+
|
8
|
+
def copy_config
|
9
|
+
template "red_light.rb", "config/initializers/red_light.rb"
|
10
|
+
end
|
11
|
+
|
12
|
+
def show_readme
|
13
|
+
readme "README" if behavior == :invoke
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/red_light.rb
CHANGED
@@ -71,7 +71,7 @@ module RedLight
|
|
71
71
|
controller = File.basename(entry, ".rb").classify.constantize
|
72
72
|
|
73
73
|
filter = controller._process_action_callbacks.select{ |callback|
|
74
|
-
callback.filter
|
74
|
+
RedLight.authentications.include?(callback.filter)
|
75
75
|
}.first
|
76
76
|
|
77
77
|
next if filter.nil?
|
data/lib/red_light/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red_light
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-05-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70215895456320 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.3'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70215895456320
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70215895452900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70215895452900
|
36
36
|
description: a gem used to add fancy login to your rails application
|
37
37
|
email:
|
38
38
|
- leomayleomay@gmail.com
|
@@ -47,6 +47,9 @@ files:
|
|
47
47
|
- README.md
|
48
48
|
- Rakefile
|
49
49
|
- TODO
|
50
|
+
- lib/generators/red_light/install_generator.rb
|
51
|
+
- lib/generators/templates/README
|
52
|
+
- lib/generators/templates/red_light.rb
|
50
53
|
- lib/red_light.rb
|
51
54
|
- lib/red_light/fancy_login.rb
|
52
55
|
- lib/red_light/railtie.rb
|