├── log └── .gitignore ├── public ├── favicon.ico ├── images │ └── rails.png ├── javascripts │ └── application.js ├── robots.txt ├── dispatch.cgi └── dispatch.rb ├── tmp └── .gitignore ├── vendor ├── gems │ ├── rspec-rails-1.1.12 │ │ ├── TODO.txt │ │ ├── spec │ │ │ ├── resources │ │ │ │ ├── views │ │ │ │ │ ├── layouts │ │ │ │ │ │ ├── simple.rhtml │ │ │ │ │ │ └── application.rhtml │ │ │ │ │ ├── controller_spec │ │ │ │ │ │ ├── _partial.rhtml │ │ │ │ │ │ ├── action_setting_the_assigns_hash.rhtml │ │ │ │ │ │ ├── action_with_errors_in_template.rhtml │ │ │ │ │ │ ├── action_setting_flash_after_session_reset.rhtml │ │ │ │ │ │ ├── action_setting_flash_before_session_reset.rhtml │ │ │ │ │ │ └── action_with_template.rhtml │ │ │ │ │ ├── render_spec │ │ │ │ │ │ ├── _a_partial.rhtml │ │ │ │ │ │ ├── some_action.html.erb │ │ │ │ │ │ ├── action_with_alternate_layout.rhtml │ │ │ │ │ │ ├── some_action.js.rjs │ │ │ │ │ │ └── some_action.rjs │ │ │ │ │ ├── view_spec │ │ │ │ │ │ ├── _partial_used_twice.rhtml │ │ │ │ │ │ ├── _spacer.rhtml │ │ │ │ │ │ ├── path_params.html.erb │ │ │ │ │ │ ├── entry_form.rhtml │ │ │ │ │ │ ├── _partial_with_local_variable.rhtml │ │ │ │ │ │ ├── foo │ │ │ │ │ │ │ └── show.rhtml │ │ │ │ │ │ ├── template_with_partial_with_array.rhtml │ │ │ │ │ │ ├── _partial.rhtml │ │ │ │ │ │ ├── _partial_with_sub_partial.rhtml │ │ │ │ │ │ ├── block_helper.rhtml │ │ │ │ │ │ ├── implicit_helper.rhtml │ │ │ │ │ │ ├── explicit_helper.rhtml │ │ │ │ │ │ ├── should_not_receive.rhtml │ │ │ │ │ │ ├── multiple_helpers.rhtml │ │ │ │ │ │ ├── template_with_partial_using_collection.rhtml │ │ │ │ │ │ ├── template_with_partial.rhtml │ │ │ │ │ │ └── accessor.rhtml │ │ │ │ │ ├── objects │ │ │ │ │ │ └── _object.html.erb │ │ │ │ │ ├── rjs_spec │ │ │ │ │ │ ├── hide_div.rjs │ │ │ │ │ │ ├── hide_page_element.rjs │ │ │ │ │ │ ├── replace.rjs │ │ │ │ │ │ ├── visual_effect.rjs │ │ │ │ │ │ ├── replace_html.rjs │ │ │ │ │ │ ├── insert_html.rjs │ │ │ │ │ │ ├── _replacement_partial.rhtml │ │ │ │ │ │ ├── visual_toggle_effect.rjs │ │ │ │ │ │ └── replace_html_with_partial.rjs │ │ │ │ │ └── tag_spec │ │ │ │ │ │ ├── no_tags.rhtml │ │ │ │ │ │ ├── single_div_with_no_attributes.rhtml │ │ │ │ │ │ └── single_div_with_one_attribute.rhtml │ │ │ │ ├── models │ │ │ │ │ ├── thing.rb │ │ │ │ │ ├── animal.rb │ │ │ │ │ └── person.rb │ │ │ │ ├── controllers │ │ │ │ │ ├── action_view_base_spec_controller.rb │ │ │ │ │ ├── application.rb │ │ │ │ │ └── render_spec_controller.rb │ │ │ │ └── helpers │ │ │ │ │ ├── addition_helper.rb │ │ │ │ │ ├── more_explicit_helper.rb │ │ │ │ │ ├── plugin_application_helper.rb │ │ │ │ │ └── view_spec_helper.rb │ │ │ ├── rails_suite.rb │ │ │ └── spec │ │ │ │ └── rails │ │ │ │ ├── sample_spec.rb │ │ │ │ ├── sample_modified_fixture.rb │ │ │ │ ├── mocks │ │ │ │ └── ar_classes.rb │ │ │ │ ├── spec_spec.rb │ │ │ │ ├── extensions │ │ │ │ └── active_record_spec.rb │ │ │ │ ├── example │ │ │ │ ├── shared_behaviour_spec.rb │ │ │ │ └── model_spec_spec.rb │ │ │ │ └── matchers │ │ │ │ └── should_change_spec.rb │ │ ├── generators │ │ │ ├── rspec │ │ │ │ ├── templates │ │ │ │ │ ├── previous_failures.txt │ │ │ │ │ ├── rcov.opts │ │ │ │ │ ├── spec.opts │ │ │ │ │ └── script │ │ │ │ │ │ ├── spec │ │ │ │ │ │ └── autospec │ │ │ │ └── CHANGES │ │ │ ├── rspec_controller │ │ │ │ └── templates │ │ │ │ │ ├── helper_spec.rb │ │ │ │ │ ├── view_spec.rb │ │ │ │ │ └── controller_spec.rb │ │ │ ├── rspec_scaffold │ │ │ │ └── templates │ │ │ │ │ └── helper_spec.rb │ │ │ ├── rspec_model │ │ │ │ ├── templates │ │ │ │ │ └── model_spec.rb │ │ │ │ └── USAGE │ │ │ └── rspec_default_values.rb │ │ ├── lib │ │ │ ├── autotest │ │ │ │ └── discover.rb │ │ │ └── spec │ │ │ │ └── rails │ │ │ │ ├── extensions │ │ │ │ └── action_controller │ │ │ │ │ ├── base.rb │ │ │ │ │ ├── test_response.rb │ │ │ │ │ └── rescue.rb │ │ │ │ ├── version.rb │ │ │ │ ├── matchers │ │ │ │ └── change.rb │ │ │ │ ├── extensions.rb │ │ │ │ ├── interop │ │ │ │ └── testcase.rb │ │ │ │ └── example │ │ │ │ ├── model_example_group.rb │ │ │ │ ├── cookies_proxy.rb │ │ │ │ └── rails_example_group.rb │ │ ├── features │ │ │ ├── step_definitions │ │ │ │ └── people.rb │ │ │ ├── support │ │ │ │ └── env.rb │ │ │ └── transactions │ │ │ │ └── transactions_should_rollback.feature │ │ └── init.rb │ ├── ctran-annotate-2.0.0 │ │ ├── spec │ │ │ ├── spec.opts │ │ │ ├── spec_helper.rb │ │ │ └── annotate_spec.rb │ │ ├── lib │ │ │ ├── tasks │ │ │ │ ├── annotate_routes.rake │ │ │ │ └── annotate_models.rake │ │ │ └── annotate.rb │ │ ├── script │ │ │ ├── destroy │ │ │ ├── generate │ │ │ └── console │ │ ├── tasks │ │ │ └── rspec.rake │ │ └── bin │ │ │ └── annotate │ ├── rspec-1.1.12 │ │ ├── spec │ │ │ ├── spec │ │ │ │ ├── runner │ │ │ │ │ ├── empty_file.txt │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── a_bar.rb │ │ │ │ │ │ ├── a_foo.rb │ │ │ │ │ │ ├── a_spec.rb │ │ │ │ │ │ ├── utf8_encoded.rb │ │ │ │ │ │ └── custom_example_group_runner.rb │ │ │ │ │ ├── spec_drb.opts │ │ │ │ │ ├── spec.opts │ │ │ │ │ ├── spec_spaced.opts │ │ │ │ │ ├── failed.txt │ │ │ │ │ ├── examples.txt │ │ │ │ │ ├── output_one_time_fixture.rb │ │ │ │ │ ├── output_one_time_fixture_runner.rb │ │ │ │ │ ├── output_one_time_spec.rb │ │ │ │ │ ├── formatter │ │ │ │ │ │ ├── base_text_formatter_spec.rb │ │ │ │ │ │ └── snippet_extractor_spec.rb │ │ │ │ │ └── heckler_spec.rb │ │ │ │ ├── story │ │ │ │ │ ├── story_helper.rb │ │ │ │ │ ├── extensions_spec.rb │ │ │ │ │ ├── scenario_spec.rb │ │ │ │ │ └── given_scenario_spec.rb │ │ │ │ ├── mocks │ │ │ │ │ ├── bug_report_10260_spec.rb │ │ │ │ │ ├── bug_report_7611_spec.rb │ │ │ │ │ ├── bug_report_496.rb │ │ │ │ │ ├── stubbed_message_expectations_spec.rb │ │ │ │ │ ├── bug_report_600_spec.rb │ │ │ │ │ ├── bug_report_8302_spec.rb │ │ │ │ │ ├── bug_report_10263_spec.rb │ │ │ │ │ └── bug_report_7805_spec.rb │ │ │ │ ├── interop │ │ │ │ │ └── test │ │ │ │ │ │ └── unit │ │ │ │ │ │ ├── testsuite_adapter_spec.rb │ │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── spec_that_fails.rb │ │ │ │ │ │ ├── spec_that_passes.rb │ │ │ │ │ │ ├── test_case_that_fails.rb │ │ │ │ │ │ ├── test_case_that_passes.rb │ │ │ │ │ │ ├── test_case_with_errors.rb │ │ │ │ │ │ ├── spec_with_errors.rb │ │ │ │ │ │ └── spec_with_options_hash.rb │ │ │ │ │ │ └── test_unit_spec_helper.rb │ │ │ │ ├── runner_spec.rb │ │ │ │ ├── example │ │ │ │ │ ├── subclassing_example_group_spec.rb │ │ │ │ │ ├── helper_method_spec.rb │ │ │ │ │ └── predicate_matcher_spec.rb │ │ │ │ ├── package │ │ │ │ │ └── bin_spec_spec.rb │ │ │ │ ├── spec_spec.rb │ │ │ │ └── expectations │ │ │ │ │ └── wrap_expectation_spec.rb │ │ │ ├── spec.opts │ │ │ ├── rspec_suite.rb │ │ │ ├── autotest │ │ │ │ ├── autotest_helper.rb │ │ │ │ └── discover_spec.rb │ │ │ ├── README.jruby │ │ │ └── ruby_forker.rb │ │ ├── lib │ │ │ ├── spec │ │ │ │ ├── dsl.rb │ │ │ │ ├── mocks │ │ │ │ │ ├── extensions.rb │ │ │ │ │ ├── extensions │ │ │ │ │ │ └── object.rb │ │ │ │ │ ├── errors.rb │ │ │ │ │ ├── space.rb │ │ │ │ │ ├── framework.rb │ │ │ │ │ └── order_group.rb │ │ │ │ ├── matchers │ │ │ │ │ ├── errors.rb │ │ │ │ │ ├── method_missing.rb │ │ │ │ │ ├── exist.rb │ │ │ │ │ ├── be_close.rb │ │ │ │ │ ├── has.rb │ │ │ │ │ └── match.rb │ │ │ │ ├── expectations │ │ │ │ │ ├── extensions.rb │ │ │ │ │ ├── extensions │ │ │ │ │ │ └── string_and_symbol.rb │ │ │ │ │ └── errors.rb │ │ │ │ ├── story │ │ │ │ │ ├── extensions.rb │ │ │ │ │ ├── extensions │ │ │ │ │ │ ├── string.rb │ │ │ │ │ │ └── regexp.rb │ │ │ │ │ ├── scenario.rb │ │ │ │ │ ├── given_scenario.rb │ │ │ │ │ └── runner │ │ │ │ │ │ └── scenario_collector.rb │ │ │ │ ├── interop │ │ │ │ │ ├── test │ │ │ │ │ │ └── unit │ │ │ │ │ │ │ ├── autorunner.rb │ │ │ │ │ │ │ ├── testresult.rb │ │ │ │ │ │ │ └── testsuite_adapter.rb │ │ │ │ │ └── test.rb │ │ │ │ ├── ruby.rb │ │ │ │ ├── runner │ │ │ │ │ ├── heckle_runner_unsupported.rb │ │ │ │ │ ├── class_and_arguments_parser.rb │ │ │ │ │ ├── command_line.rb │ │ │ │ │ ├── formatter │ │ │ │ │ │ ├── text_mate_formatter.rb │ │ │ │ │ │ └── failing_examples_formatter.rb │ │ │ │ │ └── drb_command_line.rb │ │ │ │ ├── version.rb │ │ │ │ ├── story.rb │ │ │ │ └── example │ │ │ │ │ ├── module_reopening_fix.rb │ │ │ │ │ ├── pending.rb │ │ │ │ │ ├── example_group.rb │ │ │ │ │ └── errors.rb │ │ │ ├── autotest │ │ │ │ └── discover.rb │ │ │ ├── spec.rb │ │ │ └── adapters │ │ │ │ └── mock_frameworks │ │ │ │ ├── mocha.rb │ │ │ │ ├── flexmock.rb │ │ │ │ ├── rr.rb │ │ │ │ └── rspec.rb │ │ ├── examples │ │ │ ├── passing │ │ │ │ ├── priority.txt │ │ │ │ ├── spec_helper.rb │ │ │ │ ├── legacy_spec.rb │ │ │ │ ├── dynamic_spec.rb │ │ │ │ ├── io_processor.rb │ │ │ │ ├── helper_method_example.rb │ │ │ │ ├── file_accessor.rb │ │ │ │ ├── custom_formatter.rb │ │ │ │ ├── predicate_example.rb │ │ │ │ ├── pending_example.rb │ │ │ │ ├── autogenerated_docstrings_example.rb │ │ │ │ ├── io_processor_spec.rb │ │ │ │ ├── stack.rb │ │ │ │ ├── multi_threaded_example_group_runner.rb │ │ │ │ ├── greeter_spec.rb │ │ │ │ ├── before_and_after_example.rb │ │ │ │ └── partial_mock_example.rb │ │ │ └── failing │ │ │ │ ├── spec_helper.rb │ │ │ │ ├── failure_in_after.rb │ │ │ │ ├── failure_in_before.rb │ │ │ │ ├── timeout_behaviour.rb │ │ │ │ ├── syntax_error_example.rb │ │ │ │ ├── README.txt │ │ │ │ ├── failing_autogenerated_docstrings_example.rb │ │ │ │ ├── partial_mock_example.rb │ │ │ │ ├── predicate_example.rb │ │ │ │ ├── mocking_with_mocha.rb │ │ │ │ ├── mocking_with_rr.rb │ │ │ │ └── diffing_spec.rb │ │ ├── bin │ │ │ ├── spec │ │ │ └── autospec │ │ ├── .autotest │ │ ├── resources │ │ │ ├── rake │ │ │ │ ├── examples.rake │ │ │ │ ├── verify_rcov.rake │ │ │ │ ├── examples_with_rcov.rake │ │ │ │ └── failing_examples_with_html.rake │ │ │ ├── spec │ │ │ │ ├── simple_spec.rb │ │ │ │ ├── example_group_with_should_methods.rb │ │ │ │ └── spec_with_flexmock.rb │ │ │ └── test │ │ │ │ ├── spec_including_test_but_not_unit.rb │ │ │ │ └── test_case_with_should_methods.rb │ │ ├── features │ │ │ ├── support │ │ │ │ ├── helpers │ │ │ │ │ ├── cmdline.rb │ │ │ │ │ └── story_helper.rb │ │ │ │ └── env.rb │ │ │ ├── mock_framework_integration │ │ │ │ └── use_flexmock.feature │ │ │ ├── interop │ │ │ │ ├── test_but_not_test_unit.feature │ │ │ │ └── test_case_with_should_methods.feature │ │ │ └── example_groups │ │ │ │ ├── nested_groups.feature │ │ │ │ └── example_group_with_should_methods.feature │ │ ├── init.rb │ │ ├── TODO.txt │ │ └── story_server │ │ │ └── prototype │ │ │ └── lib │ │ │ └── server.rb │ ├── ruby-openid-2.1.2 │ │ ├── examples │ │ │ ├── rails_openid │ │ │ │ ├── public │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── robots.txt │ │ │ │ │ ├── images │ │ │ │ │ │ └── openid_login_bg.gif │ │ │ │ │ ├── 404.html │ │ │ │ │ ├── 500.html │ │ │ │ │ ├── dispatch.cgi │ │ │ │ │ └── dispatch.rb │ │ │ │ ├── app │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── login_helper.rb │ │ │ │ │ │ ├── application_helper.rb │ │ │ │ │ │ └── server_helper.rb │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── application.rb │ │ │ │ │ └── views │ │ │ │ │ │ └── server │ │ │ │ │ │ └── decide.rhtml │ │ │ │ ├── script │ │ │ │ │ ├── about │ │ │ │ │ ├── console │ │ │ │ │ ├── destroy │ │ │ │ │ ├── generate │ │ │ │ │ ├── plugin │ │ │ │ │ ├── runner │ │ │ │ │ ├── server │ │ │ │ │ ├── breakpointer │ │ │ │ │ ├── process │ │ │ │ │ │ ├── reaper │ │ │ │ │ │ ├── spawner │ │ │ │ │ │ └── spinner │ │ │ │ │ └── performance │ │ │ │ │ │ ├── profiler │ │ │ │ │ │ └── benchmarker │ │ │ │ ├── doc │ │ │ │ │ └── README_FOR_APP │ │ │ │ ├── Rakefile │ │ │ │ ├── test │ │ │ │ │ └── functional │ │ │ │ │ │ ├── login_controller_test.rb │ │ │ │ │ │ └── server_controller_test.rb │ │ │ │ └── config │ │ │ │ │ └── boot.rb │ │ │ └── active_record_openid_store │ │ │ │ ├── lib │ │ │ │ ├── nonce.rb │ │ │ │ ├── open_id_setting.rb │ │ │ │ └── association.rb │ │ │ │ └── init.rb │ │ ├── test │ │ │ └── data │ │ │ │ ├── test_xrds │ │ │ │ ├── not-xrds.xml │ │ │ │ ├── no-xrd.xml │ │ │ │ ├── status222.xrds │ │ │ │ ├── README │ │ │ │ ├── spoof1.xrds │ │ │ │ └── spoof2.xrds │ │ │ │ ├── test_discover │ │ │ │ ├── yadis_no_delegate.xml │ │ │ │ ├── openid_no_delegate.html │ │ │ │ ├── openid2_xrds_no_local_id.xml │ │ │ │ ├── yadis_0entries.xml │ │ │ │ ├── openid2_xrds.xml │ │ │ │ ├── yadis_idp.xml │ │ │ │ ├── openid.html │ │ │ │ ├── openid2.html │ │ │ │ ├── openid_1_and_2.html │ │ │ │ ├── yadis_idp_delegate.xml │ │ │ │ ├── yadis_another_delegate.xml │ │ │ │ ├── openid_and_yadis.html │ │ │ │ ├── yadis_2_bad_local_id.xml │ │ │ │ ├── openid_1_and_2_xrds.xml │ │ │ │ ├── openid_1_and_2_xrds_bad_delegate.xml │ │ │ │ ├── yadis_2entries_idp.xml │ │ │ │ └── yadis_2entries_delegate.xml │ │ │ │ └── example-xrds.xml │ │ ├── NOTICE │ │ └── lib │ │ │ ├── openid │ │ │ ├── protocolerror.rb │ │ │ ├── extras.rb │ │ │ └── yadis │ │ │ │ └── constants.rb │ │ │ ├── hmac │ │ │ ├── sha1.rb │ │ │ └── sha2.rb │ │ │ └── openid.rb │ └── yfactorial-utility_scopes-0.2.2 │ │ ├── init.rb │ │ ├── spec │ │ ├── fixtures │ │ │ └── article.rb │ │ ├── spec_helper.rb │ │ ├── abstract_spec.rb │ │ └── eager_spec.rb │ │ ├── lib │ │ ├── utility_scopes │ │ │ ├── eager.rb │ │ │ └── limited.rb │ │ └── utility_scopes.rb │ │ ├── CHANGELOG │ │ └── Rakefile └── plugins │ ├── rows_logger │ ├── lib │ │ └── rows_logger.rb │ ├── install.rb │ ├── tasks │ │ └── rows_logger_tasks.rake │ ├── adapters │ │ ├── mysql.rb │ │ └── postgresql.rb │ ├── test │ │ └── rows_logger_test.rb │ └── Rakefile │ ├── query_analyzer │ └── init.rb │ └── custom-err-msg │ └── trunk │ └── init.rb ├── spec ├── rcov.opts └── spec.opts ├── script ├── autospec ├── about ├── plugin ├── runner ├── server ├── console ├── dbconsole ├── destroy ├── generate ├── process │ ├── reaper │ ├── spawner │ └── inspector ├── performance │ ├── profiler │ ├── request │ └── benchmarker └── spec ├── app ├── views │ ├── user_mailer │ │ ├── reset_password.erb │ │ ├── invitation.erb │ │ ├── activation.erb │ │ ├── forgot_password.erb │ │ └── signup_notification.erb │ ├── user │ │ ├── profiles │ │ │ ├── _edit_profile.html.erb │ │ │ ├── edit.html.erb │ │ │ └── show.html.erb │ │ ├── invitations │ │ │ └── new.html.erb │ │ ├── passwords │ │ │ ├── new.html.erb │ │ │ └── edit.html.erb │ │ ├── activations │ │ │ └── new.html.erb │ │ ├── openid_accounts │ │ │ ├── edit.html.erb │ │ │ └── new.html.erb │ │ └── password_settings │ │ │ └── index.html.erb │ ├── members │ │ ├── show.html.erb │ │ └── index.html.erb │ ├── sessions │ │ └── new.rjs │ ├── openid_sessions │ │ ├── new.rjs │ │ └── new.html.erb │ ├── admin │ │ ├── controls │ │ │ └── index.html.erb │ │ ├── invites │ │ │ └── edit.html.erb │ │ ├── roles │ │ │ └── index.html.erb │ │ └── users │ │ │ └── index.html.erb │ ├── layouts │ │ └── _default.html.erb │ ├── shared │ │ ├── _login_with_openid.html.erb │ │ ├── _debug.html.erb │ │ ├── _login.html.erb │ │ └── _user_bar.html.erb │ └── root │ │ └── index.html.erb ├── controllers │ ├── root_controller.rb │ ├── admin │ │ ├── controls_controller.rb │ │ ├── mailings_controller.rb │ │ ├── users_controller.rb │ │ ├── invite_actions_controller.rb │ │ ├── states_controller.rb │ │ └── roles_controller.rb │ ├── members_controller.rb │ ├── openid_sessions_controller.rb │ ├── four_oh_fours_controller.rb │ └── user │ │ ├── invitations_controller.rb │ │ ├── activations_controller.rb │ │ └── password_settings_controller.rb └── models │ ├── four_oh_four.rb │ ├── user_observer.rb │ ├── role.rb │ └── openid_user.rb ├── test └── fixtures │ ├── roles_users.yml │ ├── roles.yml │ └── users.yml ├── stories ├── all.rb ├── helper.rb └── rest_auth_stories.rb ├── .gitignore ├── doc └── README_FOR_APP ├── config ├── initializers │ ├── mime_types.rb │ ├── inflections.rb │ ├── mail.rb │ └── new_rails_defaults.rb └── environments │ └── development.rb ├── Rakefile └── db └── migrate ├── 20080911154835_create_invitations.rb ├── 20080910234648_create_user_failures.rb ├── 20080910224435_create_four_oh_fours.rb ├── 20080805045808_create_roles.rb ├── 20080813053928_add_exception_table.rb └── 20080805045812_add_open_id_authentication_tables.rb /log/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/TODO.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/rcov.opts: -------------------------------------------------------------------------------- 1 | --exclude "spec/*,gems/*" 2 | --rails -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/spec/spec.opts: -------------------------------------------------------------------------------- 1 | --colour -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/empty_file.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/lib/rows_logger.rb: -------------------------------------------------------------------------------- 1 | # RowsLogger -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/dsl.rb: -------------------------------------------------------------------------------- 1 | require 'spec/dsl/main' -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/resources/a_bar.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/resources/a_foo.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/query_analyzer/init.rb: -------------------------------------------------------------------------------- 1 | require 'query_analyzer' -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/spec_drb.opts: -------------------------------------------------------------------------------- 1 | --drb 2 | -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/install.rb: -------------------------------------------------------------------------------- 1 | # Install hook code here 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/spec.opts: -------------------------------------------------------------------------------- 1 | --diff 2 | --colour -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/layouts/simple.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/layouts/application.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/init.rb: -------------------------------------------------------------------------------- 1 | require 'utility_scopes' -------------------------------------------------------------------------------- /script/autospec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['RSPEC'] = 'true' 3 | system 'autotest' -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec/templates/previous_failures.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/controller_spec/_partial.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/render_spec/_a_partial.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/custom-err-msg/trunk/init.rb: -------------------------------------------------------------------------------- 1 | require 'custom_error_message' 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/spec_spaced.opts: -------------------------------------------------------------------------------- 1 | --diff --colour 2 | --format s -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/render_spec/some_action.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/_partial_used_twice.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/priority.txt: -------------------------------------------------------------------------------- 1 | examples/custom_expectation_matchers.rb -------------------------------------------------------------------------------- /app/views/user_mailer/reset_password.erb: -------------------------------------------------------------------------------- 1 | <%=h @user.login %>, Your password has been reset. 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/mocks/extensions.rb: -------------------------------------------------------------------------------- 1 | require 'spec/mocks/extensions/object' 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/resources/a_spec.rb: -------------------------------------------------------------------------------- 1 | # Empty - used by ../options_spec.rb -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/objects/_object.html.erb: -------------------------------------------------------------------------------- 1 | <%= object.name %> -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/render_spec/action_with_alternate_layout.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/hide_div.rjs: -------------------------------------------------------------------------------- 1 | page.hide 'mydiv' 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/_spacer.rhtml: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /test/fixtures/roles_users.yml: -------------------------------------------------------------------------------- 1 | admin_is_admin: 2 | user_id: 1 # admin 3 | role_id: 1 # admin role -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/tag_spec/no_tags.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/roles.yml: -------------------------------------------------------------------------------- 1 | admin_role: 2 | id: 1 3 | name: admin 4 | user_role: 5 | id: 2 6 | name: user -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec.opts: -------------------------------------------------------------------------------- 1 | --colour 2 | --format 3 | profile 4 | --timeout 5 | 20 6 | --diff -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec/CHANGES: -------------------------------------------------------------------------------- 1 | Please refer to the CHANGES file for RSpec's core -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec/templates/rcov.opts: -------------------------------------------------------------------------------- 1 | --exclude "spec/*,gems/*" 2 | --rails -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/controller_spec/action_setting_the_assigns_hash.rhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/hide_page_element.rjs: -------------------------------------------------------------------------------- 1 | page['mydiv'].hide 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/tag_spec/single_div_with_no_attributes.rhtml: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/path_params.html.erb: -------------------------------------------------------------------------------- 1 | <%= params[:controller] %> -------------------------------------------------------------------------------- /spec/spec.opts: -------------------------------------------------------------------------------- 1 | --colour 2 | --format progress 3 | --format html:rpec.html 4 | --loadby mtime 5 | --reverse 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/failed.txt: -------------------------------------------------------------------------------- 1 | heckler_spec.rb 2 | command_line_spec.rb 3 | reporter_spec.rb -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/entry_form.rhtml: -------------------------------------------------------------------------------- 1 | <% form_tag do %> 2 | <% end %> -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/helpers/login_helper.rb: -------------------------------------------------------------------------------- 1 | module LoginHelper 2 | end 3 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/spec/fixtures/article.rb: -------------------------------------------------------------------------------- 1 | class Article < ActiveRecord::Base 2 | end -------------------------------------------------------------------------------- /app/views/user_mailer/invitation.erb: -------------------------------------------------------------------------------- 1 | You have been invited to join our private beta! 2 | 3 | <%= @url %> 4 | 5 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/controller_spec/action_with_errors_in_template.rhtml: -------------------------------------------------------------------------------- 1 | <% raise %> -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/render_spec/some_action.js.rjs: -------------------------------------------------------------------------------- 1 | # This is used for rails > 1.2.3 -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/render_spec/some_action.rjs: -------------------------------------------------------------------------------- 1 | # This is used for rails <= 1.2.3 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/replace.rjs: -------------------------------------------------------------------------------- 1 | page.replace 'mydiv', 'replacement text' 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/visual_effect.rjs: -------------------------------------------------------------------------------- 1 | page.visual_effect :fade, 'mydiv' 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/_partial_with_local_variable.rhtml: -------------------------------------------------------------------------------- 1 |
<%= x %>
-------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/not-xrds.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/images/rails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/activefx/restful_authentication_tutorial/HEAD/public/images/rails.png -------------------------------------------------------------------------------- /script/about: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/about' 4 | -------------------------------------------------------------------------------- /script/plugin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/plugin' 4 | -------------------------------------------------------------------------------- /script/runner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/runner' 4 | -------------------------------------------------------------------------------- /script/server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/server' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/mocks/extensions/object.rb: -------------------------------------------------------------------------------- 1 | class Object 2 | include Spec::Mocks::Methods 3 | end 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/replace_html.rjs: -------------------------------------------------------------------------------- 1 | page.replace_html 'mydiv', 'replacement text' -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/tag_spec/single_div_with_one_attribute.rhtml: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/foo/show.rhtml: -------------------------------------------------------------------------------- 1 | <%= method_in_plugin_application_helper %> 2 | -------------------------------------------------------------------------------- /script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/console' 4 | -------------------------------------------------------------------------------- /script/dbconsole: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/dbconsole' 4 | -------------------------------------------------------------------------------- /script/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/destroy' 4 | -------------------------------------------------------------------------------- /script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/generate' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/insert_html.rjs: -------------------------------------------------------------------------------- 1 | page.insert_html 'mydiv', 'replacement text' 2 | -------------------------------------------------------------------------------- /app/views/user/profiles/_edit_profile.html.erb: -------------------------------------------------------------------------------- 1 | <%= f.text_field :name, :size => 60 %> 2 | <%= f.text_field :email, :size => 60 %> 3 | -------------------------------------------------------------------------------- /stories/all.rb: -------------------------------------------------------------------------------- 1 | dir = File.dirname(__FILE__) 2 | Dir[File.expand_path("#{dir}/**/*.rb")].uniq.each do |file| 3 | require file 4 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/_replacement_partial.rhtml: -------------------------------------------------------------------------------- 1 | This is the text in the replacement partial. -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/visual_toggle_effect.rjs: -------------------------------------------------------------------------------- 1 | page.visual_effect :toggle_blind, 'mydiv' 2 | -------------------------------------------------------------------------------- /app/views/user_mailer/activation.erb: -------------------------------------------------------------------------------- 1 | <%=h @user.login %>, your account has been activated. Welcome aboard! 2 | 3 | <%=h @url %> 4 | -------------------------------------------------------------------------------- /app/views/user_mailer/forgot_password.erb: -------------------------------------------------------------------------------- 1 | <%=h @user.login %>, to reset your password, please visit: 2 | 3 | <%=h @url %> 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec/templates/spec.opts: -------------------------------------------------------------------------------- 1 | --colour 2 | --format progress 3 | --loadby mtime 4 | --reverse 5 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/template_with_partial_with_array.rhtml: -------------------------------------------------------------------------------- 1 | <%= render :partial => @array %> 2 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/NOTICE: -------------------------------------------------------------------------------- 1 | This product includes software developed by JanRain, 2 | available from http://openidenabled.com/ 3 | -------------------------------------------------------------------------------- /app/views/members/show.html.erb: -------------------------------------------------------------------------------- 1 |

