nbudin-castronaut 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.textile +67 -0
- data/Rakefile +73 -0
- data/app/config.rb +17 -0
- data/app/config.ru +24 -0
- data/app/controllers/application.rb +42 -0
- data/app/public/javascripts/application.js +3 -0
- data/app/public/javascripts/jquery.js +32 -0
- data/app/public/stylesheets/screen.css +122 -0
- data/app/views/layout.erb +27 -0
- data/app/views/login.erb +31 -0
- data/app/views/logout.erb +13 -0
- data/app/views/proxy_validate.erb +22 -0
- data/app/views/service_validate.erb +15 -0
- data/bin/castronaut +71 -0
- data/castronaut.rb +7 -0
- data/config/castronaut.example.yml +41 -0
- data/config/castronaut.sample.yml +40 -0
- data/config/nginx_vhost.conf +17 -0
- data/config/thin_config.yml +13 -0
- data/lib/castronaut.rb +35 -0
- data/lib/castronaut/adapters.rb +22 -0
- data/lib/castronaut/adapters/development/adapter.rb +13 -0
- data/lib/castronaut/adapters/development/user.rb +25 -0
- data/lib/castronaut/adapters/ldap/adapter.rb +15 -0
- data/lib/castronaut/adapters/ldap/user.rb +39 -0
- data/lib/castronaut/adapters/restful_authentication/adapter.rb +15 -0
- data/lib/castronaut/adapters/restful_authentication/user.rb +50 -0
- data/lib/castronaut/authentication_result.rb +24 -0
- data/lib/castronaut/configuration.rb +108 -0
- data/lib/castronaut/db/001_create_cas_database.rb +47 -0
- data/lib/castronaut/extra_attributes.rb +8 -0
- data/lib/castronaut/models/consumeable.rb +18 -0
- data/lib/castronaut/models/dispenser.rb +14 -0
- data/lib/castronaut/models/login_ticket.rb +53 -0
- data/lib/castronaut/models/proxy_granting_ticket.rb +70 -0
- data/lib/castronaut/models/proxy_ticket.rb +43 -0
- data/lib/castronaut/models/service_ticket.rb +91 -0
- data/lib/castronaut/models/ticket_granting_ticket.rb +52 -0
- data/lib/castronaut/presenters/login.rb +84 -0
- data/lib/castronaut/presenters/logout.rb +56 -0
- data/lib/castronaut/presenters/process_login.rb +149 -0
- data/lib/castronaut/presenters/proxy_validate.rb +68 -0
- data/lib/castronaut/presenters/service_validate.rb +69 -0
- data/lib/castronaut/support/sample.rb +21 -0
- data/lib/castronaut/ticket_result.rb +27 -0
- data/lib/castronaut/utilities/random_string.rb +24 -0
- data/spec/app/controllers/application_spec.rb +86 -0
- data/spec/castronaut/adapters/development/adapter_spec.rb +14 -0
- data/spec/castronaut/adapters/development/user_spec.rb +55 -0
- data/spec/castronaut/adapters/ldap/adapter_spec.rb +14 -0
- data/spec/castronaut/adapters/ldap/user_spec.rb +25 -0
- data/spec/castronaut/adapters/restful_authentication/adapter_spec.rb +14 -0
- data/spec/castronaut/adapters/restful_authentication/user_spec.rb +108 -0
- data/spec/castronaut/adapters_spec.rb +13 -0
- data/spec/castronaut/authentication_result_spec.rb +20 -0
- data/spec/castronaut/configuration_spec.rb +172 -0
- data/spec/castronaut/models/consumeable_spec.rb +39 -0
- data/spec/castronaut/models/dispenser_spec.rb +30 -0
- data/spec/castronaut/models/login_ticket_spec.rb +107 -0
- data/spec/castronaut/models/proxy_granting_ticket_spec.rb +302 -0
- data/spec/castronaut/models/proxy_ticket_spec.rb +109 -0
- data/spec/castronaut/models/service_ticket_spec.rb +269 -0
- data/spec/castronaut/models/ticket_granting_ticket_spec.rb +89 -0
- data/spec/castronaut/presenters/login_spec.rb +152 -0
- data/spec/castronaut/presenters/logout_spec.rb +85 -0
- data/spec/castronaut/presenters/process_login_spec.rb +300 -0
- data/spec/castronaut/presenters/proxy_validate_spec.rb +103 -0
- data/spec/castronaut/presenters/service_validate_spec.rb +86 -0
- data/spec/castronaut/ticket_result_spec.rb +42 -0
- data/spec/castronaut/utilities/random_string_spec.rb +14 -0
- data/spec/castronaut_spec.rb +26 -0
- data/spec/spec_controller_helper.rb +17 -0
- data/spec/spec_helper.rb +39 -0
- data/spec/spec_rails_mocks.rb +132 -0
- data/vendor/activerecord/CHANGELOG +5786 -0
- data/vendor/activerecord/README +351 -0
- data/vendor/activerecord/RUNNING_UNIT_TESTS +36 -0
- data/vendor/activerecord/Rakefile +247 -0
- data/vendor/activerecord/examples/associations.png +0 -0
- data/vendor/activerecord/install.rb +30 -0
- data/vendor/activerecord/lib/active_record.rb +81 -0
- data/vendor/activerecord/lib/active_record/aggregations.rb +261 -0
- data/vendor/activerecord/lib/active_record/association_preload.rb +374 -0
- data/vendor/activerecord/lib/active_record/associations.rb +2227 -0
- data/vendor/activerecord/lib/active_record/associations/association_collection.rb +453 -0
- data/vendor/activerecord/lib/active_record/associations/association_proxy.rb +272 -0
- data/vendor/activerecord/lib/active_record/associations/belongs_to_association.rb +58 -0
- data/vendor/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +49 -0
- data/vendor/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +121 -0
- data/vendor/activerecord/lib/active_record/associations/has_many_association.rb +121 -0
- data/vendor/activerecord/lib/active_record/associations/has_many_through_association.rb +256 -0
- data/vendor/activerecord/lib/active_record/associations/has_one_association.rb +115 -0
- data/vendor/activerecord/lib/active_record/associations/has_one_through_association.rb +31 -0
- data/vendor/activerecord/lib/active_record/attribute_methods.rb +387 -0
- data/vendor/activerecord/lib/active_record/base.rb +2967 -0
- data/vendor/activerecord/lib/active_record/calculations.rb +299 -0
- data/vendor/activerecord/lib/active_record/callbacks.rb +331 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +355 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +136 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +201 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +94 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +69 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +705 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +434 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +210 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +585 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +1065 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
- data/vendor/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +418 -0
- data/vendor/activerecord/lib/active_record/dirty.rb +183 -0
- data/vendor/activerecord/lib/active_record/dynamic_finder_match.rb +41 -0
- data/vendor/activerecord/lib/active_record/fixtures.rb +998 -0
- data/vendor/activerecord/lib/active_record/i18n_interpolation_deprecation.rb +26 -0
- data/vendor/activerecord/lib/active_record/locale/en.yml +54 -0
- data/vendor/activerecord/lib/active_record/locking/optimistic.rb +148 -0
- data/vendor/activerecord/lib/active_record/locking/pessimistic.rb +77 -0
- data/vendor/activerecord/lib/active_record/migration.rb +560 -0
- data/vendor/activerecord/lib/active_record/named_scope.rb +181 -0
- data/vendor/activerecord/lib/active_record/observer.rb +197 -0
- data/vendor/activerecord/lib/active_record/query_cache.rb +21 -0
- data/vendor/activerecord/lib/active_record/reflection.rb +307 -0
- data/vendor/activerecord/lib/active_record/schema.rb +51 -0
- data/vendor/activerecord/lib/active_record/schema_dumper.rb +177 -0
- data/vendor/activerecord/lib/active_record/serialization.rb +98 -0
- data/vendor/activerecord/lib/active_record/serializers/json_serializer.rb +80 -0
- data/vendor/activerecord/lib/active_record/serializers/xml_serializer.rb +338 -0
- data/vendor/activerecord/lib/active_record/test_case.rb +60 -0
- data/vendor/activerecord/lib/active_record/timestamp.rb +41 -0
- data/vendor/activerecord/lib/active_record/transactions.rb +185 -0
- data/vendor/activerecord/lib/active_record/validations.rb +1061 -0
- data/vendor/activerecord/lib/active_record/version.rb +9 -0
- data/vendor/activerecord/lib/activerecord.rb +1 -0
- data/vendor/activerecord/test/assets/example.log +1 -0
- data/vendor/activerecord/test/assets/flowers.jpg +0 -0
- data/vendor/activerecord/test/cases/aaa_create_tables_test.rb +24 -0
- data/vendor/activerecord/test/cases/active_schema_test_mysql.rb +100 -0
- data/vendor/activerecord/test/cases/active_schema_test_postgresql.rb +24 -0
- data/vendor/activerecord/test/cases/adapter_test.rb +133 -0
- data/vendor/activerecord/test/cases/aggregations_test.rb +167 -0
- data/vendor/activerecord/test/cases/ar_schema_test.rb +33 -0
- data/vendor/activerecord/test/cases/associations/belongs_to_associations_test.rb +441 -0
- data/vendor/activerecord/test/cases/associations/callbacks_test.rb +161 -0
- data/vendor/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +123 -0
- data/vendor/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +36 -0
- data/vendor/activerecord/test/cases/associations/eager_load_nested_include_test.rb +101 -0
- data/vendor/activerecord/test/cases/associations/eager_singularization_test.rb +145 -0
- data/vendor/activerecord/test/cases/associations/eager_test.rb +692 -0
- data/vendor/activerecord/test/cases/associations/extension_test.rb +62 -0
- data/vendor/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +773 -0
- data/vendor/activerecord/test/cases/associations/has_many_associations_test.rb +1101 -0
- data/vendor/activerecord/test/cases/associations/has_many_through_associations_test.rb +247 -0
- data/vendor/activerecord/test/cases/associations/has_one_associations_test.rb +362 -0
- data/vendor/activerecord/test/cases/associations/has_one_through_associations_test.rb +161 -0
- data/vendor/activerecord/test/cases/associations/inner_join_association_test.rb +88 -0
- data/vendor/activerecord/test/cases/associations/join_model_test.rb +714 -0
- data/vendor/activerecord/test/cases/associations_test.rb +262 -0
- data/vendor/activerecord/test/cases/attribute_methods_test.rb +293 -0
- data/vendor/activerecord/test/cases/base_test.rb +2087 -0
- data/vendor/activerecord/test/cases/binary_test.rb +30 -0
- data/vendor/activerecord/test/cases/calculations_test.rb +328 -0
- data/vendor/activerecord/test/cases/callbacks_observers_test.rb +38 -0
- data/vendor/activerecord/test/cases/callbacks_test.rb +400 -0
- data/vendor/activerecord/test/cases/class_inheritable_attributes_test.rb +32 -0
- data/vendor/activerecord/test/cases/column_alias_test.rb +17 -0
- data/vendor/activerecord/test/cases/column_definition_test.rb +36 -0
- data/vendor/activerecord/test/cases/connection_test_firebird.rb +8 -0
- data/vendor/activerecord/test/cases/connection_test_mysql.rb +30 -0
- data/vendor/activerecord/test/cases/copy_table_test_sqlite.rb +69 -0
- data/vendor/activerecord/test/cases/database_statements_test.rb +12 -0
- data/vendor/activerecord/test/cases/datatype_test_postgresql.rb +203 -0
- data/vendor/activerecord/test/cases/date_time_test.rb +37 -0
- data/vendor/activerecord/test/cases/default_test_firebird.rb +16 -0
- data/vendor/activerecord/test/cases/defaults_test.rb +100 -0
- data/vendor/activerecord/test/cases/deprecated_finder_test.rb +30 -0
- data/vendor/activerecord/test/cases/dirty_test.rb +270 -0
- data/vendor/activerecord/test/cases/finder_respond_to_test.rb +76 -0
- data/vendor/activerecord/test/cases/finder_test.rb +1048 -0
- data/vendor/activerecord/test/cases/fixtures_test.rb +655 -0
- data/vendor/activerecord/test/cases/helper.rb +62 -0
- data/vendor/activerecord/test/cases/i18n_test.rb +41 -0
- data/vendor/activerecord/test/cases/inheritance_test.rb +262 -0
- data/vendor/activerecord/test/cases/invalid_date_test.rb +24 -0
- data/vendor/activerecord/test/cases/json_serialization_test.rb +205 -0
- data/vendor/activerecord/test/cases/lifecycle_test.rb +193 -0
- data/vendor/activerecord/test/cases/locking_test.rb +304 -0
- data/vendor/activerecord/test/cases/method_scoping_test.rb +569 -0
- data/vendor/activerecord/test/cases/migration_test.rb +1479 -0
- data/vendor/activerecord/test/cases/migration_test_firebird.rb +124 -0
- data/vendor/activerecord/test/cases/mixin_test.rb +96 -0
- data/vendor/activerecord/test/cases/modules_test.rb +39 -0
- data/vendor/activerecord/test/cases/multiple_db_test.rb +85 -0
- data/vendor/activerecord/test/cases/named_scope_test.rb +280 -0
- data/vendor/activerecord/test/cases/pk_test.rb +101 -0
- data/vendor/activerecord/test/cases/pooled_connections_test.rb +103 -0
- data/vendor/activerecord/test/cases/query_cache_test.rb +127 -0
- data/vendor/activerecord/test/cases/readonly_test.rb +107 -0
- data/vendor/activerecord/test/cases/reflection_test.rb +184 -0
- data/vendor/activerecord/test/cases/reload_models_test.rb +20 -0
- data/vendor/activerecord/test/cases/reserved_word_test_mysql.rb +176 -0
- data/vendor/activerecord/test/cases/sanitize_test.rb +25 -0
- data/vendor/activerecord/test/cases/schema_authorization_test_postgresql.rb +75 -0
- data/vendor/activerecord/test/cases/schema_dumper_test.rb +184 -0
- data/vendor/activerecord/test/cases/schema_test_postgresql.rb +102 -0
- data/vendor/activerecord/test/cases/serialization_test.rb +47 -0
- data/vendor/activerecord/test/cases/synonym_test_oracle.rb +17 -0
- data/vendor/activerecord/test/cases/transactions_test.rb +357 -0
- data/vendor/activerecord/test/cases/unconnected_test.rb +32 -0
- data/vendor/activerecord/test/cases/validations_i18n_test.rb +921 -0
- data/vendor/activerecord/test/cases/validations_test.rb +1552 -0
- data/vendor/activerecord/test/cases/xml_serialization_test.rb +202 -0
- data/vendor/activerecord/test/config.rb +5 -0
- data/vendor/activerecord/test/connections/native_db2/connection.rb +25 -0
- data/vendor/activerecord/test/connections/native_firebird/connection.rb +26 -0
- data/vendor/activerecord/test/connections/native_frontbase/connection.rb +27 -0
- data/vendor/activerecord/test/connections/native_mysql/connection.rb +25 -0
- data/vendor/activerecord/test/connections/native_openbase/connection.rb +21 -0
- data/vendor/activerecord/test/connections/native_oracle/connection.rb +27 -0
- data/vendor/activerecord/test/connections/native_postgresql/connection.rb +21 -0
- data/vendor/activerecord/test/connections/native_sqlite/connection.rb +25 -0
- data/vendor/activerecord/test/connections/native_sqlite3/connection.rb +25 -0
- data/vendor/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +18 -0
- data/vendor/activerecord/test/connections/native_sybase/connection.rb +23 -0
- data/vendor/activerecord/test/fixtures/accounts.yml +28 -0
- data/vendor/activerecord/test/fixtures/all/developers.yml +0 -0
- data/vendor/activerecord/test/fixtures/all/people.csv +0 -0
- data/vendor/activerecord/test/fixtures/all/tasks.yml +0 -0
- data/vendor/activerecord/test/fixtures/author_addresses.yml +5 -0
- data/vendor/activerecord/test/fixtures/author_favorites.yml +4 -0
- data/vendor/activerecord/test/fixtures/authors.yml +9 -0
- data/vendor/activerecord/test/fixtures/binaries.yml +132 -0
- data/vendor/activerecord/test/fixtures/books.yml +7 -0
- data/vendor/activerecord/test/fixtures/categories.yml +14 -0
- data/vendor/activerecord/test/fixtures/categories/special_categories.yml +9 -0
- data/vendor/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +4 -0
- data/vendor/activerecord/test/fixtures/categories_ordered.yml +7 -0
- data/vendor/activerecord/test/fixtures/categories_posts.yml +23 -0
- data/vendor/activerecord/test/fixtures/categorizations.yml +17 -0
- data/vendor/activerecord/test/fixtures/clubs.yml +6 -0
- data/vendor/activerecord/test/fixtures/comments.yml +59 -0
- data/vendor/activerecord/test/fixtures/companies.yml +56 -0
- data/vendor/activerecord/test/fixtures/computers.yml +4 -0
- data/vendor/activerecord/test/fixtures/courses.yml +7 -0
- data/vendor/activerecord/test/fixtures/customers.yml +26 -0
- data/vendor/activerecord/test/fixtures/developers.yml +21 -0
- data/vendor/activerecord/test/fixtures/developers_projects.yml +17 -0
- data/vendor/activerecord/test/fixtures/edges.yml +6 -0
- data/vendor/activerecord/test/fixtures/entrants.yml +14 -0
- data/vendor/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
- data/vendor/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -0
- data/vendor/activerecord/test/fixtures/fk_test_has_fk.yml +3 -0
- data/vendor/activerecord/test/fixtures/fk_test_has_pk.yml +2 -0
- data/vendor/activerecord/test/fixtures/funny_jokes.yml +10 -0
- data/vendor/activerecord/test/fixtures/items.yml +4 -0
- data/vendor/activerecord/test/fixtures/jobs.yml +7 -0
- data/vendor/activerecord/test/fixtures/legacy_things.yml +3 -0
- data/vendor/activerecord/test/fixtures/mateys.yml +4 -0
- data/vendor/activerecord/test/fixtures/members.yml +4 -0
- data/vendor/activerecord/test/fixtures/memberships.yml +20 -0
- data/vendor/activerecord/test/fixtures/minimalistics.yml +2 -0
- data/vendor/activerecord/test/fixtures/mixed_case_monkeys.yml +6 -0
- data/vendor/activerecord/test/fixtures/mixins.yml +29 -0
- data/vendor/activerecord/test/fixtures/movies.yml +7 -0
- data/vendor/activerecord/test/fixtures/naked/csv/accounts.csv +1 -0
- data/vendor/activerecord/test/fixtures/naked/yml/accounts.yml +1 -0
- data/vendor/activerecord/test/fixtures/naked/yml/companies.yml +1 -0
- data/vendor/activerecord/test/fixtures/naked/yml/courses.yml +1 -0
- data/vendor/activerecord/test/fixtures/organizations.yml +5 -0
- data/vendor/activerecord/test/fixtures/owners.yml +7 -0
- data/vendor/activerecord/test/fixtures/parrots.yml +27 -0
- data/vendor/activerecord/test/fixtures/parrots_pirates.yml +7 -0
- data/vendor/activerecord/test/fixtures/people.yml +6 -0
- data/vendor/activerecord/test/fixtures/pets.yml +14 -0
- data/vendor/activerecord/test/fixtures/pirates.yml +9 -0
- data/vendor/activerecord/test/fixtures/posts.yml +49 -0
- data/vendor/activerecord/test/fixtures/price_estimates.yml +7 -0
- data/vendor/activerecord/test/fixtures/projects.yml +7 -0
- data/vendor/activerecord/test/fixtures/readers.yml +9 -0
- data/vendor/activerecord/test/fixtures/references.yml +17 -0
- data/vendor/activerecord/test/fixtures/reserved_words/distinct.yml +5 -0
- data/vendor/activerecord/test/fixtures/reserved_words/distincts_selects.yml +11 -0
- data/vendor/activerecord/test/fixtures/reserved_words/group.yml +14 -0
- data/vendor/activerecord/test/fixtures/reserved_words/select.yml +8 -0
- data/vendor/activerecord/test/fixtures/reserved_words/values.yml +7 -0
- data/vendor/activerecord/test/fixtures/ships.yml +5 -0
- data/vendor/activerecord/test/fixtures/sponsors.yml +9 -0
- data/vendor/activerecord/test/fixtures/subscribers.yml +7 -0
- data/vendor/activerecord/test/fixtures/subscriptions.yml +12 -0
- data/vendor/activerecord/test/fixtures/taggings.yml +28 -0
- data/vendor/activerecord/test/fixtures/tags.yml +7 -0
- data/vendor/activerecord/test/fixtures/tasks.yml +7 -0
- data/vendor/activerecord/test/fixtures/topics.yml +42 -0
- data/vendor/activerecord/test/fixtures/treasures.yml +10 -0
- data/vendor/activerecord/test/fixtures/vertices.yml +4 -0
- data/vendor/activerecord/test/fixtures/warehouse-things.yml +3 -0
- data/vendor/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb +10 -0
- data/vendor/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +15 -0
- data/vendor/activerecord/test/migrations/duplicate/1_people_have_last_names.rb +9 -0
- data/vendor/activerecord/test/migrations/duplicate/2_we_need_reminders.rb +12 -0
- data/vendor/activerecord/test/migrations/duplicate/3_foo.rb +7 -0
- data/vendor/activerecord/test/migrations/duplicate/3_innocent_jointable.rb +12 -0
- data/vendor/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb +7 -0
- data/vendor/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb +7 -0
- data/vendor/activerecord/test/migrations/interleaved/pass_1/3_innocent_jointable.rb +12 -0
- data/vendor/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb +9 -0
- data/vendor/activerecord/test/migrations/interleaved/pass_2/3_innocent_jointable.rb +12 -0
- data/vendor/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb +9 -0
- data/vendor/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb +8 -0
- data/vendor/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb +12 -0
- data/vendor/activerecord/test/migrations/missing/1000_people_have_middle_names.rb +9 -0
- data/vendor/activerecord/test/migrations/missing/1_people_have_last_names.rb +9 -0
- data/vendor/activerecord/test/migrations/missing/3_we_need_reminders.rb +12 -0
- data/vendor/activerecord/test/migrations/missing/4_innocent_jointable.rb +12 -0
- data/vendor/activerecord/test/migrations/valid/1_people_have_last_names.rb +9 -0
- data/vendor/activerecord/test/migrations/valid/2_we_need_reminders.rb +12 -0
- data/vendor/activerecord/test/migrations/valid/3_innocent_jointable.rb +12 -0
- data/vendor/activerecord/test/models/author.rb +140 -0
- data/vendor/activerecord/test/models/auto_id.rb +4 -0
- data/vendor/activerecord/test/models/binary.rb +2 -0
- data/vendor/activerecord/test/models/book.rb +4 -0
- data/vendor/activerecord/test/models/categorization.rb +5 -0
- data/vendor/activerecord/test/models/category.rb +33 -0
- data/vendor/activerecord/test/models/citation.rb +6 -0
- data/vendor/activerecord/test/models/club.rb +13 -0
- data/vendor/activerecord/test/models/column_name.rb +3 -0
- data/vendor/activerecord/test/models/comment.rb +25 -0
- data/vendor/activerecord/test/models/company.rb +156 -0
- data/vendor/activerecord/test/models/company_in_module.rb +61 -0
- data/vendor/activerecord/test/models/computer.rb +3 -0
- data/vendor/activerecord/test/models/contact.rb +16 -0
- data/vendor/activerecord/test/models/course.rb +3 -0
- data/vendor/activerecord/test/models/customer.rb +73 -0
- data/vendor/activerecord/test/models/default.rb +2 -0
- data/vendor/activerecord/test/models/developer.rb +79 -0
- data/vendor/activerecord/test/models/edge.rb +5 -0
- data/vendor/activerecord/test/models/entrant.rb +3 -0
- data/vendor/activerecord/test/models/guid.rb +2 -0
- data/vendor/activerecord/test/models/item.rb +7 -0
- data/vendor/activerecord/test/models/job.rb +5 -0
- data/vendor/activerecord/test/models/joke.rb +3 -0
- data/vendor/activerecord/test/models/keyboard.rb +3 -0
- data/vendor/activerecord/test/models/legacy_thing.rb +3 -0
- data/vendor/activerecord/test/models/matey.rb +4 -0
- data/vendor/activerecord/test/models/member.rb +11 -0
- data/vendor/activerecord/test/models/member_detail.rb +4 -0
- data/vendor/activerecord/test/models/membership.rb +9 -0
- data/vendor/activerecord/test/models/minimalistic.rb +2 -0
- data/vendor/activerecord/test/models/mixed_case_monkey.rb +3 -0
- data/vendor/activerecord/test/models/movie.rb +5 -0
- data/vendor/activerecord/test/models/order.rb +4 -0
- data/vendor/activerecord/test/models/organization.rb +4 -0
- data/vendor/activerecord/test/models/owner.rb +4 -0
- data/vendor/activerecord/test/models/parrot.rb +14 -0
- data/vendor/activerecord/test/models/person.rb +10 -0
- data/vendor/activerecord/test/models/pet.rb +4 -0
- data/vendor/activerecord/test/models/pirate.rb +9 -0
- data/vendor/activerecord/test/models/post.rb +88 -0
- data/vendor/activerecord/test/models/price_estimate.rb +3 -0
- data/vendor/activerecord/test/models/project.rb +29 -0
- data/vendor/activerecord/test/models/reader.rb +4 -0
- data/vendor/activerecord/test/models/reference.rb +4 -0
- data/vendor/activerecord/test/models/reply.rb +39 -0
- data/vendor/activerecord/test/models/ship.rb +3 -0
- data/vendor/activerecord/test/models/sponsor.rb +4 -0
- data/vendor/activerecord/test/models/subject.rb +4 -0
- data/vendor/activerecord/test/models/subscriber.rb +8 -0
- data/vendor/activerecord/test/models/subscription.rb +4 -0
- data/vendor/activerecord/test/models/tag.rb +7 -0
- data/vendor/activerecord/test/models/tagging.rb +10 -0
- data/vendor/activerecord/test/models/task.rb +3 -0
- data/vendor/activerecord/test/models/topic.rb +69 -0
- data/vendor/activerecord/test/models/treasure.rb +6 -0
- data/vendor/activerecord/test/models/vertex.rb +9 -0
- data/vendor/activerecord/test/models/warehouse_thing.rb +5 -0
- data/vendor/activerecord/test/schema/mysql_specific_schema.rb +12 -0
- data/vendor/activerecord/test/schema/postgresql_specific_schema.rb +103 -0
- data/vendor/activerecord/test/schema/schema.rb +440 -0
- data/vendor/activerecord/test/schema/schema2.rb +6 -0
- data/vendor/activerecord/test/schema/sqlite_specific_schema.rb +25 -0
- data/vendor/activesupport/CHANGELOG +1257 -0
- data/vendor/activesupport/README +43 -0
- data/vendor/activesupport/lib/active_support.rb +61 -0
- data/vendor/activesupport/lib/active_support/base64.rb +33 -0
- data/vendor/activesupport/lib/active_support/basic_object.rb +24 -0
- data/vendor/activesupport/lib/active_support/buffered_logger.rb +122 -0
- data/vendor/activesupport/lib/active_support/cache.rb +223 -0
- data/vendor/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
- data/vendor/activesupport/lib/active_support/cache/drb_store.rb +15 -0
- data/vendor/activesupport/lib/active_support/cache/file_store.rb +72 -0
- data/vendor/activesupport/lib/active_support/cache/mem_cache_store.rb +127 -0
- data/vendor/activesupport/lib/active_support/cache/memory_store.rb +52 -0
- data/vendor/activesupport/lib/active_support/cache/synchronized_memory_store.rb +47 -0
- data/vendor/activesupport/lib/active_support/callbacks.rb +280 -0
- data/vendor/activesupport/lib/active_support/core_ext.rb +4 -0
- data/vendor/activesupport/lib/active_support/core_ext/array.rb +13 -0
- data/vendor/activesupport/lib/active_support/core_ext/array/access.rb +53 -0
- data/vendor/activesupport/lib/active_support/core_ext/array/conversions.rb +183 -0
- data/vendor/activesupport/lib/active_support/core_ext/array/extract_options.rb +20 -0
- data/vendor/activesupport/lib/active_support/core_ext/array/grouping.rb +106 -0
- data/vendor/activesupport/lib/active_support/core_ext/array/random_access.rb +12 -0
- data/vendor/activesupport/lib/active_support/core_ext/base64.rb +4 -0
- data/vendor/activesupport/lib/active_support/core_ext/base64/encoding.rb +16 -0
- data/vendor/activesupport/lib/active_support/core_ext/benchmark.rb +12 -0
- data/vendor/activesupport/lib/active_support/core_ext/bigdecimal.rb +6 -0
- data/vendor/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
- data/vendor/activesupport/lib/active_support/core_ext/blank.rb +58 -0
- data/vendor/activesupport/lib/active_support/core_ext/cgi.rb +5 -0
- data/vendor/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -0
- data/vendor/activesupport/lib/active_support/core_ext/class.rb +4 -0
- data/vendor/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
- data/vendor/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +46 -0
- data/vendor/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/vendor/activesupport/lib/active_support/core_ext/class/removal.rb +50 -0
- data/vendor/activesupport/lib/active_support/core_ext/date.rb +10 -0
- data/vendor/activesupport/lib/active_support/core_ext/date/behavior.rb +42 -0
- data/vendor/activesupport/lib/active_support/core_ext/date/calculations.rb +230 -0
- data/vendor/activesupport/lib/active_support/core_ext/date/conversions.rb +107 -0
- data/vendor/activesupport/lib/active_support/core_ext/date_time.rb +12 -0
- data/vendor/activesupport/lib/active_support/core_ext/date_time/calculations.rb +126 -0
- data/vendor/activesupport/lib/active_support/core_ext/date_time/conversions.rb +96 -0
- data/vendor/activesupport/lib/active_support/core_ext/duplicable.rb +43 -0
- data/vendor/activesupport/lib/active_support/core_ext/enumerable.rb +107 -0
- data/vendor/activesupport/lib/active_support/core_ext/exception.rb +41 -0
- data/vendor/activesupport/lib/active_support/core_ext/file.rb +5 -0
- data/vendor/activesupport/lib/active_support/core_ext/file/atomic.rb +46 -0
- data/vendor/activesupport/lib/active_support/core_ext/float.rb +7 -0
- data/vendor/activesupport/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/vendor/activesupport/lib/active_support/core_ext/float/time.rb +27 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash.rb +14 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/conversions.rb +259 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/diff.rb +19 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/except.rb +25 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +137 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/keys.rb +52 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
- data/vendor/activesupport/lib/active_support/core_ext/hash/slice.rb +33 -0
- data/vendor/activesupport/lib/active_support/core_ext/integer.rb +9 -0
- data/vendor/activesupport/lib/active_support/core_ext/integer/even_odd.rb +29 -0
- data/vendor/activesupport/lib/active_support/core_ext/integer/inflections.rb +20 -0
- data/vendor/activesupport/lib/active_support/core_ext/integer/time.rb +45 -0
- data/vendor/activesupport/lib/active_support/core_ext/kernel.rb +5 -0
- data/vendor/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/vendor/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
- data/vendor/activesupport/lib/active_support/core_ext/kernel/debugger.rb +13 -0
- data/vendor/activesupport/lib/active_support/core_ext/kernel/reporting.rb +59 -0
- data/vendor/activesupport/lib/active_support/core_ext/kernel/requires.rb +24 -0
- data/vendor/activesupport/lib/active_support/core_ext/load_error.rb +38 -0
- data/vendor/activesupport/lib/active_support/core_ext/logger.rb +143 -0
- data/vendor/activesupport/lib/active_support/core_ext/module.rb +23 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/aliasing.rb +74 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/attr_internal.rb +32 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +58 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/delegation.rb +95 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/inclusion.rb +30 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/introspection.rb +90 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/loading.rb +23 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/model_naming.rb +23 -0
- data/vendor/activesupport/lib/active_support/core_ext/module/synchronization.rb +39 -0
- data/vendor/activesupport/lib/active_support/core_ext/name_error.rb +17 -0
- data/vendor/activesupport/lib/active_support/core_ext/numeric.rb +9 -0
- data/vendor/activesupport/lib/active_support/core_ext/numeric/bytes.rb +44 -0
- data/vendor/activesupport/lib/active_support/core_ext/numeric/conversions.rb +19 -0
- data/vendor/activesupport/lib/active_support/core_ext/numeric/time.rb +81 -0
- data/vendor/activesupport/lib/active_support/core_ext/object.rb +5 -0
- data/vendor/activesupport/lib/active_support/core_ext/object/conversions.rb +14 -0
- data/vendor/activesupport/lib/active_support/core_ext/object/extending.rb +80 -0
- data/vendor/activesupport/lib/active_support/core_ext/object/instance_variables.rb +74 -0
- data/vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb +13 -0
- data/vendor/activesupport/lib/active_support/core_ext/object/misc.rb +74 -0
- data/vendor/activesupport/lib/active_support/core_ext/pathname.rb +7 -0
- data/vendor/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
- data/vendor/activesupport/lib/active_support/core_ext/proc.rb +12 -0
- data/vendor/activesupport/lib/active_support/core_ext/process.rb +1 -0
- data/vendor/activesupport/lib/active_support/core_ext/process/daemon.rb +25 -0
- data/vendor/activesupport/lib/active_support/core_ext/range.rb +11 -0
- data/vendor/activesupport/lib/active_support/core_ext/range/blockless_step.rb +32 -0
- data/vendor/activesupport/lib/active_support/core_ext/range/conversions.rb +27 -0
- data/vendor/activesupport/lib/active_support/core_ext/range/include_range.rb +30 -0
- data/vendor/activesupport/lib/active_support/core_ext/range/overlaps.rb +15 -0
- data/vendor/activesupport/lib/active_support/core_ext/rexml.rb +36 -0
- data/vendor/activesupport/lib/active_support/core_ext/string.rb +22 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/access.rb +82 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/behavior.rb +13 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/conversions.rb +28 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/filters.rb +26 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/inflections.rb +167 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/iterators.rb +21 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/multibyte.rb +81 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
- data/vendor/activesupport/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/vendor/activesupport/lib/active_support/core_ext/symbol.rb +14 -0
- data/vendor/activesupport/lib/active_support/core_ext/time.rb +42 -0
- data/vendor/activesupport/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/vendor/activesupport/lib/active_support/core_ext/time/calculations.rb +303 -0
- data/vendor/activesupport/lib/active_support/core_ext/time/conversions.rb +90 -0
- data/vendor/activesupport/lib/active_support/core_ext/time/zones.rb +86 -0
- data/vendor/activesupport/lib/active_support/dependencies.rb +621 -0
- data/vendor/activesupport/lib/active_support/deprecation.rb +243 -0
- data/vendor/activesupport/lib/active_support/duration.rb +96 -0
- data/vendor/activesupport/lib/active_support/gzip.rb +25 -0
- data/vendor/activesupport/lib/active_support/inflections.rb +55 -0
- data/vendor/activesupport/lib/active_support/inflector.rb +397 -0
- data/vendor/activesupport/lib/active_support/json.rb +23 -0
- data/vendor/activesupport/lib/active_support/json/decoding.rb +63 -0
- data/vendor/activesupport/lib/active_support/json/encoders/date.rb +21 -0
- data/vendor/activesupport/lib/active_support/json/encoders/date_time.rb +21 -0
- data/vendor/activesupport/lib/active_support/json/encoders/enumerable.rb +12 -0
- data/vendor/activesupport/lib/active_support/json/encoders/false_class.rb +5 -0
- data/vendor/activesupport/lib/active_support/json/encoders/hash.rb +47 -0
- data/vendor/activesupport/lib/active_support/json/encoders/nil_class.rb +5 -0
- data/vendor/activesupport/lib/active_support/json/encoders/numeric.rb +5 -0
- data/vendor/activesupport/lib/active_support/json/encoders/object.rb +6 -0
- data/vendor/activesupport/lib/active_support/json/encoders/regexp.rb +5 -0
- data/vendor/activesupport/lib/active_support/json/encoders/string.rb +36 -0
- data/vendor/activesupport/lib/active_support/json/encoders/symbol.rb +5 -0
- data/vendor/activesupport/lib/active_support/json/encoders/time.rb +21 -0
- data/vendor/activesupport/lib/active_support/json/encoders/true_class.rb +5 -0
- data/vendor/activesupport/lib/active_support/json/encoding.rb +37 -0
- data/vendor/activesupport/lib/active_support/json/variable.rb +10 -0
- data/vendor/activesupport/lib/active_support/locale/en.yml +32 -0
- data/vendor/activesupport/lib/active_support/memoizable.rb +82 -0
- data/vendor/activesupport/lib/active_support/multibyte.rb +33 -0
- data/vendor/activesupport/lib/active_support/multibyte/chars.rb +679 -0
- data/vendor/activesupport/lib/active_support/multibyte/exceptions.rb +8 -0
- data/vendor/activesupport/lib/active_support/multibyte/unicode_database.rb +71 -0
- data/vendor/activesupport/lib/active_support/option_merger.rb +17 -0
- data/vendor/activesupport/lib/active_support/ordered_hash.rb +58 -0
- data/vendor/activesupport/lib/active_support/ordered_options.rb +19 -0
- data/vendor/activesupport/lib/active_support/rescuable.rb +108 -0
- data/vendor/activesupport/lib/active_support/secure_random.rb +197 -0
- data/vendor/activesupport/lib/active_support/string_inquirer.rb +21 -0
- data/vendor/activesupport/lib/active_support/test_case.rb +24 -0
- data/vendor/activesupport/lib/active_support/testing/core_ext/test.rb +6 -0
- data/vendor/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb +72 -0
- data/vendor/activesupport/lib/active_support/testing/default.rb +9 -0
- data/vendor/activesupport/lib/active_support/testing/performance.rb +452 -0
- data/vendor/activesupport/lib/active_support/testing/setup_and_teardown.rb +120 -0
- data/vendor/activesupport/lib/active_support/time_with_zone.rb +328 -0
- data/vendor/activesupport/lib/active_support/values/time_zone.rb +403 -0
- data/vendor/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/activesupport/lib/active_support/vendor.rb +34 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/vendor/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/vendor/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb +194 -0
- data/vendor/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +216 -0
- data/vendor/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb +53 -0
- data/vendor/activesupport/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb +849 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
- data/vendor/activesupport/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
- data/vendor/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
- data/vendor/activesupport/lib/active_support/version.rb +9 -0
- data/vendor/activesupport/lib/active_support/whiny_nil.rb +58 -0
- data/vendor/activesupport/lib/activesupport.rb +1 -0
- data/vendor/isaac/LICENSE +26 -0
- data/vendor/isaac/README +78 -0
- data/vendor/isaac/TODO +3 -0
- data/vendor/isaac/VERSIONS +3 -0
- data/vendor/isaac/crypt/ISAAC.rb +171 -0
- data/vendor/isaac/isaac.gemspec +39 -0
- data/vendor/isaac/setup.rb +596 -0
- data/vendor/isaac/test/TC_ISAAC.rb +76 -0
- data/vendor/json/CHANGES +93 -0
- data/vendor/json/GPL +340 -0
- data/vendor/json/README +78 -0
- data/vendor/json/RUBY +58 -0
- data/vendor/json/Rakefile +309 -0
- data/vendor/json/TODO +1 -0
- data/vendor/json/VERSION +1 -0
- data/vendor/json/benchmarks/benchmark.txt +133 -0
- data/vendor/json/benchmarks/benchmark_generator.rb +48 -0
- data/vendor/json/benchmarks/benchmark_parser.rb +26 -0
- data/vendor/json/benchmarks/benchmark_rails.rb +26 -0
- data/vendor/json/bin/edit_json.rb +10 -0
- data/vendor/json/bin/prettify_json.rb +76 -0
- data/vendor/json/data/example.json +1 -0
- data/vendor/json/data/index.html +38 -0
- data/vendor/json/data/prototype.js +4184 -0
- data/vendor/json/ext/json/ext/generator/extconf.rb +9 -0
- data/vendor/json/ext/json/ext/generator/generator.c +875 -0
- data/vendor/json/ext/json/ext/generator/unicode.c +182 -0
- data/vendor/json/ext/json/ext/generator/unicode.h +53 -0
- data/vendor/json/ext/json/ext/parser/extconf.rb +9 -0
- data/vendor/json/ext/json/ext/parser/parser.c +1758 -0
- data/vendor/json/ext/json/ext/parser/parser.rl +638 -0
- data/vendor/json/ext/json/ext/parser/unicode.c +154 -0
- data/vendor/json/ext/json/ext/parser/unicode.h +58 -0
- data/vendor/json/install.rb +26 -0
- data/vendor/json/lib/json.rb +235 -0
- data/vendor/json/lib/json/Array.xpm +21 -0
- data/vendor/json/lib/json/FalseClass.xpm +21 -0
- data/vendor/json/lib/json/Hash.xpm +21 -0
- data/vendor/json/lib/json/Key.xpm +73 -0
- data/vendor/json/lib/json/NilClass.xpm +21 -0
- data/vendor/json/lib/json/Numeric.xpm +28 -0
- data/vendor/json/lib/json/String.xpm +96 -0
- data/vendor/json/lib/json/TrueClass.xpm +21 -0
- data/vendor/json/lib/json/add/core.rb +135 -0
- data/vendor/json/lib/json/add/rails.rb +58 -0
- data/vendor/json/lib/json/common.rb +354 -0
- data/vendor/json/lib/json/editor.rb +1362 -0
- data/vendor/json/lib/json/ext.rb +13 -0
- data/vendor/json/lib/json/json.xpm +1499 -0
- data/vendor/json/lib/json/pure.rb +75 -0
- data/vendor/json/lib/json/pure/generator.rb +394 -0
- data/vendor/json/lib/json/pure/parser.rb +259 -0
- data/vendor/json/lib/json/version.rb +9 -0
- data/vendor/json/tests/fixtures/fail1.json +1 -0
- data/vendor/json/tests/fixtures/fail10.json +1 -0
- data/vendor/json/tests/fixtures/fail11.json +1 -0
- data/vendor/json/tests/fixtures/fail12.json +1 -0
- data/vendor/json/tests/fixtures/fail13.json +1 -0
- data/vendor/json/tests/fixtures/fail14.json +1 -0
- data/vendor/json/tests/fixtures/fail18.json +1 -0
- data/vendor/json/tests/fixtures/fail19.json +1 -0
- data/vendor/json/tests/fixtures/fail2.json +1 -0
- data/vendor/json/tests/fixtures/fail20.json +1 -0
- data/vendor/json/tests/fixtures/fail21.json +1 -0
- data/vendor/json/tests/fixtures/fail22.json +1 -0
- data/vendor/json/tests/fixtures/fail23.json +1 -0
- data/vendor/json/tests/fixtures/fail24.json +1 -0
- data/vendor/json/tests/fixtures/fail25.json +1 -0
- data/vendor/json/tests/fixtures/fail27.json +2 -0
- data/vendor/json/tests/fixtures/fail28.json +2 -0
- data/vendor/json/tests/fixtures/fail3.json +1 -0
- data/vendor/json/tests/fixtures/fail4.json +1 -0
- data/vendor/json/tests/fixtures/fail5.json +1 -0
- data/vendor/json/tests/fixtures/fail6.json +1 -0
- data/vendor/json/tests/fixtures/fail7.json +1 -0
- data/vendor/json/tests/fixtures/fail8.json +1 -0
- data/vendor/json/tests/fixtures/fail9.json +1 -0
- data/vendor/json/tests/fixtures/pass1.json +56 -0
- data/vendor/json/tests/fixtures/pass15.json +1 -0
- data/vendor/json/tests/fixtures/pass16.json +1 -0
- data/vendor/json/tests/fixtures/pass17.json +1 -0
- data/vendor/json/tests/fixtures/pass2.json +1 -0
- data/vendor/json/tests/fixtures/pass26.json +1 -0
- data/vendor/json/tests/fixtures/pass3.json +6 -0
- data/vendor/json/tests/runner.rb +25 -0
- data/vendor/json/tests/test_json.rb +293 -0
- data/vendor/json/tests/test_json_addition.rb +161 -0
- data/vendor/json/tests/test_json_fixtures.rb +30 -0
- data/vendor/json/tests/test_json_generate.rb +100 -0
- data/vendor/json/tests/test_json_rails.rb +118 -0
- data/vendor/json/tests/test_json_unicode.rb +61 -0
- data/vendor/json/tools/fuzz.rb +140 -0
- data/vendor/json/tools/server.rb +62 -0
- data/vendor/rack/AUTHORS +8 -0
- data/vendor/rack/COPYING +18 -0
- data/vendor/rack/KNOWN-ISSUES +18 -0
- data/vendor/rack/RDOX +324 -0
- data/vendor/rack/README +306 -0
- data/vendor/rack/Rakefile +188 -0
- data/vendor/rack/SPEC +129 -0
- data/vendor/rack/bin/rackup +172 -0
- data/vendor/rack/contrib/rack_logo.svg +111 -0
- data/vendor/rack/example/lobster.ru +4 -0
- data/vendor/rack/example/protectedlobster.rb +14 -0
- data/vendor/rack/example/protectedlobster.ru +8 -0
- data/vendor/rack/lib/rack.rb +86 -0
- data/vendor/rack/lib/rack/adapter/camping.rb +22 -0
- data/vendor/rack/lib/rack/auth/abstract/handler.rb +28 -0
- data/vendor/rack/lib/rack/auth/abstract/request.rb +37 -0
- data/vendor/rack/lib/rack/auth/basic.rb +58 -0
- data/vendor/rack/lib/rack/auth/digest/md5.rb +124 -0
- data/vendor/rack/lib/rack/auth/digest/nonce.rb +51 -0
- data/vendor/rack/lib/rack/auth/digest/params.rb +55 -0
- data/vendor/rack/lib/rack/auth/digest/request.rb +40 -0
- data/vendor/rack/lib/rack/auth/openid.rb +438 -0
- data/vendor/rack/lib/rack/builder.rb +67 -0
- data/vendor/rack/lib/rack/cascade.rb +36 -0
- data/vendor/rack/lib/rack/commonlogger.rb +61 -0
- data/vendor/rack/lib/rack/conditionalget.rb +43 -0
- data/vendor/rack/lib/rack/content_length.rb +25 -0
- data/vendor/rack/lib/rack/deflater.rb +87 -0
- data/vendor/rack/lib/rack/directory.rb +150 -0
- data/vendor/rack/lib/rack/file.rb +85 -0
- data/vendor/rack/lib/rack/handler.rb +48 -0
- data/vendor/rack/lib/rack/handler/cgi.rb +57 -0
- data/vendor/rack/lib/rack/handler/evented_mongrel.rb +8 -0
- data/vendor/rack/lib/rack/handler/fastcgi.rb +86 -0
- data/vendor/rack/lib/rack/handler/lsws.rb +52 -0
- data/vendor/rack/lib/rack/handler/mongrel.rb +82 -0
- data/vendor/rack/lib/rack/handler/scgi.rb +57 -0
- data/vendor/rack/lib/rack/handler/swiftiplied_mongrel.rb +8 -0
- data/vendor/rack/lib/rack/handler/thin.rb +15 -0
- data/vendor/rack/lib/rack/handler/webrick.rb +61 -0
- data/vendor/rack/lib/rack/head.rb +19 -0
- data/vendor/rack/lib/rack/lint.rb +465 -0
- data/vendor/rack/lib/rack/lobster.rb +65 -0
- data/vendor/rack/lib/rack/methodoverride.rb +27 -0
- data/vendor/rack/lib/rack/mime.rb +204 -0
- data/vendor/rack/lib/rack/mock.rb +160 -0
- data/vendor/rack/lib/rack/recursive.rb +57 -0
- data/vendor/rack/lib/rack/reloader.rb +64 -0
- data/vendor/rack/lib/rack/request.rb +218 -0
- data/vendor/rack/lib/rack/response.rb +171 -0
- data/vendor/rack/lib/rack/session/abstract/id.rb +153 -0
- data/vendor/rack/lib/rack/session/cookie.rb +89 -0
- data/vendor/rack/lib/rack/session/memcache.rb +97 -0
- data/vendor/rack/lib/rack/session/pool.rb +73 -0
- data/vendor/rack/lib/rack/showexceptions.rb +348 -0
- data/vendor/rack/lib/rack/showstatus.rb +106 -0
- data/vendor/rack/lib/rack/static.rb +38 -0
- data/vendor/rack/lib/rack/urlmap.rb +48 -0
- data/vendor/rack/lib/rack/utils.rb +347 -0
- data/vendor/rack/test/cgi/lighttpd.conf +20 -0
- data/vendor/rack/test/cgi/test +9 -0
- data/vendor/rack/test/cgi/test.fcgi +8 -0
- data/vendor/rack/test/cgi/test.ru +7 -0
- data/vendor/rack/test/spec_rack_auth_basic.rb +69 -0
- data/vendor/rack/test/spec_rack_auth_digest.rb +169 -0
- data/vendor/rack/test/spec_rack_auth_openid.rb +137 -0
- data/vendor/rack/test/spec_rack_builder.rb +84 -0
- data/vendor/rack/test/spec_rack_camping.rb +51 -0
- data/vendor/rack/test/spec_rack_cascade.rb +50 -0
- data/vendor/rack/test/spec_rack_cgi.rb +89 -0
- data/vendor/rack/test/spec_rack_commonlogger.rb +32 -0
- data/vendor/rack/test/spec_rack_conditionalget.rb +41 -0
- data/vendor/rack/test/spec_rack_content_length.rb +43 -0
- data/vendor/rack/test/spec_rack_deflater.rb +105 -0
- data/vendor/rack/test/spec_rack_directory.rb +61 -0
- data/vendor/rack/test/spec_rack_fastcgi.rb +89 -0
- data/vendor/rack/test/spec_rack_file.rb +64 -0
- data/vendor/rack/test/spec_rack_handler.rb +24 -0
- data/vendor/rack/test/spec_rack_head.rb +30 -0
- data/vendor/rack/test/spec_rack_lint.rb +380 -0
- data/vendor/rack/test/spec_rack_lobster.rb +45 -0
- data/vendor/rack/test/spec_rack_methodoverride.rb +60 -0
- data/vendor/rack/test/spec_rack_mock.rb +152 -0
- data/vendor/rack/test/spec_rack_mongrel.rb +189 -0
- data/vendor/rack/test/spec_rack_recursive.rb +77 -0
- data/vendor/rack/test/spec_rack_request.rb +446 -0
- data/vendor/rack/test/spec_rack_response.rb +174 -0
- data/vendor/rack/test/spec_rack_session_cookie.rb +82 -0
- data/vendor/rack/test/spec_rack_session_memcache.rb +132 -0
- data/vendor/rack/test/spec_rack_session_pool.rb +84 -0
- data/vendor/rack/test/spec_rack_showexceptions.rb +21 -0
- data/vendor/rack/test/spec_rack_showstatus.rb +72 -0
- data/vendor/rack/test/spec_rack_static.rb +37 -0
- data/vendor/rack/test/spec_rack_thin.rb +90 -0
- data/vendor/rack/test/spec_rack_urlmap.rb +175 -0
- data/vendor/rack/test/spec_rack_utils.rb +176 -0
- data/vendor/rack/test/spec_rack_webrick.rb +123 -0
- data/vendor/rack/test/testrequest.rb +57 -0
- data/vendor/sinatra/AUTHORS +40 -0
- data/vendor/sinatra/CHANGES +189 -0
- data/vendor/sinatra/LICENSE +22 -0
- data/vendor/sinatra/README.rdoc +552 -0
- data/vendor/sinatra/Rakefile +186 -0
- data/vendor/sinatra/compat/app_test.rb +300 -0
- data/vendor/sinatra/compat/application_test.rb +334 -0
- data/vendor/sinatra/compat/builder_test.rb +101 -0
- data/vendor/sinatra/compat/custom_error_test.rb +62 -0
- data/vendor/sinatra/compat/erb_test.rb +136 -0
- data/vendor/sinatra/compat/events_test.rb +78 -0
- data/vendor/sinatra/compat/filter_test.rb +30 -0
- data/vendor/sinatra/compat/haml_test.rb +233 -0
- data/vendor/sinatra/compat/helper.rb +30 -0
- data/vendor/sinatra/compat/mapped_error_test.rb +72 -0
- data/vendor/sinatra/compat/pipeline_test.rb +71 -0
- data/vendor/sinatra/compat/public/foo.xml +1 -0
- data/vendor/sinatra/compat/sass_test.rb +57 -0
- data/vendor/sinatra/compat/sessions_test.rb +39 -0
- data/vendor/sinatra/compat/streaming_test.rb +121 -0
- data/vendor/sinatra/compat/sym_params_test.rb +19 -0
- data/vendor/sinatra/compat/template_test.rb +30 -0
- data/vendor/sinatra/compat/use_in_file_templates_test.rb +47 -0
- data/vendor/sinatra/compat/views/foo.builder +1 -0
- data/vendor/sinatra/compat/views/foo.erb +1 -0
- data/vendor/sinatra/compat/views/foo.haml +1 -0
- data/vendor/sinatra/compat/views/foo.sass +2 -0
- data/vendor/sinatra/compat/views/foo_layout.erb +2 -0
- data/vendor/sinatra/compat/views/foo_layout.haml +2 -0
- data/vendor/sinatra/compat/views/layout_test/foo.builder +1 -0
- data/vendor/sinatra/compat/views/layout_test/foo.erb +1 -0
- data/vendor/sinatra/compat/views/layout_test/foo.haml +1 -0
- data/vendor/sinatra/compat/views/layout_test/foo.sass +2 -0
- data/vendor/sinatra/compat/views/layout_test/layout.builder +3 -0
- data/vendor/sinatra/compat/views/layout_test/layout.erb +1 -0
- data/vendor/sinatra/compat/views/layout_test/layout.haml +1 -0
- data/vendor/sinatra/compat/views/layout_test/layout.sass +2 -0
- data/vendor/sinatra/compat/views/no_layout/no_layout.builder +1 -0
- data/vendor/sinatra/compat/views/no_layout/no_layout.haml +1 -0
- data/vendor/sinatra/lib/sinatra.rb +8 -0
- data/vendor/sinatra/lib/sinatra/base.rb +843 -0
- data/vendor/sinatra/lib/sinatra/compat.rb +239 -0
- data/vendor/sinatra/lib/sinatra/images/404.png +0 -0
- data/vendor/sinatra/lib/sinatra/images/500.png +0 -0
- data/vendor/sinatra/lib/sinatra/main.rb +48 -0
- data/vendor/sinatra/lib/sinatra/test.rb +114 -0
- data/vendor/sinatra/lib/sinatra/test/bacon.rb +17 -0
- data/vendor/sinatra/lib/sinatra/test/rspec.rb +9 -0
- data/vendor/sinatra/lib/sinatra/test/spec.rb +9 -0
- data/vendor/sinatra/lib/sinatra/test/unit.rb +11 -0
- data/vendor/sinatra/sinatra.gemspec +110 -0
- data/vendor/sinatra/test/base_test.rb +68 -0
- data/vendor/sinatra/test/builder_test.rb +64 -0
- data/vendor/sinatra/test/data/reload_app_file.rb +3 -0
- data/vendor/sinatra/test/erb_test.rb +50 -0
- data/vendor/sinatra/test/filter_test.rb +75 -0
- data/vendor/sinatra/test/haml_test.rb +68 -0
- data/vendor/sinatra/test/helper.rb +25 -0
- data/vendor/sinatra/test/helpers_test.rb +361 -0
- data/vendor/sinatra/test/mapped_error_test.rb +160 -0
- data/vendor/sinatra/test/middleware_test.rb +58 -0
- data/vendor/sinatra/test/options_test.rb +97 -0
- data/vendor/sinatra/test/reload_test.rb +61 -0
- data/vendor/sinatra/test/request_test.rb +18 -0
- data/vendor/sinatra/test/result_test.rb +88 -0
- data/vendor/sinatra/test/routing_test.rb +391 -0
- data/vendor/sinatra/test/sass_test.rb +36 -0
- data/vendor/sinatra/test/sinatra_test.rb +13 -0
- data/vendor/sinatra/test/static_test.rb +57 -0
- data/vendor/sinatra/test/templates_test.rb +88 -0
- data/vendor/sinatra/test/views/hello.builder +1 -0
- data/vendor/sinatra/test/views/hello.erb +1 -0
- data/vendor/sinatra/test/views/hello.haml +1 -0
- data/vendor/sinatra/test/views/hello.sass +2 -0
- data/vendor/sinatra/test/views/hello.test +1 -0
- data/vendor/sinatra/test/views/layout2.builder +3 -0
- data/vendor/sinatra/test/views/layout2.erb +2 -0
- data/vendor/sinatra/test/views/layout2.haml +2 -0
- data/vendor/sinatra/test/views/layout2.test +1 -0
- metadata +1058 -0
@@ -0,0 +1,123 @@
|
|
1
|
+
require 'test/spec'
|
2
|
+
|
3
|
+
require 'rack/handler/webrick'
|
4
|
+
require 'rack/lint'
|
5
|
+
require 'rack/response'
|
6
|
+
require 'testrequest'
|
7
|
+
|
8
|
+
Thread.abort_on_exception = true
|
9
|
+
|
10
|
+
context "Rack::Handler::WEBrick" do
|
11
|
+
include TestRequest::Helpers
|
12
|
+
|
13
|
+
setup do
|
14
|
+
@server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0',
|
15
|
+
:Port => @port=9202,
|
16
|
+
:Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN),
|
17
|
+
:AccessLog => [])
|
18
|
+
@server.mount "/test", Rack::Handler::WEBrick,
|
19
|
+
Rack::Lint.new(TestRequest.new)
|
20
|
+
Thread.new { @server.start }
|
21
|
+
trap(:INT) { @server.shutdown }
|
22
|
+
end
|
23
|
+
|
24
|
+
specify "should respond" do
|
25
|
+
lambda {
|
26
|
+
GET("/test")
|
27
|
+
}.should.not.raise
|
28
|
+
end
|
29
|
+
|
30
|
+
specify "should be a WEBrick" do
|
31
|
+
GET("/test")
|
32
|
+
status.should.be 200
|
33
|
+
response["SERVER_SOFTWARE"].should =~ /WEBrick/
|
34
|
+
response["HTTP_VERSION"].should.equal "HTTP/1.1"
|
35
|
+
response["SERVER_PROTOCOL"].should.equal "HTTP/1.1"
|
36
|
+
response["SERVER_PORT"].should.equal "9202"
|
37
|
+
response["SERVER_NAME"].should.equal "0.0.0.0"
|
38
|
+
end
|
39
|
+
|
40
|
+
specify "should have rack headers" do
|
41
|
+
GET("/test")
|
42
|
+
response["rack.version"].should.equal [0,1]
|
43
|
+
response["rack.multithread"].should.be true
|
44
|
+
response["rack.multiprocess"].should.be false
|
45
|
+
response["rack.run_once"].should.be false
|
46
|
+
end
|
47
|
+
|
48
|
+
specify "should have CGI headers on GET" do
|
49
|
+
GET("/test")
|
50
|
+
response["REQUEST_METHOD"].should.equal "GET"
|
51
|
+
response["SCRIPT_NAME"].should.equal "/test"
|
52
|
+
response["REQUEST_PATH"].should.equal "/"
|
53
|
+
response["PATH_INFO"].should.be.nil
|
54
|
+
response["QUERY_STRING"].should.equal ""
|
55
|
+
response["test.postdata"].should.equal ""
|
56
|
+
|
57
|
+
GET("/test/foo?quux=1")
|
58
|
+
response["REQUEST_METHOD"].should.equal "GET"
|
59
|
+
response["SCRIPT_NAME"].should.equal "/test"
|
60
|
+
response["REQUEST_PATH"].should.equal "/"
|
61
|
+
response["PATH_INFO"].should.equal "/foo"
|
62
|
+
response["QUERY_STRING"].should.equal "quux=1"
|
63
|
+
end
|
64
|
+
|
65
|
+
specify "should have CGI headers on POST" do
|
66
|
+
POST("/test", {"rack-form-data" => "23"}, {'X-test-header' => '42'})
|
67
|
+
status.should.equal 200
|
68
|
+
response["REQUEST_METHOD"].should.equal "POST"
|
69
|
+
response["SCRIPT_NAME"].should.equal "/test"
|
70
|
+
response["REQUEST_PATH"].should.equal "/"
|
71
|
+
response["QUERY_STRING"].should.equal ""
|
72
|
+
response["HTTP_X_TEST_HEADER"].should.equal "42"
|
73
|
+
response["test.postdata"].should.equal "rack-form-data=23"
|
74
|
+
end
|
75
|
+
|
76
|
+
specify "should support HTTP auth" do
|
77
|
+
GET("/test", {:user => "ruth", :passwd => "secret"})
|
78
|
+
response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ="
|
79
|
+
end
|
80
|
+
|
81
|
+
specify "should set status" do
|
82
|
+
GET("/test?secret")
|
83
|
+
status.should.equal 403
|
84
|
+
response["rack.url_scheme"].should.equal "http"
|
85
|
+
end
|
86
|
+
|
87
|
+
specify "should correctly set cookies" do
|
88
|
+
@server.mount "/cookie-test", Rack::Handler::WEBrick,
|
89
|
+
Rack::Lint.new(lambda { |req|
|
90
|
+
res = Rack::Response.new
|
91
|
+
res.set_cookie "one", "1"
|
92
|
+
res.set_cookie "two", "2"
|
93
|
+
res.finish
|
94
|
+
})
|
95
|
+
|
96
|
+
Net::HTTP.start(@host, @port) { |http|
|
97
|
+
res = http.get("/cookie-test")
|
98
|
+
res.code.to_i.should.equal 200
|
99
|
+
res.get_fields("set-cookie").should.equal ["one=1", "two=2"]
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
specify "should provide a .run" do
|
104
|
+
block_ran = false
|
105
|
+
catch(:done) {
|
106
|
+
Rack::Handler::WEBrick.run(lambda {},
|
107
|
+
{:Port => 9210,
|
108
|
+
:Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN),
|
109
|
+
:AccessLog => []}) { |server|
|
110
|
+
block_ran = true
|
111
|
+
server.should.be.kind_of WEBrick::HTTPServer
|
112
|
+
@s = server
|
113
|
+
throw :done
|
114
|
+
}
|
115
|
+
}
|
116
|
+
block_ran.should.be true
|
117
|
+
@s.shutdown
|
118
|
+
end
|
119
|
+
|
120
|
+
teardown do
|
121
|
+
@server.shutdown
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'net/http'
|
3
|
+
|
4
|
+
class TestRequest
|
5
|
+
def call(env)
|
6
|
+
status = env["QUERY_STRING"] =~ /secret/ ? 403 : 200
|
7
|
+
env["test.postdata"] = env["rack.input"].read
|
8
|
+
body = env.to_yaml
|
9
|
+
size = body.respond_to?(:bytesize) ? body.bytesize : body.size
|
10
|
+
[status, {"Content-Type" => "text/yaml", "Content-Length" => size.to_s}, [body]]
|
11
|
+
end
|
12
|
+
|
13
|
+
module Helpers
|
14
|
+
attr_reader :status, :response
|
15
|
+
|
16
|
+
def GET(path, header={})
|
17
|
+
Net::HTTP.start(@host, @port) { |http|
|
18
|
+
user = header.delete(:user)
|
19
|
+
passwd = header.delete(:passwd)
|
20
|
+
|
21
|
+
get = Net::HTTP::Get.new(path, header)
|
22
|
+
get.basic_auth user, passwd if user && passwd
|
23
|
+
http.request(get) { |response|
|
24
|
+
@status = response.code.to_i
|
25
|
+
@response = YAML.load(response.body)
|
26
|
+
}
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def POST(path, formdata={}, header={})
|
31
|
+
Net::HTTP.start(@host, @port) { |http|
|
32
|
+
user = header.delete(:user)
|
33
|
+
passwd = header.delete(:passwd)
|
34
|
+
|
35
|
+
post = Net::HTTP::Post.new(path, header)
|
36
|
+
post.form_data = formdata
|
37
|
+
post.basic_auth user, passwd if user && passwd
|
38
|
+
http.request(post) { |response|
|
39
|
+
@status = response.code.to_i
|
40
|
+
@response = YAML.load(response.body)
|
41
|
+
}
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
class StreamingRequest
|
48
|
+
def self.call(env)
|
49
|
+
[200, {"Content-Type" => "text/plain"}, new]
|
50
|
+
end
|
51
|
+
|
52
|
+
def each
|
53
|
+
yield "hello there!\n"
|
54
|
+
sleep 5
|
55
|
+
yield "that is all.\n"
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Sinatra was designed and developed by Blake Mizerany (bmizerany) in
|
2
|
+
California. Continued development would not be possible without the ongoing
|
3
|
+
financial support provided by Heroku <heroku.com> and the emotional support
|
4
|
+
provided by Adam Wiggins (adamwiggins), Chris Wanstrath (defunkt), PJ Hyett (pjhyett), and
|
5
|
+
the rest of the Github crew.
|
6
|
+
|
7
|
+
Special thanks to the following extraordinary individuals, who-out which
|
8
|
+
Sinatra would not be possible:
|
9
|
+
|
10
|
+
* Ryan Tomayko (rtomayko) for constantly fixing whitespace errors 60d5006
|
11
|
+
* Ezra Zygmuntowicz (ezmobius) for initial help and letting Blake steal
|
12
|
+
some of merbs internal code.
|
13
|
+
* Christopher Schneid (cschneid) for The Book, the blog (gittr.com),
|
14
|
+
irclogger.com, and a bunch of useful patches.
|
15
|
+
* Markus Prinz (cypher) for patches over the years, caring about
|
16
|
+
the README, and hanging in there when times were rough.
|
17
|
+
* Simon Rozet (sr) for a ton of doc patches, HAML options, and all that
|
18
|
+
advocacy stuff he's going to do for 1.0.
|
19
|
+
* Erik Kastner (kastner) for fixing MIME_TYPES under Rack 0.5.
|
20
|
+
* Ben Bleything (bleything) for caring about HTTP status codes and doc fixes.
|
21
|
+
* Igal Koshevoy (igal) for root path detection under Thin/Passenger.
|
22
|
+
* Jon Crosby (jcrosby) for coffee breaks, doc fixes, and just because, man.
|
23
|
+
* Karel Minarik (karmi) for screaming until the website came back up.
|
24
|
+
* Jeremy Evans (jeremyevans) for unbreaking optional path params (twice!)
|
25
|
+
* The GitHub guys for stealing Blake's table.
|
26
|
+
* Nickolas Means (nmeans) for Sass template support.
|
27
|
+
* Victor Hugo Borja (vic) for splat'n routes specs and doco.
|
28
|
+
* Avdi Grimm (avdi) for basic RSpec support.
|
29
|
+
* Jack Danger Canty for a more accurate root directory and for making me
|
30
|
+
watch this just now: http://www.youtube.com/watch?v=ueaHLHgskkw.
|
31
|
+
* Mathew Walker for making escaped paths work with static files.
|
32
|
+
* Millions of Us for having the problem that led to Sinatra's conception.
|
33
|
+
* Songbird for the problems that helped Sinatra's future become realized.
|
34
|
+
* Rick Olsen (technoweenie) for the killer plug at RailsConf '08.
|
35
|
+
* Steven Garcia for the amazing custom artwork you see on 404's and 500's
|
36
|
+
|
37
|
+
and last but not least:
|
38
|
+
|
39
|
+
* Frank Sinatra (chairman of the board) for having so much class he
|
40
|
+
deserves a web-framework named after him.
|
@@ -0,0 +1,189 @@
|
|
1
|
+
= 0.9.0 / 2009-01-18
|
2
|
+
|
3
|
+
* Works with and requires Rack >= 0.9.1
|
4
|
+
|
5
|
+
* Multiple Sinatra applications can now co-exist peacefully within a
|
6
|
+
single process. The new "Sinatra::Base" class can be subclassed to
|
7
|
+
establish a blank-slate Rack application or middleware component.
|
8
|
+
Documentation on using these features is forth-coming; the following
|
9
|
+
provides the basic gist: http://gist.github.com/38605
|
10
|
+
|
11
|
+
* Parameters with subscripts are now parsed into a nested/recursive
|
12
|
+
Hash structure. e.g., "post[title]=Hello&post[body]=World" yields
|
13
|
+
params: {'post' => {'title' => 'Hello', 'body' => 'World'}}.
|
14
|
+
|
15
|
+
* Regular expressions may now be used in route pattens; captures are
|
16
|
+
available at "params[:captures]".
|
17
|
+
|
18
|
+
* New ":provides" route condition takes an array of mime types and
|
19
|
+
matches only when an Accept request header is present with a
|
20
|
+
corresponding type. [cypher]
|
21
|
+
|
22
|
+
* New request-level "pass" method; immediately exits the current block
|
23
|
+
and passes control to the next matching route.
|
24
|
+
|
25
|
+
* The request-level "body" method now takes a block; evaluation is
|
26
|
+
deferred until an attempt is made to read the body. The block must
|
27
|
+
return a String or Array.
|
28
|
+
|
29
|
+
* New "route conditions" system for attaching rules for when a route
|
30
|
+
matches. The :agent and :host route options now use this system.
|
31
|
+
|
32
|
+
* New "dump_errors" option controls whether the backtrace is dumped to
|
33
|
+
rack.errors when an exception is raised from a route. The option is
|
34
|
+
enabled by default for top-level apps.
|
35
|
+
|
36
|
+
* Better default "app_file", "root", "public", and "views" location
|
37
|
+
detection; changes to "root" and "app_file" automatically cascade to
|
38
|
+
other options that depend on them.
|
39
|
+
|
40
|
+
* Error mappings are now split into two distinct layers: exception
|
41
|
+
mappings and custom error pages. Exception mappings are registered
|
42
|
+
with "error(Exception)" and are run only when the app raises an
|
43
|
+
exception. Custom error pages are registered with "error(status_code)",
|
44
|
+
where "status_code" is an integer, and are run any time the response
|
45
|
+
has the status code specified. It's also possible to register an error
|
46
|
+
page for a range of status codes: "error(500..599)".
|
47
|
+
|
48
|
+
* In-file templates are now automatically imported from the file that
|
49
|
+
requires 'sinatra'. The use_in_file_templates! method is still available
|
50
|
+
for loading templates from other files.
|
51
|
+
|
52
|
+
* Sinatra's testing support is no longer dependent on Test::Unit. Requiring
|
53
|
+
'sinatra/test' adds the Sinatra::Test module and Sinatra::TestHarness
|
54
|
+
class, which can be used with any test framework. The 'sinatra/test/unit',
|
55
|
+
'sinatra/test/spec', 'sinatra/test/rspec', or 'sinatra/test/bacon' files
|
56
|
+
can be required to setup a framework-specific testing environment. See the
|
57
|
+
README for more information.
|
58
|
+
|
59
|
+
* Added support for Bacon (test framework). The 'sinatra/test/bacon' file
|
60
|
+
can be required to setup Sinatra test helpers on Bacon::Context.
|
61
|
+
|
62
|
+
* Deprecated "set_option" and "set_options"; use "set" instead.
|
63
|
+
|
64
|
+
* Deprecated the "env" option ("options.env"); use "environment" instead.
|
65
|
+
|
66
|
+
* Deprecated the request level "stop" method; use "halt" instead.
|
67
|
+
|
68
|
+
* Deprecated the request level "entity_tag" method; use "etag" instead.
|
69
|
+
Both "entity_tag" and "etag" were previously supported.
|
70
|
+
|
71
|
+
* Deprecated the request level "headers" method (HTTP response headers);
|
72
|
+
use "response['Header-Name']" instead.
|
73
|
+
|
74
|
+
* Deprecated "Sinatra.application"; use "Sinatra::Application" instead.
|
75
|
+
|
76
|
+
* Deprecated setting Sinatra.application = nil to reset an application.
|
77
|
+
This should no longer be necessary.
|
78
|
+
|
79
|
+
* Deprecated "Sinatra.default_options"; use
|
80
|
+
"Sinatra::Default.set(key, value)" instead.
|
81
|
+
|
82
|
+
* Deprecated the "ServerError" exception. All Exceptions are now
|
83
|
+
treated as internal server errors and result in a 500 response
|
84
|
+
status.
|
85
|
+
|
86
|
+
* Deprecated the "get_it", "post_it", "put_it", "delete_it", and "head_it"
|
87
|
+
test helper methods. Use "get", "post", "put", "delete", and "head",
|
88
|
+
respectively, instead.
|
89
|
+
|
90
|
+
* Removed Event and EventContext classes. Applications are defined in a
|
91
|
+
subclass of Sinatra::Base; each request is processed within an
|
92
|
+
instance.
|
93
|
+
|
94
|
+
= 0.3.3 / 2009-01-06
|
95
|
+
|
96
|
+
* Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
|
97
|
+
|
98
|
+
* Log unhandled exception backtraces to rack.errors.
|
99
|
+
|
100
|
+
* Use RACK_ENV environment variable to establish Sinatra
|
101
|
+
environment when given. Thin sets this when started with
|
102
|
+
the -e argument.
|
103
|
+
|
104
|
+
* BUG: raising Sinatra::NotFound resulted in a 500 response
|
105
|
+
code instead of 404.
|
106
|
+
|
107
|
+
* BUG: use_in_file_templates! fails with CR/LF (#45)
|
108
|
+
|
109
|
+
* BUG: Sinatra detects the app file and root path when run under
|
110
|
+
thin/passenger.
|
111
|
+
|
112
|
+
= 0.3.2
|
113
|
+
|
114
|
+
* BUG: Static and send_file read entire file into String before
|
115
|
+
sending. Updated to stream with 8K chunks instead.
|
116
|
+
|
117
|
+
* Rake tasks and assets for building basic documentation website.
|
118
|
+
See http://sinatra.rubyforge.org
|
119
|
+
|
120
|
+
* Various minor doc fixes.
|
121
|
+
|
122
|
+
= 0.3.1
|
123
|
+
|
124
|
+
* Unbreak optional path parameters [jeremyevans]
|
125
|
+
|
126
|
+
= 0.3.0
|
127
|
+
|
128
|
+
* Add sinatra.gemspec w/ support for github gem builds. Forks can now
|
129
|
+
enable the build gem option in github to get free username-sinatra.gem
|
130
|
+
builds: gem install username-sinatra.gem --source=http://gems.github.com/
|
131
|
+
|
132
|
+
* Require rack-0.4 gem; removes frozen rack dir.
|
133
|
+
|
134
|
+
* Basic RSpec support; require 'sinatra/test/rspec' instead of
|
135
|
+
'sinatra/test/spec' to use. [avdi]
|
136
|
+
|
137
|
+
* before filters can modify request environment vars used for
|
138
|
+
routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
|
139
|
+
type functionality.
|
140
|
+
|
141
|
+
* In-file templates now uses @@ instead of ## as template separator.
|
142
|
+
|
143
|
+
* Top-level environment test predicates: development?, test?, production?
|
144
|
+
|
145
|
+
* Top-level "set", "enable", and "disable" methods for tweaking
|
146
|
+
app options. [rtomayko]
|
147
|
+
|
148
|
+
* Top-level "use" method for building Rack middleware pipelines
|
149
|
+
leading to app. See README for usage. [rtomayko]
|
150
|
+
|
151
|
+
* New "reload" option - set false to disable reloading in development.
|
152
|
+
|
153
|
+
* New "host" option - host/ip to bind to [cschneid]
|
154
|
+
|
155
|
+
* New "app_file" option - override the file to reload in development
|
156
|
+
mode [cschneid]
|
157
|
+
|
158
|
+
* Development error/not_found page cleanup [sr, adamwiggins]
|
159
|
+
|
160
|
+
* Remove a bunch of core extensions (String#to_param, String#from_param,
|
161
|
+
Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass)
|
162
|
+
|
163
|
+
* Various grammar and formatting fixes to README; additions on
|
164
|
+
community and contributing [cypher]
|
165
|
+
|
166
|
+
* Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api
|
167
|
+
|
168
|
+
* Specs, documentation and fixes for splat'n routes [vic]
|
169
|
+
|
170
|
+
* Fix whitespace errors across all source files. [rtomayko]
|
171
|
+
|
172
|
+
* Fix streaming issues with Mongrel (body not closed). [bmizerany]
|
173
|
+
|
174
|
+
* Fix various issues with environment not being set properly (configure
|
175
|
+
blocks not running, error pages not registering, etc.) [cypher]
|
176
|
+
|
177
|
+
* Fix to allow locals to be passed to ERB templates [cschneid]
|
178
|
+
|
179
|
+
* Fix locking issues causing random errors during reload in development.
|
180
|
+
|
181
|
+
* Fix for escaped paths not resolving static files [Matthew Walker]
|
182
|
+
|
183
|
+
= 0.2.1
|
184
|
+
|
185
|
+
* File upload fix and minor tweaks.
|
186
|
+
|
187
|
+
= 0.2.0
|
188
|
+
|
189
|
+
* Initial gem release of 0.2 codebase.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2007 Blake Mizerany
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,552 @@
|
|
1
|
+
= Sinatra
|
2
|
+
|
3
|
+
Sinatra is a DSL for quickly creating web-applications in Ruby with minimal
|
4
|
+
effort:
|
5
|
+
|
6
|
+
# myapp.rb
|
7
|
+
require 'rubygems'
|
8
|
+
require 'sinatra'
|
9
|
+
get '/' do
|
10
|
+
'Hello world!'
|
11
|
+
end
|
12
|
+
|
13
|
+
Run with <tt>ruby myapp.rb</tt> and view at <tt>http://localhost:4567</tt>
|
14
|
+
|
15
|
+
== HTTP Methods
|
16
|
+
|
17
|
+
get '/' do
|
18
|
+
.. show things ..
|
19
|
+
end
|
20
|
+
|
21
|
+
post '/' do
|
22
|
+
.. create something ..
|
23
|
+
end
|
24
|
+
|
25
|
+
put '/' do
|
26
|
+
.. update something ..
|
27
|
+
end
|
28
|
+
|
29
|
+
delete '/' do
|
30
|
+
.. annihilate something ..
|
31
|
+
end
|
32
|
+
|
33
|
+
== Routes
|
34
|
+
|
35
|
+
Routes are matched based on the order of declaration. The first route that
|
36
|
+
matches the request is invoked.
|
37
|
+
|
38
|
+
Basic routes:
|
39
|
+
|
40
|
+
get '/hi' do
|
41
|
+
...
|
42
|
+
end
|
43
|
+
|
44
|
+
Route patterns may include named parameters, accessible via the
|
45
|
+
<tt>params</tt> hash:
|
46
|
+
|
47
|
+
get '/:name' do
|
48
|
+
# matches "GET /foo" and "GET /bar"
|
49
|
+
# params[:name] is 'foo' or 'bar'
|
50
|
+
"Hello #{params[:name]}!"
|
51
|
+
end
|
52
|
+
|
53
|
+
Route patterns may also include splat (or wildcard) parameters, accessible
|
54
|
+
via the <tt>params[:splat]</tt> array.
|
55
|
+
|
56
|
+
get '/say/*/to/*' do
|
57
|
+
# matches /say/hello/to/world
|
58
|
+
params[:splat] # => ["hello", "world"]
|
59
|
+
end
|
60
|
+
|
61
|
+
get '/download/*.*' do
|
62
|
+
# matches /download/path/to/file.xml
|
63
|
+
params[:splat] # => ["path/to/file", "xml"]
|
64
|
+
end
|
65
|
+
|
66
|
+
Route matching with Regular Expressions:
|
67
|
+
|
68
|
+
get %r{/hello/([\w]+)} do
|
69
|
+
"Hello, #{params[:captures].first}!"
|
70
|
+
end
|
71
|
+
|
72
|
+
Routes may include a variety of matching conditions, such as the user agent:
|
73
|
+
|
74
|
+
get '/foo', :agent => /Songbird (\d\.\d)[\d\/]*?/ do
|
75
|
+
"You're using Songbird version #{params[:agent][0]}"
|
76
|
+
end
|
77
|
+
|
78
|
+
get '/foo' do
|
79
|
+
# Matches non-songbird browsers
|
80
|
+
end
|
81
|
+
|
82
|
+
== Static Files
|
83
|
+
|
84
|
+
Static files are served from the <tt>./public</tt> directory. You can specify
|
85
|
+
a different location by setting the <tt>:public</tt> option:
|
86
|
+
|
87
|
+
set :public, File.dirname(__FILE__) + '/static'
|
88
|
+
|
89
|
+
== Views / Templates
|
90
|
+
|
91
|
+
Templates are assumed to be located directly under a <tt>./views</tt>
|
92
|
+
directory. To use a different views directory:
|
93
|
+
|
94
|
+
set :views, File.dirname(__FILE__) + '/templates'
|
95
|
+
|
96
|
+
=== Haml Templates
|
97
|
+
|
98
|
+
The haml gem/library is required to render HAML templates:
|
99
|
+
|
100
|
+
get '/' do
|
101
|
+
haml :index
|
102
|
+
end
|
103
|
+
|
104
|
+
Renders <tt>./views/index.haml</tt>.
|
105
|
+
|
106
|
+
=== Erb Templates
|
107
|
+
|
108
|
+
get '/' do
|
109
|
+
erb :index
|
110
|
+
end
|
111
|
+
|
112
|
+
Renders <tt>./views/index.erb</tt>
|
113
|
+
|
114
|
+
=== Builder Templates
|
115
|
+
|
116
|
+
The builder gem/library is required to render builder templates:
|
117
|
+
|
118
|
+
get '/' do
|
119
|
+
content_type 'application/xml', :charset => 'utf-8'
|
120
|
+
builder :index
|
121
|
+
end
|
122
|
+
|
123
|
+
Renders <tt>./views/index.builder</tt>.
|
124
|
+
|
125
|
+
=== Sass Templates
|
126
|
+
|
127
|
+
The sass gem/library is required to render Sass templates:
|
128
|
+
|
129
|
+
get '/stylesheet.css' do
|
130
|
+
content_type 'text/css', :charset => 'utf-8'
|
131
|
+
sass :stylesheet
|
132
|
+
end
|
133
|
+
|
134
|
+
Renders <tt>./views/stylesheet.sass</tt>.
|
135
|
+
|
136
|
+
=== Inline Templates
|
137
|
+
|
138
|
+
get '/' do
|
139
|
+
haml '%div.title Hello World'
|
140
|
+
end
|
141
|
+
|
142
|
+
Renders the inlined template string.
|
143
|
+
|
144
|
+
=== Accessing Variables
|
145
|
+
|
146
|
+
Templates are evaluated within the same context as the route blocks. Instance
|
147
|
+
variables set in route blocks are available in templates:
|
148
|
+
|
149
|
+
get '/:id' do
|
150
|
+
@foo = Foo.find(params[:id])
|
151
|
+
haml '%h1= @foo.name'
|
152
|
+
end
|
153
|
+
|
154
|
+
Or, specify an explicit Hash of local variables:
|
155
|
+
|
156
|
+
get '/:id' do
|
157
|
+
foo = Foo.find(params[:id])
|
158
|
+
haml '%h1= foo.name', :locals => { :foo => foo }
|
159
|
+
end
|
160
|
+
|
161
|
+
This is typically used when rendering templates as partials from within
|
162
|
+
other templates.
|
163
|
+
|
164
|
+
=== In-file Templates
|
165
|
+
|
166
|
+
Templates may be defined at the end of the source file:
|
167
|
+
|
168
|
+
require 'rubygems'
|
169
|
+
require 'sinatra'
|
170
|
+
|
171
|
+
get '/' do
|
172
|
+
haml :index
|
173
|
+
end
|
174
|
+
|
175
|
+
__END__
|
176
|
+
|
177
|
+
@@ layout
|
178
|
+
%html
|
179
|
+
= yield
|
180
|
+
|
181
|
+
@@ index
|
182
|
+
%div.title Hello world!!!!!
|
183
|
+
|
184
|
+
NOTE: Sinatra will automaticly load any in-file-templates in the
|
185
|
+
source file that first required sinatra. If you have in-file-templates
|
186
|
+
in another source file you will need to explicitly call
|
187
|
+
+use_in_file_templates! on main in that file.
|
188
|
+
|
189
|
+
It's also possible to define named templates using the top-level template
|
190
|
+
method:
|
191
|
+
|
192
|
+
template :layout do
|
193
|
+
"%html\n =yield\n"
|
194
|
+
end
|
195
|
+
|
196
|
+
template :index do
|
197
|
+
'%div.title Hello World!'
|
198
|
+
end
|
199
|
+
|
200
|
+
get '/' do
|
201
|
+
haml :index
|
202
|
+
end
|
203
|
+
|
204
|
+
If a template named "layout" exists, it will be used each time a template
|
205
|
+
is rendered. You can disable layouts by passing <tt>:layout => false</tt>.
|
206
|
+
|
207
|
+
get '/' do
|
208
|
+
haml :index, :layout => !request.xhr?
|
209
|
+
end
|
210
|
+
|
211
|
+
== Helpers
|
212
|
+
|
213
|
+
Use the top-level <tt>helpers</tt> method to define helper methods for use in
|
214
|
+
route blocks and templates:
|
215
|
+
|
216
|
+
helpers do
|
217
|
+
def bar(name)
|
218
|
+
"#{name}bar"
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
get '/:name' do
|
223
|
+
bar(params[:name])
|
224
|
+
end
|
225
|
+
|
226
|
+
== Filters
|
227
|
+
|
228
|
+
Before filters are evaluated before each request within the context of the
|
229
|
+
request and can modify the request and response. Instance variables set in
|
230
|
+
filters are accessible by routes and templates.
|
231
|
+
|
232
|
+
before do
|
233
|
+
@note = 'Hi!'
|
234
|
+
request.path_info = '/foo/bar/baz'
|
235
|
+
end
|
236
|
+
|
237
|
+
get '/foo/*' do
|
238
|
+
@note #=> 'Hi!'
|
239
|
+
params[:splat] #=> 'bar/baz'
|
240
|
+
end
|
241
|
+
|
242
|
+
== Halting
|
243
|
+
|
244
|
+
To immediately stop a request during a before filter or route use:
|
245
|
+
|
246
|
+
halt
|
247
|
+
|
248
|
+
You can also specify a body when halting ...
|
249
|
+
|
250
|
+
halt 'this will be the body'
|
251
|
+
|
252
|
+
Set the status and body ...
|
253
|
+
|
254
|
+
halt 401, 'go away!'
|
255
|
+
|
256
|
+
== Passing
|
257
|
+
|
258
|
+
A route can punt processing to the next matching route using the <tt>pass</tt>
|
259
|
+
statement:
|
260
|
+
|
261
|
+
get '/guess/:who' do
|
262
|
+
pass unless params[:who] == 'Frank'
|
263
|
+
"You got me!"
|
264
|
+
end
|
265
|
+
|
266
|
+
get '/guess/*' do
|
267
|
+
"You missed!"
|
268
|
+
end
|
269
|
+
|
270
|
+
The route block is immediately exited and control continues with the next
|
271
|
+
matching route. If no matching route is found, a 404 is returned.
|
272
|
+
|
273
|
+
== Configuration and Reloading
|
274
|
+
|
275
|
+
Sinatra supports multiple environments and reloading. Reloading happens
|
276
|
+
before each request when running under the <tt>:development</tt>
|
277
|
+
environment. Wrap your configurations (e.g., database connections, constants,
|
278
|
+
etc.) in <tt>configure</tt> blocks to protect them from reloading or to
|
279
|
+
target specific environments.
|
280
|
+
|
281
|
+
Run once, at startup, in any environment:
|
282
|
+
|
283
|
+
configure do
|
284
|
+
...
|
285
|
+
end
|
286
|
+
|
287
|
+
Run only when the environment (RACK_ENV environment variable) is set to
|
288
|
+
<tt>:production</tt>.
|
289
|
+
|
290
|
+
configure :production do
|
291
|
+
...
|
292
|
+
end
|
293
|
+
|
294
|
+
Run when the environment (RACK_ENV environment variable) is set to
|
295
|
+
either <tt>:production</tt> or <tt>:test</tt>.
|
296
|
+
|
297
|
+
configure :production, :test do
|
298
|
+
...
|
299
|
+
end
|
300
|
+
|
301
|
+
== Error handling
|
302
|
+
|
303
|
+
Error handlers run within the same context as routes and before filters, which
|
304
|
+
means you get all the goodies it has to offer, like <tt>haml</tt>, <tt>erb</tt>,
|
305
|
+
<tt>halt</tt>, etc.
|
306
|
+
|
307
|
+
=== Not Found
|
308
|
+
|
309
|
+
When a <tt>Sinatra::NotFound</tt> exception is raised, or the response's status
|
310
|
+
code is 404, the <tt>not_found</tt> handler is invoked:
|
311
|
+
|
312
|
+
not_found do
|
313
|
+
'This is nowhere to be found'
|
314
|
+
end
|
315
|
+
|
316
|
+
=== Error
|
317
|
+
|
318
|
+
The +error+ handler is invoked any time an exception is raised from a route
|
319
|
+
block or before filter. The exception object can be obtained from the
|
320
|
+
'sinatra.error' Rack variable:
|
321
|
+
|
322
|
+
error do
|
323
|
+
'Sorry there was a nasty error - ' + env['sinatra.error'].name
|
324
|
+
end
|
325
|
+
|
326
|
+
Custom errors:
|
327
|
+
|
328
|
+
error MyCustomError do
|
329
|
+
'So what happened was...' + request.env['sinatra.error'].message
|
330
|
+
end
|
331
|
+
|
332
|
+
Then, if this happens:
|
333
|
+
|
334
|
+
get '/' do
|
335
|
+
raise MyCustomError, 'something bad'
|
336
|
+
end
|
337
|
+
|
338
|
+
You get this:
|
339
|
+
|
340
|
+
So what happened was... something bad
|
341
|
+
|
342
|
+
Sinatra installs special not_found and error handlers when running under
|
343
|
+
the development environment.
|
344
|
+
|
345
|
+
== Mime types
|
346
|
+
|
347
|
+
When using <tt>send_file</tt> or static files you may have mime types Sinatra
|
348
|
+
doesn't understand. Use +mime+ to register them by file extension:
|
349
|
+
|
350
|
+
mime :foo, 'text/foo'
|
351
|
+
|
352
|
+
== Rack Middleware
|
353
|
+
|
354
|
+
Sinatra rides on Rack[http://rack.rubyforge.org/], a minimal standard
|
355
|
+
interface for Ruby web frameworks. One of Rack's most interesting capabilities
|
356
|
+
for application developers is support for "middleware" -- components that sit
|
357
|
+
between the server and your application monitoring and/or manipulating the
|
358
|
+
HTTP request/response to provide various types of common functionality.
|
359
|
+
|
360
|
+
Sinatra makes building Rack middleware pipelines a cinch via a top-level
|
361
|
+
+use+ method:
|
362
|
+
|
363
|
+
require 'sinatra'
|
364
|
+
require 'my_custom_middleware'
|
365
|
+
|
366
|
+
use Rack::Lint
|
367
|
+
use MyCustomMiddleware
|
368
|
+
|
369
|
+
get '/hello' do
|
370
|
+
'Hello World'
|
371
|
+
end
|
372
|
+
|
373
|
+
The semantics of +use+ are identical to those defined for the
|
374
|
+
Rack::Builder[http://rack.rubyforge.org/doc/classes/Rack/Builder.html] DSL
|
375
|
+
(most frequently used from rackup files). For example, the +use+ method
|
376
|
+
accepts multiple/variable args as well as blocks:
|
377
|
+
|
378
|
+
use Rack::Auth::Basic do |username, password|
|
379
|
+
username == 'admin' && password == 'secret'
|
380
|
+
end
|
381
|
+
|
382
|
+
Rack is distributed with a variety of standard middleware for logging,
|
383
|
+
debugging, URL routing, authentication, and session handling. Sinatra uses
|
384
|
+
many of of these components automatically based on configuration so you
|
385
|
+
typically don't have to +use+ them explicitly.
|
386
|
+
|
387
|
+
== Testing
|
388
|
+
|
389
|
+
The Sinatra::Test module includes a variety of helper methods for testing
|
390
|
+
your Sinatra app. Sinatra includes support for Test::Unit, test-spec, RSpec,
|
391
|
+
and Bacon through separate source files.
|
392
|
+
|
393
|
+
=== Test::Unit
|
394
|
+
|
395
|
+
require 'sinatra'
|
396
|
+
require 'sinatra/test/unit'
|
397
|
+
require 'my_sinatra_app'
|
398
|
+
|
399
|
+
class MyAppTest < Test::Unit::TestCase
|
400
|
+
def test_my_default
|
401
|
+
get '/'
|
402
|
+
assert_equal 'My Default Page!', @response.body
|
403
|
+
end
|
404
|
+
|
405
|
+
def test_with_agent
|
406
|
+
get '/', :agent => 'Songbird'
|
407
|
+
assert_equal 'You're in Songbird!', @response.body
|
408
|
+
end
|
409
|
+
|
410
|
+
...
|
411
|
+
end
|
412
|
+
|
413
|
+
=== Test::Spec
|
414
|
+
|
415
|
+
Install the test-spec gem and require <tt>'sinatra/test/spec'</tt> before
|
416
|
+
your app:
|
417
|
+
|
418
|
+
require 'sinatra'
|
419
|
+
require 'sinatra/test/spec'
|
420
|
+
require 'my_sinatra_app'
|
421
|
+
|
422
|
+
describe 'My app' do
|
423
|
+
it "should show a default page" do
|
424
|
+
get '/'
|
425
|
+
should.be.ok
|
426
|
+
body.should.equal 'My Default Page!'
|
427
|
+
end
|
428
|
+
|
429
|
+
...
|
430
|
+
end
|
431
|
+
|
432
|
+
=== RSpec
|
433
|
+
|
434
|
+
Install the rspec gem and require <tt>'sinatra/test/rspec'</tt> before
|
435
|
+
your app:
|
436
|
+
|
437
|
+
require 'sinatra'
|
438
|
+
require 'sinatra/test/rspec'
|
439
|
+
require 'my_sinatra_app'
|
440
|
+
|
441
|
+
describe 'My app' do
|
442
|
+
it 'should show a default page' do
|
443
|
+
get '/'
|
444
|
+
@response.should be_ok
|
445
|
+
@response.body.should == 'My Default Page!'
|
446
|
+
end
|
447
|
+
|
448
|
+
...
|
449
|
+
|
450
|
+
end
|
451
|
+
|
452
|
+
=== Bacon
|
453
|
+
|
454
|
+
require 'sinatra'
|
455
|
+
require 'sinatra/test/bacon'
|
456
|
+
require 'my_sinatra_app'
|
457
|
+
|
458
|
+
describe 'My app' do
|
459
|
+
it 'should be ok' do
|
460
|
+
get '/'
|
461
|
+
should.be.ok
|
462
|
+
body.should == 'Im OK'
|
463
|
+
end
|
464
|
+
end
|
465
|
+
|
466
|
+
See Sinatra::Test for more information on +get+, +post+, +put+, and
|
467
|
+
friends.
|
468
|
+
|
469
|
+
== Command line
|
470
|
+
|
471
|
+
Sinatra applications can be run directly:
|
472
|
+
|
473
|
+
ruby myapp.rb [-h] [-x] [-e ENVIRONMENT] [-p PORT] [-s HANDLER]
|
474
|
+
|
475
|
+
Options are:
|
476
|
+
|
477
|
+
-h # help
|
478
|
+
-p # set the port (default is 4567)
|
479
|
+
-e # set the environment (default is development)
|
480
|
+
-s # specify rack server/handler (default is thin)
|
481
|
+
-x # turn on the mutex lock (default is off)
|
482
|
+
|
483
|
+
== Contributing
|
484
|
+
|
485
|
+
=== Tools
|
486
|
+
|
487
|
+
Besides Ruby itself, you only need a text editor, preferably one that supports
|
488
|
+
Ruby syntax hilighting. VIM and Emacs are a fine choice on any platform, but
|
489
|
+
feel free to use whatever you're familiar with.
|
490
|
+
|
491
|
+
Sinatra uses the Git source code management system. If you're unfamiliar with
|
492
|
+
Git, you can find more information and tutorials on http://git.or.cz/ as well
|
493
|
+
as http://git-scm.com/. Scott Chacon created a great series of introductory
|
494
|
+
screencasts about Git, which you can find here: http://www.gitcasts.com/
|
495
|
+
|
496
|
+
=== First Time: Cloning The Sinatra Repo
|
497
|
+
|
498
|
+
cd where/you/keep/your/projects
|
499
|
+
git clone git://github.com/bmizerany/sinatra.git
|
500
|
+
cd sinatra
|
501
|
+
cd path/to/your_project
|
502
|
+
ln -s ../sinatra/
|
503
|
+
|
504
|
+
=== Updating Your Existing Sinatra Clone
|
505
|
+
|
506
|
+
cd where/you/keep/sinatra
|
507
|
+
git pull
|
508
|
+
|
509
|
+
=== Using Edge Sinatra in Your App
|
510
|
+
|
511
|
+
at the top of your sinatra_app.rb file:
|
512
|
+
|
513
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + '/sinatra/lib'
|
514
|
+
require 'sinatra'
|
515
|
+
|
516
|
+
get '/about' do
|
517
|
+
"I'm running on Version " + Sinatra::VERSION
|
518
|
+
end
|
519
|
+
|
520
|
+
=== Contributing a Patch
|
521
|
+
|
522
|
+
There are several ways to do this. Probably the easiest (and preferred) way is
|
523
|
+
to fork Sinatra on GitHub (http://github.com/bmizerany/sinatra), push your
|
524
|
+
changes to your Sinatra repo, and then send Blake Mizerany (bmizerany on
|
525
|
+
GitHub) a pull request.
|
526
|
+
|
527
|
+
You can also create a patch file and attach it to a feature request or bug fix
|
528
|
+
on the issue tracker (see below) or send it to the mailing list (see Community
|
529
|
+
section).
|
530
|
+
|
531
|
+
=== Issue Tracking and Feature Requests
|
532
|
+
|
533
|
+
http://sinatra.lighthouseapp.com/
|
534
|
+
|
535
|
+
== Community
|
536
|
+
|
537
|
+
=== Mailing List
|
538
|
+
|
539
|
+
http://groups.google.com/group/sinatrarb
|
540
|
+
|
541
|
+
If you have a problem or question, please make sure to include all the
|
542
|
+
relevant information in your mail, like the Sinatra version you're using, what
|
543
|
+
version of Ruby you have, and so on.
|
544
|
+
|
545
|
+
=== IRC Channel
|
546
|
+
|
547
|
+
You can find us on the Freenode network in the channel #sinatra
|
548
|
+
(irc://chat.freenode.net/#sinatra)
|
549
|
+
|
550
|
+
There's usually someone online at any given time, but we cannot pay attention
|
551
|
+
to the channel all the time, so please stick around for a while after asking a
|
552
|
+
question.
|