clearance 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of clearance might be problematic. Click here for more details.
- data/CHANGELOG.md +9 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +171 -0
- data/README.md +18 -30
- data/Rakefile +14 -123
- data/VERSION +1 -1
- data/{spec/rails_root/app → app}/views/layouts/application.html.erb +0 -2
- data/app/views/passwords/edit.html.erb +3 -4
- data/app/views/passwords/new.html.erb +2 -2
- data/{lib/rails/generators/clearance_views_templates/formtastic/erb → app/views}/users/_inputs.html.erb +0 -0
- data/lib/clearance/user.rb +11 -9
- data/lib/generators/clearance/features/features_generator.rb +18 -0
- data/lib/generators/clearance/install/install_generator.rb +46 -0
- data/lib/generators/clearance/install/templates/README +22 -0
- data/lib/{rails/generators/clearance_templates → generators/clearance/install/templates}/clearance.rb +0 -0
- data/lib/{rails/generators/clearance_templates/migrations/update_users.rb → generators/clearance/install/templates/db/migrate/upgrade_clearance_to_diesel.rb} +1 -1
- data/lib/{rails/generators/clearance_templates → generators/clearance/install/templates}/user.rb +0 -0
- data/lib/generators/clearance/views/views_generator.rb +8 -0
- data/test/controllers/sessions_controller_test.rb +0 -2
- data/test/controllers/users_controller_test.rb +0 -2
- data/{lib/rails/generators/clearance_templates → test}/factories.rb +1 -1
- data/test/models/user_test.rb +23 -0
- data/test/test_helper.rb +18 -8
- metadata +38 -478
- data/lib/rails/generators/clearance_features_generator.rb +0 -20
- data/lib/rails/generators/clearance_features_templates/features/password_reset.feature +0 -40
- data/lib/rails/generators/clearance_features_templates/features/sign_in.feature +0 -28
- data/lib/rails/generators/clearance_features_templates/features/sign_out.feature +0 -16
- data/lib/rails/generators/clearance_features_templates/features/sign_up.feature +0 -21
- data/lib/rails/generators/clearance_features_templates/features/step_definitions/clearance_steps.rb +0 -109
- data/lib/rails/generators/clearance_generator.rb +0 -72
- data/lib/rails/generators/clearance_templates/README +0 -24
- data/lib/rails/generators/clearance_templates/migrations/create_users.rb +0 -19
- data/lib/rails/generators/clearance_views_generator.rb +0 -14
- data/lib/rails/generators/clearance_views_templates/formtastic/erb/passwords/edit.html.erb +0 -21
- data/lib/rails/generators/clearance_views_templates/formtastic/erb/passwords/new.html.erb +0 -15
- data/lib/rails/generators/clearance_views_templates/formtastic/erb/sessions/new.html.erb +0 -21
- data/lib/rails/generators/clearance_views_templates/formtastic/erb/users/new.html.erb +0 -10
- data/spec/rails_root/Gemfile +0 -17
- data/spec/rails_root/Gemfile.lock +0 -143
- data/spec/rails_root/README +0 -244
- data/spec/rails_root/Rakefile +0 -10
- data/spec/rails_root/app/controllers/accounts_controller.rb +0 -10
- data/spec/rails_root/app/controllers/application_controller.rb +0 -6
- data/spec/rails_root/app/helpers/application_helper.rb +0 -2
- data/spec/rails_root/app/models/user.rb +0 -3
- data/spec/rails_root/app/views/accounts/edit.html.erb +0 -0
- data/spec/rails_root/app/views/passwords/edit.html.erb +0 -21
- data/spec/rails_root/app/views/passwords/new.html.erb +0 -15
- data/spec/rails_root/app/views/sessions/new.html.erb +0 -21
- data/spec/rails_root/app/views/users/_inputs.html.erb +0 -6
- data/spec/rails_root/app/views/users/new.html.erb +0 -10
- data/spec/rails_root/config.ru +0 -4
- data/spec/rails_root/config/application.rb +0 -46
- data/spec/rails_root/config/boot.rb +0 -6
- data/spec/rails_root/config/cucumber.yml +0 -8
- data/spec/rails_root/config/database.yml +0 -25
- data/spec/rails_root/config/environment.rb +0 -7
- data/spec/rails_root/config/environments/development.rb +0 -21
- data/spec/rails_root/config/environments/production.rb +0 -42
- data/spec/rails_root/config/environments/test.rb +0 -34
- data/spec/rails_root/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails_root/config/initializers/clearance.rb +0 -3
- data/spec/rails_root/config/initializers/inflections.rb +0 -10
- data/spec/rails_root/config/initializers/mime_types.rb +0 -5
- data/spec/rails_root/config/initializers/secret_token.rb +0 -7
- data/spec/rails_root/config/initializers/session_store.rb +0 -8
- data/spec/rails_root/config/locales/en.yml +0 -5
- data/spec/rails_root/config/routes.rb +0 -61
- data/spec/rails_root/db/development.sqlite3 +0 -0
- data/spec/rails_root/db/migrate/20110209234521_clearance_create_users.rb +0 -19
- data/spec/rails_root/db/schema.rb +0 -28
- data/spec/rails_root/db/test.sqlite3 +0 -0
- data/spec/rails_root/doc/README_FOR_APP +0 -2
- data/spec/rails_root/features/password_reset.feature +0 -40
- data/spec/rails_root/features/sign_in.feature +0 -28
- data/spec/rails_root/features/sign_out.feature +0 -16
- data/spec/rails_root/features/sign_up.feature +0 -21
- data/spec/rails_root/features/step_definitions/clearance_steps.rb +0 -109
- data/spec/rails_root/features/step_definitions/web_steps.rb +0 -219
- data/spec/rails_root/features/support/env.rb +0 -57
- data/spec/rails_root/features/support/paths.rb +0 -45
- data/spec/rails_root/lib/tasks/cucumber.rake +0 -53
- data/spec/rails_root/log/development.log +0 -536
- data/spec/rails_root/log/test.log +0 -7600
- data/spec/rails_root/public/404.html +0 -26
- data/spec/rails_root/public/422.html +0 -26
- data/spec/rails_root/public/500.html +0 -26
- data/spec/rails_root/public/favicon.ico +0 -0
- data/spec/rails_root/public/images/rails.png +0 -0
- data/spec/rails_root/public/javascripts/application.js +0 -2
- data/spec/rails_root/public/javascripts/controls.js +0 -965
- data/spec/rails_root/public/javascripts/dragdrop.js +0 -974
- data/spec/rails_root/public/javascripts/effects.js +0 -1123
- data/spec/rails_root/public/javascripts/prototype.js +0 -4874
- data/spec/rails_root/public/javascripts/rails.js +0 -118
- data/spec/rails_root/public/robots.txt +0 -5
- data/spec/rails_root/script/cucumber +0 -10
- data/spec/rails_root/script/rails +0 -9
- data/spec/rails_root/test/factories/clearance.rb +0 -13
- data/spec/rails_root/test/functional/accounts_controller_test.rb +0 -22
- data/spec/rails_root/test/performance/browsing_test.rb +0 -9
- data/spec/rails_root/test/test_helper.rb +0 -13
- data/spec/rails_root/vendor/Gemfile +0 -17
- data/spec/rails_root/vendor/Gemfile.lock +0 -143
- data/spec/rails_root/vendor/README +0 -244
- data/spec/rails_root/vendor/Rakefile +0 -10
- data/spec/rails_root/vendor/app/controllers/accounts_controller.rb +0 -10
- data/spec/rails_root/vendor/app/controllers/application_controller.rb +0 -6
- data/spec/rails_root/vendor/app/helpers/application_helper.rb +0 -2
- data/spec/rails_root/vendor/app/models/user.rb +0 -3
- data/spec/rails_root/vendor/app/views/accounts/edit.html.erb +0 -0
- data/spec/rails_root/vendor/app/views/layouts/application.html.erb +0 -24
- data/spec/rails_root/vendor/app/views/passwords/edit.html.erb +0 -21
- data/spec/rails_root/vendor/app/views/passwords/new.html.erb +0 -15
- data/spec/rails_root/vendor/app/views/sessions/new.html.erb +0 -21
- data/spec/rails_root/vendor/app/views/users/_inputs.html.erb +0 -6
- data/spec/rails_root/vendor/app/views/users/new.html.erb +0 -10
- data/spec/rails_root/vendor/config.ru +0 -4
- data/spec/rails_root/vendor/config/application.rb +0 -46
- data/spec/rails_root/vendor/config/boot.rb +0 -6
- data/spec/rails_root/vendor/config/cucumber.yml +0 -8
- data/spec/rails_root/vendor/config/database.yml +0 -25
- data/spec/rails_root/vendor/config/environment.rb +0 -7
- data/spec/rails_root/vendor/config/environments/development.rb +0 -21
- data/spec/rails_root/vendor/config/environments/production.rb +0 -42
- data/spec/rails_root/vendor/config/environments/test.rb +0 -34
- data/spec/rails_root/vendor/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails_root/vendor/config/initializers/clearance.rb +0 -3
- data/spec/rails_root/vendor/config/initializers/inflections.rb +0 -10
- data/spec/rails_root/vendor/config/initializers/mime_types.rb +0 -5
- data/spec/rails_root/vendor/config/initializers/secret_token.rb +0 -7
- data/spec/rails_root/vendor/config/initializers/session_store.rb +0 -8
- data/spec/rails_root/vendor/config/locales/en.yml +0 -5
- data/spec/rails_root/vendor/config/routes.rb +0 -61
- data/spec/rails_root/vendor/db/development.sqlite3 +0 -0
- data/spec/rails_root/vendor/db/migrate/20101220184900_clearance_create_users.rb +0 -20
- data/spec/rails_root/vendor/db/schema.rb +0 -29
- data/spec/rails_root/vendor/db/test.sqlite3 +0 -0
- data/spec/rails_root/vendor/doc/README_FOR_APP +0 -2
- data/spec/rails_root/vendor/features/password_reset.feature +0 -33
- data/spec/rails_root/vendor/features/sign_in.feature +0 -35
- data/spec/rails_root/vendor/features/sign_out.feature +0 -15
- data/spec/rails_root/vendor/features/sign_up.feature +0 -45
- data/spec/rails_root/vendor/features/step_definitions/clearance_steps.rb +0 -138
- data/spec/rails_root/vendor/features/step_definitions/web_steps.rb +0 -219
- data/spec/rails_root/vendor/features/support/env.rb +0 -57
- data/spec/rails_root/vendor/features/support/paths.rb +0 -45
- data/spec/rails_root/vendor/lib/tasks/cucumber.rake +0 -53
- data/spec/rails_root/vendor/log/development.log +0 -663
- data/spec/rails_root/vendor/log/test.log +0 -22745
- data/spec/rails_root/vendor/plugins/dynamic_form/MIT-LICENSE +0 -20
- data/spec/rails_root/vendor/plugins/dynamic_form/README +0 -13
- data/spec/rails_root/vendor/plugins/dynamic_form/Rakefile +0 -10
- data/spec/rails_root/vendor/plugins/dynamic_form/init.rb +0 -5
- data/spec/rails_root/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +0 -300
- data/spec/rails_root/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +0 -8
- data/spec/rails_root/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +0 -42
- data/spec/rails_root/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +0 -370
- data/spec/rails_root/vendor/plugins/dynamic_form/test/test_helper.rb +0 -9
- data/spec/rails_root/vendor/public/404.html +0 -26
- data/spec/rails_root/vendor/public/422.html +0 -26
- data/spec/rails_root/vendor/public/500.html +0 -26
- data/spec/rails_root/vendor/public/favicon.ico +0 -0
- data/spec/rails_root/vendor/public/images/rails.png +0 -0
- data/spec/rails_root/vendor/public/javascripts/application.js +0 -2
- data/spec/rails_root/vendor/public/javascripts/controls.js +0 -965
- data/spec/rails_root/vendor/public/javascripts/dragdrop.js +0 -974
- data/spec/rails_root/vendor/public/javascripts/effects.js +0 -1123
- data/spec/rails_root/vendor/public/javascripts/prototype.js +0 -4874
- data/spec/rails_root/vendor/public/javascripts/rails.js +0 -118
- data/spec/rails_root/vendor/public/robots.txt +0 -5
- data/spec/rails_root/vendor/script/cucumber +0 -10
- data/spec/rails_root/vendor/script/rails +0 -9
- data/spec/rails_root/vendor/test/factories/clearance.rb +0 -13
- data/spec/rails_root/vendor/test/functional/accounts_controller_test.rb +0 -22
- data/spec/rails_root/vendor/test/performance/browsing_test.rb +0 -9
- data/spec/rails_root/vendor/test/test_helper.rb +0 -13
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/MIT-LICENSE +0 -20
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/README +0 -13
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/Rakefile +0 -10
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/init.rb +0 -5
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +0 -300
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +0 -8
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +0 -42
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +0 -370
- data/spec/rails_root/vendor/vendor/plugins/dynamic_form/test/test_helper.rb +0 -9
- data/test/rails_root/Gemfile +0 -17
- data/test/rails_root/Gemfile.lock +0 -145
- data/test/rails_root/README +0 -244
- data/test/rails_root/Rakefile +0 -10
- data/test/rails_root/app/controllers/accounts_controller.rb +0 -10
- data/test/rails_root/app/controllers/application_controller.rb +0 -6
- data/test/rails_root/app/helpers/application_helper.rb +0 -2
- data/test/rails_root/app/models/user.rb +0 -3
- data/test/rails_root/app/views/accounts/edit.html.erb +0 -0
- data/test/rails_root/app/views/layouts/application.html.erb +0 -24
- data/test/rails_root/app/views/passwords/edit.html.erb +0 -21
- data/test/rails_root/app/views/passwords/new.html.erb +0 -15
- data/test/rails_root/app/views/sessions/new.html.erb +0 -21
- data/test/rails_root/app/views/users/_inputs.html.erb +0 -6
- data/test/rails_root/app/views/users/new.html.erb +0 -10
- data/test/rails_root/config.ru +0 -4
- data/test/rails_root/config/application.rb +0 -46
- data/test/rails_root/config/boot.rb +0 -6
- data/test/rails_root/config/cucumber.yml +0 -8
- data/test/rails_root/config/database.yml +0 -25
- data/test/rails_root/config/environment.rb +0 -7
- data/test/rails_root/config/environments/development.rb +0 -21
- data/test/rails_root/config/environments/production.rb +0 -42
- data/test/rails_root/config/environments/test.rb +0 -34
- data/test/rails_root/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails_root/config/initializers/clearance.rb +0 -3
- data/test/rails_root/config/initializers/inflections.rb +0 -10
- data/test/rails_root/config/initializers/mime_types.rb +0 -5
- data/test/rails_root/config/initializers/secret_token.rb +0 -7
- data/test/rails_root/config/initializers/session_store.rb +0 -8
- data/test/rails_root/config/locales/en.yml +0 -5
- data/test/rails_root/config/routes.rb +0 -61
- data/test/rails_root/db/development.sqlite3 +0 -0
- data/test/rails_root/db/migrate/20110209234101_clearance_create_users.rb +0 -19
- data/test/rails_root/db/schema.rb +0 -28
- data/test/rails_root/db/test.sqlite3 +0 -0
- data/test/rails_root/doc/README_FOR_APP +0 -2
- data/test/rails_root/features/password_reset.feature +0 -40
- data/test/rails_root/features/sign_in.feature +0 -28
- data/test/rails_root/features/sign_out.feature +0 -16
- data/test/rails_root/features/sign_up.feature +0 -21
- data/test/rails_root/features/step_definitions/clearance_steps.rb +0 -109
- data/test/rails_root/features/step_definitions/web_steps.rb +0 -219
- data/test/rails_root/features/support/env.rb +0 -57
- data/test/rails_root/features/support/paths.rb +0 -45
- data/test/rails_root/lib/tasks/cucumber.rake +0 -53
- data/test/rails_root/log/development.log +0 -938
- data/test/rails_root/log/test.log +0 -20303
- data/test/rails_root/public/404.html +0 -26
- data/test/rails_root/public/422.html +0 -26
- data/test/rails_root/public/500.html +0 -26
- data/test/rails_root/public/favicon.ico +0 -0
- data/test/rails_root/public/images/rails.png +0 -0
- data/test/rails_root/public/javascripts/application.js +0 -2
- data/test/rails_root/public/javascripts/controls.js +0 -965
- data/test/rails_root/public/javascripts/dragdrop.js +0 -974
- data/test/rails_root/public/javascripts/effects.js +0 -1123
- data/test/rails_root/public/javascripts/prototype.js +0 -4874
- data/test/rails_root/public/javascripts/rails.js +0 -118
- data/test/rails_root/public/robots.txt +0 -5
- data/test/rails_root/script/cucumber +0 -10
- data/test/rails_root/script/rails +0 -9
- data/test/rails_root/test/factories/clearance.rb +0 -13
- data/test/rails_root/test/functional/accounts_controller_test.rb +0 -22
- data/test/rails_root/test/performance/browsing_test.rb +0 -9
- data/test/rails_root/test/test_helper.rb +0 -13
- data/test/rails_root/vendor/plugins/dynamic_form/MIT-LICENSE +0 -20
- data/test/rails_root/vendor/plugins/dynamic_form/README +0 -13
- data/test/rails_root/vendor/plugins/dynamic_form/Rakefile +0 -10
- data/test/rails_root/vendor/plugins/dynamic_form/init.rb +0 -5
- data/test/rails_root/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +0 -300
- data/test/rails_root/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +0 -8
- data/test/rails_root/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +0 -42
- data/test/rails_root/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +0 -370
- data/test/rails_root/vendor/plugins/dynamic_form/test/test_helper.rb +0 -9
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
0.10.2
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Replaced test/rails_root & general testing strategy with Diesel. (Joe Ferris)
|
5
|
+
* Conveniences in factories for password/confirmation.
|
6
|
+
* New generator command: rails generate clearance:install.
|
7
|
+
* Step definitions are now prefixed with visitor_ to use thoughtbot convention.
|
8
|
+
* When Clearance installed in an app that already has users, allow old users to sign in by resetting their password.
|
9
|
+
|
1
10
|
0.10.1
|
2
11
|
------------------
|
3
12
|
|
data/Gemfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
gem "cucumber"
|
3
|
+
gem "aruba", "~> 0.2.7"
|
4
|
+
gem "rake"
|
5
|
+
gem "rails", ">= 3.0.3"
|
6
|
+
gem "thin"
|
7
|
+
gem "shoulda"
|
8
|
+
gem "sqlite3-ruby"
|
9
|
+
gem "factory_girl"
|
10
|
+
gem "diesel"
|
11
|
+
gem "cucumber-rails"
|
12
|
+
gem "capybara"
|
13
|
+
gem "factory_girl_rails"
|
14
|
+
gem "rspec-rails"
|
15
|
+
gem "formtastic"
|
16
|
+
gem "database_cleaner"
|
17
|
+
gem "dynamic_form"
|
18
|
+
gem "launchy"
|
19
|
+
gem "redgreen"
|
20
|
+
gem "mocha"
|
21
|
+
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
abstract (1.0.0)
|
5
|
+
actionmailer (3.0.3)
|
6
|
+
actionpack (= 3.0.3)
|
7
|
+
mail (~> 2.2.9)
|
8
|
+
actionpack (3.0.3)
|
9
|
+
activemodel (= 3.0.3)
|
10
|
+
activesupport (= 3.0.3)
|
11
|
+
builder (~> 2.1.2)
|
12
|
+
erubis (~> 2.6.6)
|
13
|
+
i18n (~> 0.4)
|
14
|
+
rack (~> 1.2.1)
|
15
|
+
rack-mount (~> 0.6.13)
|
16
|
+
rack-test (~> 0.5.6)
|
17
|
+
tzinfo (~> 0.3.23)
|
18
|
+
activemodel (3.0.3)
|
19
|
+
activesupport (= 3.0.3)
|
20
|
+
builder (~> 2.1.2)
|
21
|
+
i18n (~> 0.4)
|
22
|
+
activerecord (3.0.3)
|
23
|
+
activemodel (= 3.0.3)
|
24
|
+
activesupport (= 3.0.3)
|
25
|
+
arel (~> 2.0.2)
|
26
|
+
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.3)
|
28
|
+
activemodel (= 3.0.3)
|
29
|
+
activesupport (= 3.0.3)
|
30
|
+
activesupport (3.0.3)
|
31
|
+
arel (2.0.6)
|
32
|
+
aruba (0.2.8)
|
33
|
+
childprocess (~> 0.1.6)
|
34
|
+
cucumber (~> 0.10.0)
|
35
|
+
rspec (~> 2.3.0)
|
36
|
+
builder (2.1.2)
|
37
|
+
capybara (0.4.0)
|
38
|
+
celerity (>= 0.7.9)
|
39
|
+
culerity (>= 0.2.4)
|
40
|
+
mime-types (>= 1.16)
|
41
|
+
nokogiri (>= 1.3.3)
|
42
|
+
rack (>= 1.0.0)
|
43
|
+
rack-test (>= 0.5.4)
|
44
|
+
selenium-webdriver (>= 0.0.27)
|
45
|
+
xpath (~> 0.1.2)
|
46
|
+
celerity (0.8.7)
|
47
|
+
childprocess (0.1.6)
|
48
|
+
ffi (~> 0.6.3)
|
49
|
+
configuration (1.2.0)
|
50
|
+
cucumber (0.10.0)
|
51
|
+
builder (>= 2.1.2)
|
52
|
+
diff-lcs (~> 1.1.2)
|
53
|
+
gherkin (~> 2.3.2)
|
54
|
+
json (~> 1.4.6)
|
55
|
+
term-ansicolor (~> 1.0.5)
|
56
|
+
cucumber-rails (0.3.2)
|
57
|
+
cucumber (>= 0.8.0)
|
58
|
+
culerity (0.2.14)
|
59
|
+
daemons (1.1.0)
|
60
|
+
database_cleaner (0.6.0)
|
61
|
+
diesel (0.1.4)
|
62
|
+
railties (~> 3.0.3)
|
63
|
+
diff-lcs (1.1.2)
|
64
|
+
dynamic_form (1.1.3)
|
65
|
+
erubis (2.6.6)
|
66
|
+
abstract (>= 1.0.0)
|
67
|
+
eventmachine (0.12.10)
|
68
|
+
factory_girl (1.3.3)
|
69
|
+
factory_girl_rails (1.0.1)
|
70
|
+
factory_girl (~> 1.3)
|
71
|
+
railties (>= 3.0.0)
|
72
|
+
ffi (0.6.3)
|
73
|
+
rake (>= 0.8.7)
|
74
|
+
formtastic (1.2.3)
|
75
|
+
actionpack (>= 2.3.7)
|
76
|
+
activesupport (>= 2.3.7)
|
77
|
+
i18n (~> 0.4)
|
78
|
+
gherkin (2.3.3)
|
79
|
+
json (~> 1.4.6)
|
80
|
+
i18n (0.5.0)
|
81
|
+
json (1.4.6)
|
82
|
+
json_pure (1.4.6)
|
83
|
+
launchy (0.3.7)
|
84
|
+
configuration (>= 0.0.5)
|
85
|
+
rake (>= 0.8.1)
|
86
|
+
mail (2.2.14)
|
87
|
+
activesupport (>= 2.3.6)
|
88
|
+
i18n (>= 0.4.0)
|
89
|
+
mime-types (~> 1.16)
|
90
|
+
treetop (~> 1.4.8)
|
91
|
+
mime-types (1.16)
|
92
|
+
mocha (0.9.10)
|
93
|
+
rake
|
94
|
+
nokogiri (1.4.4)
|
95
|
+
polyglot (0.3.1)
|
96
|
+
rack (1.2.1)
|
97
|
+
rack-mount (0.6.13)
|
98
|
+
rack (>= 1.0.0)
|
99
|
+
rack-test (0.5.7)
|
100
|
+
rack (>= 1.0)
|
101
|
+
rails (3.0.3)
|
102
|
+
actionmailer (= 3.0.3)
|
103
|
+
actionpack (= 3.0.3)
|
104
|
+
activerecord (= 3.0.3)
|
105
|
+
activeresource (= 3.0.3)
|
106
|
+
activesupport (= 3.0.3)
|
107
|
+
bundler (~> 1.0)
|
108
|
+
railties (= 3.0.3)
|
109
|
+
railties (3.0.3)
|
110
|
+
actionpack (= 3.0.3)
|
111
|
+
activesupport (= 3.0.3)
|
112
|
+
rake (>= 0.8.7)
|
113
|
+
thor (~> 0.14.4)
|
114
|
+
rake (0.8.7)
|
115
|
+
redgreen (1.2.2)
|
116
|
+
rspec (2.3.0)
|
117
|
+
rspec-core (~> 2.3.0)
|
118
|
+
rspec-expectations (~> 2.3.0)
|
119
|
+
rspec-mocks (~> 2.3.0)
|
120
|
+
rspec-core (2.3.1)
|
121
|
+
rspec-expectations (2.3.0)
|
122
|
+
diff-lcs (~> 1.1.2)
|
123
|
+
rspec-mocks (2.3.0)
|
124
|
+
rspec-rails (2.3.1)
|
125
|
+
actionpack (~> 3.0)
|
126
|
+
activesupport (~> 3.0)
|
127
|
+
railties (~> 3.0)
|
128
|
+
rspec (~> 2.3.0)
|
129
|
+
rubyzip (0.9.4)
|
130
|
+
selenium-webdriver (0.1.2)
|
131
|
+
childprocess (~> 0.1.5)
|
132
|
+
ffi (~> 0.6.3)
|
133
|
+
json_pure
|
134
|
+
rubyzip
|
135
|
+
shoulda (2.11.3)
|
136
|
+
sqlite3-ruby (1.3.2)
|
137
|
+
term-ansicolor (1.0.5)
|
138
|
+
thin (1.2.7)
|
139
|
+
daemons (>= 1.0.9)
|
140
|
+
eventmachine (>= 0.12.6)
|
141
|
+
rack (>= 1.0.0)
|
142
|
+
thor (0.14.6)
|
143
|
+
treetop (1.4.9)
|
144
|
+
polyglot (>= 0.3.1)
|
145
|
+
tzinfo (0.3.23)
|
146
|
+
xpath (0.1.3)
|
147
|
+
nokogiri (~> 1.3)
|
148
|
+
|
149
|
+
PLATFORMS
|
150
|
+
ruby
|
151
|
+
|
152
|
+
DEPENDENCIES
|
153
|
+
aruba (~> 0.2.7)
|
154
|
+
capybara
|
155
|
+
cucumber
|
156
|
+
cucumber-rails
|
157
|
+
database_cleaner
|
158
|
+
diesel
|
159
|
+
dynamic_form
|
160
|
+
factory_girl
|
161
|
+
factory_girl_rails
|
162
|
+
formtastic
|
163
|
+
launchy
|
164
|
+
mocha
|
165
|
+
rails (>= 3.0.3)
|
166
|
+
rake
|
167
|
+
redgreen
|
168
|
+
rspec-rails
|
169
|
+
shoulda
|
170
|
+
sqlite3-ruby
|
171
|
+
thin
|
data/README.md
CHANGED
@@ -5,37 +5,28 @@ Rails authentication with email & password.
|
|
5
5
|
|
6
6
|
[We have clearance, Clarence.](http://www.youtube.com/watch?v=fVq4_HhBK8Y)
|
7
7
|
|
8
|
-
Clearance was extracted out of [Hoptoad](http://hoptoadapp.com).
|
9
|
-
authentication code from two of thoughtbot's client Rails apps and have since
|
10
|
-
used it each time we needed authentication.
|
8
|
+
Clearance was extracted out of [Hoptoad](http://hoptoadapp.com).
|
11
9
|
|
12
10
|
Help
|
13
11
|
----
|
14
12
|
|
15
|
-
* [
|
16
|
-
* [
|
17
|
-
* [
|
18
|
-
|
19
|
-
Bugs, Patches
|
20
|
-
-------------
|
21
|
-
|
22
|
-
Fork away and create a [Github Issue](http://github.com/thoughtbot/clearance/issues).
|
13
|
+
* [Documentation](http://rdoc.info/gems/clearance) at RDoc.info.
|
14
|
+
* [Patches welcome](http://github.com/thoughtbot/clearance/issues) via Github Issues.
|
15
|
+
* [#thoughtbot](irc://irc.freenode.net/thoughtbot) IRC channel on freenode.
|
16
|
+
* [Mailing list](http://groups.google.com/group/thoughtbot-clearance) on Google Groups.
|
23
17
|
|
24
18
|
Installation
|
25
19
|
------------
|
26
20
|
|
27
21
|
Clearance is a Rails engine for Rails 3.
|
28
22
|
|
29
|
-
Use the [0.8.x](https://github.com/thoughtbot/clearance/tree/v0.8.8)
|
30
|
-
series of Clearance if you have a Rails 2 app.
|
31
|
-
|
32
23
|
Include the gem in your Gemfile:
|
33
24
|
|
34
25
|
gem "clearance"
|
35
26
|
|
36
27
|
Make sure the development database exists, then run the generator:
|
37
28
|
|
38
|
-
rails generate clearance
|
29
|
+
rails generate clearance:install
|
39
30
|
|
40
31
|
This:
|
41
32
|
|
@@ -43,6 +34,9 @@ This:
|
|
43
34
|
* inserts Clearance::Authentication into your ApplicationController
|
44
35
|
* creates a migration that either creates a users table or adds only missing columns
|
45
36
|
|
37
|
+
Use the [0.8.x](https://github.com/thoughtbot/clearance/tree/v0.8.8)
|
38
|
+
series of Clearance if you have a Rails 2 app.
|
39
|
+
|
46
40
|
Usage
|
47
41
|
-----
|
48
42
|
|
@@ -82,35 +76,29 @@ can be overridden by re-defining url_after_(action) methods as seen above.
|
|
82
76
|
Optional Cucumber features
|
83
77
|
--------------------------
|
84
78
|
|
85
|
-
As your app evolves, you want to know that authentication still works.
|
86
|
-
|
87
|
-
[Cucumber](http://cukes.info).
|
88
|
-
|
89
|
-
Run the Cucumber generator and Clearance feature generator:
|
79
|
+
As your app evolves, you want to know that authentication still works. If you
|
80
|
+
use [Cucumber](http://cukes.info), run the Clearance features generator:
|
90
81
|
|
91
|
-
|
92
|
-
script/rails generate clearance_features
|
82
|
+
rails generate clearance_features
|
93
83
|
|
94
84
|
Edit your Gemfile to include:
|
95
85
|
|
96
86
|
gem 'factory_girl_rails'
|
97
87
|
|
98
|
-
Edit
|
88
|
+
Edit config/enviroments/test.rb to include the following:
|
99
89
|
|
100
90
|
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
101
91
|
|
102
|
-
Then run
|
92
|
+
Then run your tests!
|
93
|
+
|
94
|
+
rake
|
103
95
|
|
104
96
|
Optional Formtastic views
|
105
97
|
-------------------------
|
106
98
|
|
107
|
-
|
108
|
-
|
109
|
-
Clearance has another generator to generate Formastic views:
|
110
|
-
|
111
|
-
script/rails generate clearance_views
|
99
|
+
Clearance can also generate [Formtastic](http://github.com/justinfrench/formtastic) views:
|
112
100
|
|
113
|
-
|
101
|
+
rails generate clearance_views
|
114
102
|
|
115
103
|
Extensions
|
116
104
|
----------
|
data/Rakefile
CHANGED
@@ -1,133 +1,24 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
5
5
|
require 'rake'
|
6
|
-
require 'rake/
|
6
|
+
require 'rake/gempackagetask'
|
7
7
|
require 'cucumber/rake/task'
|
8
|
-
require '
|
9
|
-
|
10
|
-
namespace :test do
|
11
|
-
Rake::TestTask.new(:basic => ["generator:cleanup",
|
12
|
-
"generator:clearance"]) do |task|
|
13
|
-
task.libs << "lib"
|
14
|
-
task.libs << "test"
|
15
|
-
task.pattern = "test/*/*_test.rb"
|
16
|
-
task.verbose = false
|
17
|
-
end
|
18
|
-
|
19
|
-
Rake::TestTask.new(:views => ["generator:cleanup",
|
20
|
-
"generator:clearance",
|
21
|
-
"generator:clearance_views"]) do |task|
|
22
|
-
task.libs << "lib"
|
23
|
-
task.libs << "test"
|
24
|
-
task.pattern = "test/*/*_test.rb"
|
25
|
-
task.verbose = false
|
26
|
-
end
|
27
|
-
|
28
|
-
|
29
|
-
Cucumber::Rake::Task.new(:features => ["generator:cleanup",
|
30
|
-
"generator:clearance",
|
31
|
-
"generator:clearance_features"]) do |t|
|
32
|
-
t.cucumber_opts = "--format progress"
|
33
|
-
t.profile = 'features'
|
34
|
-
end
|
8
|
+
require 'diesel/tasks'
|
35
9
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
t.profile = 'features_for_views'
|
42
|
-
end
|
10
|
+
Rake::TestTask.new do |task|
|
11
|
+
task.libs << "lib"
|
12
|
+
task.libs << "test"
|
13
|
+
task.pattern = "test/*/*_test.rb"
|
14
|
+
task.verbose = false
|
43
15
|
end
|
44
16
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
Spec::Rake::SpecTask.new(:views => %w(spec:generator:cleanup spec:generator:clearance spec:generator:clearance_views)) do |task|
|
51
|
-
task.spec_files = FileList['spec/*/*_spec.rb']
|
52
|
-
end
|
53
|
-
|
54
|
-
Cucumber::Rake::Task.new(:features => %w(spec:generator:cleanup spec:generator:clearance spec:generator:clearance_features)) do |task|
|
55
|
-
task.cucumber_opts = '--format progress'
|
56
|
-
task.profile = 'features_with_rspec'
|
57
|
-
end
|
58
|
-
|
59
|
-
Cucumber::Rake::Task.new(:features_for_views => %w(spec:generator:cleanup spec:generator:clearance spec:generator:clearance_features spec:generator:clearance_views)) do |task|
|
60
|
-
task.cucumber_opts = '--format progress'
|
61
|
-
task.profile = 'features_for_views_with_rspec'
|
62
|
-
end
|
63
|
-
|
64
|
-
namespace :generator do
|
65
|
-
task :cleanup do
|
66
|
-
FileList["spec/rails_root/db/**/*"].each do |each|
|
67
|
-
FileUtils.rm_rf(each)
|
68
|
-
end
|
69
|
-
|
70
|
-
FileUtils.rm_rf("spec/rails_root/vendor/plugins/clearance")
|
71
|
-
FileUtils.rm_rf("spec/rails_root/app/views/passwords")
|
72
|
-
FileUtils.rm_rf("spec/rails_root/app/views/sessions")
|
73
|
-
FileUtils.rm_rf("spec/rails_root/app/views/users")
|
74
|
-
FileUtils.mkdir_p("spec/rails_root/vendor/plugins")
|
75
|
-
clearance_root = File.expand_path(File.dirname(__FILE__))
|
76
|
-
system("ln -s #{clearance_root} spec/rails_root/vendor/plugins/clearance")
|
77
|
-
FileList["spec/rails_root/features/*.feature"].each do |each|
|
78
|
-
FileUtils.rm_rf(each)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
task :clearance do
|
83
|
-
system "cd spec/rails_root && bundle install && ./script/rails generate clearance && rake db:migrate db:test:prepare"
|
84
|
-
end
|
85
|
-
|
86
|
-
task :clearance_features do
|
87
|
-
system "cd spec/rails_root && ./script/rails generate clearance_features"
|
88
|
-
end
|
89
|
-
|
90
|
-
task :clearance_views do
|
91
|
-
system "cd spec/rails_root && ./script/rails generate clearance_views"
|
92
|
-
end
|
93
|
-
end
|
17
|
+
Cucumber::Rake::Task.new(:cucumber) do |t|
|
18
|
+
t.fork = true
|
19
|
+
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
|
94
20
|
end
|
95
21
|
|
96
|
-
|
97
|
-
|
98
|
-
task :cleanup do
|
99
|
-
FileList["test/rails_root/db/**/*"].each do |each|
|
100
|
-
FileUtils.rm_rf(each)
|
101
|
-
end
|
102
|
-
|
103
|
-
FileUtils.rm_rf("test/rails_root/app/views/passwords")
|
104
|
-
FileUtils.rm_rf("test/rails_root/app/views/sessions")
|
105
|
-
FileUtils.rm_rf("test/rails_root/app/views/users")
|
106
|
-
FileUtils.mkdir_p("test/rails_root/vendor/plugins")
|
107
|
-
clearance_root = File.expand_path(File.dirname(__FILE__))
|
108
|
-
FileList["test/rails_root/features/*.feature"].each do |each|
|
109
|
-
FileUtils.rm_rf(each)
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
desc "Run the clearance generator"
|
114
|
-
task :clearance do
|
115
|
-
system "cd test/rails_root && bundle install && ./script/rails generate clearance && rake db:migrate db:test:prepare"
|
116
|
-
end
|
117
|
-
|
118
|
-
desc "Run the clearance features generator"
|
119
|
-
task :clearance_features do
|
120
|
-
system "cd test/rails_root && ./script/rails generate clearance_features"
|
121
|
-
end
|
122
|
-
|
123
|
-
desc "Run the clearance views generator"
|
124
|
-
task :clearance_views do
|
125
|
-
system "cd test/rails_root && ./script/rails generate clearance_views"
|
126
|
-
end
|
127
|
-
end
|
22
|
+
desc "Default: run the unit tests and cucumber features"
|
23
|
+
task :default => [:test, :cucumber]
|
128
24
|
|
129
|
-
desc "Run the test suite"
|
130
|
-
task :default => ['test:basic', 'test:features',
|
131
|
-
'test:views', 'test:features_for_views',
|
132
|
-
'spec:basic', 'spec:features',
|
133
|
-
'spec:views', 'spec:features_for_views']
|