Member: <%=h @user.login %>

2 |

Joined on: <%= @user.created_at.to_s(:long) %>

3 | 4 | 5 | -------------------------------------------------------------------------------- /script/process/reaper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/reaper' 4 | -------------------------------------------------------------------------------- /script/process/spawner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/spawner' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/autotest/discover.rb: -------------------------------------------------------------------------------- 1 | # This needs to be here for >= ZenTest-3.9.0 to add this directory to the load path. -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/models/thing.rb: -------------------------------------------------------------------------------- 1 | class Thing < ActiveRecord::Base 2 | validates_presence_of :name 3 | end 4 | -------------------------------------------------------------------------------- /script/process/inspector: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/inspector' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/autotest/discover.rb: -------------------------------------------------------------------------------- 1 | Autotest.add_discovery do 2 | "rspec" if File.directory?('spec') && ENV['RSPEC'] 3 | end 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/controller_spec/action_with_template.rhtml: -------------------------------------------------------------------------------- 1 |
This is action_with_template.rhtml
2 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/_partial.rhtml: -------------------------------------------------------------------------------- 1 | <%= method_in_plugin_application_helper %> 2 | <%= method_in_partial %> -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/_partial_with_sub_partial.rhtml: -------------------------------------------------------------------------------- 1 | <%= render :partial => 'partial', :object => partial %> -------------------------------------------------------------------------------- /script/performance/profiler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/profiler' 4 | -------------------------------------------------------------------------------- /script/performance/request: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/request' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/matchers/errors.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | class MatcherError < StandardError; end 4 | end 5 | end -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'spec' 3 | 4 | Spec::Runner.configure do |config| 5 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/block_helper.rhtml: -------------------------------------------------------------------------------- 1 | <% if_allowed do %> 2 |
block helper was rendered
3 | <% end %> -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/implicit_helper.rhtml: -------------------------------------------------------------------------------- 1 | <%= method_in_plugin_application_helper %> 2 | <%= method_in_helper %> 3 | -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/tasks/rows_logger_tasks.rake: -------------------------------------------------------------------------------- 1 | # desc "Explaining what the task does" 2 | # task :rows_logger do 3 | # # Task goes here 4 | # end -------------------------------------------------------------------------------- /script/performance/benchmarker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/benchmarker' 4 | -------------------------------------------------------------------------------- /stories/helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] = "test" 2 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") 3 | require 'spec/rails/story_adapter' -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/examples.txt: -------------------------------------------------------------------------------- 1 | Sir, if you were my husband, I would poison your drink. 2 | Madam, if you were my wife, I would drink it. -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/story/story_helper.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | require File.dirname(__FILE__) + '/builders' 3 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/rjs_spec/replace_html_with_partial.rjs: -------------------------------------------------------------------------------- 1 | page.replace_html 'mydiv', :partial => 'rjs_spec/replacement_partial' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/lib/nonce.rb: -------------------------------------------------------------------------------- 1 | class Nonce < ActiveRecord::Base 2 | set_table_name 'open_id_nonces' 3 | end 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/controllers/action_view_base_spec_controller.rb: -------------------------------------------------------------------------------- 1 | class ActionViewBaseSpecController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/helpers/addition_helper.rb: -------------------------------------------------------------------------------- 1 | module AdditionHelper 2 | def plus(addend) 3 | @addend + addend 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/explicit_helper.rhtml: -------------------------------------------------------------------------------- 1 | <%= method_in_plugin_application_helper %> 2 | <%= method_in_explicit_helper %> 3 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/about: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/about' -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/expectations/extensions.rb: -------------------------------------------------------------------------------- 1 | require 'spec/expectations/extensions/object' 2 | require 'spec/expectations/extensions/string_and_symbol' 3 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/models/animal.rb: -------------------------------------------------------------------------------- 1 | class Animal < ActiveRecord::Base 2 | belongs_to :person 3 | validates_uniqueness_of :name 4 | end 5 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/console' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/destroy' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/generate' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/plugin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/plugin' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/runner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/runner' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/server' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | log/*.log 2 | tmp/**/* 3 | config/database.yml 4 | config/config.yml 5 | doc/api 6 | doc/app 7 | doc/plugins 8 | config/initializers/site_keys.rb 9 | *~ 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story/extensions.rb: -------------------------------------------------------------------------------- 1 | require 'spec/story/extensions/main' 2 | require 'spec/story/extensions/string' 3 | require 'spec/story/extensions/regexp' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/should_not_receive.rhtml: -------------------------------------------------------------------------------- 1 | <% if @obj.render_partial? %> 2 | <%= render :partial => 'some_partial' %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/breakpointer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/breakpointer' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/lib/open_id_setting.rb: -------------------------------------------------------------------------------- 1 | class OpenIdSetting < ActiveRecord::Base 2 | 3 | validates_uniqueness_of :setting 4 | end 5 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/interop/test/unit/autorunner.rb: -------------------------------------------------------------------------------- 1 | class Test::Unit::AutoRunner 2 | remove_method :process_args 3 | def process_args(argv) 4 | true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/process/reaper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/reaper' 4 | -------------------------------------------------------------------------------- /app/views/user_mailer/signup_notification.erb: -------------------------------------------------------------------------------- 1 | Your account has been created. 2 | 3 | Username: <%=h @user.login %> 4 | 5 | Visit this url to activate your account: 6 | 7 | <%=h @url %> 8 | -------------------------------------------------------------------------------- /public/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // Place your application-specific JavaScript functions and classes here 2 | // This file is automatically included by javascript_include_tag :defaults 3 | 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/bin/spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib")) 3 | require 'spec' 4 | exit ::Spec::Runner::CommandLine.run 5 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/ruby.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Ruby 3 | class << self 4 | def version 5 | RUBY_VERSION 6 | end 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/rspec_suite.rb: -------------------------------------------------------------------------------- 1 | if __FILE__ == $0 2 | dir = File.dirname(__FILE__) 3 | Dir["#{dir}/**/*_spec.rb"].reverse.each do |file| 4 | require file 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/resources/utf8_encoded.rb: -------------------------------------------------------------------------------- 1 | module Custom 2 | class ExampleUTF8ClassNameVarietà 3 | def self.è 4 | così = :però 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/process/spawner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/spawner' 4 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/process/spinner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/spinner' 4 | -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/adapters/mysql.rb: -------------------------------------------------------------------------------- 1 | ActiveRecord::ConnectionAdapters::MysqlAdapter.class_eval do 2 | protected 3 | def count_result(result) 4 | result.num_rows 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/.autotest: -------------------------------------------------------------------------------- 1 | Autotest.add_hook :initialize do |at| 2 | at.add_exception("spec/interop/test/unit/resources") 3 | at.add_exception("spec/spec/runner/drb_command_line_spec.rb") 4 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/multiple_helpers.rhtml: -------------------------------------------------------------------------------- 1 | <%= method_in_plugin_application_helper %> 2 | <%= method_in_explicit_helper %> 3 | <%= method_in_more_explicit_helper %> -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/performance/profiler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/profiler' 4 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | # Methods added to this helper will be available to all templates in the application. 2 | module ApplicationHelper 3 | end 4 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/script/performance/benchmarker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/benchmarker' 4 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/lib/openid/protocolerror.rb: -------------------------------------------------------------------------------- 1 | require 'openid/util' 2 | 3 | module OpenID 4 | 5 | # An error in the OpenID protocol 6 | class ProtocolError < OpenIDError 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/spec_helper.rb: -------------------------------------------------------------------------------- 1 | lib_path = File.expand_path(File.dirname(__FILE__) + "/../../lib") 2 | $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path) 3 | require "spec" 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/spec_helper.rb: -------------------------------------------------------------------------------- 1 | lib_path = File.expand_path("#{File.dirname(__FILE__)}/../../lib") 2 | $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path) 3 | require 'spec' 4 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/interop/test/unit/testresult.rb: -------------------------------------------------------------------------------- 1 | class Test::Unit::TestResult 2 | alias_method :tu_passed?, :passed? 3 | def passed? 4 | return tu_passed? & ::Spec::Runner.run 5 | end 6 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec/matchers' 2 | require 'spec/expectations' 3 | require 'spec/example' 4 | require 'spec/runner' 5 | require 'spec/version' 6 | require 'spec/dsl' 7 | require 'spec/ruby' 8 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/features/step_definitions/people.rb: -------------------------------------------------------------------------------- 1 | When "I add a Person" do 2 | Person.create!(:name => "Foo") 3 | end 4 | Then "there should be one person" do 5 | Person.count.should == 1 6 | end 7 | -------------------------------------------------------------------------------- /app/controllers/root_controller.rb: -------------------------------------------------------------------------------- 1 | class RootController < ApplicationController 2 | 3 | def index 4 | 5 | respond_to do |format| 6 | format.html # index.html.erb 7 | end 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story/extensions/string.rb: -------------------------------------------------------------------------------- 1 | class String 2 | def step_name 3 | self 4 | end 5 | 6 | def arg_regexp 7 | ::Spec::Story::Step::PARAM_OR_GROUP_PATTERN 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/lib/tasks/annotate_routes.rake: -------------------------------------------------------------------------------- 1 | desc "Prepends the route map to the top of routes.rb" 2 | task :annotate_routes do 3 | require 'annotate/annotate_routes' 4 | AnnotateRoutes.do_annotate 5 | end 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/rails_suite.rb: -------------------------------------------------------------------------------- 1 | dir = File.dirname(__FILE__) 2 | Dir["#{dir}/**/*_example.rb"].each do |file| 3 | require file 4 | end 5 | Dir["#{dir}/**/*_spec.rb"].each do |file| 6 | require file 7 | end 8 | -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/test/rows_logger_test.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | 3 | class RowsLoggerTest < Test::Unit::TestCase 4 | # Replace this with your real tests. 5 | def test_this_plugin 6 | flunk 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/views/members/index.html.erb: -------------------------------------------------------------------------------- 1 |

Members

