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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad458ec6b566815314368f039f5e81710b67ca01
4
- data.tar.gz: d09e52a75f0e3c47c1f681c7624686d5026f063b
3
+ metadata.gz: 9420825798759437bc87dbd09da3f78cf36a41e7
4
+ data.tar.gz: 35d1bd72c78cf53adcd25203b57a88e7b2290f98
5
5
  SHA512:
6
- metadata.gz: 113046e69edea1272ebf56c9319b3df82e0234cf59b33cd154f885b933e1ca2c16e3466cf52ed36aac857692a306f86f67c57b6175a06c4c7464d79010d3f11d
7
- data.tar.gz: 0a8a7c69454b917620fc69654e04637b2d8e95bf047d72e238469d3e48cae2152be051020716a0df3ef1f89c0dd906510783baf2cb18f7eaf83c1f5fe50ddc20
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Coadjutor
2
- VERSION = "0.0.2"
2
+ VERSION = '0.0.3'
3
3
  end
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.2
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-04-09 00:00:00.000000000 Z
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