noodall-devise 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +217 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +38 -0
- data/app/controllers/admin/users_controller.rb +85 -0
- data/app/helpers/admin/users_helper.rb +3 -0
- data/app/models/user.rb +21 -0
- data/app/views/admin/users/index.html.erb +39 -0
- data/app/views/admin/users/show.html.erb +37 -0
- data/config/locales/devise.en.yml +39 -0
- data/config/locales/en.yml +5 -0
- data/cucumber.yml +8 -0
- data/features/manage_users.feature +44 -0
- data/features/step_definitions/user_steps.rb +47 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/env.rb +49 -0
- data/features/support/paths.rb +19 -0
- data/lib/noodall-devise.rb +2 -0
- data/lib/noodall/devise/engine.rb +9 -0
- data/lib/noodall/devise/version.rb +5 -0
- data/noodall-devise.gemspec +24 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +3 -0
- data/spec/dummy/app/views/home/index.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +44 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +15 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +142 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/mongo_mapper.rb +13 -0
- data/spec/dummy/config/initializers/noodall.rb +2 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +9 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/user.rb +14 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/noodall_devise_spec.rb +7 -0
- data/spec/spec_helper.rb +30 -0
- metadata +173 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'f062e624a433fd1a37f01b00e42b77435ccd27f44adae270a58e44549d841815c1636c6f5c69667e5d3ade1779c52f924be3b30887803b5e5ac84a83c1d4663c'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rake db:sessions:create")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Factory.define :user do |user|
|
2
|
+
user.email { |u| Faker::Internet.email(u.name) }
|
3
|
+
user.name { Faker::Name.name }
|
4
|
+
user.password { "password" }
|
5
|
+
user.password_confirmation { "password" }
|
6
|
+
end
|
7
|
+
|
8
|
+
Factory.define :website_editor, :parent => :user do |user|
|
9
|
+
user.groups [ "editor" ]
|
10
|
+
end
|
11
|
+
|
12
|
+
Factory.define :website_administrator, :parent => :user do |user|
|
13
|
+
user.groups [ "admin" ]
|
14
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
require "rspec/rails"
|
7
|
+
|
8
|
+
ActionMailer::Base.delivery_method = :test
|
9
|
+
ActionMailer::Base.perform_deliveries = true
|
10
|
+
ActionMailer::Base.default_url_options[:host] = "test.com"
|
11
|
+
|
12
|
+
Rails.backtrace_cleaner.remove_silencers!
|
13
|
+
|
14
|
+
# Configure capybara for integration testing
|
15
|
+
require "capybara/rails"
|
16
|
+
Capybara.default_driver = :rack_test
|
17
|
+
Capybara.default_selector = :css
|
18
|
+
|
19
|
+
# Load support files
|
20
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
21
|
+
|
22
|
+
Rspec.configure do |config|
|
23
|
+
# Remove this line if you don't want Rspec's should and should_not
|
24
|
+
# methods or matchers
|
25
|
+
require 'rspec/expectations'
|
26
|
+
config.include Rspec::Matchers
|
27
|
+
|
28
|
+
# == Mock Framework
|
29
|
+
config.mock_with :rspec
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: noodall-devise
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors: []
|
13
|
+
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-11-02 00:00:00 +00:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 21
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 1
|
32
|
+
- 3
|
33
|
+
version: 1.1.3
|
34
|
+
requirement: *id001
|
35
|
+
type: :runtime
|
36
|
+
name: devise
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 31
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 1
|
48
|
+
- 6
|
49
|
+
version: 1.1.6
|
50
|
+
requirement: *id002
|
51
|
+
type: :runtime
|
52
|
+
name: mm-devise
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
prerelease: false
|
55
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 23
|
61
|
+
segments:
|
62
|
+
- 1
|
63
|
+
- 0
|
64
|
+
- 0
|
65
|
+
version: 1.0.0
|
66
|
+
requirement: *id003
|
67
|
+
type: :development
|
68
|
+
name: bundler
|
69
|
+
description: User sign in and managent with devise. Provides administration of users in the admin area
|
70
|
+
email: []
|
71
|
+
|
72
|
+
executables: []
|
73
|
+
|
74
|
+
extensions: []
|
75
|
+
|
76
|
+
extra_rdoc_files: []
|
77
|
+
|
78
|
+
files:
|
79
|
+
- .gitignore
|
80
|
+
- Gemfile
|
81
|
+
- Gemfile.lock
|
82
|
+
- MIT-LICENSE
|
83
|
+
- README.rdoc
|
84
|
+
- Rakefile
|
85
|
+
- app/controllers/admin/users_controller.rb
|
86
|
+
- app/helpers/admin/users_helper.rb
|
87
|
+
- app/models/user.rb
|
88
|
+
- app/views/admin/users/index.html.erb
|
89
|
+
- app/views/admin/users/show.html.erb
|
90
|
+
- config/locales/devise.en.yml
|
91
|
+
- config/locales/en.yml
|
92
|
+
- cucumber.yml
|
93
|
+
- features/manage_users.feature
|
94
|
+
- features/step_definitions/user_steps.rb
|
95
|
+
- features/step_definitions/web_steps.rb
|
96
|
+
- features/support/env.rb
|
97
|
+
- features/support/paths.rb
|
98
|
+
- lib/noodall-devise.rb
|
99
|
+
- lib/noodall/devise/engine.rb
|
100
|
+
- lib/noodall/devise/version.rb
|
101
|
+
- noodall-devise.gemspec
|
102
|
+
- spec/dummy/Rakefile
|
103
|
+
- spec/dummy/app/controllers/application_controller.rb
|
104
|
+
- spec/dummy/app/controllers/home_controller.rb
|
105
|
+
- spec/dummy/app/helpers/application_helper.rb
|
106
|
+
- spec/dummy/app/views/home/index.html.erb
|
107
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
108
|
+
- spec/dummy/config.ru
|
109
|
+
- spec/dummy/config/application.rb
|
110
|
+
- spec/dummy/config/boot.rb
|
111
|
+
- spec/dummy/config/database.yml
|
112
|
+
- spec/dummy/config/environment.rb
|
113
|
+
- spec/dummy/config/environments/development.rb
|
114
|
+
- spec/dummy/config/environments/production.rb
|
115
|
+
- spec/dummy/config/environments/test.rb
|
116
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
117
|
+
- spec/dummy/config/initializers/devise.rb
|
118
|
+
- spec/dummy/config/initializers/inflections.rb
|
119
|
+
- spec/dummy/config/initializers/mime_types.rb
|
120
|
+
- spec/dummy/config/initializers/mongo_mapper.rb
|
121
|
+
- spec/dummy/config/initializers/noodall.rb
|
122
|
+
- spec/dummy/config/initializers/secret_token.rb
|
123
|
+
- spec/dummy/config/initializers/session_store.rb
|
124
|
+
- spec/dummy/config/locales/en.yml
|
125
|
+
- spec/dummy/config/routes.rb
|
126
|
+
- spec/dummy/db/test.sqlite3
|
127
|
+
- spec/dummy/public/404.html
|
128
|
+
- spec/dummy/public/422.html
|
129
|
+
- spec/dummy/public/500.html
|
130
|
+
- spec/dummy/public/favicon.ico
|
131
|
+
- spec/dummy/script/rails
|
132
|
+
- spec/factories/user.rb
|
133
|
+
- spec/integration/navigation_spec.rb
|
134
|
+
- spec/noodall_devise_spec.rb
|
135
|
+
- spec/spec_helper.rb
|
136
|
+
has_rdoc: true
|
137
|
+
homepage: http://rubygems.org/gems/noodall-components-gallery
|
138
|
+
licenses: []
|
139
|
+
|
140
|
+
post_install_message:
|
141
|
+
rdoc_options: []
|
142
|
+
|
143
|
+
require_paths:
|
144
|
+
- lib
|
145
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
hash: 3
|
151
|
+
segments:
|
152
|
+
- 0
|
153
|
+
version: "0"
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
hash: 23
|
160
|
+
segments:
|
161
|
+
- 1
|
162
|
+
- 3
|
163
|
+
- 6
|
164
|
+
version: 1.3.6
|
165
|
+
requirements: []
|
166
|
+
|
167
|
+
rubyforge_project:
|
168
|
+
rubygems_version: 1.3.7
|
169
|
+
signing_key:
|
170
|
+
specification_version: 3
|
171
|
+
summary: "Noodall Devise: User sign in and managent with devise"
|
172
|
+
test_files: []
|
173
|
+
|