2 | 3 | 8 | 9 | <%= will_paginate @users %> 10 | -------------------------------------------------------------------------------- /doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/init.rb: -------------------------------------------------------------------------------- 1 | # might using the ruby-openid gem 2 | begin 3 | require 'rubygems' 4 | rescue LoadError 5 | nil 6 | end 7 | require 'openid' 8 | require 'openid_ar_store' 9 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-Agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/helpers/more_explicit_helper.rb: -------------------------------------------------------------------------------- 1 | module MoreExplicitHelper 2 | def method_in_more_explicit_helper 3 | "
This is text from a method in the MoreExplicitHelper
" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/template_with_partial_using_collection.rhtml: -------------------------------------------------------------------------------- 1 | <%= render :partial => 'partial', 2 | :collection => ['Alice', 'Bob'], 3 | :spacer_template => 'spacer' %> 4 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | begin 2 | require 'spec' 3 | rescue LoadError 4 | require 'rubygems' 5 | gem 'rspec' 6 | require 'spec' 7 | end 8 | 9 | require File.dirname(__FILE__) + '/../lib/annotate' 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/rake/examples.rake: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'spec/rake/spectask' 3 | 4 | desc "Run all examples" 5 | Spec::Rake::SpecTask.new('examples') do |t| 6 | t.spec_files = FileList['examples/**/*.rb'] 7 | end 8 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/rake/verify_rcov.rake: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'spec/rake/verify_rcov' 3 | 4 | RCov::VerifyTask.new(:verify_rcov => :spec) do |t| 5 | t.threshold = 100.0 6 | t.index_html = 'coverage/index.html' 7 | end 8 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/helpers/server_helper.rb: -------------------------------------------------------------------------------- 1 | 2 | module ServerHelper 3 | 4 | def url_for_user 5 | url_for :controller => 'user', :action => session[:username] 6 | end 7 | 8 | end 9 | 10 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/images/openid_login_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/activefx/restful_authentication_tutorial/HEAD/vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/images/openid_login_bg.gif -------------------------------------------------------------------------------- /app/models/four_oh_four.rb: -------------------------------------------------------------------------------- 1 | class FourOhFour < ActiveRecord::Base 2 | def self.add_request(url, referer) 3 | request = find_or_initialize_by_url_and_referer(url, referer) 4 | request.count += 1 5 | request.save 6 | end 7 | end 8 | 9 | -------------------------------------------------------------------------------- /script/spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib")) 3 | require 'spec' 4 | exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT)) 5 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/mocks/errors.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Mocks 3 | class MockExpectationError < StandardError 4 | end 5 | 6 | class AmbiguousReturnError < StandardError 7 | end 8 | end 9 | end 10 | 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story/extensions/regexp.rb: -------------------------------------------------------------------------------- 1 | class Regexp 2 | def step_name 3 | self.source.gsub '\\$', '$$' 4 | end 5 | 6 | def arg_regexp 7 | ::Spec::Story::Step::PARAM_OR_GROUP_PATTERN 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/output_one_time_fixture.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | describe "Running an Example" do 4 | it "should not output twice" do 5 | true.should be_true 6 | end 7 | end -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/failure_in_after.rb: -------------------------------------------------------------------------------- 1 | describe "This example" do 2 | 3 | it "should be listed as failing in after" do 4 | end 5 | 6 | after(:each) do 7 | NonExistentClass.new 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/failure_in_before.rb: -------------------------------------------------------------------------------- 1 | describe "This example" do 2 | 3 | before(:each) do 4 | NonExistentClass.new 5 | end 6 | 7 | it "should be listed as failing in each" do 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/spec/simple_spec.rb: -------------------------------------------------------------------------------- 1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib]) 2 | require 'spec' 3 | 4 | describe "Running an Example" do 5 | it "should not output twice" do 6 | true.should be_true 7 | end 8 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake appdoc" to generate API documentation for your models and controllers. -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/spec/annotate_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper.rb' 2 | 3 | describe Annotate do 4 | 5 | it "should have a version" do 6 | Annotate::VERSION.should be_instance_of(String) 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/timeout_behaviour.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | describe "Something really slow" do 4 | it "should be failed by RSpec when it takes longer than --timeout" do 5 | sleep(2) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/legacy_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | context "A legacy spec" do 3 | setup do 4 | end 5 | 6 | specify "should work fine" do 7 | end 8 | 9 | teardown do 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/bin/autospec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['RSPEC'] = 'true' # allows autotest to discover rspec 3 | ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux 4 | system (RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV -------------------------------------------------------------------------------- /app/controllers/admin/controls_controller.rb: -------------------------------------------------------------------------------- 1 | class Admin::ControlsController < ApplicationController 2 | before_filter :login_required 3 | require_role :admin 4 | 5 | def index 6 | @users = User.count 7 | @exceptions = LoggedException.count 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/user/invitations/new.html.erb: -------------------------------------------------------------------------------- 1 |

Send invitation

2 | 3 | <%= error_messages_for :invitation %> 4 | <% uberform_for [:user, @invitation] do |f| %> 5 | <%= f.text_field :email, :label => "Friend's email address:" %> 6 | <%= f.submit "Invite!" %> 7 | <% end %> 8 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/template_with_partial.rhtml: -------------------------------------------------------------------------------- 1 | <%= method_in_template_with_partial %> 2 | <%= render :partial => 'partial' %> 3 | 4 | <%= render :partial => 'partial_used_twice' %> 5 | <%= render :partial => 'partial_used_twice' %> 6 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/sample_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | 3 | describe "A sample spec", :type => :model do 4 | fixtures :animals 5 | it "should pass" do 6 | animals(:pig).name.should == "Pig" 7 | end 8 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/dynamic_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | describe "The square root" do 4 | (1..10).each do |n| 5 | it "of #{n*n} should be #{n}" do 6 | Math.sqrt(n*n).should == n 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/io_processor.rb: -------------------------------------------------------------------------------- 1 | class DataTooShort < StandardError; end 2 | 3 | class IoProcessor 4 | # Does some fancy stuff unless the length of +io+ is shorter than 32 5 | def process(io) 6 | raise DataTooShort if io.read.length < 32 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/sample_modified_fixture.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | 3 | describe "A sample spec", :type => :model do 4 | fixtures :animals 5 | it "should pass" do 6 | animals(:pig).name.should == "Piggy" 7 | end 8 | end -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/adapters/postgresql.rb: -------------------------------------------------------------------------------- 1 | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do 2 | protected 3 | def count_result(result) 4 | if result.is_a?(PGresult) 5 | result.num_tuples 6 | else 7 | nil 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/controllers/members_controller.rb: -------------------------------------------------------------------------------- 1 | class MembersController < ApplicationController 2 | before_filter :login_required 3 | 4 | def index 5 | @users = User.member_list(params[:page]) 6 | end 7 | 8 | def show 9 | @user = User.find_by_login(params[:id]) 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /app/views/sessions/new.rjs: -------------------------------------------------------------------------------- 1 | if @bad_visitor 2 | page.redirect_to login_path 3 | else 4 | page['logins'].hide 5 | page['logins'].replace_html :partial => "shared/login" 6 | page['logins'].appear 7 | page.delay(1) do 8 | page << focus_on_div("login") 9 | end 10 | end 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/test/spec_including_test_but_not_unit.rb: -------------------------------------------------------------------------------- 1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib]) 2 | require 'spec' 3 | 4 | module Test 5 | end 6 | 7 | describe "description" do 8 | it "should description" do 9 | 1.should == 1 10 | end 11 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/lib/openid/extras.rb: -------------------------------------------------------------------------------- 1 | class String 2 | def starts_with?(other) 3 | head = self[0, other.length] 4 | head == other 5 | end 6 | 7 | def ends_with?(other) 8 | tail = self[-1 * other.length, other.length] 9 | tail == other 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/autotest/autotest_helper.rb: -------------------------------------------------------------------------------- 1 | require "rubygems" 2 | require 'autotest' 3 | dir = File.dirname(__FILE__) 4 | require File.expand_path("#{dir}/../spec_helper") 5 | require File.expand_path("#{dir}/../../lib/autotest/rspec") 6 | require File.expand_path("#{dir}/autotest_matchers") 7 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/mocks/ar_classes.rb: -------------------------------------------------------------------------------- 1 | class MockableModel < ActiveRecord::Base 2 | has_one :associated_model 3 | end 4 | 5 | class SubMockableModel < MockableModel 6 | end 7 | 8 | class AssociatedModel < ActiveRecord::Base 9 | belongs_to :mockable_model 10 | end 11 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/controllers/application.rb: -------------------------------------------------------------------------------- 1 | # Filters added to this controller will be run for all controllers in the application. 2 | # Likewise, all the methods added will be available for all controllers. 3 | class ApplicationController < ActionController::Base 4 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/no-xrd.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/lib/hmac/sha1.rb: -------------------------------------------------------------------------------- 1 | require 'hmac/hmac' 2 | require 'digest/sha1' 3 | 4 | module HMAC 5 | class SHA1 < Base 6 | def initialize(key = nil) 7 | super(Digest::SHA1, 64, 20, key) 8 | end 9 | public_class_method :new, :digest, :hexdigest 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/syntax_error_example.rb: -------------------------------------------------------------------------------- 1 | describe "when passing a block to a matcher" do 2 | it "you should use {} instead of do/end" do 3 | Object.new.should satisfy do 4 | "this block is being passed to #should instead of #satisfy - use {} instead" 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/views/view_spec/accessor.rhtml: -------------------------------------------------------------------------------- 1 |
<%= session[:key] %>
2 |
<%= params[:key] %>
3 |
<%= flash[:key] %>
4 |
<%= params[:controller] %>
5 |
<%= params[:action] %>
6 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/lib/utility_scopes/eager.rb: -------------------------------------------------------------------------------- 1 | module UtilityScopes 2 | module Eager 3 | 4 | def self.included(within) 5 | within.class_eval do 6 | named_scope :with, lambda { |*associations| { :include => associations } } 7 | end 8 | end 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec/templates/script/spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib")) 3 | require 'rubygems' 4 | require 'spec' 5 | exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT)) 6 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/404.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 |

File not found

6 |

Change this error message for pages not found in public/404.html

7 | 8 | -------------------------------------------------------------------------------- /app/views/openid_sessions/new.rjs: -------------------------------------------------------------------------------- 1 | if @bad_visitor 2 | page.redirect_to login_with_openid_path 3 | else 4 | page['logins'].hide 5 | page['logins'].replace_html :partial => "shared/login_with_openid" 6 | page['logins'].appear 7 | page.delay(1) do 8 | page << focus_on_div("openid_identifier") 9 | end 10 | end 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/users.yml: -------------------------------------------------------------------------------- 1 | admin: 2 | id: 1 3 | login: admin 4 | email: admin@example.com 5 | salt: 7e3041ebc2fc05a40c60028e2c4901a81035d3cd 6 | crypted_password: 00742970dc9e6319f8019fd54864d3ea740f04b1 # test 7 | # activation_code: adminscode # only if you're activating new signups 8 | created_at: <%= 1.days.ago.to_s :db %> -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/rake/examples_with_rcov.rake: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'spec/rake/spectask' 3 | 4 | desc "Run all examples with RCov" 5 | Spec::Rake::SpecTask.new('examples_with_rcov') do |t| 6 | t.spec_files = FileList['examples/**/*.rb'] 7 | t.rcov = true 8 | t.rcov_opts = ['--exclude', 'examples'] 9 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/helpers/plugin_application_helper.rb: -------------------------------------------------------------------------------- 1 | # Methods added to this helper will be available to all templates in the application. 2 | module ApplicationHelper 3 | def method_in_plugin_application_helper 4 | "
This is text from a method in the ApplicationHelper
" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/matchers/method_missing.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | def method_missing(sym, *args, &block) # :nodoc: 4 | return Matchers::Be.new(sym, *args) if sym.starts_with?("be_") 5 | return has(sym, *args) if sym.starts_with?("have_") 6 | super 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/autotest/discover_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + "/autotest_helper" 2 | 3 | describe Autotest::Rspec, "discovery" do 4 | it "adds the rspec autotest plugin" do 5 | Autotest.should_receive(:add_discovery) 6 | require File.dirname(__FILE__) + "/../../lib/autotest/discover" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_10260_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | describe "An RSpec Mock" do 4 | it "should hide internals in its inspect representation" do 5 | m = mock('cup') 6 | m.inspect.should =~ /#/ 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story/scenario.rb: -------------------------------------------------------------------------------- 1 | 2 | module Spec 3 | module Story 4 | class Scenario 5 | attr_accessor :name, :body, :story 6 | 7 | def initialize(story, name, &body) 8 | @story = story 9 | @name = name 10 | @body = body 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/spec/example_group_with_should_methods.rb: -------------------------------------------------------------------------------- 1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib]) 2 | require 'spec' 3 | 4 | class MySpec < Spec::ExampleGroup 5 | def should_pass_with_should 6 | 1.should == 1 7 | end 8 | 9 | def should_fail_with_should 10 | 1.should == 2 11 | end 12 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/controllers/application.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | before_filter :i_should_only_be_run_once, 3 | :only => 'action_with_inherited_before_filter' 4 | 5 | def i_should_only_be_run_once 6 | true 7 | end 8 | private :i_should_only_be_run_once 9 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/output_one_time_fixture_runner.rb: -------------------------------------------------------------------------------- 1 | dir = File.dirname(__FILE__) 2 | require "#{dir}/../../spec_helper" 3 | 4 | triggering_double_output = Spec::Runner.options 5 | options = Spec::Runner::OptionParser.parse( 6 | ["#{dir}/output_one_time_fixture.rb"], $stderr, $stdout 7 | ) 8 | Spec::Runner::CommandLine.run(options) 9 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require(File.join(File.dirname(__FILE__), 'config', 'boot')) 5 | 6 | require 'rake' 7 | require 'rake/testtask' 8 | require 'rake/rdoctask' 9 | 10 | require 'tasks/rails' 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/runner/heckle_runner_unsupported.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Runner 3 | # Dummy implementation for Windows that just fails (Heckle is not supported on Windows) 4 | class HeckleRunner 5 | def initialize(filter) 6 | raise "Heckle not supported on Windows" 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/testsuite_adapter_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/test_unit_spec_helper' 2 | 3 | describe "TestSuiteAdapter" do 4 | include TestUnitSpecHelper 5 | it "should pass" do 6 | dir = File.dirname(__FILE__) 7 | run_script "#{dir}/resources/testsuite_adapter_spec_with_test_unit.rb" 8 | end 9 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/version.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module VERSION 3 | unless defined? MAJOR 4 | MAJOR = 1 5 | MINOR = 1 6 | TINY = 12 7 | MINESCULE = nil 8 | 9 | 10 | STRING = [MAJOR, MINOR, TINY, MINESCULE].compact.join('.') 11 | 12 | SUMMARY = "rspec #{STRING}" 13 | end 14 | end 15 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/resources/custom_example_group_runner.rb: -------------------------------------------------------------------------------- 1 | module Custom 2 | class ExampleGroupRunner 3 | attr_reader :options, :arg 4 | def initialize(options, arg) 5 | @options, @arg = options, arg 6 | end 7 | 8 | def load_files(files) 9 | end 10 | 11 | def run 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../spec_helper.rb' 2 | 3 | module Spec 4 | describe Runner, ".configure" do 5 | it "should yield global configuration" do 6 | Spec::Runner.configure do |config| 7 | config.should equal(Spec::Runner.configuration) 8 | end 9 | end 10 | end 11 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/active_record_openid_store/lib/association.rb: -------------------------------------------------------------------------------- 1 | require 'openid/association' 2 | require 'time' 3 | 4 | class Association < ActiveRecord::Base 5 | set_table_name 'open_id_associations' 6 | def from_record 7 | OpenID::Association.new(handle, secret, Time.at(issued), lifetime, assoc_type) 8 | end 9 | end 10 | 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/support/helpers/cmdline.rb: -------------------------------------------------------------------------------- 1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib]) 2 | require 'spec' 3 | 4 | # Uncommenting next line will break the output story (no output!!) 5 | # rspec_options 6 | options = Spec::Runner::OptionParser.parse( 7 | ARGV, $stderr, $stdout 8 | ) 9 | Spec::Runner::CommandLine.run(options) 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/spec_that_fails.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | describe "example group with failures" do 7 | it "should fail" do 8 | false.should be_true 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story.rb: -------------------------------------------------------------------------------- 1 | require 'spec' 2 | require 'spec/story/extensions' 3 | require 'spec/story/given_scenario' 4 | require 'spec/story/runner' 5 | require 'spec/story/scenario' 6 | require 'spec/story/step' 7 | require 'spec/story/step_group' 8 | require 'spec/story/step_mother' 9 | require 'spec/story/story' 10 | require 'spec/story/world' 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/spec_that_passes.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | describe "example group with passing examples" do 7 | it "should pass" do 8 | true.should be_true 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/lib/annotate.rb: -------------------------------------------------------------------------------- 1 | unless defined?(Annotate) 2 | $:.unshift(File.dirname(__FILE__)) 3 | 4 | module Annotate 5 | VERSION = '2.0.0' 6 | end 7 | 8 | begin 9 | load 'Rakefile' 10 | Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake } 11 | rescue LoadError => e 12 | nil 13 | end 14 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/test_case_that_fails.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | class TestCaseThatFails < Test::Unit::TestCase 7 | def test_that_fails 8 | false.should be_true 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/test_case_that_passes.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | class TestCaseThatPasses < Test::Unit::TestCase 7 | def test_that_passes 8 | true.should be_true 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/status222.xrds: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | *x 5 | The subsegment does not exist 6 | 2006-08-18T00:02:35.000Z 7 | xri://= 8 | 9 | -------------------------------------------------------------------------------- /app/views/admin/controls/index.html.erb: -------------------------------------------------------------------------------- 1 |

Control Panel

2 | 3 | 10 | -------------------------------------------------------------------------------- /app/views/layouts/_default.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= flash_messages %> 5 | <%= yield %> 6 |
7 |
8 |
9 |
10 | <%= yield :side %> 11 |
12 |
13 | -------------------------------------------------------------------------------- /app/views/user/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 |

Forgot password

2 | <% form_tag url_for(:action => 'create') do %> 3 | 4 |
5 | 6 | <%= text_field_tag :email, "", :size => 50 %>
7 |
8 | 9 | <%= submit_tag 'Reset Password' %> 10 | <% end %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/spec/abstract_spec.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), *%w[spec_helper]) 2 | require 'activerecord' 3 | 4 | $:.unshift "#{File.dirname(__FILE__)}/../lib" 5 | require 'utility_scopes' 6 | 7 | # Load a test class 8 | def uses_fixture(fixture_name) 9 | require File.join(File.dirname(__FILE__), 'fixtures', fixture_name.to_s) 10 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/test_case_with_errors.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | class TestCaseWithErrors < Test::Unit::TestCase 7 | def test_with_error 8 | raise "error raised in TestCaseWithErrors" 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/spec_with_errors.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | describe "example group with errors" do 7 | it "should raise errors" do 8 | raise "error raised in example group with errors" 9 | end 10 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec/templates/script/autospec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['RSPEC'] = 'true' # allows autotest to discover rspec 3 | ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux 4 | system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) || 5 | $stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH") 6 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/switchtower.rake, and they will automatically be available to Rake. 3 | 4 | require(File.join(File.dirname(__FILE__), 'config', 'boot')) 5 | 6 | require 'rake' 7 | require 'rake/testtask' 8 | require 'rake/rdoctask' 9 | 10 | require 'tasks/rails' -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/500.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 |

Application error (Apache)

6 |

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

7 | 8 | -------------------------------------------------------------------------------- /app/views/shared/_login_with_openid.html.erb: -------------------------------------------------------------------------------- 1 | <% form_tag session_path do -%> 2 | <%= label_tag 'openid_indentifier', 'OpenID Url' %>
3 | <%= text_field_tag "openid_identifier", @openid_identifier %>
4 | <%= label_tag 'remember_me', 'Remember me' %><%= check_box_tag 'remember_me', '1', @remember_me %>
5 | <%= submit_tag 'Log in', :disable_with => "Signing in…" %> 6 | <% end -%> 7 |
8 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/init.rb: -------------------------------------------------------------------------------- 1 | # Placeholder to satisfy Rails. 2 | # 3 | # Do NOT add any require statements to this file. Doing 4 | # so will cause Rails to load this plugin all of the time. 5 | # 6 | # Running 'ruby script/generate rspec' will 7 | # generate spec/spec_helper.rb, which includes the necessary 8 | # require statements and configuration. This file should 9 | # be required by all of your spec files. -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/init.rb: -------------------------------------------------------------------------------- 1 | # Placeholder to satisfy Rails. 2 | # 3 | # Do NOT add any require statements to this file. Doing 4 | # so will cause Rails to load this plugin all of the time. 5 | # 6 | # Running 'ruby script/generate rspec' will 7 | # generate spec/spec_helper.rb, which includes the necessary 8 | # require statements and configuration. This file should 9 | # be required by all of your spec files. -------------------------------------------------------------------------------- /app/views/user/activations/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend activation

2 | <% form_tag user_activations_path do %> 3 | 4 |
5 | 6 | <%= text_field_tag :email, "", :size => 50 %>
7 |
8 | 9 | <%= submit_tag 'Resend Activation Code', :disable_with => "Sending…" %> 10 | <% end %> 11 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_no_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | http://openid.net/signon/1.0 8 | http://www.myopenid.com/server 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/rake/failing_examples_with_html.rake: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'spec/rake/spectask' 3 | 4 | desc "Generate HTML report for failing examples" 5 | Spec::Rake::SpecTask.new('failing_examples_with_html') do |t| 6 | t.spec_files = FileList['failing_examples/**/*.rb'] 7 | t.spec_opts = ["--format", "html:doc/reports/tools/failing_examples.html", "--diff"] 8 | t.fail_on_error = false 9 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid_no_delegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Identity Page for Smoker 5 | 6 | 7 | 8 |

foo

