merbful_authentication 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
3
3
 
4
4
  PLUGIN = "merbful_authentication"
5
5
  NAME = "merbful_authentication"
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.2"
7
7
  AUTHOR = "Daniel Neighman"
8
8
  EMAIL = "has.sox@gmail.com"
9
9
  HOMEPAGE = "http://rubyforge.org/projects/merbful-auth/"
@@ -21,6 +21,7 @@ spec = Gem::Specification.new do |s|
21
21
  s.email = EMAIL
22
22
  s.homepage = HOMEPAGE
23
23
  s.add_dependency('merb', '>= 0.5.0')
24
+ s.add_dependency('merb_helpers', '>= 0.5.0')
24
25
  s.require_path = 'lib'
25
26
  s.autorequire = PLUGIN
26
27
  s.files = %w(LICENSE README Rakefile TODO) +
@@ -1,5 +1,5 @@
1
1
  require 'digest/sha1'
2
- require 'authenticated_system_model'
2
+ dependency 'authenticated_system_model'
3
3
  class <%= class_name %> < ActiveRecord::Base
4
4
  include AuthenticatedSystem::Model
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'digest/sha1'
2
- require 'authenticated_system_model'
2
+ dependency 'authenticated_system_model'
3
3
  class <%= class_name %> < DataMapper::Base
4
4
  include AuthenticatedSystem::Model
5
5
 
@@ -129,4 +129,8 @@ module AuthenticatedSystem
129
129
  return auth_data && auth_data[0] == 'Basic' ? Base64.decode64(auth_data[1]).split(':')[0..1] : [nil, nil]
130
130
  end
131
131
  end
132
+ end
133
+
134
+ Merb::BootLoader.after_app_loads do
135
+ Application.send(:include, AuthenticatedSystem::Controller)
132
136
  end
@@ -1,4 +1,4 @@
1
- require 'authenticated_system_orm_map'
1
+ dependency 'authenticated_system_orm_map'
2
2
  module AuthenticatedSystem
3
3
  module Model
4
4
 
@@ -87,7 +87,7 @@ module AuthenticatedSystem
87
87
 
88
88
  # Authenticates a <%= singular_name %> by their login name and unencrypted password. Returns the <%= singular_name %> or nil.
89
89
  def authenticate(login, password)
90
- u = find_activated_authenticated_model_with_login(login) # need to get the salt
90
+ u = find_activated_authenticated_model_with_login(login.downcase) # need to get the salt
91
91
  u && u.authenticated?(password) ? u : nil
92
92
  end
93
93
  end
@@ -1,6 +1,6 @@
1
+ dependencies "authenticated_system_controller", "merb_helpers"
1
2
  class <%= model_controller_class_name %> < Application
2
3
  provides :xml
3
- include AuthenticatedSystem::Controller
4
4
 
5
5
  skip_before :login_required
6
6
 
@@ -1,5 +1,5 @@
1
- <%%= error_messages_for @user %>
2
- <%% form_for @user, :action => url(:users) do %>
1
+ <%%= error_messages_for @<%= singular_name %> %>
2
+ <%% form_for @<%= singular_name %>, :action => url(:<%= plural_name %>) do %>
3
3
  <p>
4
4
  <%%= text_control :login, :label => "Login" %>
5
5
  </p>
@@ -1,9 +1,6 @@
1
- require 'lib/authenticated_system_controller'
1
+ dependencies "authenticated_system_controller", "merb_helpers"
2
2
  class <%= controller_class_name %> < Application
3
3
 
4
- # Be sure to include AuthenticationSystem in Application Controller instead
5
- include AuthenticatedSystem::Controller
6
-
7
4
  skip_before :login_required
8
5
 
9
6
  def new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merbful_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Neighman
@@ -9,7 +9,7 @@ autorequire: merbful_authentication
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-07 00:00:00 +11:00
12
+ date: 2008-01-18 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -21,6 +21,15 @@ dependencies:
21
21
  - !ruby/object:Gem::Version
22
22
  version: 0.5.0
23
23
  version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: merb_helpers
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.5.0
32
+ version:
24
33
  description: A Merb plugin that is essentially a port of Rick Olsons restful_authentication plugin for rails
25
34
  email: has.sox@gmail.com
26
35
  executables: []