clearance 0.8.4 → 0.8.5
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/CHANGELOG.textile +12 -1
- data/README.textile +27 -44
- data/Rakefile +20 -36
- data/VERSION +1 -0
- data/app/controllers/clearance/confirmations_controller.rb +1 -1
- data/app/controllers/clearance/passwords_controller.rb +2 -2
- data/app/controllers/clearance/sessions_controller.rb +3 -3
- data/app/controllers/clearance/users_controller.rb +1 -1
- data/app/models/clearance_mailer.rb +2 -4
- data/app/views/sessions/new.html.erb +1 -1
- data/generators/clearance/clearance_generator.rb +6 -0
- data/generators/clearance/lib/insert_commands.rb +1 -1
- data/generators/clearance/templates/README +13 -11
- data/generators/clearance/templates/clearance.rb +3 -0
- data/generators/clearance_features/templates/features/step_definitions/clearance_steps.rb +12 -8
- data/generators/clearance_features/templates/features/support/paths.rb +10 -9
- data/generators/clearance_views/templates/formtastic/sessions/new.html.erb +1 -1
- data/lib/clearance.rb +2 -1
- data/lib/clearance/authentication.rb +2 -2
- data/lib/clearance/configuration.rb +25 -0
- data/lib/clearance/routes.rb +49 -0
- data/lib/clearance/user.rb +0 -18
- data/shoulda_macros/clearance.rb +1 -1
- data/test/controllers/confirmations_controller_test.rb +100 -0
- data/test/controllers/passwords_controller_test.rb +183 -0
- data/test/controllers/sessions_controller_test.rb +141 -0
- data/test/controllers/users_controller_test.rb +65 -0
- data/test/models/clearance_mailer_test.rb +55 -0
- data/test/models/user_test.rb +227 -0
- data/test/rails_root/app/controllers/accounts_controller.rb +10 -0
- data/test/rails_root/app/controllers/application_controller.rb +5 -0
- data/test/rails_root/app/helpers/application_helper.rb +5 -0
- data/test/rails_root/app/helpers/confirmations_helper.rb +2 -0
- data/test/rails_root/app/helpers/passwords_helper.rb +2 -0
- data/test/rails_root/app/models/user.rb +3 -0
- data/test/rails_root/config/boot.rb +110 -0
- data/test/rails_root/config/environment.rb +17 -0
- data/test/rails_root/config/environments/development.rb +19 -0
- data/test/rails_root/config/environments/production.rb +1 -0
- data/test/rails_root/config/environments/test.rb +36 -0
- data/test/rails_root/config/initializers/clearance.rb +3 -0
- data/test/rails_root/config/initializers/clearance_loader.rb +8 -0
- data/test/rails_root/config/initializers/inflections.rb +10 -0
- data/test/rails_root/config/initializers/mime_types.rb +5 -0
- data/test/rails_root/config/initializers/requires.rb +13 -0
- data/test/rails_root/config/initializers/time_formats.rb +4 -0
- data/test/rails_root/config/routes.rb +6 -0
- data/test/rails_root/db/migrate/20100120045223_clearance_create_users.rb +21 -0
- data/test/rails_root/features/step_definitions/clearance_steps.rb +122 -0
- data/test/rails_root/features/step_definitions/factory_girl_steps.rb +5 -0
- data/test/rails_root/features/step_definitions/web_steps.rb +259 -0
- data/test/rails_root/features/support/env.rb +47 -0
- data/test/rails_root/features/support/paths.rb +23 -0
- data/test/rails_root/public/dispatch.rb +10 -0
- data/test/rails_root/script/create_project.rb +52 -0
- data/test/rails_root/test/factories/clearance.rb +13 -0
- data/test/rails_root/test/functional/accounts_controller_test.rb +23 -0
- data/test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/generators/formtastic_stylesheets/formtastic_stylesheets_generator.rb +21 -0
- data/test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/lib/formtastic.rb +1236 -0
- data/test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/lib/justin_french/formtastic.rb +10 -0
- data/test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/rails/init.rb +3 -0
- data/test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/spec/formtastic_spec.rb +2900 -0
- data/test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/spec/test_helper.rb +14 -0
- data/test/test_helper.rb +19 -0
- metadata +60 -18
- data/TODO.textile +0 -6
- data/config/clearance_routes.rb +0 -30
- data/lib/clearance/extensions/routes.rb +0 -14
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'spec'
|
|
3
|
+
require 'activesupport'
|
|
4
|
+
require 'active_support'
|
|
5
|
+
require 'actionpack'
|
|
6
|
+
require 'action_controller'
|
|
7
|
+
require 'action_view'
|
|
8
|
+
require 'rexml/document'
|
|
9
|
+
require 'rspec_hpricot_matchers'
|
|
10
|
+
Spec::Runner.configure do |config|
|
|
11
|
+
config.include(RspecHpricotMatchers)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
|
data/test/test_helper.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
|
2
|
+
require File.expand_path(File.dirname(__FILE__) +
|
|
3
|
+
"/rails_root/config/environment")
|
|
4
|
+
require 'test_help'
|
|
5
|
+
|
|
6
|
+
$: << File.expand_path(File.dirname(__FILE__) + '/..')
|
|
7
|
+
require 'clearance'
|
|
8
|
+
|
|
9
|
+
begin
|
|
10
|
+
require 'redgreen'
|
|
11
|
+
rescue LoadError
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
require File.join(File.dirname(__FILE__), '..', 'shoulda_macros', 'clearance')
|
|
15
|
+
|
|
16
|
+
class ActiveSupport::TestCase
|
|
17
|
+
self.use_transactional_fixtures = true
|
|
18
|
+
self.use_instantiated_fixtures = false
|
|
19
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: clearance
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Croak
|
|
@@ -26,7 +26,7 @@ autorequire:
|
|
|
26
26
|
bindir: bin
|
|
27
27
|
cert_chain: []
|
|
28
28
|
|
|
29
|
-
date:
|
|
29
|
+
date: 2010-01-20 00:00:00 -05:00
|
|
30
30
|
default_executable:
|
|
31
31
|
dependencies: []
|
|
32
32
|
|
|
@@ -36,14 +36,15 @@ executables: []
|
|
|
36
36
|
|
|
37
37
|
extensions: []
|
|
38
38
|
|
|
39
|
-
extra_rdoc_files:
|
|
40
|
-
|
|
39
|
+
extra_rdoc_files:
|
|
40
|
+
- LICENSE
|
|
41
|
+
- README.textile
|
|
41
42
|
files:
|
|
42
43
|
- CHANGELOG.textile
|
|
43
44
|
- LICENSE
|
|
44
|
-
- Rakefile
|
|
45
45
|
- README.textile
|
|
46
|
-
-
|
|
46
|
+
- Rakefile
|
|
47
|
+
- VERSION
|
|
47
48
|
- app/controllers/clearance/confirmations_controller.rb
|
|
48
49
|
- app/controllers/clearance/passwords_controller.rb
|
|
49
50
|
- app/controllers/clearance/sessions_controller.rb
|
|
@@ -56,16 +57,17 @@ files:
|
|
|
56
57
|
- app/views/sessions/new.html.erb
|
|
57
58
|
- app/views/users/_form.html.erb
|
|
58
59
|
- app/views/users/new.html.erb
|
|
59
|
-
-
|
|
60
|
+
- generators/clearance/USAGE
|
|
60
61
|
- generators/clearance/clearance_generator.rb
|
|
61
62
|
- generators/clearance/lib/insert_commands.rb
|
|
62
63
|
- generators/clearance/lib/rake_commands.rb
|
|
64
|
+
- generators/clearance/templates/README
|
|
65
|
+
- generators/clearance/templates/clearance.rb
|
|
63
66
|
- generators/clearance/templates/factories.rb
|
|
64
67
|
- generators/clearance/templates/migrations/create_users.rb
|
|
65
68
|
- generators/clearance/templates/migrations/update_users.rb
|
|
66
|
-
- generators/clearance/templates/README
|
|
67
69
|
- generators/clearance/templates/user.rb
|
|
68
|
-
- generators/
|
|
70
|
+
- generators/clearance_features/USAGE
|
|
69
71
|
- generators/clearance_features/clearance_features_generator.rb
|
|
70
72
|
- generators/clearance_features/templates/features/password_reset.feature
|
|
71
73
|
- generators/clearance_features/templates/features/sign_in.feature
|
|
@@ -74,29 +76,29 @@ files:
|
|
|
74
76
|
- generators/clearance_features/templates/features/step_definitions/clearance_steps.rb
|
|
75
77
|
- generators/clearance_features/templates/features/step_definitions/factory_girl_steps.rb
|
|
76
78
|
- generators/clearance_features/templates/features/support/paths.rb
|
|
77
|
-
- generators/
|
|
79
|
+
- generators/clearance_views/USAGE
|
|
78
80
|
- generators/clearance_views/clearance_views_generator.rb
|
|
79
81
|
- generators/clearance_views/templates/formtastic/passwords/edit.html.erb
|
|
80
82
|
- generators/clearance_views/templates/formtastic/passwords/new.html.erb
|
|
81
83
|
- generators/clearance_views/templates/formtastic/sessions/new.html.erb
|
|
82
84
|
- generators/clearance_views/templates/formtastic/users/_inputs.html.erb
|
|
83
85
|
- generators/clearance_views/templates/formtastic/users/new.html.erb
|
|
84
|
-
-
|
|
86
|
+
- lib/clearance.rb
|
|
85
87
|
- lib/clearance/authentication.rb
|
|
88
|
+
- lib/clearance/configuration.rb
|
|
86
89
|
- lib/clearance/extensions/errors.rb
|
|
87
90
|
- lib/clearance/extensions/rescue.rb
|
|
88
|
-
- lib/clearance/
|
|
91
|
+
- lib/clearance/routes.rb
|
|
89
92
|
- lib/clearance/user.rb
|
|
90
|
-
- lib/clearance.rb
|
|
91
|
-
- shoulda_macros/clearance.rb
|
|
92
93
|
- rails/init.rb
|
|
94
|
+
- shoulda_macros/clearance.rb
|
|
93
95
|
has_rdoc: true
|
|
94
96
|
homepage: http://github.com/thoughtbot/clearance
|
|
95
97
|
licenses: []
|
|
96
98
|
|
|
97
99
|
post_install_message:
|
|
98
|
-
rdoc_options:
|
|
99
|
-
|
|
100
|
+
rdoc_options:
|
|
101
|
+
- --charset=UTF-8
|
|
100
102
|
require_paths:
|
|
101
103
|
- lib
|
|
102
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
@@ -118,5 +120,45 @@ rubygems_version: 1.3.5
|
|
|
118
120
|
signing_key:
|
|
119
121
|
specification_version: 3
|
|
120
122
|
summary: Rails authentication with email & password.
|
|
121
|
-
test_files:
|
|
122
|
-
|
|
123
|
+
test_files:
|
|
124
|
+
- test/controllers/confirmations_controller_test.rb
|
|
125
|
+
- test/controllers/passwords_controller_test.rb
|
|
126
|
+
- test/controllers/sessions_controller_test.rb
|
|
127
|
+
- test/controllers/users_controller_test.rb
|
|
128
|
+
- test/models/clearance_mailer_test.rb
|
|
129
|
+
- test/models/user_test.rb
|
|
130
|
+
- test/rails_root/app/controllers/accounts_controller.rb
|
|
131
|
+
- test/rails_root/app/controllers/application_controller.rb
|
|
132
|
+
- test/rails_root/app/helpers/application_helper.rb
|
|
133
|
+
- test/rails_root/app/helpers/confirmations_helper.rb
|
|
134
|
+
- test/rails_root/app/helpers/passwords_helper.rb
|
|
135
|
+
- test/rails_root/app/models/user.rb
|
|
136
|
+
- test/rails_root/config/boot.rb
|
|
137
|
+
- test/rails_root/config/environment.rb
|
|
138
|
+
- test/rails_root/config/environments/development.rb
|
|
139
|
+
- test/rails_root/config/environments/production.rb
|
|
140
|
+
- test/rails_root/config/environments/test.rb
|
|
141
|
+
- test/rails_root/config/initializers/clearance.rb
|
|
142
|
+
- test/rails_root/config/initializers/clearance_loader.rb
|
|
143
|
+
- test/rails_root/config/initializers/inflections.rb
|
|
144
|
+
- test/rails_root/config/initializers/mime_types.rb
|
|
145
|
+
- test/rails_root/config/initializers/requires.rb
|
|
146
|
+
- test/rails_root/config/initializers/time_formats.rb
|
|
147
|
+
- test/rails_root/config/routes.rb
|
|
148
|
+
- test/rails_root/db/migrate/20100120045223_clearance_create_users.rb
|
|
149
|
+
- test/rails_root/features/step_definitions/clearance_steps.rb
|
|
150
|
+
- test/rails_root/features/step_definitions/factory_girl_steps.rb
|
|
151
|
+
- test/rails_root/features/step_definitions/web_steps.rb
|
|
152
|
+
- test/rails_root/features/support/env.rb
|
|
153
|
+
- test/rails_root/features/support/paths.rb
|
|
154
|
+
- test/rails_root/public/dispatch.rb
|
|
155
|
+
- test/rails_root/script/create_project.rb
|
|
156
|
+
- test/rails_root/test/factories/clearance.rb
|
|
157
|
+
- test/rails_root/test/functional/accounts_controller_test.rb
|
|
158
|
+
- test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/generators/formtastic_stylesheets/formtastic_stylesheets_generator.rb
|
|
159
|
+
- test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/lib/formtastic.rb
|
|
160
|
+
- test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/lib/justin_french/formtastic.rb
|
|
161
|
+
- test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/rails/init.rb
|
|
162
|
+
- test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/spec/formtastic_spec.rb
|
|
163
|
+
- test/rails_root/vendor/gems/justinfrench-formtastic-0.2.1/spec/test_helper.rb
|
|
164
|
+
- test/test_helper.rb
|
data/TODO.textile
DELETED
data/config/clearance_routes.rb
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
ActionController::Routing::Routes.draw do |map|
|
|
2
|
-
map.resources :passwords,
|
|
3
|
-
:controller => 'clearance/passwords',
|
|
4
|
-
:only => [:new, :create]
|
|
5
|
-
|
|
6
|
-
map.resource :session,
|
|
7
|
-
:controller => 'clearance/sessions',
|
|
8
|
-
:only => [:new, :create, :destroy]
|
|
9
|
-
|
|
10
|
-
map.resources :users, :controller => 'clearance/users' do |users|
|
|
11
|
-
users.resource :password,
|
|
12
|
-
:controller => 'clearance/passwords',
|
|
13
|
-
:only => [:create, :edit, :update]
|
|
14
|
-
|
|
15
|
-
users.resource :confirmation,
|
|
16
|
-
:controller => 'clearance/confirmations',
|
|
17
|
-
:only => [:new, :create]
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
map.sign_up 'sign_up',
|
|
21
|
-
:controller => 'clearance/users',
|
|
22
|
-
:action => 'new'
|
|
23
|
-
map.sign_in 'sign_in',
|
|
24
|
-
:controller => 'clearance/sessions',
|
|
25
|
-
:action => 'new'
|
|
26
|
-
map.sign_out 'sign_out',
|
|
27
|
-
:controller => 'clearance/sessions',
|
|
28
|
-
:action => 'destroy',
|
|
29
|
-
:method => :delete
|
|
30
|
-
end
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
if defined?(ActionController::Routing::RouteSet)
|
|
2
|
-
class ActionController::Routing::RouteSet
|
|
3
|
-
def load_routes_with_clearance!
|
|
4
|
-
lib_path = File.dirname(__FILE__)
|
|
5
|
-
clearance_routes = File.join(lib_path, *%w[.. .. .. config clearance_routes.rb])
|
|
6
|
-
unless configuration_files.include?(clearance_routes)
|
|
7
|
-
add_configuration_file(clearance_routes)
|
|
8
|
-
end
|
|
9
|
-
load_routes_without_clearance!
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
alias_method_chain :load_routes!, :clearance
|
|
13
|
-
end
|
|
14
|
-
end
|