9 | 10 | 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/mock_framework_integration/use_flexmock.feature: -------------------------------------------------------------------------------- 1 | Story: Getting correct output with flexmock 2 | 3 | As an RSpec user who prefers flexmock 4 | I want to be able to use flexmock without rspec mocks interfering 5 | 6 | Scenario: Mock with flexmock 7 | Given the file ../../resources/spec/spec_with_flexmock.rb 8 | When I run it with the ruby interpreter 9 | Then the exit code should be 0 -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/runner/class_and_arguments_parser.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Runner 3 | class ClassAndArgumentsParser 4 | def self.parse(s) 5 | if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/ 6 | arg = $2 == "" ? nil : $2 7 | [$1, arg] 8 | else 9 | raise "Couldn't parse #{s.inspect}" 10 | end 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/extensions/action_controller/base.rb: -------------------------------------------------------------------------------- 1 | module ActionController 2 | class Base 3 | class << self 4 | def set_view_path(path) 5 | [:append_view_path, :template_root=].each do |method| 6 | if respond_to?(method) 7 | return send(method, path) 8 | end 9 | end 10 | end 11 | end 12 | end 13 | end 14 | 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/version.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Rails 3 | module VERSION #:nodoc: 4 | unless defined? MAJOR 5 | MAJOR = 1 6 | MINOR = 1 7 | TINY = 12 8 | MINESCULE = nil 9 | 10 | STRING = [MAJOR, MINOR, TINY, MINESCULE].compact.join('.') 11 | 12 | SUMMARY = "rspec-rails #{STRING}" 13 | end 14 | end 15 | end 16 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/spec_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | 3 | describe "script/spec file" do 4 | it "should run a spec" do 5 | dir = File.dirname(__FILE__) 6 | output = `#{RAILS_ROOT}/script/spec #{dir}/sample_spec.rb` 7 | unless $?.exitstatus == 0 8 | flunk "command 'script/spec spec/sample_spec' failed\n#{output}" 9 | end 10 | end 11 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/example-xrds.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | http://example.com/ 10 | http://www.openidenabled.com/ 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/helper_method_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | module HelperMethodExample 4 | describe "an example group with helper a method" do 5 | def helper_method 6 | "received call" 7 | end 8 | 9 | it "should make that method available to specs" do 10 | helper_method.should == "received call" 11 | end 12 | end 13 | end 14 | 15 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 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 | # 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 11 | -------------------------------------------------------------------------------- /db/migrate/20080911154835_create_invitations.rb: -------------------------------------------------------------------------------- 1 | class CreateInvitations < ActiveRecord::Migration 2 | def self.up 3 | create_table "invitations" do |t| 4 | t.integer :sender_id 5 | t.string :email, :token 6 | t.datetime :sent_at 7 | t.timestamps 8 | end 9 | 10 | add_index :invitations, :token, :unique => true 11 | end 12 | 13 | def self.down 14 | drop_table "invitations" 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story/given_scenario.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Story 3 | class GivenScenario 4 | def initialize(name) 5 | @name = name 6 | end 7 | 8 | def perform(instance, ignore_name) 9 | scenario = Runner::StoryRunner.scenario_from_current_story(@name) 10 | Runner::ScenarioRunner.new.run(scenario, instance) 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid2_xrds_no_local_id.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | http://specs.openid.net/auth/2.0/signon 8 | http://www.myopenid.com/server 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/helpers/view_spec_helper.rb: -------------------------------------------------------------------------------- 1 | module ViewSpecHelper 2 | def method_in_helper 3 | "
This is text from a method in the ViewSpecHelper
" 4 | end 5 | 6 | def method_in_template_with_partial 7 | "
method_in_template_with_partial in ViewSpecHelper
" 8 | end 9 | 10 | def method_in_partial 11 | "
method_in_partial in ViewSpecHelper
" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/expectations/extensions/string_and_symbol.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Expectations 3 | module StringHelpers 4 | def starts_with?(prefix) 5 | to_s[0..(prefix.to_s.length - 1)] == prefix.to_s 6 | end 7 | end 8 | end 9 | end 10 | 11 | class String 12 | include Spec::Expectations::StringHelpers 13 | end 14 | 15 | class Symbol 16 | include Spec::Expectations::StringHelpers 17 | end 18 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/story/extensions_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/story_helper' 2 | 3 | require 'spec/story' 4 | 5 | describe Kernel, "#Story" do 6 | before(:each) do 7 | Kernel.stub!(:at_exit) 8 | end 9 | 10 | it "should delegate to ::Spec::Story::Runner.story_runner" do 11 | ::Spec::Story::Runner.story_runner.should_receive(:Story) 12 | story = Story("title","narrative"){} 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/admin/invites/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Edit invitations for <%= @user.login %>

2 |

<%= link_to 'Back to user administration', admin_users_path %>.

3 | <%= error_messages_for :user %> 4 | <% form_for :user, :url => admin_invite_path(@user), 5 | :html => { :method => :put }, 6 | :builder => Uberkit::Forms::Builder do |f| -%> 7 | <%= f.text_field :invitation_limit %> 8 | <%= f.submit "Update" %> 9 | <% end -%> 10 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/runner/command_line.rb: -------------------------------------------------------------------------------- 1 | require 'spec/runner/option_parser' 2 | 3 | module Spec 4 | module Runner 5 | class CommandLine 6 | def self.run(tmp_options=Spec::Runner.options) 7 | orig_options = Spec::Runner.options 8 | Spec::Runner.use tmp_options 9 | tmp_options.run_examples 10 | ensure 11 | Spec::Runner.use orig_options 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/README.jruby: -------------------------------------------------------------------------------- 1 | = Running specs on JRuby = 2 | 3 | svn co http://svn.codehaus.org/jruby/trunk jruby 4 | cd jruby/jruby 5 | ant clean 6 | ant 7 | # put JRuby's bin dir on your PATH 8 | jruby -S gem install rake --no-ri --no-rdoc 9 | jruby -S gem install diff-lcs 10 | jruby -S gem install syntax 11 | cd ../testsuites/rspec 12 | mkdir target 13 | jruby -S rake checkout_code 14 | cd target/rspec 15 | jruby bin/spec spec -c 16 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_0entries.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | http://is-not-openid.unittest/ 9 | http://noffing.unittest./ 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config/initializers/mail.rb: -------------------------------------------------------------------------------- 1 | # Email settings 2 | ActionMailer::Base.delivery_method = :smtp 3 | ActionMailer::Base.smtp_settings = { 4 | :address => APP_CONFIG['mail']['address'], 5 | :port => APP_CONFIG['mail']['port'], 6 | :domain => APP_CONFIG['mail']['domain'], 7 | :authentication => APP_CONFIG['mail']['authentication'], 8 | :user_name => APP_CONFIG['mail']['user_name'], 9 | :password => APP_CONFIG['mail']['password'] 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /db/migrate/20080910234648_create_user_failures.rb: -------------------------------------------------------------------------------- 1 | class CreateUserFailures < ActiveRecord::Migration 2 | def self.up 3 | create_table :user_failures do |t| 4 | t.string :remote_ip, :http_user_agent, :failure_type, :username 5 | t.integer :count, :default => 0 6 | t.timestamps 7 | end 8 | 9 | add_index :user_failures, :remote_ip 10 | end 11 | 12 | def self.down 13 | drop_table :user_failures 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_7611_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module Bug7611 4 | class Foo 5 | end 6 | 7 | class Bar < Foo 8 | end 9 | 10 | describe "A Partial Mock" do 11 | it "should respect subclasses" do 12 | Foo.stub!(:new).and_return(Object.new) 13 | end 14 | 15 | it "should" do 16 | Bar.new.class.should == Bar 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/models/person.rb: -------------------------------------------------------------------------------- 1 | class Person < ActiveRecord::Base 2 | has_many :animals do 3 | def pups 4 | find(:all, :conditions => 'age < 1') 5 | end 6 | def adults 7 | find(:all, :conditions => 'age >= 1') 8 | end 9 | end 10 | validates_presence_of :name 11 | 12 | def add_animal animal 13 | animal.person = self 14 | animals << animal 15 | animal.save 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/lib/utility_scopes.rb: -------------------------------------------------------------------------------- 1 | require 'utility_scopes/limited' 2 | require 'utility_scopes/ordered' 3 | require 'utility_scopes/eager' 4 | require 'utility_scopes/except' 5 | 6 | if defined?(ActiveRecord) 7 | 8 | ActiveRecord::Base.class_eval do 9 | include UtilityScopes::Limited 10 | include UtilityScopes::Ordered 11 | include UtilityScopes::Eager 12 | include UtilityScopes::Except 13 | end 14 | 15 | end -------------------------------------------------------------------------------- /app/views/shared/_debug.html.erb: -------------------------------------------------------------------------------- 1 |
2 | Stats 3 | 4 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/interop/test.rb: -------------------------------------------------------------------------------- 1 | require 'test/unit' 2 | require 'test/unit/testresult' 3 | 4 | require 'spec/interop/test/unit/testcase' 5 | require 'spec/interop/test/unit/testsuite_adapter' 6 | require 'spec/interop/test/unit/autorunner' 7 | require 'spec/interop/test/unit/testresult' 8 | require 'spec/interop/test/unit/ui/console/testrunner' 9 | 10 | Spec::Example::ExampleGroupFactory.default(Test::Unit::TestCase) 11 | 12 | Test::Unit.run = true 13 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/matchers/change.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | class Change 4 | def evaluate_value_proc_with_ensured_evaluation_of_proxy 5 | value = evaluate_value_proc_without_ensured_evaluation_of_proxy 6 | ActiveRecord::Associations::AssociationProxy === value ? value.dup : value 7 | end 8 | alias_method_chain :evaluate_value_proc, :ensured_evaluation_of_proxy 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid2_xrds.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | http://specs.openid.net/auth/2.0/signon 8 | http://www.myopenid.com/server 9 | http://smoker.myopenid.com/ 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_idp.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | http://specs.openid.net/auth/2.0/server 9 | http://www.myopenid.com/server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Identity Page for Smoker 5 | 6 | 7 | 8 | 9 |

foo

10 | 11 | 12 | -------------------------------------------------------------------------------- /db/migrate/20080910224435_create_four_oh_fours.rb: -------------------------------------------------------------------------------- 1 | class CreateFourOhFours < ActiveRecord::Migration 2 | def self.up 3 | create_table :four_oh_fours do |t| 4 | t.string :url, :referer 5 | t.integer :count, :default => 0 6 | t.timestamps 7 | end 8 | 9 | add_index :four_oh_fours, [:url, :referer], :unique => true 10 | add_index :four_oh_fours, [:url] 11 | end 12 | 13 | def self.down 14 | drop_table :four_oh_fours 15 | end 16 | end 17 | 18 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Identity Page for Smoker 5 | 6 | 7 | 8 | 9 |

foo

10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/script/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) 3 | 4 | begin 5 | require 'rubigen' 6 | rescue LoadError 7 | require 'rubygems' 8 | require 'rubigen' 9 | end 10 | require 'rubigen/scripts/destroy' 11 | 12 | ARGV.shift if ['--help', '-h'].include?(ARGV[0]) 13 | RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit] 14 | RubiGen::Scripts::Destroy.new.run(ARGV) 15 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) 3 | 4 | begin 5 | require 'rubigen' 6 | rescue LoadError 7 | require 'rubygems' 8 | require 'rubigen' 9 | end 10 | require 'rubigen/scripts/generate' 11 | 12 | ARGV.shift if ['--help', '-h'].include?(ARGV[0]) 13 | RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit] 14 | RubiGen::Scripts::Generate.new.run(ARGV) 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/adapters/mock_frameworks/mocha.rb: -------------------------------------------------------------------------------- 1 | require 'mocha/standalone' 2 | require 'mocha/object' 3 | 4 | module Spec 5 | module Adapters 6 | module MockFramework 7 | include Mocha::Standalone 8 | def setup_mocks_for_rspec 9 | mocha_setup 10 | end 11 | def verify_mocks_for_rspec 12 | mocha_verify 13 | end 14 | def teardown_mocks_for_rspec 15 | mocha_teardown 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb: -------------------------------------------------------------------------------- 1 | rspec_lib = File.dirname(__FILE__) + "/../../../../../../lib" 2 | $:.unshift rspec_lib unless $:.include?(rspec_lib) 3 | require 'test/unit' 4 | require 'spec' 5 | 6 | describe "options hash" do 7 | describe "#options" do 8 | it "should expose the options hash" do 9 | group = describe("group", :this => 'hash') {} 10 | group.options[:this].should == 'hash' 11 | end 12 | end 13 | end -------------------------------------------------------------------------------- /app/controllers/openid_sessions_controller.rb: -------------------------------------------------------------------------------- 1 | class OpenidSessionsController < SessionsController 2 | before_filter :login_prohibited 3 | 4 | def index 5 | 6 | end 7 | 8 | def new 9 | # Display recaptcha only if the number of failed logins have 10 | # exceeded the specified limit within a certain timeframe 11 | @bad_visitor = UserFailure.failure_check(request.remote_ip) 12 | respond_to do |format| 13 | format.html 14 | format.js 15 | end 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/expectations/errors.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Expectations 3 | # If Test::Unit is loaed, we'll use its error as baseclass, so that Test::Unit 4 | # will report unmet RSpec expectations as failures rather than errors. 5 | superclass = ['Test::Unit::AssertionFailedError', '::StandardError'].map do |c| 6 | eval(c) rescue nil 7 | end.compact.first 8 | 9 | class ExpectationNotMetError < superclass 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/story/runner/scenario_collector.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Story 3 | module Runner 4 | class ScenarioCollector 5 | attr_accessor :scenarios 6 | 7 | def initialize(story) 8 | @story = story 9 | @scenarios = [] 10 | end 11 | 12 | def Scenario(name, &body) 13 | @scenarios << Scenario.new(@story, name, &body) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/extensions.rb: -------------------------------------------------------------------------------- 1 | require 'spec' 2 | 3 | require 'spec/rails/extensions/spec/runner/configuration' 4 | require 'spec/rails/extensions/spec/matchers/have' 5 | 6 | require 'spec/rails/extensions/active_record/base' 7 | require 'spec/rails/extensions/action_controller/base' 8 | require 'spec/rails/extensions/action_controller/rescue' 9 | require 'spec/rails/extensions/action_controller/test_response' 10 | require 'spec/rails/extensions/action_view/base' 11 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/ruby_forker.rb: -------------------------------------------------------------------------------- 1 | require 'rbconfig' 2 | 3 | module RubyForker 4 | # Forks a ruby interpreter with same type as ourself. 5 | # juby will fork jruby, ruby will fork ruby etc. 6 | def ruby(args, stderr=nil) 7 | config = ::Config::CONFIG 8 | interpreter = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT'] 9 | cmd = "#{interpreter} #{args}" 10 | cmd << " 2> #{stderr}" unless stderr.nil? 11 | `#{cmd}` 12 | end 13 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/extensions/active_record_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../spec_helper' 2 | 3 | describe "A model" do 4 | fixtures :things 5 | it "should tell you its required fields" do 6 | Thing.new.should have(1).error_on(:name) 7 | end 8 | 9 | it "should tell you how many records it has" do 10 | Thing.should have(:no).records 11 | Thing.create(:name => "THE THING") 12 | Thing.should have(1).record 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/admin/mailings_controller.rb: -------------------------------------------------------------------------------- 1 | class Admin::MailingsController < ApplicationController 2 | before_filter :login_required 3 | require_role :admin 4 | 5 | # Send invite emails 6 | def create 7 | if Invitation.send_to_pending_users(params[:limit].to_i) 8 | flash[:notice] = "Sending invitations." 9 | redirect_to admin_invites_path 10 | else 11 | flash[:error] = "There was a problem sending the invitations." 12 | redirect_to admin_invites_path 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/README.txt: -------------------------------------------------------------------------------- 1 | "Why have failing examples?", you might ask. 2 | 3 | They allow us to see failure messages. RSpec wants to provide meaningful and helpful failure messages. The failures in this directory not only provide you a way of seeing the failure messages, but they provide RSpec's own specs a way of describing what they should look like and ensuring they stay correct. 4 | 5 | To see the types of messages you can expect, stand in this directory and run: 6 | 7 | ../bin/spec ./*.rb -------------------------------------------------------------------------------- /app/views/user/openid_accounts/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Edit your account

2 |

Show current profile for: <%= link_to_current_user :content_method => :login %> 3 | <%= error_messages_for :user %> 4 | 5 | <% form_for :user, :url => user_openid_account_url(@user), 6 | :html => { :method => :put }, 7 | :builder => Uberkit::Forms::Builder do |f| %> 8 | 9 | <%= render :partial => "user/profiles/edit_profile", :locals => { :f => f } %> 10 | 11 | <%= f.submit 'Save' %> 12 | <% end %> 13 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # File: script/console 3 | irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' 4 | 5 | libs = " -r irb/completion" 6 | # Perhaps use a console_lib to store any extra methods I may want available in the cosole 7 | # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}" 8 | libs << " -r #{File.dirname(__FILE__) + '/../lib/annotate.rb'}" 9 | puts "Loading annotate gem" 10 | exec "#{irb} #{libs} --simple-prompt" -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/story/scenario_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/story_helper' 2 | 3 | module Spec 4 | module Story 5 | describe Scenario do 6 | it 'should not raise an error if no body is supplied' do 7 | # given 8 | story = StoryBuilder.new.to_story 9 | 10 | # when 11 | error = exception_from { Scenario.new story, 'name' } 12 | 13 | # then 14 | error.should be_nil 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid_1_and_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Identity Page for Smoker 5 | 6 | 7 | 8 | 9 |

foo

10 | 11 | 12 | -------------------------------------------------------------------------------- /app/models/user_observer.rb: -------------------------------------------------------------------------------- 1 | class UserObserver < ActiveRecord::Observer 2 | 3 | #def after_create(user) 4 | #end 5 | 6 | def after_save(user) 7 | UserMailer.deliver_activation(user) if user.recently_activated? 8 | UserMailer.deliver_forgot_password(user) if user.recently_forgot_password? 9 | UserMailer.deliver_reset_password(user) if user.recently_reset_password? 10 | UserMailer.deliver_signup_notification(user) if (user.recently_created? || user.lost_activation_code?) 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /public/dispatch.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby1.8 2 | 3 | require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) 4 | 5 | # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: 6 | # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired 7 | require "dispatcher" 8 | 9 | ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) 10 | Dispatcher.dispatch -------------------------------------------------------------------------------- /public/dispatch.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby1.8 2 | 3 | require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) 4 | 5 | # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: 6 | # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired 7 | require "dispatcher" 8 | 9 | ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) 10 | Dispatcher.dispatch -------------------------------------------------------------------------------- /app/controllers/four_oh_fours_controller.rb: -------------------------------------------------------------------------------- 1 | class FourOhFoursController < ApplicationController 2 | def index 3 | FourOhFour.add_request(request.url, 4 | request.env['HTTP_REFERER'] || '') 5 | respond_to do |format| 6 | format.html { render :file => "#{RAILS_ROOT}/public/404.html" , 7 | :status => "404 Not Found" } 8 | format.all { render :nothing => true, 9 | :status => "404 Not Found" } 10 | end 11 | end 12 | end 13 | 14 | -------------------------------------------------------------------------------- /app/views/shared/_login.html.erb: -------------------------------------------------------------------------------- 1 | <% form_tag session_path do -%> 2 | <%= label_tag 'login:' %>
3 | <%= text_field_tag 'login', @login %>

