merbful_authentication 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.9.2"
6
+ VERSION = "0.9.3"
7
7
  AUTHOR = "Daniel Neighman"
8
8
  EMAIL = "has.sox@gmail.com"
9
9
  HOMEPAGE = "http://rubyforge.org/projects/merbful-auth/"
@@ -44,7 +44,7 @@ class AuthenticatedGenerator < Merb::GeneratorBase
44
44
  @include_activation = options[:include_activation]
45
45
 
46
46
  @controller_name = runtime_args.shift || 'sessions'
47
- @model_controller_name = @name.pluralize
47
+ @model_controller_name = @name.snake_case.pluralize
48
48
  @mailer_controller_name = @name
49
49
 
50
50
  # sessions controller
@@ -58,7 +58,7 @@ class AuthenticatedGenerator < Merb::GeneratorBase
58
58
  end
59
59
  @controller_full_path = File.join(controller_class_path, controller_file_name)
60
60
  @controller_view_path = File.join("app/views", @controller_full_path)
61
-
61
+
62
62
  # model controller
63
63
  base_name, @model_controller_class_path, @model_controller_file_path, @model_controller_class_nesting, @model_controller_class_nesting_depth = extract_modules(@model_controller_name)
64
64
  @model_controller_class_name_without_nesting, @model_controller_singular_name, @model_controller_plural_name = inflect_names(base_name)
@@ -70,6 +70,7 @@ class AuthenticatedGenerator < Merb::GeneratorBase
70
70
  end
71
71
  @model_controller_full_path = File.join(model_controller_class_path, model_controller_file_name)
72
72
  @model_controller_view_path = File.join("app/views", @model_controller_full_path)
73
+
73
74
  end
74
75
 
75
76
  def manifest
@@ -85,7 +86,7 @@ class AuthenticatedGenerator < Merb::GeneratorBase
85
86
  @choices.each do |f|
86
87
  options[f] = options[:include_activation] ? true : false
87
88
  end
88
-
89
+
89
90
  @assigns = {
90
91
  :class_name => class_name,
91
92
  :class_path => class_path,
@@ -55,7 +55,11 @@ module AuthenticatedSystem
55
55
 
56
56
  # Redirect as appropriate when an access request fails.
57
57
  #
58
- # The default action is to redirect to the login screen.
58
+ # The default HTML action is to redirect to the login screen.
59
+ #
60
+ # The default XML action is to render the text Couldn't authenticate you.
61
+ # To provide this response wrapped in XML, make sure to specify an
62
+ # XML layout, such as /app/views/layouts/application.xml.builder.
59
63
  #
60
64
  # Override this method in your controllers if you want to have special
61
65
  # behavior in case the <%= singular_name %> is not authorized
@@ -69,8 +73,8 @@ module AuthenticatedSystem
69
73
  when :xml
70
74
  headers["Status"] = "Unauthorized"
71
75
  headers["WWW-Authenticate"] = %(Basic realm="Web Password")
72
- set_status(401)
73
- render :text => "Couldn't authenticate you"
76
+ self.status = 401
77
+ render "Couldn't authenticate you"
74
78
  end
75
79
  end
76
80
 
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.9.2
4
+ version: 0.9.3
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-03-26 00:00:00 +11:00
12
+ date: 2008-04-25 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements: []
150
150
 
151
151
  rubyforge_project:
152
- rubygems_version: 1.0.1
152
+ rubygems_version: 1.1.0
153
153
  signing_key:
154
154
  specification_version: 2
155
155
  summary: A Merb plugin that is essentially a port of Rick Olsons restful_authentication plugin for rails