coadjutor 0.0.2 → 0.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/coadjutor/authentication_helper.rb +9 -0
- data/lib/coadjutor/railtie.rb +5 -0
- data/lib/coadjutor/version.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: 9420825798759437bc87dbd09da3f78cf36a41e7
|
4
|
+
data.tar.gz: 35d1bd72c78cf53adcd25203b57a88e7b2290f98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11febc2346b6bbac45c7e94e5d4c11ea8247350cb81ea040302453bdc851db7d975346e36d76a874287891dc4c56b312d535dc98b3a0b73c01886422b13bb46e
|
7
|
+
data.tar.gz: 9c674d8261c7a96d49c7bddefe40fa2238e4a1a8807c2e46c894d3f1bb1e58336297aa55419247b0d39eaca2b241779e2dc0ecbb986b1b35a7d53cda7c58e0ad
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module AuthenticationHelper
|
2
|
+
def authenticate_with_basic_auth
|
3
|
+
if Chamber.env.basic_auth.enabled?
|
4
|
+
authenticate_or_request_with_http_basic do |username, password|
|
5
|
+
username == Chamber.env.basic_auth.username && password == Chamber.env.basic_auth.password
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
data/lib/coadjutor/railtie.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rails/railtie'
|
2
|
+
require 'coadjutor/authentication_helper'
|
2
3
|
require 'coadjutor/qualified_controller_resources'
|
3
4
|
require 'coadjutor/css_class_helper'
|
4
5
|
require 'coadjutor/page_title_helper'
|
@@ -12,6 +13,10 @@ class Railtie < Rails::Railtie
|
|
12
13
|
ActionController::Base.send :include, QualifiedControllerResources
|
13
14
|
end
|
14
15
|
|
16
|
+
initializer 'authentication.helper' do |app|
|
17
|
+
ActionController::Base.send :include, AuthenticationHelper
|
18
|
+
end
|
19
|
+
|
15
20
|
initializer 'css_class.helper' do |app|
|
16
21
|
ActionView::Base.send :include, CssClassHelper
|
17
22
|
end
|
data/lib/coadjutor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coadjutor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jfelchner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- README.md
|
37
37
|
- Rakefile
|
38
38
|
- lib/coadjutor.rb
|
39
|
+
- lib/coadjutor/authentication_helper.rb
|
39
40
|
- lib/coadjutor/css_class_helper.rb
|
40
41
|
- lib/coadjutor/flash_helper.rb
|
41
42
|
- lib/coadjutor/javascript_helper.rb
|