4 | <%= label_tag 'password:' %>
5 | <%= password_field_tag 'password', nil %>
6 | <%= link_to 'Forgot Password?', forgot_password_path %>
7 | <%= label_tag 'remember_me', 'Remember me:' %><%= check_box_tag 'remember_me', '1', @remember_me %>
8 | <%= submit_tag 'Log in', :disable_with => "Signing in…" %> 9 | <% end -%> 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /db/migrate/20080805045808_create_roles.rb: -------------------------------------------------------------------------------- 1 | class CreateRoles < ActiveRecord::Migration 2 | def self.up 3 | create_table "roles" do |t| 4 | t.string :name 5 | end 6 | 7 | # generate the join table 8 | create_table "roles_users", :id => false do |t| 9 | t.integer "role_id", "user_id" 10 | end 11 | add_index "roles_users", "role_id" 12 | add_index "roles_users", "user_id" 13 | end 14 | 15 | def self.down 16 | drop_table "roles" 17 | drop_table "roles_users" 18 | end 19 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/matchers/exist.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | # :call-seq: 4 | # should exist 5 | # should_not exist 6 | # 7 | # Passes if actual.exist? 8 | def exist 9 | simple_matcher do |actual, matcher| 10 | matcher.failure_message = "expected #{actual.inspect} to exist, but it doesn't." 11 | matcher.negative_failure_message = "expected #{actual.inspect} to not exist, but it does." 12 | actual.exist? 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_controller/templates/helper_spec.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') 2 | 3 | describe <%= class_name %>Helper do 4 | 5 | #Delete this example and add some real ones or delete this file 6 | it "should be included in the object returned by #helper" do 7 | included_modules = (class << helper; self; end).send :included_modules 8 | included_modules.should include(<%= class_name %>Helper) 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_idp_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | http://specs.openid.net/auth/2.0/server 9 | http://www.myopenid.com/server 10 | http://smoker.myopenid.com/ 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/support/helpers/story_helper.rb: -------------------------------------------------------------------------------- 1 | require 'spec/story' 2 | require File.dirname(__FILE__) + '/../../../spec/ruby_forker' 3 | 4 | module StoryHelper 5 | include RubyForker 6 | 7 | def spec(args, stderr) 8 | ruby("#{File.dirname(__FILE__) + '/../../../bin/spec'} #{args}", stderr) 9 | end 10 | 11 | def cmdline(args, stderr) 12 | ruby("#{File.dirname(__FILE__) + '/../../resources/helpers/cmdline.rb'} #{args}", stderr) 13 | end 14 | 15 | Spec::Story::World.__send__ :include, self 16 | end 17 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/tasks/rspec.rake: -------------------------------------------------------------------------------- 1 | begin 2 | require 'spec' 3 | rescue LoadError 4 | require 'rubygems' 5 | require 'spec' 6 | end 7 | begin 8 | require 'spec/rake/spectask' 9 | rescue LoadError 10 | puts <<-EOS 11 | To use rspec for testing you must install rspec gem: 12 | gem install rspec 13 | EOS 14 | exit(0) 15 | end 16 | 17 | desc "Run the specs under spec/models" 18 | Spec::Rake::SpecTask.new do |t| 19 | t.spec_opts = ['--options', "spec/spec.opts"] 20 | t.spec_files = FileList['spec/**/*_spec.rb'] 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/interop/testcase.rb: -------------------------------------------------------------------------------- 1 | module Test 2 | module Unit 3 | class TestCase 4 | # Edge rails (r8664) introduces class-wide setup & teardown callbacks for Test::Unit::TestCase. 5 | # Make sure these still get run when running TestCases under rspec: 6 | prepend_before(:each) do 7 | run_callbacks :setup if respond_to?(:run_callbacks) 8 | end 9 | append_after(:each) do 10 | run_callbacks :teardown if respond_to?(:run_callbacks) 11 | end 12 | end 13 | end 14 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_another_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | http://openid.net/signon/1.0 10 | http://vroom.unittest/server 11 | http://smoker.myopenid.com/ 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/views/root/index.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :side do -%> 2 | <% unless logged_in? -%><% if_in_beta? do -%> 3 | <%= error_messages_for :invitation %> 4 |

We are currently in private beta. Please enter your email address below and we will let know when an invitation becomes available.

5 | <% uberform_for [:user, Invitation.new] do |f| -%> 6 | <%= f.text_field :email, :label => "Your Email:" %> 7 | <%= f.submit 'Submit' %> 8 | <% end -%> 9 | <% end -%><% end -%> 10 | <% end -%> 11 | 12 |

Welcome to my application.

13 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/interop/test/unit/test_unit_spec_helper.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../../spec_helper' 2 | require File.dirname(__FILE__) + '/../../../../ruby_forker' 3 | 4 | module TestUnitSpecHelper 5 | include RubyForker 6 | 7 | def resources 8 | File.dirname(__FILE__) + "/resources" 9 | end 10 | 11 | def run_script(file_name) 12 | output = ruby(file_name) 13 | if !$?.success? || output.include?("FAILED") || output.include?("Error") 14 | raise output 15 | end 16 | output 17 | end 18 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_scaffold/templates/helper_spec.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') 2 | 3 | describe <%= controller_class_name %>Helper do 4 | 5 | #Delete this example and add some real ones or delete this file 6 | it "should be included in the object returned by #helper" do 7 | included_modules = (class << helper; self; end).send :included_modules 8 | included_modules.should include(<%= controller_class_name %>Helper) 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/file_accessor.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | class FileAccessor 3 | def open_and_handle_with(pathname, processor) 4 | pathname.open do |io| 5 | processor.process(io) 6 | end 7 | end 8 | end 9 | 10 | if __FILE__ == $0 11 | require File.dirname(__FILE__) + '/io_processor' 12 | require 'pathname' 13 | 14 | accessor = FileAccessor.new 15 | io_processor = IoProcessor.new 16 | file = Pathname.new ARGV[0] 17 | 18 | accessor.open_and_handle_with(file, io_processor) 19 | end 20 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/runner/formatter/text_mate_formatter.rb: -------------------------------------------------------------------------------- 1 | require 'spec/runner/formatter/html_formatter' 2 | 3 | module Spec 4 | module Runner 5 | module Formatter 6 | # Formats backtraces so they're clickable by TextMate 7 | class TextMateFormatter < HtmlFormatter 8 | def backtrace_line(line) 9 | line.gsub(/([^:]*\.rb):(\d*)/) do 10 | "#{$1}:#{$2} " 11 | end 12 | end 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/example/model_example_group.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Rails 3 | module Example 4 | # Model examples live in $RAILS_ROOT/spec/models/. 5 | # 6 | # Model examples use Spec::Rails::Example::ModelExampleGroup, which 7 | # provides support for fixtures and some custom expectations via extensions 8 | # to ActiveRecord::Base. 9 | class ModelExampleGroup < RailsExampleGroup 10 | Spec::Example::ExampleGroupFactory.register(:model, self) 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid_and_yadis.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Identity Page for Smoker 5 | 6 | 7 | 8 | 9 | 10 |

foo

11 | 12 | 13 | -------------------------------------------------------------------------------- /app/views/admin/roles/index.html.erb: -------------------------------------------------------------------------------- 1 |

Roles for <%=h @user.login %>

2 | <% form_for @user, :url => { :action => "update", :id => @user }, 3 | :builder => Uberkit::Forms::Builder do |f| -%> 4 | 5 | <%= hidden_field_tag "user[created_at]", @user.created_at %> 6 | 7 | 14 | 15 |

16 | <%= f.submit "Update" %> 17 |

18 | <% end %> 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/failing_autogenerated_docstrings_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | # Run spec w/ -fs to see the output of this file 4 | 5 | describe "Failing examples with no descriptions" do 6 | 7 | # description is auto-generated as "should equal(5)" based on the last #should 8 | it do 9 | 3.should equal(2) 10 | 5.should equal(5) 11 | end 12 | 13 | it { 3.should be > 5 } 14 | 15 | it { ["a"].should include("b") } 16 | 17 | it { [1,2,3].should_not respond_to(:size) } 18 | 19 | end 20 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_496.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module BugReport496 4 | class BaseClass 5 | end 6 | 7 | class SubClass < BaseClass 8 | end 9 | 10 | describe "a message expectation on a base class object" do 11 | it "should correctly pick up message sent to it subclass" do 12 | pending("fix for http://rspec.lighthouseapp.com/projects/5645/tickets/496") do 13 | BaseClass.should_receive(:new).once 14 | SubClass.new 15 | end 16 | end 17 | end 18 | end 19 | 20 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/output_one_time_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module Spec 4 | module Runner 5 | describe CommandLine do 6 | it "should not output twice" do 7 | dir = File.dirname(__FILE__) 8 | Dir.chdir("#{dir}/../../..") do 9 | output =`ruby #{dir}/output_one_time_fixture_runner.rb` 10 | output.should include("1 example, 0 failures") 11 | output.should_not include("0 examples, 0 failures") 12 | end 13 | end 14 | end 15 | end 16 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/example/shared_behaviour_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../spec_helper' 2 | 3 | describe "A shared view example_group", :shared => true do 4 | it "should have some tag with some text" do 5 | response.should have_tag('div', 'This is text from a method in the ViewSpecHelper') 6 | end 7 | end 8 | 9 | describe "A view example_group", :type => :view do 10 | it_should_behave_like "A shared view example_group" 11 | 12 | before(:each) do 13 | render "view_spec/implicit_helper" 14 | end 15 | end 16 | 17 | -------------------------------------------------------------------------------- /app/models/role.rb: -------------------------------------------------------------------------------- 1 | class Role < ActiveRecord::Base 2 | #validates_presence_of :name 3 | #validates_length_of :name, :within => 3..40 4 | #validates_uniqueness_of :name, :case_sensitive => false 5 | #validates_format_of :name, :with => /\w/, :message => "should be a word." 6 | 7 | attr_accessible nil 8 | 9 | def to_xml(options = {}) 10 | #Add attributes accessible by xml 11 | #Ex. default_only = [:id, :name] 12 | default_only = [] 13 | options[:only] = (options[:only] || []) + default_only 14 | super(options) 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/custom_formatter.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | require 'spec/runner/formatter/progress_bar_formatter' 3 | 4 | # Example of a formatter with custom bactrace printing. Run me with: 5 | # ruby bin/spec examples/failing -r examples/passing/custom_formatter.rb -f CustomFormatter 6 | class CustomFormatter < Spec::Runner::Formatter::ProgressBarFormatter 7 | def backtrace_line(line) 8 | line.gsub(/([^:]*\.rb):(\d*)/) do 9 | "#{$1}:#{$2} " 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/predicate_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | class BddFramework 4 | def intuitive? 5 | true 6 | end 7 | 8 | def adopted_quickly? 9 | true 10 | end 11 | end 12 | 13 | describe "BDD framework" do 14 | 15 | before(:each) do 16 | @bdd_framework = BddFramework.new 17 | end 18 | 19 | it "should be adopted quickly" do 20 | @bdd_framework.should be_adopted_quickly 21 | end 22 | 23 | it "should be intuitive" do 24 | @bdd_framework.should be_intuitive 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/spec/spec_with_flexmock.rb: -------------------------------------------------------------------------------- 1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib]) 2 | require "rubygems" 3 | require 'spec' 4 | 5 | Spec::Runner.configure do |config| 6 | config.mock_with :flexmock 7 | end 8 | 9 | describe "plugging in flexmock" do 10 | it "allows flexmock to be used" do 11 | target = Object.new 12 | flexmock(target).should_receive(:foo).once 13 | lambda {flexmock_verify}.should raise_error 14 | end 15 | 16 | it "does not include rspec mocks" do 17 | Spec.const_defined?(:Mocks).should be_false 18 | end 19 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/stubbed_message_expectations_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module Spec 4 | module Mocks 5 | describe "Example with stubbed and then called message" do 6 | it "should fail if the message is expected and then subsequently not called again" do 7 | mock_obj = mock("mock", :msg => nil) 8 | mock_obj.msg 9 | mock_obj.should_receive(:msg) 10 | lambda { mock_obj.rspec_verify }.should raise_error(Spec::Mocks::MockExpectationError) 11 | end 12 | end 13 | end 14 | end -------------------------------------------------------------------------------- /app/controllers/admin/users_controller.rb: -------------------------------------------------------------------------------- 1 | class Admin::UsersController < ApplicationController 2 | before_filter :login_required 3 | require_role :admin 4 | 5 | def index 6 | @users = User.administrative_member_list(params[:page]) 7 | end 8 | 9 | # Administrative activate action 10 | def update 11 | @user = User.find_by_login(params[:id]) 12 | if @user.activate! 13 | flash[:notice] = "User activated." 14 | else 15 | flash[:error] = "There was a problem activating this user." 16 | end 17 | redirect_to :action => 'index' 18 | end 19 | 20 | end 21 | 22 | -------------------------------------------------------------------------------- /app/views/user/profiles/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Edit your account

2 |

Show current profile for: <%= link_to_current_user :content_method => :login %> | <%= link_to 'Change Password', user_profile_password_settings_path(current_user) %>

3 | <%= error_messages_for :user %> 4 | 5 | <% form_for :user, :url => user_profile_url(@user), 6 | :html => { :method => :put }, 7 | :builder => Uberkit::Forms::Builder do |f| %> 8 | 9 | <%= render :partial => "user/profiles/edit_profile", :locals => { :f => f } %> 10 | 11 | <%= f.submit 'Save' %> 12 | <% end %> 13 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/example/module_reopening_fix.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Example 3 | # This is a fix for ...Something in Ruby 1.8.6??... (Someone fill in here please - Aslak) 4 | module ModuleReopeningFix 5 | def child_modules 6 | @child_modules ||= [] 7 | end 8 | 9 | def included(mod) 10 | child_modules << mod 11 | end 12 | 13 | def include(mod) 14 | super 15 | child_modules.each do |child_module| 16 | child_module.__send__(:include, mod) 17 | end 18 | end 19 | end 20 | end 21 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_controller/templates/view_spec.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper') 2 | 3 | describe "/<%= class_name.underscore %>/<%= action %>" do 4 | before(:each) do 5 | render '<%= class_name.underscore %>/<%= action %>' 6 | end 7 | 8 | #Delete this example and add some real ones or delete this file 9 | it "should tell you where to find the file" do 10 | response.should have_tag('p', %r[Find me in app/views/<%= class_name.underscore %>/<%= action %>]) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/dispatch.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby1.8 2 | 3 | #!/usr/local/bin/ruby 4 | 5 | require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) 6 | 7 | # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: 8 | # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired 9 | require "dispatcher" 10 | 11 | ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) 12 | Dispatcher.dispatch -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/public/dispatch.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby1.8 2 | 3 | #!/usr/local/bin/ruby 4 | 5 | require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) 6 | 7 | # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: 8 | # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired 9 | require "dispatcher" 10 | 11 | ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) 12 | Dispatcher.dispatch -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_2_bad_local_id.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | http://specs.openid.net/auth/2.0/signon 10 | http://www.myopenid.com/server 11 | http://smoker.myopenid.com/ 12 | http://localid.mismatch.invalid/ 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/adapters/mock_frameworks/flexmock.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # Created by Jim Weirich on 2007-04-10. 4 | # Copyright (c) 2007. All rights reserved. 5 | 6 | require 'flexmock/rspec' 7 | 8 | module Spec 9 | module Adapters 10 | module MockFramework 11 | include FlexMock::MockContainer 12 | def setup_mocks_for_rspec 13 | # No setup required 14 | end 15 | def verify_mocks_for_rspec 16 | flexmock_verify 17 | end 18 | def teardown_mocks_for_rspec 19 | flexmock_close 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/features/support/env.rb: -------------------------------------------------------------------------------- 1 | # Sets up the Rails environment for Cucumber 2 | ENV["RAILS_ENV"] = "test" 3 | require File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment') 4 | require 'cucumber/rails/world' 5 | Cucumber::Rails.use_transactional_fixtures 6 | 7 | # require 'webrat/rails' 8 | 9 | # Comment out the next two lines if you're not using RSpec's matchers (should / should_not) in your steps. 10 | require 'cucumber/rails/rspec' 11 | # require 'webrat/rspec-rails' 12 | 13 | require File.join(File.dirname(__FILE__), "/../../spec/resources/models/person") 14 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/matchers/should_change_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../spec_helper' 2 | 3 | describe "should change" do 4 | describe "handling association proxies" do 5 | it "should match expected collection with proxied collection" do 6 | person = Person.create!(:name => 'David') 7 | koala = person.animals.create!(:name => 'Koala') 8 | zebra = person.animals.create!(:name => 'Zebra') 9 | 10 | lambda { 11 | person.animals.delete(koala) 12 | }.should change{person.animals}.to([zebra]) 13 | end 14 | end 15 | end -------------------------------------------------------------------------------- /app/views/user/profiles/show.html.erb: -------------------------------------------------------------------------------- 1 |

My Profile: <%=h @user.login %> <%= link_to '(edit)', edit_user_profile_path(current_user) %>

2 | <% if_invites_available? do -%> 3 |

You have <%=h @user.invitation_limit %> invitations left. <%= link_to "Invite friends to join", 4 | new_user_invitation_path %>.

5 | <% end -%> 6 |

Joined on: <%=h @user.created_at.to_s(:long) %>

7 |

Name: <%=h @user.name %>

8 |

Username: <%=h @user.login %>

9 |

Email: <%=h @user.email %>

10 |

Password: <%= link_to '(change)', user_profile_password_settings_path(current_user) %>

11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/mocks/space.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Mocks 3 | class Space 4 | def add(obj) 5 | mocks << obj unless mocks.detect {|m| m.equal? obj} 6 | end 7 | 8 | def verify_all 9 | mocks.each do |mock| 10 | mock.rspec_verify 11 | end 12 | end 13 | 14 | def reset_all 15 | mocks.each do |mock| 16 | mock.rspec_reset 17 | end 18 | mocks.clear 19 | end 20 | 21 | private 22 | 23 | def mocks 24 | @mocks ||= [] 25 | end 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/spec/rails/example/model_spec_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../spec_helper' 2 | 3 | module Spec 4 | module Rails 5 | module Example 6 | describe ModelExampleGroup do 7 | it "should clear its name from the description" do 8 | group = describe("foo", :type => :model) do 9 | $nested_group = describe("bar") do 10 | end 11 | end 12 | group.description.to_s.should == "foo" 13 | $nested_group.description.to_s.should == "foo bar" 14 | end 15 | end 16 | end 17 | end 18 | end -------------------------------------------------------------------------------- /app/views/admin/users/index.html.erb: -------------------------------------------------------------------------------- 1 |

All Users

2 | <% if_in_beta? do -%> 3 |

<%= link_to 'Manage Beta Invitations for All Users', admin_invites_path %> | 4 | <%= link_to 'Pending Beta Users', admin_invite_actions_path %>

