challah 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +11 -1
- data/README.md +14 -0
- data/app/controllers/{challah/sessions_controller.rb → sessions_controller.rb} +1 -1
- data/app/views/{challah/sessions → sessions}/access_denied.html.erb +0 -0
- data/app/views/{challah/sessions → sessions}/new.html.erb +0 -0
- data/lib/challah.rb +3 -2
- data/lib/challah/routes.rb +10 -8
- data/lib/challah/version.rb +1 -1
- data/test/restrictions_controller_test.rb +1 -1
- data/test/routes_test.rb +3 -3
- data/test/sessions_controller_test.rb +1 -1
- data/vendor/bundle/cache/factory_girl-2.5.1.gem +0 -0
- data/vendor/bundle/gems/bcrypt-ruby-3.0.1/ext/mri/bcrypt_ext.bundle +0 -0
- data/vendor/bundle/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.bundle +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/Appraisals +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/CONTRIBUTION_GUIDELINES.md +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/Changelog +9 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/GETTING_STARTED.md +18 -5
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/Gemfile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/Gemfile.lock +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/LICENSE +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/README.md +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/Rakefile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/cucumber.yml +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/factory_girl_steps.feature +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/find_definitions.feature +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/step_definitions/database_steps.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/step_definitions/factory_girl_steps.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/support/env.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/support/factories.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/2.1.gemfile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/2.1.gemfile.lock +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/2.3.gemfile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/2.3.gemfile.lock +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/3.0.gemfile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/3.0.gemfile.lock +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/3.1.gemfile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/3.1.gemfile.lock +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/3.2.gemfile +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/gemfiles/3.2.gemfile.lock +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/aliases.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute/association.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute/dynamic.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute/sequence.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute/static.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute_assigner.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute_list.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/callback.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration/association.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration/dynamic.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration/implicit.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration/static.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration_list.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/definition.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/definition_proxy.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/deprecated.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/evaluator.rb +9 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/evaluator_class_definer.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/factory.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/find_definitions.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/null_factory.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/null_object.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/attributes_for.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/build.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/create.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/stub.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/rails2.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/registry.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/reload.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/sequence.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/step_definitions.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/blueprint.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/default.rb +2 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/generate.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/make.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/methods.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/sham.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/vintage.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/trait.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/version.rb +1 -1
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/aliases_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/attribute_aliases_spec.rb +0 -0
- data/vendor/bundle/gems/factory_girl-2.5.1/spec/acceptance/attribute_existing_on_object_spec.rb +68 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/attributes_for_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/attributes_from_instance_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/attributes_ordered_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/build_list_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/build_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/build_stubbed_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/callbacks_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/create_list_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/create_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/default_strategy_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/define_child_before_parent_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/definition_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/definition_without_block_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/initialize_with_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/modify_factories_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/modify_inherited_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/overrides_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/parent_spec.rb +23 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/sequence_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/stub_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/syntax/blueprint_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/syntax/generate_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/syntax/make_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/syntax/sham_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/syntax/vintage_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/traits_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/transient_attributes_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/aliases_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/attribute/association_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/attribute/dynamic_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/attribute/sequence_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/attribute/static_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/attribute_list_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/attribute_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/callback_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/declaration/implicit_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/declaration_list_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/definition_proxy_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/definition_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/deprecated_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/evaluator_class_definer_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/factory_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/find_definitions_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/null_factory_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/null_object_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/proxy/attributes_for_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/proxy/build_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/proxy/create_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/proxy/stub_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/proxy_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/registry_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl/sequence_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/factory_girl_spec.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/spec_helper.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/support/macros/define_constant.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/support/matchers/callback.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/support/matchers/declaration.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/support/matchers/delegate.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/support/matchers/trait.rb +0 -0
- data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/support/shared_examples/proxy.rb +0 -0
- data/vendor/bundle/gems/json-1.6.5/ext/json/ext/generator/generator.bundle +0 -0
- data/vendor/bundle/gems/json-1.6.5/ext/json/ext/json/ext/generator.bundle +0 -0
- data/vendor/bundle/gems/json-1.6.5/ext/json/ext/json/ext/parser.bundle +0 -0
- data/vendor/bundle/gems/json-1.6.5/ext/json/ext/parser/parser.bundle +0 -0
- data/vendor/bundle/gems/rdiscount-1.6.8/ext/rdiscount.bundle +0 -0
- data/vendor/bundle/gems/rdiscount-1.6.8/lib/rdiscount.bundle +0 -0
- data/vendor/bundle/gems/sqlite3-1.3.5/ext/sqlite3/mkmf.log +3 -3
- data/vendor/bundle/gems/sqlite3-1.3.5/ext/sqlite3/sqlite3_native.bundle +0 -0
- data/vendor/bundle/gems/sqlite3-1.3.5/lib/sqlite3/sqlite3_native.bundle +0 -0
- data/vendor/bundle/specifications/{factory_girl-2.5.0.gemspec → factory_girl-2.5.1.gemspec} +2 -2
- metadata +147 -147
- data/vendor/bundle/cache/factory_girl-2.5.0.gem +0 -0
- data/vendor/bundle/gems/factory_girl-2.5.0/spec/acceptance/attribute_existing_on_object.rb +0 -21
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
-
## Challah 0.1
|
1
|
+
## Challah 0.3.1
|
2
|
+
|
3
|
+
* Removed namespacing of controllers and default routes.
|
4
|
+
* Added option to not include default routes
|
5
|
+
|
6
|
+
## Challah 0.3.0
|
7
|
+
|
8
|
+
* Documentation clean up.
|
9
|
+
* Added rake tasks for creating role, permission and user records.
|
10
|
+
|
11
|
+
## Challah 0.2.0
|
2
12
|
|
3
13
|
* Initial build. Basic functionality for session persistence and authentication.
|
data/README.md
CHANGED
@@ -175,6 +175,20 @@ And of course, you can stack up multiple restrictions get very specific about wh
|
|
175
175
|
|
176
176
|
Whichever method you use will yield the same results. Just make sure you are checking for a permission key, and not checking for a role. Checking for roles (i.e.: `user.role_id == 1`) is shameful practice. Use permissions!
|
177
177
|
|
178
|
+
## Default Routes
|
179
|
+
|
180
|
+
By default, there are a few routes included with the Challah engine. These routes provide a basic method for a username- and password-based login page. These routes are:
|
181
|
+
|
182
|
+
GET /login # => SessionsController#new
|
183
|
+
POST /login # => SessionsController#create
|
184
|
+
GET /logout # => SessionsController#new
|
185
|
+
|
186
|
+
Feel free to override the `SessionsController` with something more appropriate for your app.
|
187
|
+
|
188
|
+
If you'd prefer to set up your own login/logout actions, you can skip the inclusion of the default routes by adding the following line to an initializer file in your app:
|
189
|
+
|
190
|
+
Challah.options[:skip_routes] = true
|
191
|
+
|
178
192
|
## Full documentation
|
179
193
|
|
180
194
|
Documentation is available at: [http://rubydoc.info/gems/challah](http://rubydoc.info/gems/challah/frames)
|
File without changes
|
File without changes
|
data/lib/challah.rb
CHANGED
@@ -54,8 +54,9 @@ module Challah
|
|
54
54
|
def options
|
55
55
|
@options ||= {
|
56
56
|
:cookie_prefix => 'challah',
|
57
|
-
:access_denied_view => '
|
58
|
-
:storage_class => CookieStore
|
57
|
+
:access_denied_view => 'sessions/access_denied',
|
58
|
+
:storage_class => CookieStore,
|
59
|
+
:skip_routes => false
|
59
60
|
}
|
60
61
|
end
|
61
62
|
end
|
data/lib/challah/routes.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
unless Challah.options[:skip_routes]
|
3
|
+
match '/login' => 'sessions#create', :as => 'authenticate', :via => :post
|
4
|
+
match '/login' => 'sessions#new', :as => 'login', :via => :get
|
5
|
+
match '/logout' => 'sessions#destroy', :as => 'logout'
|
6
|
+
end
|
3
7
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
# These are used for testing purposes only.
|
9
|
-
match '/__challah__/:action', :controller => 'challah/test/restrictions'
|
8
|
+
if Rails.env.test?
|
9
|
+
# These are used for testing purposes only.
|
10
|
+
match '/challah/:action', :controller => 'challah/test/restrictions'
|
11
|
+
end
|
10
12
|
end
|
data/lib/challah/version.rb
CHANGED
data/test/routes_test.rb
CHANGED
@@ -3,9 +3,9 @@ require 'helper'
|
|
3
3
|
class RoutesTest < ActionDispatch::IntegrationTest
|
4
4
|
context "The routing engine" do
|
5
5
|
should "have login and logout routes" do
|
6
|
-
assert_generates '/login', :controller => '
|
7
|
-
assert_generates '/logout', :controller => '
|
8
|
-
assert_routing({ :method => 'post', :path => '/login' }, { :controller => '
|
6
|
+
assert_generates '/login', :controller => 'sessions', :action => 'new'
|
7
|
+
assert_generates '/logout', :controller => 'sessions', :action => 'destroy'
|
8
|
+
assert_routing({ :method => 'post', :path => '/login' }, { :controller => 'sessions', :action => 'create' })
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/CONTRIBUTION_GUIDELINES.md
RENAMED
File without changes
|
@@ -1,3 +1,12 @@
|
|
1
|
+
2.5.1 (February 3, 2012)
|
2
|
+
Fix attribute evaluation when the attribute isn't defined in the factory but
|
3
|
+
is a private method on Object
|
4
|
+
Update rubygems on Travis before running tests
|
5
|
+
Fix spec name
|
6
|
+
Update GETTING_STARTED with correct usage of build_stubbed
|
7
|
+
Update README with more info on initialize_with
|
8
|
+
Honor :parent on factory over block nesting
|
9
|
+
|
1
10
|
2.5.0 (January 20, 2012)
|
2
11
|
Revert 'Deprecate build_stubbed and attributes_for'
|
3
12
|
Implement initialize_with to allow overriding object instantiation
|
@@ -487,7 +487,7 @@ factory\_girl makes available three callbacks for injecting some code:
|
|
487
487
|
|
488
488
|
* after_build - called after a factory is built (via FactoryGirl.build)
|
489
489
|
* after_create - called after a factory is saved (via FactoryGirl.create)
|
490
|
-
* after_stub - called after a factory is stubbed (via FactoryGirl.
|
490
|
+
* after_stub - called after a factory is stubbed (via FactoryGirl.build_stubbed)
|
491
491
|
|
492
492
|
Examples:
|
493
493
|
|
@@ -593,10 +593,10 @@ twenty_year_olds = FactoryGirl.build_list(:user, 25, :date_of_birth => 20.years.
|
|
593
593
|
Custom Construction
|
594
594
|
-------------------
|
595
595
|
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
596
|
+
If you want to use factory_girl to construct an object where some attributes
|
597
|
+
are passed to `initialize` or if you want to do something other than simply
|
598
|
+
calling `new` on your build class, you can override the default behavior by
|
599
|
+
defining `to_initialize` on your factory. Example:
|
600
600
|
|
601
601
|
```ruby
|
602
602
|
# user.rb
|
@@ -626,6 +626,19 @@ FactoryGirl.build(:user).name # Bob Hope
|
|
626
626
|
Notice that I ignored the `name` attribute. If you don't want attributes
|
627
627
|
reassigned after your object has been instantiated, you'll want to `ignore` them.
|
628
628
|
|
629
|
+
Although factory_girl is written to work with ActiveRecord out of the box, it
|
630
|
+
can also work with any Ruby class. For maximum compatibiltiy with ActiveRecord,
|
631
|
+
the default initializer builds all instances by calling new on your build class
|
632
|
+
without any arguments. It then calls attribute writer methods to assign all the
|
633
|
+
attribute values. While that works fine for ActiveRecord, it actually doesn't
|
634
|
+
work for almost any other Ruby class.
|
635
|
+
|
636
|
+
You can override the initializer in order to:
|
637
|
+
|
638
|
+
* Build non-ActiveRecord objects that require arguments to `initialize`
|
639
|
+
* Use a method other than `new` to instantiate the instance
|
640
|
+
* Do crazy things like decorate the instance after it's built
|
641
|
+
|
629
642
|
Cucumber Integration
|
630
643
|
--------------------
|
631
644
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/find_definitions.feature
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/features/support/factories.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/aliases.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/attribute_list.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/callback.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/declaration.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/definition.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/deprecated.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/evaluator.rb
RENAMED
@@ -11,13 +11,21 @@ module FactoryGirl
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
|
+
private_instance_methods.each do |method|
|
16
|
+
undef_method(method) unless method =~ /^__|initialize/
|
17
|
+
end
|
15
18
|
|
16
19
|
def initialize(build_strategy, overrides = {})
|
17
20
|
@build_strategy = build_strategy
|
18
21
|
@overrides = overrides
|
19
22
|
@cached_attributes = overrides
|
20
23
|
|
24
|
+
singleton = class << self; self end
|
25
|
+
@overrides.each do |name, value|
|
26
|
+
singleton.send :define_method, name, lambda { value }
|
27
|
+
end
|
28
|
+
|
21
29
|
@build_strategy.add_observer(CallbackRunner.new(self.class.callbacks, self))
|
22
30
|
end
|
23
31
|
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/factory.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/null_factory.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/null_object.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/build.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/create.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/proxy/stub.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/rails2.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/registry.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/reload.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/sequence.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/default.rb
RENAMED
@@ -24,7 +24,8 @@ module FactoryGirl
|
|
24
24
|
FactoryGirl.register_factory(factory)
|
25
25
|
|
26
26
|
proxy.child_factories.each do |(child_name, child_options, child_block)|
|
27
|
-
|
27
|
+
parent_factory = child_options.delete(:parent) || name
|
28
|
+
factory(child_name, child_options.merge(:parent => parent_factory), &child_block)
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/make.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/methods.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/sham.rb
RENAMED
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/lib/factory_girl/syntax/vintage.rb
RENAMED
File without changes
|
File without changes
|
data/vendor/bundle/gems/{factory_girl-2.5.0 → factory_girl-2.5.1}/spec/acceptance/aliases_spec.rb
RENAMED
File without changes
|