5 | <% end -%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | <% if_in_beta? do -%> 14 | 15 | <% end -%> 16 | 17 | <%= render :partial => 'user', :collection => @users %> 18 |
LoginEmailActive?Enabled?RolesInvitations
19 | 20 | <%= will_paginate @users %> 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/example/pending.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Example 3 | module Pending 4 | def pending(message = "TODO") 5 | if block_given? 6 | begin 7 | yield 8 | rescue Exception => e 9 | raise Spec::Example::ExamplePendingError.new(message) 10 | end 11 | raise Spec::Example::PendingExampleFixedError.new("Expected pending '#{message}' to fail. No Error was raised.") 12 | else 13 | raise Spec::Example::ExamplePendingError.new(message) 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/adapters/mock_frameworks/rr.rb: -------------------------------------------------------------------------------- 1 | require 'rr' 2 | 3 | patterns = ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS 4 | patterns.push(RR::Errors::BACKTRACE_IDENTIFIER) 5 | 6 | module Spec 7 | module Adapters 8 | module MockFramework 9 | include RR::Extensions::InstanceMethods 10 | def setup_mocks_for_rspec 11 | RR::Space.instance.reset 12 | end 13 | def verify_mocks_for_rspec 14 | RR::Space.instance.verify_doubles 15 | end 16 | def teardown_mocks_for_rspec 17 | RR::Space.instance.reset 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/README: -------------------------------------------------------------------------------- 1 | delegated-20060809.xrds - results from proxy.xri.net, determined by 2 | Drummond and Kevin to be incorrect. 3 | delegated-20060809-r1.xrds - Drummond's 1st correction 4 | delegated-20060809-r2.xrds - Drummond's 2nd correction 5 | 6 | spoofs: keturn's (=!E4)'s attempts to log in with Drummond's i-number (=!D2) 7 | spoof1.xrds 8 | spoof2.xrds 9 | spoof3.xrds - attempt to steal @!C0!D2 by having "at least one" CanonicalID 10 | match the $res service ProviderID. 11 | 12 | ref.xrds - resolving @ootao*test.ref, which refers to a neustar XRI. 13 | -------------------------------------------------------------------------------- /db/migrate/20080813053928_add_exception_table.rb: -------------------------------------------------------------------------------- 1 | class AddExceptionTable < ActiveRecord::Migration 2 | def self.up 3 | create_table "logged_exceptions", :force => true do |t| 4 | t.column :exception_class, :string 5 | t.column :controller_name, :string 6 | t.column :action_name, :string 7 | t.column :message, :text 8 | t.column :backtrace, :text 9 | t.column :environment, :text 10 | t.column :request, :text 11 | t.column :created_at, :datetime 12 | end 13 | end 14 | 15 | def self.down 16 | drop_table "logged_exceptions" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_model/templates/model_spec.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') 2 | 3 | describe <%= class_name %> do 4 | before(:each) do 5 | @valid_attributes = { 6 | <% attributes.each_with_index do |attribute, attribute_index| -%> 7 | :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%> 8 | <% end -%> 9 | } 10 | end 11 | 12 | it "should create a new instance given valid attributes" do 13 | <%= class_name %>.create!(@valid_attributes) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/test/functional/login_controller_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | require 'login_controller' 3 | 4 | # Re-raise errors caught by the controller. 5 | class LoginController; def rescue_action(e) raise e end; end 6 | 7 | class LoginControllerTest < Test::Unit::TestCase 8 | def setup 9 | @controller = LoginController.new 10 | @request = ActionController::TestRequest.new 11 | @response = ActionController::TestResponse.new 12 | end 13 | 14 | # Replace this with your real tests. 15 | def test_truth 16 | assert true 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/partial_mock_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | class MockableClass 4 | def self.find id 5 | return :original_return 6 | end 7 | end 8 | 9 | describe "A partial mock" do 10 | 11 | it "should work at the class level (but fail here due to the type mismatch)" do 12 | MockableClass.should_receive(:find).with(1).and_return {:stub_return} 13 | MockableClass.find("1").should equal(:stub_return) 14 | end 15 | 16 | it "should revert to the original after each spec" do 17 | MockableClass.find(1).should equal(:original_return) 18 | end 19 | 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/mocks/framework.rb: -------------------------------------------------------------------------------- 1 | # Require everything except the global extensions of class and object. This 2 | # supports wrapping rspec's mocking functionality without invading every 3 | # object in the system. 4 | 5 | require 'spec/mocks/methods' 6 | require 'spec/mocks/argument_constraints' 7 | require 'spec/mocks/spec_methods' 8 | require 'spec/mocks/proxy' 9 | require 'spec/mocks/mock' 10 | require 'spec/mocks/argument_expectation' 11 | require 'spec/mocks/message_expectation' 12 | require 'spec/mocks/order_group' 13 | require 'spec/mocks/errors' 14 | require 'spec/mocks/error_generator' 15 | require 'spec/mocks/space' 16 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/test/functional/server_controller_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | require 'server_controller' 3 | 4 | # Re-raise errors caught by the controller. 5 | class ServerController; def rescue_action(e) raise e end; end 6 | 7 | class ServerControllerTest < Test::Unit::TestCase 8 | def setup 9 | @controller = ServerController.new 10 | @request = ActionController::TestRequest.new 11 | @response = ActionController::TestResponse.new 12 | end 13 | 14 | # Replace this with your real tests. 15 | def test_truth 16 | assert true 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/adapters/mock_frameworks/rspec.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec", "mocks")) 2 | require 'spec/mocks/framework' 3 | require 'spec/mocks/extensions' 4 | 5 | module Spec 6 | module Adapters 7 | module MockFramework 8 | include Spec::Mocks::ExampleMethods 9 | def setup_mocks_for_rspec 10 | $rspec_mocks ||= Spec::Mocks::Space.new 11 | end 12 | def verify_mocks_for_rspec 13 | $rspec_mocks.verify_all 14 | end 15 | def teardown_mocks_for_rspec 16 | $rspec_mocks.reset_all 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/features/transactions/transactions_should_rollback.feature: -------------------------------------------------------------------------------- 1 | Story: transactions should rollback in plain text 2 | As an RSpec/Rails Story author 3 | I want transactions to roll back between scenarios in plain text 4 | So that I can have confidence in the state of the database 5 | 6 | Scenario: add one Person 7 | When I add a Person 8 | Then there should be one person 9 | 10 | Scenario: add one Person for the second time 11 | When I add a Person 12 | Then there should be one person 13 | 14 | Scenario: add yet another person 15 | When I add a Person 16 | Then there should be one person 17 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/runner/formatter/failing_examples_formatter.rb: -------------------------------------------------------------------------------- 1 | require 'spec/runner/formatter/base_text_formatter' 2 | 3 | module Spec 4 | module Runner 5 | module Formatter 6 | class FailingExamplesFormatter < BaseTextFormatter 7 | def example_failed(example, counter, failure) 8 | @output.puts "#{example_group.description} #{example.description}" 9 | @output.flush 10 | end 11 | 12 | def dump_failure(counter, failure) 13 | end 14 | 15 | def dump_summary(duration, example_count, failure_count, pending_count) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid_1_and_2_xrds.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | http://specs.openid.net/auth/2.0/signon 10 | http://openid.net/signon/1.1 11 | http://www.myopenid.com/server 12 | http://smoker.myopenid.com/ 13 | http://smoker.myopenid.com/ 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /vendor/plugins/rows_logger/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'rake/testtask' 3 | require 'rake/rdoctask' 4 | 5 | desc 'Default: run unit tests.' 6 | task :default => :test 7 | 8 | desc 'Test the rows_logger plugin.' 9 | Rake::TestTask.new(:test) do |t| 10 | t.libs << 'lib' 11 | t.pattern = 'test/**/*_test.rb' 12 | t.verbose = true 13 | end 14 | 15 | desc 'Generate documentation for the rows_logger plugin.' 16 | Rake::RDocTask.new(:rdoc) do |rdoc| 17 | rdoc.rdoc_dir = 'rdoc' 18 | rdoc.title = 'RowsLogger' 19 | rdoc.options << '--line-numbers' << '--inline-source' 20 | rdoc.rdoc_files.include('README') 21 | rdoc.rdoc_files.include('lib/**/*.rb') 22 | end 23 | -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/lib/tasks/annotate_models.rake: -------------------------------------------------------------------------------- 1 | desc "Add schema information (as comments) to model and fixture files" 2 | task :annotate_models => :environment do 3 | require 'annotate/annotate_models' 4 | options={} 5 | options[:position_in_class] = ENV['position_in_class'] || ENV['position'] || :before 6 | options[:position_in_fixture] = ENV['position_in_fixture'] || ENV['position'] || :before 7 | AnnotateModels.do_annotations(options) 8 | end 9 | 10 | desc "Remove schema information from model and fixture files" 11 | task :remove_annotation => :environment do 12 | require 'annotate/annotate_models' 13 | AnnotateModels.remove_annotations 14 | end 15 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/resources/test/test_case_with_should_methods.rb: -------------------------------------------------------------------------------- 1 | $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib]) 2 | require 'test/unit' 3 | require 'spec' 4 | require 'spec/interop/test' 5 | 6 | class MyTest < Test::Unit::TestCase 7 | def should_pass_with_should 8 | 1.should == 1 9 | end 10 | 11 | def should_fail_with_should 12 | 1.should == 2 13 | end 14 | 15 | def should_pass_with_assert 16 | assert true 17 | end 18 | 19 | def should_fail_with_assert 20 | assert false 21 | end 22 | 23 | def test 24 | raise "This is not a real test" 25 | end 26 | 27 | def test_ify 28 | raise "This is a real test" 29 | end 30 | end -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/lib/hmac/sha2.rb: -------------------------------------------------------------------------------- 1 | require 'hmac/hmac' 2 | require 'digest/sha2' 3 | 4 | module HMAC 5 | class SHA256 < Base 6 | def initialize(key = nil) 7 | super(Digest::SHA256, 64, 32, key) 8 | end 9 | public_class_method :new, :digest, :hexdigest 10 | end 11 | 12 | class SHA384 < Base 13 | def initialize(key = nil) 14 | super(Digest::SHA384, 128, 48, key) 15 | end 16 | public_class_method :new, :digest, :hexdigest 17 | end 18 | 19 | class SHA512 < Base 20 | def initialize(key = nil) 21 | super(Digest::SHA512, 128, 64, key) 22 | end 23 | public_class_method :new, :digest, :hexdigest 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/pending_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | describe "pending example (using pending method)" do 4 | it %Q|should be reported as "PENDING: for some reason"| do 5 | pending("for some reason") 6 | end 7 | end 8 | 9 | describe "pending example (with no block)" do 10 | it %Q|should be reported as "PENDING: Not Yet Implemented"| 11 | end 12 | 13 | describe "pending example (with block for pending)" do 14 | it %Q|should have a failing block, passed to pending, reported as "PENDING: for some reason"| do 15 | pending("for some reason") do 16 | raise "some reason" 17 | end 18 | end 19 | end 20 | 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/interop/test_but_not_test_unit.feature: -------------------------------------------------------------------------------- 1 | Story: Test is defined, but not Test::Unit 2 | 3 | As an RSpec user who has my own library named Test (but not Test::Unit) 4 | I want to run examples without getting Test::Unit NameErrors 5 | 6 | Scenario: Run with ruby 7 | Given the file ../../resources/test/spec_including_test_but_not_unit.rb 8 | When I run it with the ruby interpreter 9 | Then the stderr should not match "Test::Unit" 10 | 11 | Scenario: Run with spec 12 | Given the file ../../resources/test/spec_including_test_but_not_unit.rb 13 | When I run it with the spec script 14 | Then the stderr should not match "Test::Unit" 15 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/config/boot.rb: -------------------------------------------------------------------------------- 1 | # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb 2 | 3 | unless defined?(RAILS_ROOT) 4 | root_path = File.join(File.dirname(__FILE__), '..') 5 | unless RUBY_PLATFORM =~ /mswin32/ 6 | require 'pathname' 7 | root_path = Pathname.new(root_path).cleanpath(true).to_s 8 | end 9 | RAILS_ROOT = root_path 10 | end 11 | 12 | if File.directory?("#{RAILS_ROOT}/vendor/rails") 13 | require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" 14 | else 15 | require 'rubygems' 16 | require 'initializer' 17 | end 18 | 19 | Rails::Initializer.run(:set_load_path) 20 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/autogenerated_docstrings_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | # Run spec w/ -fs to see the output of this file 4 | 5 | describe "Examples with no descriptions" do 6 | 7 | # description is auto-generated as "should equal(5)" based on the last #should 8 | specify do 9 | 3.should equal(3) 10 | 5.should equal(5) 11 | end 12 | 13 | specify { 3.should be < 5 } 14 | 15 | specify { ["a"].should include("a") } 16 | 17 | specify { [1,2,3].should respond_to(:size) } 18 | 19 | end 20 | 21 | describe "the number 1" do 22 | subject { 1 } 23 | it { should == 1 } 24 | it { should be < 2} 25 | end 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/extensions/action_controller/test_response.rb: -------------------------------------------------------------------------------- 1 | module ActionController #:nodoc: 2 | class TestResponse #:nodoc: 3 | attr_writer :controller_path 4 | 5 | def capture(name) 6 | template.instance_variable_get "@content_for_#{name.to_s}" 7 | end 8 | 9 | if ::Rails::VERSION::STRING < "2.3" 10 | def [](name) 11 | Kernel.warn <<-WARNING 12 | [](name) as an alias for capture(name) (TestResponse extension in rspec-rails) 13 | is deprecated and will be removed in the rspec-rails release that follows the 14 | rails-2.3.0 release. 15 | WARNING 16 | capture(name) 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/io_processor_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | require File.dirname(__FILE__) + '/io_processor' 3 | require 'stringio' 4 | 5 | describe "An IoProcessor" do 6 | before(:each) do 7 | @processor = IoProcessor.new 8 | end 9 | 10 | it "should raise nothing when the file is exactly 32 bytes" do 11 | lambda { 12 | @processor.process(StringIO.new("z"*32)) 13 | }.should_not raise_error 14 | end 15 | 16 | it "should raise an exception when the file length is less than 32 bytes" do 17 | lambda { 18 | @processor.process(StringIO.new("z"*31)) 19 | }.should raise_error(DataTooShort) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/example/subclassing_example_group_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | 3 | module Spec 4 | module Example 5 | class GrandParentExampleGroup < Spec::Example::ExampleGroup 6 | describe "Grandparent ExampleGroup" 7 | end 8 | 9 | class ParentExampleGroup < GrandParentExampleGroup 10 | describe "Parent ExampleGroup" 11 | it "should bar" do 12 | end 13 | end 14 | 15 | class ChildExampleGroup < ParentExampleGroup 16 | describe "Child ExampleGroup" 17 | it "should bam" do 18 | end 19 | end 20 | 21 | describe ChildExampleGroup do 22 | 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/matchers/be_close.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | 4 | # :call-seq: 5 | # should be_close(expected, delta) 6 | # should_not be_close(expected, delta) 7 | # 8 | # Passes if actual == expected +/- delta 9 | # 10 | # == Example 11 | # 12 | # result.should be_close(3.0, 0.5) 13 | def be_close(expected, delta) 14 | simple_matcher do |actual, matcher| 15 | matcher.failure_message = "expected #{expected} +/- (< #{delta}), got #{actual}" 16 | matcher.description = "be close to #{expected} (within +- #{delta})" 17 | (actual - expected).abs < delta 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/matchers/has.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | def has(sym, *args) # :nodoc: 4 | simple_matcher do |actual, matcher| 5 | matcher.failure_message = "expected ##{predicate(sym)}(#{args[0].inspect}) to return true, got false" 6 | matcher.negative_failure_message = "expected ##{predicate(sym)}(#{args[0].inspect}) to return false, got true" 7 | matcher.description = "have key #{args[0].inspect}" 8 | actual.__send__(predicate(sym), *args) 9 | end 10 | end 11 | 12 | private 13 | def predicate(sym) 14 | "#{sym.to_s.sub("have_","has_")}?".to_sym 15 | end 16 | 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_600_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module BugReport600 4 | class ExampleClass 5 | def self.method_that_uses_define_method 6 | define_method "defined_method" do |attributes| 7 | load_address(address, attributes) 8 | end 9 | end 10 | end 11 | 12 | describe "stubbing a class method" do 13 | it "should work" do 14 | ExampleClass.should_receive(:define_method).with("defined_method") 15 | ExampleClass.method_that_uses_define_method 16 | end 17 | 18 | it "should restore the original method" do 19 | ExampleClass.method_that_uses_define_method 20 | end 21 | end 22 | end -------------------------------------------------------------------------------- /vendor/gems/ctran-annotate-2.0.0/bin/annotate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'optparse' 4 | require 'annotate' 5 | 6 | task = :annotate_models 7 | 8 | OptionParser.new do |opts| 9 | opts.banner = "Usage: annotate [options]" 10 | opts.on('-d', '--delete') { task = :remove_annotation } 11 | opts.on('-p', '--position [before|after]', ['before', 'after']) { |p| ENV['position'] = p } 12 | opts.on('-r', '--routes') { task = :annotate_routes } 13 | opts.on('-v', '--version') { puts "Annotate v#{Annotate::VERSION}"; exit } 14 | end.parse! 15 | 16 | begin 17 | Rake::Task[task].invoke 18 | #TODO: rescue only rake error 19 | rescue NameError => e 20 | puts "Can`t find Rake. Are we in a Rails folder?" 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/stack.rb: -------------------------------------------------------------------------------- 1 | class StackUnderflowError < RuntimeError 2 | end 3 | 4 | class StackOverflowError < RuntimeError 5 | end 6 | 7 | class Stack 8 | 9 | def initialize 10 | @items = [] 11 | end 12 | 13 | def push object 14 | raise StackOverflowError if @items.length == 10 15 | @items.push object 16 | end 17 | 18 | def pop 19 | raise StackUnderflowError if @items.empty? 20 | @items.delete @items.last 21 | end 22 | 23 | def peek 24 | raise StackUnderflowError if @items.empty? 25 | @items.last 26 | end 27 | 28 | def empty? 29 | @items.empty? 30 | end 31 | 32 | def full? 33 | @items.length == 10 34 | end 35 | 36 | end 37 | -------------------------------------------------------------------------------- /app/controllers/admin/invite_actions_controller.rb: -------------------------------------------------------------------------------- 1 | class Admin::InviteActionsController < ApplicationController 2 | before_filter :login_required 3 | require_role :admin 4 | 5 | # Show users waiting for an invitation code 6 | def index 7 | @users = Invitation.pending_users(params[:page]) 8 | end 9 | 10 | # Add invitations to all users 11 | def create 12 | if !params[:add_invites].blank? 13 | User.add_to_invitation_limit(params[:add_invites].to_i) 14 | flash[:notice] = "Invitation limit updated." 15 | redirect_to admin_users_path 16 | else 17 | flash[:error] = "There was a problem updating the invitation limit." 18 | redirect_to admin_invites_path 19 | end 20 | end 21 | 22 | end 23 | 24 | -------------------------------------------------------------------------------- /app/controllers/user/invitations_controller.rb: -------------------------------------------------------------------------------- 1 | class User::InvitationsController < ApplicationController 2 | 3 | def new 4 | @invitation = Invitation.new 5 | end 6 | 7 | def create 8 | @invitation = Invitation.new(params[:invitation]) 9 | @invitation.sender = current_user 10 | if @invitation.save 11 | if logged_in? 12 | UserMailer.deliver_invitation(@invitation) 13 | flash[:notice] = "Thank you, invitation sent." 14 | redirect_to root_path 15 | else 16 | flash[:notice] = "Thank you, we will notify you when an invitation becomes available." 17 | redirect_to root_path 18 | end 19 | else 20 | render :action => 'new' 21 | end 22 | end 23 | 24 | end 25 | 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/example/helper_method_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | 3 | # This was added to prove that http://rspec.lighthouseapp.com/projects/5645/tickets/211 4 | # was fixed in ruby 1.9.1 5 | 6 | module HelperMethodExample 7 | describe "a helper method" do 8 | def helper_method 9 | "received call" 10 | end 11 | 12 | it "is available to examples in the same group" do 13 | helper_method.should == "received call" 14 | end 15 | 16 | describe "from a nested group" do 17 | it "is available to examples in a nested group" do 18 | helper_method.should == "received call" 19 | end 20 | end 21 | 22 | end 23 | end 24 | 25 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/formatter/base_text_formatter_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../spec_helper' 2 | require 'spec/runner/formatter/base_text_formatter' 3 | require 'fileutils' 4 | 5 | module Spec 6 | module Runner 7 | module Formatter 8 | describe BaseTextFormatter do 9 | 10 | before :all do 11 | @sandbox = "spec/sandbox" 12 | end 13 | 14 | it "should create the directory contained in WHERE if it does not exist" do 15 | FileUtils.should_receive(:mkdir_p).with(@sandbox) 16 | File.stub!(:open) 17 | BaseTextFormatter.new({},"#{@sandbox}/temp.rb") 18 | end 19 | 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/openid_1_and_2_xrds_bad_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | http://specs.openid.net/auth/2.0/signon 10 | http://openid.net/signon/1.0 11 | http://openid.net/signon/1.1 12 | http://www.myopenid.com/server 13 | http://smoker.myopenid.com/ 14 | http://localid.mismatch.invalid/ 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/views/user/openid_accounts/new.html.erb: -------------------------------------------------------------------------------- 1 |

Sign up as a new OpenID user

2 | 3 | <%= error_messages_for :user %> 4 | <% form_for :user, :url => user_openid_accounts_path, :builder => Uberkit::Forms::Builder do |f| -%> 5 | <%= f.hidden_field :identity_url %> 6 | <%= f.hidden_field :invitation_token %> 7 | <%= f.text_field :name, :help => "*optional" %> 8 | <%= f.text_field :login, :label => "Username" %> 9 | <% if in_beta? -%> 10 | <%= f.text_field :email, 11 | :help => "*email should match the one your invitation code was sent to, or you will have to activate your account" %> 12 | <% else -%> 13 | <%= f.text_field :email %> 14 | <% end -%> 15 | <%= f.submit 'Sign up' %> 16 | <% end -%> 17 | 18 | -------------------------------------------------------------------------------- /db/migrate/20080805045812_add_open_id_authentication_tables.rb: -------------------------------------------------------------------------------- 1 | class AddOpenIdAuthenticationTables < ActiveRecord::Migration 2 | def self.up 3 | create_table :open_id_authentication_associations, :force => true do |t| 4 | t.integer :issued, :lifetime 5 | t.string :handle, :assoc_type 6 | t.binary :server_url, :secret 7 | end 8 | 9 | create_table :open_id_authentication_nonces, :force => true do |t| 10 | t.integer :timestamp, :null => false 11 | t.string :server_url, :null => true 12 | t.string :salt, :null => false 13 | end 14 | end 15 | 16 | def self.down 17 | drop_table :open_id_authentication_associations 18 | drop_table :open_id_authentication_nonces 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_default_values.rb: -------------------------------------------------------------------------------- 1 | module Rails 2 | module Generator 3 | class GeneratedAttribute 4 | def default_value 5 | @default_value ||= case type 6 | when :int, :integer then "1" 7 | when :float then "1.5" 8 | when :decimal then "9.99" 9 | when :datetime, :timestamp, :time then "Time.now" 10 | when :date then "Date.today" 11 | when :string, :text then "\"value for #{@name}\"" 12 | when :boolean then "false" 13 | else 14 | "" 15 | end 16 | end 17 | end 18 | end 19 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/example/predicate_matcher_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | 3 | module Spec 4 | module Example 5 | class Fish 6 | def can_swim?(distance_in_yards) 7 | distance_in_yards < 1000 8 | end 9 | end 10 | 11 | describe "predicate_matcher[method_on_object] = matcher_method" do 12 | predicate_matchers[:swim] = :can_swim? 13 | it "should match matcher_method if method_on_object returns true" do 14 | swim(100).matches?(Fish.new).should be_true 15 | end 16 | it "should not match matcher_method if method_on_object returns false" do 17 | swim(10000).matches?(Fish.new).should be_false 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/formatter/snippet_extractor_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../../spec_helper.rb' 2 | require 'spec/runner/formatter/snippet_extractor' 3 | 4 | module Spec 5 | module Runner 6 | module Formatter 7 | describe SnippetExtractor do 8 | it "should fall back on a default message when it doesn't understand a line" do 9 | SnippetExtractor.new.snippet_for("blech").should == ["# Couldn't get snippet for blech", 1] 10 | end 11 | 12 | it "should fall back on a default message when it doesn't find the file" do 13 | SnippetExtractor.new.lines_around("blech", 8).should == "# Couldn't get snippet for blech" 14 | end 15 | end 16 | end 17 | end 18 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/extensions/action_controller/rescue.rb: -------------------------------------------------------------------------------- 1 | module ActionController 2 | module Rescue 3 | def use_rails_error_handling! 4 | @use_rails_error_handling = true 5 | end 6 | 7 | def use_rails_error_handling? 8 | @use_rails_error_handling ||= false 9 | end 10 | 11 | protected 12 | 13 | def rescue_action_with_fast_errors(exception) 14 | unless respond_to?(:rescue_with_handler) and rescue_with_handler(exception) 15 | if use_rails_error_handling? 16 | rescue_action_without_fast_errors exception 17 | else 18 | raise exception 19 | end 20 | end 21 | end 22 | alias_method_chain :rescue_action, :fast_errors 23 | 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /config/initializers/new_rails_defaults.rb: -------------------------------------------------------------------------------- 1 | # These settings change the behavior of Rails 2 apps and will be defaults 2 | # for Rails 3. You can remove this initializer when Rails 3 is released. 3 | 4 | # Include Active Record class name as root for JSON serialized output. 5 | ActiveRecord::Base.include_root_in_json = true 6 | 7 | # Store the full class name (including module namespace) in STI type column. 8 | ActiveRecord::Base.store_full_sti_class = true 9 | 10 | # Use ISO 8601 format for JSON serialized times and dates. 11 | ActiveSupport.use_standard_json_time_format = true 12 | 13 | # Don't escape HTML entities in JSON, leave that for the #json_escape helper. 14 | # if you're including raw json in an HTML page. 15 | ActiveSupport.escape_html_entities_in_json = false -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/multi_threaded_example_group_runner.rb: -------------------------------------------------------------------------------- 1 | class MultiThreadedExampleGroupRunner < Spec::Runner::ExampleGroupRunner 2 | def initialize(options, arg) 3 | super(options) 4 | # configure these 5 | @thread_count = 4 6 | @thread_wait = 0 7 | end 8 | 9 | def run 10 | @threads = [] 11 | q = Queue.new 12 | example_groups.each { |b| q << b} 13 | success = true 14 | @thread_count.times do 15 | @threads << Thread.new(q) do |queue| 16 | while not queue.empty? 17 | example_group = queue.pop 18 | success &= example_group.suite.run(nil) 19 | end 20 | end 21 | sleep @thread_wait 22 | end 23 | @threads.each {|t| t.join} 24 | success 25 | end 26 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/example_groups/nested_groups.feature: -------------------------------------------------------------------------------- 1 | Feature: Nested example groups 2 | 3 | As an RSpec user 4 | I want to nest examples groups 5 | So that I can better organize my examples 6 | 7 | Scenario: Run with ruby 8 | Given the file ../../examples/passing/stack_spec_with_nested_example_groups.rb 9 | When I run it with the ruby interpreter -fs 10 | Then the stdout should match /Stack \(empty\)/ 11 | And the stdout should match /Stack \(full\)/ 12 | 13 | Scenario: Run with spec 14 | Given the file ../../examples/passing/stack_spec_with_nested_example_groups.rb 15 | When I run it with the spec script -fs 16 | Then the stdout should match /Stack \(empty\)/ 17 | And the stdout should match /Stack \(full\)/ 18 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/support/env.rb: -------------------------------------------------------------------------------- 1 | require 'tempfile' 2 | require File.dirname(__FILE__) + '/../../spec/ruby_forker' 3 | require File.dirname(__FILE__) + '/matchers/smart_match' 4 | 5 | $:.push File.join(File.dirname(__FILE__), "/../../lib") 6 | require 'spec/expectations' 7 | require 'spec/matchers' 8 | 9 | module RspecWorld 10 | include Spec::Expectations 11 | include Spec::Matchers 12 | include RubyForker 13 | 14 | def spec(args, stderr) 15 | ruby("#{File.dirname(__FILE__) + '/../../bin/spec'} #{args}", stderr) 16 | end 17 | 18 | def cmdline(args, stderr) 19 | ruby("#{File.dirname(__FILE__) + '/helpers/cmdline.rb'} #{args}", stderr) 20 | end 21 | end 22 | 23 | World do |world| 24 | world.extend(RspecWorld) 25 | world 26 | end 27 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/lib/openid/yadis/constants.rb: -------------------------------------------------------------------------------- 1 | 2 | require 'openid/yadis/accept' 3 | 4 | module OpenID 5 | 6 | module Yadis 7 | 8 | YADIS_HEADER_NAME = 'X-XRDS-Location' 9 | YADIS_CONTENT_TYPE = 'application/xrds+xml' 10 | 11 | # A value suitable for using as an accept header when performing 12 | # YADIS discovery, unless the application has special requirements 13 | YADIS_ACCEPT_HEADER = generate_accept_header( 14 | ['text/html', 0.3], 15 | ['application/xhtml+xml', 0.5], 16 | [YADIS_CONTENT_TYPE, 1.0] 17 | ) 18 | 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_8302_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module Bug8302 4 | class Foo 5 | def Foo.class_method(arg) 6 | end 7 | 8 | def instance_bar(arg) 9 | end 10 | end 11 | 12 | describe "Bug report 8302:" do 13 | it "class method is not restored correctly when proxied" do 14 | Foo.should_not_receive(:class_method).with(Array.new) 15 | Foo.rspec_verify 16 | Foo.class_method(Array.new) 17 | end 18 | 19 | it "instance method is not restored correctly when proxied" do 20 | foo = Foo.new 21 | foo.should_not_receive(:instance_bar).with(Array.new) 22 | foo.rspec_verify 23 | foo.instance_bar(Array.new) 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/spec/eager_spec.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), *%w[abstract_spec]) 2 | 3 | describe "Eager scope" do 4 | 5 | before do 6 | uses_fixture(:article) 7 | end 8 | 9 | it "should provide eager loading of a single association" do 10 | Article.with(:comments).proxy_options.should == {:include => [:comments] } 11 | end 12 | 13 | it "should provide eager loading of a multiple associations" do 14 | Article.with(:comments, :contributors).proxy_options.should == {:include => [:comments, :contributors] } 15 | end 16 | 17 | it "should provider eager loading of nested associations" do 18 | Article.with(:comments => :author).proxy_options.should == {:include => [ {:comments => :author} ] } 19 | end 20 | end -------------------------------------------------------------------------------- /app/controllers/admin/states_controller.rb: -------------------------------------------------------------------------------- 1 | class Admin::StatesController < ApplicationController 2 | before_filter :login_required 3 | require_role :admin 4 | 5 | def update 6 | @user = User.find_by_login(params[:id]) 7 | if @user.update_attribute(:enabled, true) 8 | flash[:notice] = "User enabled." 9 | else 10 | flash[:error] = "There was a problem enabling this user." 11 | end 12 | redirect_to admin_users_path 13 | end 14 | 15 | def destroy 16 | @user = User.find_by_login(params[:id]) 17 | if @user.update_attribute(:enabled, false) 18 | flash[:notice] = "User disabled." 19 | else 20 | flash[:error] = "There was a problem disabling this user." 21 | end 22 | redirect_to admin_users_path 23 | end 24 | 25 | end 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/runner/drb_command_line.rb: -------------------------------------------------------------------------------- 1 | require "drb/drb" 2 | 3 | module Spec 4 | module Runner 5 | # Facade to run specs by connecting to a DRB server 6 | class DrbCommandLine 7 | # Runs specs on a DRB server. Note that this API is similar to that of 8 | # CommandLine - making it possible for clients to use both interchangeably. 9 | def self.run(options) 10 | begin 11 | DRb.start_service 12 | spec_server = DRbObject.new_with_uri("druby://127.0.0.1:8989") 13 | spec_server.run(options.argv, options.error_stream, options.output_stream) 14 | rescue DRb::DRbConnError => e 15 | options.error_stream.puts "No server is running" 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/runner/heckler_spec.rb: -------------------------------------------------------------------------------- 1 | unless Spec::Ruby.version.to_f == 1.9 2 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 3 | unless [/mswin/, /java/].detect{|p| p =~ RUBY_PLATFORM} 4 | require 'spec/runner/heckle_runner' 5 | 6 | describe "Heckler" do 7 | it "should run examples on tests_pass?" do 8 | sub = Class.new(Spec::Runner::Heckler) do 9 | def initialize(klass_name, method_name, rspec_options) 10 | @rspec_options = rspec_options 11 | end 12 | end 13 | opts = mock('options') 14 | opts.should_receive(:run_examples).and_return(true) 15 | heckler = sub.new('klass','method',opts) 16 | heckler.tests_pass? 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/lib/openid.rb: -------------------------------------------------------------------------------- 1 | # Copyright 2006-2007 JanRain, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You may 5 | # obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | 15 | module OpenID 16 | VERSION = "2.1.2" 17 | end 18 | 19 | require "openid/consumer" 20 | require 'openid/server' 21 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_2entries_idp.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | =!1000 8 | 9 | 10 | http://specs.openid.net/auth/2.0/signon 11 | http://www.myopenid.com/server 12 | http://smoker.myopenid.com/ 13 | 14 | 15 | 16 | http://specs.openid.net/auth/2.0/server 17 | http://www.livejournal.com/openid/server.bml 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_10263_spec.rb: -------------------------------------------------------------------------------- 1 | describe "Mock" do 2 | before do 3 | @mock = mock("test mock") 4 | end 5 | 6 | specify "when one example has an expectation (non-mock) inside the block passed to the mock" do 7 | @mock.should_receive(:msg) do |b| 8 | b.should be_true #this call exposes the problem 9 | end 10 | @mock.msg(false) rescue nil 11 | end 12 | 13 | specify "then the next example should behave as expected instead of saying" do 14 | @mock.should_receive(:foobar) 15 | @mock.foobar 16 | @mock.rspec_verify 17 | begin 18 | @mock.foobar 19 | rescue Exception => e 20 | e.message.should == "Mock 'test mock' received unexpected message :foobar with (no args)" 21 | end 22 | end 23 | end 24 | 25 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/package/bin_spec_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper' 2 | require File.dirname(__FILE__) + '/../../ruby_forker' 3 | 4 | describe "The bin/spec script" do 5 | include RubyForker 6 | 7 | it "should have no warnings" do 8 | pending "Hangs on JRuby" if PLATFORM =~ /java/ 9 | spec_path = "#{File.dirname(__FILE__)}/../../../bin/spec" 10 | 11 | output = ruby "-w #{spec_path} --help 2>&1" 12 | output.should_not =~ /warning/n 13 | end 14 | 15 | it "should show the help w/ no args" do 16 | pending "Hangs on JRuby" if PLATFORM =~ /java/ 17 | spec_path = "#{File.dirname(__FILE__)}/../../../bin/spec" 18 | 19 | output = ruby "-w #{spec_path} 2>&1" 20 | output.should =~ /^Usage: spec/ 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/TODO.txt: -------------------------------------------------------------------------------- 1 | == Refactoring 2 | 3 | Refactoring for 1.2.0 4 | 5 | * eliminate dependency from Spec::Example to Spec::Runner 6 | ** global predictate matchers should be stored in run_options 7 | * eliminate dependency on global options and configuration 8 | ** the only place they should exist is in the Runner, which should manage them 9 | 10 | == Future 11 | 12 | * do SOMETHING with the website 13 | * extract spec/story to rspec-stories (new gem) 14 | * rename top level namespace to Rspec and commands to 'rspec' and 'autorspec' 15 | * continue to support Spec 'spec' and 'autospec' as aliases for a reasonable time 16 | * separate the underlying framework from the DSL 17 | * be able to do everything with classes and methods 18 | * tweak raise_error rdoc to show only one arg 19 | -------------------------------------------------------------------------------- /stories/rest_auth_stories.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV["RAILS_ENV"] = "test" 3 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") 4 | require 'spec/rails/story_adapter' 5 | require 'spec/story' 6 | require File.expand_path(File.dirname(__FILE__) + "/rest_auth_stories_helper.rb") 7 | 8 | # Make visible for testing 9 | ApplicationController.send(:public, :logged_in?, :current_user, :authorized?) 10 | 11 | this_dir = File.dirname(__FILE__) 12 | Dir[File.join(this_dir, "steps/*.rb")].each do |file| 13 | puts file.to_s 14 | require file 15 | end 16 | 17 | with_steps_for :ra_navigation, :ra_response, :ra_resource, :user do 18 | story_files = Dir[File.join(this_dir, "users", '*.story')] 19 | story_files.each do |file| 20 | run file, :type => RailsStory 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/mocks/bug_report_7805_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module Bug7805 4 | #This is really a duplicate of 8302 5 | 6 | describe "Stubs should correctly restore module methods" do 7 | it "1 - stub the open method" do 8 | File.stub!(:open).and_return("something") 9 | File.open.should == "something" 10 | end 11 | it "2 - use File.open to create example.txt" do 12 | filename = "#{File.dirname(__FILE__)}/example-#{Time.new.to_i}.txt" 13 | File.exist?(filename).should be_false 14 | file = File.open(filename,'w') 15 | file.close 16 | File.exist?(filename).should be_true 17 | File.delete(filename) 18 | File.exist?(filename).should be_false 19 | end 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_model/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | The rspec_model generator creates stubs for a new model. 3 | 4 | The generator takes a model name as its argument. The model name may be 5 | given in CamelCase or under_score and should not be suffixed with 'Model'. 6 | 7 | The generator creates a model class in app/models, an RSpec spec in 8 | spec/models, database fixtures in spec/fixtures/plural_name.yml, and a migration 9 | in db/migrate. 10 | 11 | Example: 12 | ./script/generate rspec_model Account 13 | 14 | This will create an Account model: 15 | Model: app/models/account.rb 16 | Spec: spec/models/account_spec.rb 17 | Fixtures: spec/fixtures/accounts.yml 18 | Migration: db/migrate/XXX_add_accounts.rb 19 | -------------------------------------------------------------------------------- /app/controllers/admin/roles_controller.rb: -------------------------------------------------------------------------------- 1 | class Admin::RolesController < ApplicationController 2 | before_filter :login_required 3 | require_role :admin 4 | 5 | def index 6 | @user = User.find_by_login(params[:user_id], :include => :roles) 7 | @roles = Role.find(:all, :order => :name) 8 | end 9 | 10 | def update 11 | @user = User.find_by_login(params[:user_id]) 12 | @roles = (Role.find(params[:user][:role_ids]) if params[:user][:role_ids]) 13 | @user.roles = (@roles || []) 14 | if @user.save 15 | flash[:notice] = "User roles were successfully updated." 16 | redirect_to admin_user_roles_path(@user) 17 | else 18 | flash[:error] = 'There was a problem updating the roles for this user.' 19 | redirect_to admin_user_roles_path(@user) 20 | end 21 | end 22 | 23 | end 24 | 25 | -------------------------------------------------------------------------------- /app/controllers/user/activations_controller.rb: -------------------------------------------------------------------------------- 1 | class User::ActivationsController < ApplicationController 2 | before_filter :login_prohibited 3 | 4 | def activate 5 | logout_keeping_session! 6 | User.find_with_activation_code(params[:activation_code]) do |error, message, path| 7 | flash[:error_item] = ["request a new activation code", resend_activation_path] 8 | flash[error] = message 9 | redirect_to send(path) 10 | end 11 | end 12 | 13 | # Enter email address to resend activation 14 | def new 15 | end 16 | 17 | # Resend activation action 18 | def create 19 | User.send_new_activation_code(params[:email]) do |error, message, path| 20 | flash[:error_item] = ["contact us", contact_site] 21 | flash[error] = message 22 | redirect_to send(path) 23 | end 24 | end 25 | 26 | end 27 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/matchers/match.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Matchers 3 | 4 | # :call-seq: 5 | # should match(regexp) 6 | # should_not match(regexp) 7 | # 8 | # Given a Regexp, passes if actual =~ regexp 9 | # 10 | # == Examples 11 | # 12 | # email.should match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) 13 | def match(regexp) 14 | simple_matcher do |actual, matcher| 15 | matcher.failure_message = "expected #{actual.inspect} to match #{regexp.inspect}", regexp, actual 16 | matcher.negative_failure_message = "expected #{actual.inspect} not to match #{regexp.inspect}", regexp, actual 17 | matcher.description = "match #{regexp.inspect}" 18 | actual =~ regexp 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/spec_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../spec_helper.rb' 2 | 3 | describe Spec::Runner, "#exit?" do 4 | describe "when ::Test is absent during loading but present when running exit?" do 5 | # believe it or not, this can happen when ActiveSupport is loaded after RSpec is, 6 | # since it loads active_support/core_ext/test/unit/assertions.rb which defines 7 | # Test::Unit but doesn't actually load test/unit 8 | 9 | before(:each) do 10 | Object.const_set(:Test, Module.new) 11 | end 12 | 13 | it "does not attempt to access the non-loaded test/unit library" do 14 | lambda { Spec::Runner.exit? }.should_not raise_error 15 | end 16 | 17 | after(:each) do 18 | Object.send(:remove_const, :Test) 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/generators/rspec_controller/templates/controller_spec.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') 2 | 3 | describe <%= class_name %>Controller do 4 | 5 | <% if actions.empty? -%> 6 | #Delete this example and add some real ones 7 | <% else -%> 8 | #Delete these examples and add some real ones 9 | <% end -%> 10 | it "should use <%= class_name %>Controller" do 11 | controller.should be_an_instance_of(<%= class_name %>Controller) 12 | end 13 | 14 | <% unless actions.empty? -%> 15 | <% for action in actions -%> 16 | 17 | describe "GET '<%= action %>'" do 18 | it "should be successful" do 19 | get '<%= action %>' 20 | response.should be_success 21 | end 22 | end 23 | <% end -%> 24 | <% end -%> 25 | end 26 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/lib/utility_scopes/limited.rb: -------------------------------------------------------------------------------- 1 | module UtilityScopes 2 | module Limited 3 | 4 | def self.included(within) 5 | 6 | within.class_eval do 7 | 8 | # Provide default limit scope (can be overridden 9 | # if default_limit is called) 10 | named_scope :limited, lambda { |*num| 11 | { :limit => num.flatten.first || (defined?(per_page) ? per_page : 10) } 12 | } 13 | 14 | extend ClassMethods 15 | end 16 | end 17 | 18 | module ClassMethods 19 | 20 | # Set the default limit to use for the limit scope 21 | def default_limit(default) 22 | named_scope :limited, lambda { |*num| { :limit => num.flatten.first || default } } 23 | end 24 | end 25 | end 26 | end -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | # Settings specified here will take precedence over those in config/environment.rb 2 | 3 | # In the development environment your application's code is reloaded on 4 | # every request. This slows down response time but is perfect for development 5 | # since you don't have to restart the webserver when you make code changes. 6 | config.cache_classes = false 7 | 8 | # Log error messages when you accidentally call methods on nil. 9 | config.whiny_nils = true 10 | 11 | # Show full error reports and disable caching 12 | config.action_controller.consider_all_requests_local = true 13 | config.action_view.debug_rjs = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send 17 | config.action_mailer.raise_delivery_errors = false -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/mocks/order_group.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Mocks 3 | class OrderGroup 4 | def initialize error_generator 5 | @error_generator = error_generator 6 | @ordering = Array.new 7 | end 8 | 9 | def register(expectation) 10 | @ordering << expectation 11 | end 12 | 13 | def ready_for?(expectation) 14 | return @ordering.first == expectation 15 | end 16 | 17 | def consume 18 | @ordering.shift 19 | end 20 | 21 | def handle_order_constraint expectation 22 | return unless @ordering.include? expectation 23 | return consume if ready_for?(expectation) 24 | @error_generator.raise_out_of_order_error expectation.sym 25 | end 26 | 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/CHANGELOG: -------------------------------------------------------------------------------- 1 | 0.2.2 2 | 3 | * More flexible @ordered@ syntax (by jney - http://github.com/jney) 4 | 5 | 0.2.1 6 | 7 | * Fixed except named scope not correctly determining its base class 8 | (as reported by Marcus Crafter: http://github.com/crafterm) 9 | 10 | 0.2.0 11 | 12 | * Added except scope from danielmorrison (http://github.com/danielmorrison) 13 | 14 | Article.except(1, 2, 3) # Get all articles whose id is NOT 1, 2 or 3 15 | Article.except(@article) # Get all articles except the given one 16 | Article.except(Article.published) # Get all UN-published articles (poor example 17 | # since it executes full "published" query first) 18 | 19 | 0.1.0 20 | 21 | * Initial release with limit, with (eager loading) and ordered scopes. -------------------------------------------------------------------------------- /app/views/user/passwords/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Reset your password

2 | <% form_for "password", :url => user_password_url(params[:id]), 3 | :html => { :method => :put } do |f| -%> 4 | <%= hidden_field_tag :reset_code, params[:id] %> 5 | 6 |
7 |
10 | 11 |
12 | 13 | <%= password_field_tag :password_confirmation %>
14 |
15 | 16 | <% if_recaptcha? do %> 17 |
18 | 19 | <%= recaptcha_tags %>
20 |
21 | <% end %> 22 | 23 | <%= f.submit "Reset Your Password" %> 24 | <% end -%> 25 | 26 | 27 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/predicate_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | class BddFramework 4 | def intuitive? 5 | true 6 | end 7 | 8 | def adopted_quickly? 9 | #this will cause failures because it reallly SHOULD be adopted quickly 10 | false 11 | end 12 | end 13 | 14 | describe "BDD framework" do 15 | 16 | before(:each) do 17 | @bdd_framework = BddFramework.new 18 | end 19 | 20 | it "should be adopted quickly" do 21 | #this will fail because it reallly SHOULD be adopted quickly 22 | @bdd_framework.should be_adopted_quickly 23 | end 24 | 25 | it "should be intuitive" do 26 | @bdd_framework.should be_intuitive 27 | end 28 | 29 | it "should not respond to test" do 30 | #this will fail 31 | @bdd_framework.test 32 | end 33 | 34 | end 35 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/greeter_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | # greeter.rb 3 | # 4 | # Based on http://glu.ttono.us/articles/2006/12/19/tormenting-your-tests-with-heckle 5 | # 6 | # Run with: 7 | # 8 | # spec greeter_spec.rb --heckle Greeter 9 | # 10 | class Greeter 11 | def initialize(person = nil) 12 | @person = person 13 | end 14 | 15 | def greet 16 | @person.nil? ? "Hi there!" : "Hi #{@person}!" 17 | end 18 | end 19 | 20 | describe "Greeter" do 21 | it "should say Hi to person" do 22 | greeter = Greeter.new("Kevin") 23 | greeter.greet.should == "Hi Kevin!" 24 | end 25 | 26 | it "should say Hi to nobody" do 27 | greeter = Greeter.new 28 | # Uncomment the next line to make Heckle happy 29 | #greeter.greet.should == "Hi there!" 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /vendor/gems/yfactorial-utility_scopes-0.2.2/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rake' 3 | require 'rake/rdoctask' 4 | require 'spec/rake/spectask' 5 | 6 | desc 'Run the specs' 7 | Spec::Rake::SpecTask.new(:spec) do |t| 8 | t.spec_opts = ['--colour --format progress --loadby mtime --reverse'] 9 | t.spec_files = FileList['spec/**/*_spec.rb'] 10 | end 11 | 12 | desc 'Generate RDoc documentation.' 13 | Rake::RDocTask.new(:rdoc) do |rdoc| 14 | rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'Rakefile'). 15 | include('lib/**/*.rb') 16 | 17 | rdoc.main = "README.rdoc" 18 | rdoc.title = "utility_scopes documentation" 19 | 20 | rdoc.rdoc_dir = 'doc' # rdoc output folder 21 | rdoc.options << '--inline-source' << '--charset=UTF-8' 22 | rdoc.options << '--webcvs=http://github.com/yfactorial/utility_scopes/tree/master/' 23 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/example/cookies_proxy.rb: -------------------------------------------------------------------------------- 1 | require 'action_controller/cookies' 2 | 3 | module Spec 4 | module Rails 5 | module Example 6 | class CookiesProxy 7 | def initialize(example) 8 | @example = example 9 | end 10 | 11 | def[]=(name, value) 12 | if ::Rails::VERSION::STRING >= '2.3' 13 | @example.request.cookies[name.to_s] = value 14 | else 15 | @example.request.cookies[name.to_s] = CGI::Cookie.new(name.to_s, value) 16 | end 17 | end 18 | 19 | def [](name) 20 | @example.response.cookies[name.to_s] 21 | end 22 | 23 | def delete(name) 24 | @example.response.cookies.delete(name.to_s) 25 | end 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/spec/resources/controllers/render_spec_controller.rb: -------------------------------------------------------------------------------- 1 | class RenderSpecController < ApplicationController 2 | set_view_path File.join(File.dirname(__FILE__), "..", "views") 3 | 4 | def some_action 5 | respond_to do |format| 6 | format.html 7 | format.js 8 | end 9 | end 10 | 11 | def action_which_renders_template_from_other_controller 12 | render :template => 'controller_spec/action_with_template' 13 | end 14 | 15 | def text_action 16 | render :text => "this is the text for this action" 17 | end 18 | 19 | def action_with_partial 20 | render :partial => "a_partial" 21 | end 22 | 23 | def action_that_renders_nothing 24 | render :nothing => true 25 | end 26 | 27 | def action_with_alternate_layout 28 | render :layout => 'simple' 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_discover/yadis_2entries_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | =!1000 8 | 9 | 10 | http://openid.net/signon/1.0 11 | http://www.myopenid.com/server 12 | http://smoker.myopenid.com/ 13 | 14 | 15 | 16 | http://openid.net/signon/1.0 17 | http://www.livejournal.com/openid/server.bml 18 | http://frank.livejournal.com/ 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/spoof1.xrds: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | *keturn 5 | xri://= 6 | !E4 7 | =!E4 8 | 9 | 10 | xri://$res*auth*($v*2.0) 11 | http://keturn.example.com/resolve/ 12 | =!E4 13 | 14 | 15 | 16 | *isDrummond 17 | =!E4 18 | !D2 19 | =!D2 20 | 21 | http://openid.net/signon/1.0 22 | http://keturn.example.com/openid 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/views/user/password_settings/index.html.erb: -------------------------------------------------------------------------------- 1 |

Change your password

2 | 3 | <% form_tag url_for(:action => 'create') do %> 4 | 5 |
6 | 7 | <%= password_field_tag 'old_password', @old_password, :size => 45 %>
8 |
9 | 10 |
11 | 12 | <%= password_field_tag 'password', {}, :size => 45 %> 13 | Between 6 and 40 characters
14 |
15 | 16 |
17 | 18 | <%= password_field_tag 'password_confirmation', {}, :size => 45 %>
19 |
20 | 21 | <%= submit_tag 'Change Password' %> 22 | <% end %> 23 | 24 | 25 | -------------------------------------------------------------------------------- /vendor/gems/rspec-rails-1.1.12/lib/spec/rails/example/rails_example_group.rb: -------------------------------------------------------------------------------- 1 | require 'spec/interop/test' 2 | 3 | if ActionView::Base.respond_to?(:cache_template_extension) 4 | ActionView::Base.cache_template_extensions = false 5 | end 6 | 7 | module Spec 8 | module Rails 9 | 10 | module Example 11 | if ActiveSupport.const_defined?(:TestCase) 12 | class RailsExampleGroup < ActiveSupport::TestCase 13 | include ActionController::Assertions::SelectorAssertions 14 | end 15 | else 16 | class RailsExampleGroup < Test::Unit::TestCase 17 | end 18 | end 19 | 20 | class RailsExampleGroup 21 | include Spec::Rails::Matchers 22 | include Spec::Rails::Mocks 23 | Spec::Example::ExampleGroupFactory.default(self) 24 | end 25 | 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/test/data/test_xrds/spoof2.xrds: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | *keturn 5 | xri://= 6 | !E4 7 | =!E4 8 | 9 | 10 | xri://$res*auth*($v*2.0) 11 | http://keturn.example.com/resolve/ 12 | xri://= 13 | 14 | 15 | 16 | *isDrummond 17 | xri://= 18 | !D2 19 | =!D2 20 | 21 | http://openid.net/signon/1.0 22 | http://keturn.example.com/openid 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/mocking_with_mocha.rb: -------------------------------------------------------------------------------- 1 | # stub frameworks like to gum up Object, so this is deliberately 2 | # set NOT to run so that you don't accidentally run it when you 3 | # run this dir. 4 | 5 | # To run it, stand in this directory and say: 6 | # 7 | # RUN_MOCHA_EXAMPLE=true ruby ../bin/spec mocking_with_mocha.rb 8 | 9 | if ENV['RUN_MOCHA_EXAMPLE'] 10 | Spec::Runner.configure do |config| 11 | config.mock_with :mocha 12 | end 13 | describe "Mocha framework" do 14 | it "should should be made available by saying config.mock_with :mocha" do 15 | m = mock() 16 | m.expects(:msg).with("arg") 17 | m.msg 18 | end 19 | it "should should be made available by saying config.mock_with :mocha" do 20 | o = Object.new 21 | o.expects(:msg).with("arg") 22 | o.msg 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/mocking_with_rr.rb: -------------------------------------------------------------------------------- 1 | # stub frameworks like to gum up Object, so this is deliberately 2 | # set NOT to run so that you don't accidentally run it when you 3 | # run this dir. 4 | 5 | # To run it, stand in this directory and say: 6 | # 7 | # RUN_RR_EXAMPLE=true ruby ../bin/spec mocking_with_rr.rb 8 | 9 | if ENV['RUN_RR_EXAMPLE'] 10 | Spec::Runner.configure do |config| 11 | config.mock_with :rr 12 | end 13 | describe "RR framework" do 14 | it "should should be made available by saying config.mock_with :rr" do 15 | o = Object.new 16 | mock(o).msg("arg") 17 | o.msg 18 | end 19 | it "should should be made available by saying config.mock_with :rr" do 20 | o = Object.new 21 | mock(o) do |m| 22 | m.msg("arg") 23 | end 24 | o.msg 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/example_groups/example_group_with_should_methods.feature: -------------------------------------------------------------------------------- 1 | Feature: Spec::ExampleGroup with should methods 2 | 3 | As an RSpec adopter accustomed to classes and methods 4 | I want to use should_* methods in an ExampleGroup 5 | So that I use RSpec with classes and methods that look more like RSpec examples 6 | 7 | Scenario: Run with ruby 8 | Given the file ../../resources/spec/example_group_with_should_methods.rb 9 | When I run it with the ruby interpreter 10 | Then the exit code should be 256 11 | And the stdout should match "2 examples, 1 failure" 12 | 13 | Scenario: Run with spec 14 | Given the file ../../resources/spec/example_group_with_should_methods.rb 15 | When I run it with the spec script 16 | Then the exit code should be 256 17 | And the stdout should match "2 examples, 1 failure" 18 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/expectations/wrap_expectation_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../../spec_helper.rb' 2 | 3 | module Spec 4 | module Matchers 5 | describe "wrap_expectation" do 6 | 7 | def stub_matcher 8 | @_stub_matcher ||= simple_matcher do 9 | end 10 | end 11 | 12 | def failing_matcher 13 | @_failing_matcher ||= simple_matcher do 14 | 1.should == 2 15 | end 16 | end 17 | 18 | it "should return true if there is no error" do 19 | wrap_expectation stub_matcher do 20 | end.should be_true 21 | end 22 | 23 | it "should return false if there is an error" do 24 | wrap_expectation failing_matcher do 25 | raise "error" 26 | end.should be_false 27 | end 28 | end 29 | end 30 | end -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/features/interop/test_case_with_should_methods.feature: -------------------------------------------------------------------------------- 1 | Story: Test::Unit::TestCase extended by rspec with should methods 2 | 3 | As an RSpec adopter with existing Test::Unit tests 4 | I want to use should_* methods in a Test::Unit::TestCase 5 | So that I use RSpec with classes and methods that look more like RSpec examples 6 | 7 | Scenario: Run with ruby 8 | Given the file ../../resources/test/test_case_with_should_methods.rb 9 | When I run it with the ruby interpreter 10 | Then the exit code should be 256 11 | And the stdout should match "5 examples, 3 failures" 12 | 13 | Scenario: Run with spec 14 | Given the file ../../resources/test/test_case_with_should_methods.rb 15 | When I run it with the spec script 16 | Then the exit code should be 256 17 | And the stdout should match "5 examples, 3 failures" 18 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/interop/test/unit/testsuite_adapter.rb: -------------------------------------------------------------------------------- 1 | module Test 2 | module Unit 3 | class TestSuiteAdapter < TestSuite 4 | attr_reader :example_group, :examples 5 | alias_method :tests, :examples 6 | def initialize(example_group) 7 | @example_group = example_group 8 | @examples = example_group.examples 9 | end 10 | 11 | def name 12 | example_group.description 13 | end 14 | 15 | def run(*args) 16 | return true unless args.empty? 17 | example_group.run(Spec::Runner.options) 18 | end 19 | 20 | def size 21 | example_group.number_of_examples 22 | end 23 | 24 | def delete(example) 25 | examples.delete example 26 | end 27 | 28 | def empty? 29 | examples.empty? 30 | end 31 | end 32 | end 33 | end 34 | 35 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/story_server/prototype/lib/server.rb: -------------------------------------------------------------------------------- 1 | require 'webrick' 2 | 3 | class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet 4 | def do_POST(request, response) 5 | File.open('story', 'w') do |io| 6 | io.write(request.body) 7 | end 8 | 9 | response.status = 200 10 | response['Content-Type'] = 'text/html' 11 | response.body = "body" 12 | end 13 | end 14 | 15 | params = { :Port => 4000, 16 | :ServerType => WEBrick::SimpleServer, 17 | :BindAddress => "0.0.0.0", 18 | :MimeTypes => WEBrick::HTTPUtils::DefaultMimeTypes } 19 | server = WEBrick::HTTPServer.new(params) 20 | server.mount('/stories', DispatchServlet) 21 | server.mount('/', WEBrick::HTTPServlet::FileHandler, File.dirname(__FILE__) + '/..', { :FancyIndexing => true }) 22 | 23 | trap("INT") { server.shutdown } 24 | server.start -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/failing/diffing_spec.rb: -------------------------------------------------------------------------------- 1 | describe "Running specs with --diff" do 2 | it "should print diff of different strings" do 3 | uk = <<-EOF 4 | RSpec is a 5 | behaviour driven development 6 | framework for Ruby 7 | EOF 8 | usa = <<-EOF 9 | RSpec is a 10 | behavior driven development 11 | framework for Ruby 12 | EOF 13 | usa.should == uk 14 | end 15 | 16 | class Animal 17 | def initialize(name,species) 18 | @name,@species = name,species 19 | end 20 | 21 | def inspect 22 | <<-EOA 23 | 27 | EOA 28 | end 29 | end 30 | 31 | it "should print diff of different objects' pretty representation" do 32 | expected = Animal.new "bob", "giraffe" 33 | actual = Animal.new "bob", "tortoise" 34 | expected.should eql(actual) 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /app/views/shared/_user_bar.html.erb: -------------------------------------------------------------------------------- 1 | <% if logged_in? -%> 2 |
Logged in as: <%= link_to_current_user :content_method => :login %> | 3 | <%= link_to 'My Account', user_profile_path(current_user), { :title => "My account" } %> | 4 | <% if_invites_available? do -%> 5 | <%= link_to "Invite Friends (#{current_user.invitation_limit})", new_user_invitation_path %> | 6 | <% end -%> 7 | <%= link_to "Log Out", logout_path, { :title => "Log out" } %>
8 | <% else -%> 9 |
Log in with: 10 | <%= link_to_remote "Username", {:url => new_session_path, :method => :get}, :href => login_path %> | 11 | <%= link_to_remote "OpenID", {:url => new_openid_session_path, :method => :get}, :href => login_with_openid_path %> | 12 | <%= link_to "New Account", signup_path, { :title => "Create an account" } %>
13 | <% end -%> 14 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/before_and_after_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | $global = 0 3 | 4 | describe "State created in before(:all)" do 5 | before :all do 6 | @sideeffect = 1 7 | $global +=1 8 | end 9 | 10 | before :each do 11 | @isolated = 1 12 | end 13 | 14 | it "should be accessible from example" do 15 | @sideeffect.should == 1 16 | $global.should == 1 17 | @isolated.should == 1 18 | 19 | @sideeffect += 1 20 | @isolated += 1 21 | end 22 | 23 | it "should not have sideffects" do 24 | @sideeffect.should == 1 25 | $global.should == 2 26 | @isolated.should == 1 27 | 28 | @sideeffect += 1 29 | @isolated += 1 30 | end 31 | 32 | after :each do 33 | $global += 1 34 | end 35 | 36 | after :all do 37 | $global.should == 3 38 | $global = 0 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/example/example_group.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Example 3 | # Base class for customized example groups. Use this if you 4 | # want to make a custom example group. 5 | class ExampleGroup 6 | extend Spec::Example::ExampleGroupMethods 7 | include Spec::Example::ExampleMethods 8 | 9 | def initialize(defined_description, options={}, &implementation) 10 | @_options = options 11 | @_defined_description = defined_description 12 | @_implementation = implementation || pending_implementation 13 | @_backtrace = caller 14 | end 15 | 16 | private 17 | 18 | def pending_implementation 19 | error = NotYetImplementedError.new(caller) 20 | lambda { raise(error) } 21 | end 22 | end 23 | end 24 | end 25 | 26 | Spec::ExampleGroup = Spec::Example::ExampleGroup 27 | -------------------------------------------------------------------------------- /app/models/openid_user.rb: -------------------------------------------------------------------------------- 1 | class OpenidUser < User 2 | validates_presence_of :identity_url 3 | validates_uniqueness_of :identity_url 4 | 5 | # Login with openid_identifier, only available to OpenidUsers 6 | # yield account?, user, message, error_item_msg, error_item_path 7 | def self.find_with_identity_url(identity_url, &block) 8 | u = find :first, :conditions => ['identity_url = ?', identity_url] 9 | case 10 | when (identity_url.blank? || u.nil?) 11 | yield false, nil, nil, nil, nil 12 | when !u.active? 13 | yield true, nil, "Your account has not been activated, please check your email or %s.", "request a new activation code", "resend_activation_path" 14 | when !u.enabled? 15 | yield true, nil, "Your account has been disabled, please %s.", "contact the administrator", "contact_site" 16 | else 17 | yield true, u, nil, nil, nil 18 | end 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /app/views/openid_sessions/new.html.erb: -------------------------------------------------------------------------------- 1 |

Log in with OpenID

2 |

<%= link_to "Login with Username and Password", login_path %>

3 | <% form_tag session_path do -%> 4 | <%= hidden_field_tag 'openid', true %> 5 | 6 |
7 | <%= label_tag 'openid_indentifier', 'OpenID Url' %>
8 | <%= text_field_tag "openid_identifier", @openid_identifier %> 9 |
10 | 11 | <% if_recaptcha? do %> 12 |
13 | 14 | <%= recaptcha_tags %>
15 |
16 | <% end %> 17 | 18 | Stay logged in on this computer:
19 |
20 | <%= label_tag 'remember_me', 'Remember me' %> 21 | <%= check_box_tag 'remember_me', '1', @remember_me %>
22 |
23 | 24 |

<%= submit_tag 'Log in', :disable_with => "Signing in…" %>

25 | <% end -%> 26 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/examples/passing/partial_mock_example.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spec_helper' 2 | 3 | class MockableClass 4 | def self.find id 5 | return :original_return 6 | end 7 | end 8 | 9 | describe "A partial mock" do 10 | 11 | it "should work at the class level" do 12 | MockableClass.should_receive(:find).with(1).and_return {:stub_return} 13 | MockableClass.find(1).should equal(:stub_return) 14 | end 15 | 16 | it "should revert to the original after each spec" do 17 | MockableClass.find(1).should equal(:original_return) 18 | end 19 | 20 | it "can be mocked w/ ordering" do 21 | MockableClass.should_receive(:msg_1).ordered 22 | MockableClass.should_receive(:msg_2).ordered 23 | MockableClass.should_receive(:msg_3).ordered 24 | MockableClass.msg_1 25 | MockableClass.msg_2 26 | MockableClass.msg_3 27 | end 28 | 29 | end 30 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/spec/spec/story/given_scenario_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/story_helper' 2 | 3 | module Spec 4 | module Story 5 | describe GivenScenario do 6 | it 'should execute a scenario from the current story in its world' do 7 | # given 8 | class MyWorld 9 | attr :scenario_ran 10 | end 11 | instance = World.create(MyWorld) 12 | scenario = ScenarioBuilder.new.to_scenario do 13 | @scenario_ran = true 14 | end 15 | Runner::StoryRunner.should_receive(:scenario_from_current_story).with('scenario name').and_return(scenario) 16 | 17 | step = GivenScenario.new 'scenario name' 18 | 19 | # when 20 | step.perform(instance, nil) 21 | 22 | # then 23 | instance.scenario_ran.should be_true 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /vendor/gems/ruby-openid-2.1.2/examples/rails_openid/app/views/server/decide.rhtml: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | <% if @oidreq.id_select %> 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | <% else %> 19 | 20 | <% end %> 21 |
Site:<%= @oidreq.trust_root %>
9 | You entered the server identifier at the relying party. 10 | You'll need to send an identifier of your choosing. Enter a 11 | username below. 12 |
Identity to send:
Identity:<%= @oidreq.identity %>
22 | 23 | 24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /vendor/gems/rspec-1.1.12/lib/spec/example/errors.rb: -------------------------------------------------------------------------------- 1 | module Spec 2 | module Example 3 | class ExamplePendingError < StandardError 4 | attr_reader :pending_caller 5 | 6 | def initialize(message=nil) 7 | super 8 | @pending_caller = caller[2] 9 | end 10 | end 11 | 12 | class NotYetImplementedError < ExamplePendingError 13 | MESSAGE = "Not Yet Implemented" 14 | RSPEC_ROOT_LIB = File.expand_path(File.dirname(__FILE__) + "/../..") 15 | 16 | def initialize(backtrace) 17 | super(MESSAGE) 18 | @pending_caller = pending_caller_from(backtrace) 19 | end 20 | 21 | private 22 | 23 | def pending_caller_from(backtrace) 24 | backtrace.detect {|line| !line.include?(RSPEC_ROOT_LIB) } 25 | end 26 | end 27 | 28 | class PendingExampleFixedError < StandardError; end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /app/controllers/user/password_settings_controller.rb: -------------------------------------------------------------------------------- 1 | class User::PasswordSettingsController < ApplicationController 2 | before_filter :login_required 3 | 4 | # Change password view 5 | def index 6 | if (!current_user.identity_url.blank? && current_user.crypted_password.blank?) 7 | flash[:error] = "OpenID users cannot change their password." 8 | redirect_to user_profile_path(current_user) 9 | end 10 | end 11 | 12 | # Change password action 13 | def create 14 | if current_user.change_password!(params[:old_password], params[:password], params[:password_confirmation]) 15 | flash[:notice] = "Password successfully updated." 16 | redirect_to user_profile_path(current_user) 17 | else 18 | @old_password = nil 19 | flash.now[:error] = current_user.errors.on_base || "There was a problem updating your password." 20 | render :action => 'index' 21 | end 22 | end 23 | 24 | end 25 | --------------------------------------------------------------------------------