From b5f9868157c542ef61cd79002b2c9e75a6541f99 Mon Sep 17 00:00:00 2001 From: "Gun.io Whitespace Robot" Date: Sat, 29 Oct 2011 21:46:50 -0400 Subject: [PATCH] Remove whitespace [Gun.io WhitespaceBot] --- .gitignore | 20 + app/helpers/api_request_helper.rb | 2 +- app/models/access_token.rb | 2 +- app/views/api_request/make_request.html.erb | 2 +- app/views/service_providers/new.html.erb | 2 +- app/views/the_dance/index.html.erb | 2 +- config/initializers/inflections.rb | 2 +- config/initializers/session_store.rb | 2 +- config/routes.rb | 6 +- ...20100225193633_create_service_providers.rb | 2 +- db/schema.rb | 2 +- db/seeds.rb | 2 +- public/stylesheets/application.css | 6 +- test/test_helper.rb | 2 +- vendor/gems/coderay-0.9.1/.specification | 42 +- vendor/gems/coderay-0.9.1/LICENSE | 2 +- vendor/gems/coderay-0.9.1/lib/README | 4 +- vendor/gems/coderay-0.9.1/lib/coderay.rb | 60 +- vendor/gems/coderay-0.9.1/lib/coderay/duo.rb | 26 +- .../gems/coderay-0.9.1/lib/coderay/encoder.rb | 16 +- .../lib/coderay/encoders/comment_filter.rb | 16 +- .../lib/coderay/encoders/filter.rb | 26 +- .../lib/coderay/encoders/html.rb | 24 +- .../lib/coderay/encoders/html/output.rb | 2 +- .../lib/coderay/encoders/json.rb | 20 +- .../lib/coderay/encoders/lines_of_code.rb | 30 +- .../lib/coderay/encoders/term.rb | 20 +- .../coderay/encoders/token_class_filter.rb | 16 +- .../coderay-0.9.1/lib/coderay/encoders/xml.rb | 2 +- .../coderay-0.9.1/lib/coderay/for_redcloth.rb | 12 +- .../lib/coderay/helpers/gzip_simple.rb | 6 +- .../lib/coderay/helpers/plugin.rb | 12 +- .../lib/coderay/helpers/word_list.rb | 26 +- .../gems/coderay-0.9.1/lib/coderay/scanner.rb | 22 +- .../coderay-0.9.1/lib/coderay/scanners/c.rb | 6 +- .../coderay-0.9.1/lib/coderay/scanners/cpp.rb | 12 +- .../coderay-0.9.1/lib/coderay/scanners/css.rb | 10 +- .../lib/coderay/scanners/debug.rb | 14 +- .../lib/coderay/scanners/delphi.rb | 44 +- .../lib/coderay/scanners/diff.rb | 28 +- .../lib/coderay/scanners/groovy.rb | 52 +- .../lib/coderay/scanners/html.rb | 2 +- .../lib/coderay/scanners/java.rb | 26 +- .../coderay/scanners/java/builtin_types.rb | 8 +- .../lib/coderay/scanners/java_script.rb | 20 +- .../lib/coderay/scanners/json.rb | 44 +- .../lib/coderay/scanners/nitro_xhtml.rb | 6 +- .../coderay-0.9.1/lib/coderay/scanners/php.rb | 120 ++-- .../lib/coderay/scanners/plaintext.rb | 6 +- .../lib/coderay/scanners/python.rb | 98 ++-- .../lib/coderay/scanners/rhtml.rb | 2 +- .../lib/coderay/scanners/ruby.rb | 20 +- .../lib/coderay/scanners/ruby/patterns.rb | 12 +- .../lib/coderay/scanners/scheme.rb | 30 +- .../coderay-0.9.1/lib/coderay/scanners/sql.rb | 68 +-- .../coderay-0.9.1/lib/coderay/scanners/xml.rb | 2 +- .../lib/coderay/scanners/yaml.rb | 46 +- .../lib/coderay/token_classes.rb | 2 +- .../gems/coderay-0.9.1/lib/coderay/tokens.rb | 24 +- .../gems/coderay-0.9.1/lib/term/ansicolor.rb | 74 +-- .../http_configuration-1.0.2/.specification | 44 +- vendor/gems/http_configuration-1.0.2/Rakefile | 8 +- .../lib/http_configuration.rb | 65 ++- .../spec/http_configuration_spec.rb | 44 +- vendor/gems/json-1.2.4/COPYING | 4 +- vendor/gems/json-1.2.4/README | 36 +- .../GeneratorBenchmarkComparison.log | 20 +- .../GeneratorBenchmarkExt.log | 180 +++--- .../GeneratorBenchmarkPure.log | 172 +++--- .../GeneratorBenchmarkRails.log | 56 +- .../ParserBenchmarkComparison.log | 16 +- .../ParserBenchmarkExt.log | 56 +- .../ParserBenchmarkPure.log | 56 +- .../ParserBenchmarkRails.log | 56 +- .../ParserBenchmarkYAML.log | 56 +- vendor/gems/json-1.2.4/data/index.html | 2 +- .../ext/json/ext/generator/generator.c | 10 +- .../ext/json/ext/generator/unicode.c | 10 +- .../json-1.2.4/ext/json/ext/parser/parser.c | 224 ++++---- .../json-1.2.4/ext/json/ext/parser/parser.rl | 12 +- .../json-1.2.4/ext/json/ext/parser/unicode.c | 12 +- vendor/gems/json-1.2.4/lib/json/common.rb | 2 +- vendor/gems/json-1.2.4/lib/json/editor.rb | 32 +- .../json-1.2.4/lib/json/pure/generator.rb | 8 +- .../gems/json-1.2.4/lib/json/pure/parser.rb | 4 +- vendor/gems/json-1.2.4/tools/fuzz.rb | 2 +- vendor/gems/oauth-0.3.6/.specification | 94 ++-- vendor/gems/oauth-0.3.6/README.rdoc | 2 +- .../oauth-0.3.6/lib/oauth/client/net_http.rb | 6 +- vendor/gems/oauth-0.3.6/lib/oauth/helper.rb | 4 +- vendor/gems/oauth-0.3.6/setup.rb | 8 +- .../gems/oauth-0.3.6/test/cases/oauth_case.rb | 4 +- .../1_0-final/test_construct_request_url.rb | 18 +- .../test_normalize_request_parameters.rb | 38 +- .../1_0-final/test_parameter_encodings.rb | 12 +- .../1_0-final/test_signature_base_strings.rb | 42 +- vendor/gems/oauth-0.3.6/test/test_consumer.rb | 70 +-- vendor/gems/oauth-0.3.6/test/test_rsa_sha1.rb | 12 +- vendor/gems/oauth-0.3.6/test/test_server.rb | 10 +- vendor/gems/oauth-0.3.6/website/index.txt | 2 +- .../javascripts/rounded_corners_lite.inc.js | 2 +- vendor/gems/rack-1.0.1/.specification | 112 ++-- vendor/gems/rack-1.0.1/COPYING | 2 +- vendor/gems/rack-1.0.1/README | 4 +- vendor/gems/rack-1.0.1/Rakefile | 10 +- .../rack-1.0.1/lib/rack/handler/fastcgi.rb | 2 +- .../rack-1.0.1/lib/rack/handler/mongrel.rb | 2 +- .../gems/rack-1.0.1/lib/rack/handler/scgi.rb | 6 +- vendor/gems/rack-1.0.1/lib/rack/lint.rb | 10 +- vendor/gems/rack-1.0.1/lib/rack/request.rb | 6 +- .../rack-1.0.1/lib/rack/rewindable_input.rb | 18 +- vendor/gems/rack-1.0.1/lib/rack/utils.rb | 4 +- .../rack-1.0.1/test/spec_rack_auth_basic.rb | 6 +- .../gems/rack-1.0.1/test/spec_rack_builder.rb | 2 +- vendor/gems/rack-1.0.1/test/spec_rack_cgi.rb | 2 +- .../gems/rack-1.0.1/test/spec_rack_handler.rb | 4 +- vendor/gems/rack-1.0.1/test/spec_rack_lint.rb | 26 +- .../gems/rack-1.0.1/test/spec_rack_lobster.rb | 2 +- vendor/gems/rack-1.0.1/test/spec_rack_mock.rb | 4 +- .../gems/rack-1.0.1/test/spec_rack_mongrel.rb | 4 +- .../rack-1.0.1/test/spec_rack_recursive.rb | 2 +- .../rack-1.0.1/test/spec_rack_response.rb | 10 +- .../test/spec_rack_rewindable_input.rb | 38 +- .../test/spec_rack_session_cookie.rb | 8 +- vendor/gems/rack-1.0.1/test/spec_rack_thin.rb | 4 +- .../gems/rack-1.0.1/test/spec_rack_utils.rb | 8 +- .../gems/rack-1.0.1/test/spec_rack_webrick.rb | 4 +- vendor/gems/rack-1.1.0/.specification | 104 ++-- .../gems/rest-open-uri-1.0.0/.specification | 42 +- .../rest-open-uri-1.0.0/lib/rest-open-uri.rb | 16 +- vendor/gems/ruby-hmac-0.4.0/.specification | 78 +-- vendor/gems/ruby-hmac-0.4.0/README.txt | 2 +- vendor/gems/sqlite3-ruby-1.2.1/.specification | 48 +- .../gems/sqlite3-ruby-1.2.1/doc/faq/faq.html | 2 +- vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.rb | 10 +- .../gems/sqlite3-ruby-1.2.1/doc/faq/faq.yml | 8 +- .../ext/sqlite3_api/Makefile | 28 +- .../ext/sqlite3_api/sqlite3_api.i | 4 +- .../ext/sqlite3_api/sqlite3_api_wrap.c | 452 +++++++-------- vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3.rb | 10 +- .../lib/sqlite3/constants.rb | 10 +- .../lib/sqlite3/database.rb | 12 +- .../lib/sqlite3/driver/dl/api.rb | 10 +- .../lib/sqlite3/driver/dl/driver.rb | 10 +- .../lib/sqlite3/driver/native/driver.rb | 12 +- .../sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb | 10 +- .../sqlite3-ruby-1.2.1/lib/sqlite3/pragmas.rb | 16 +- .../lib/sqlite3/resultset.rb | 10 +- .../lib/sqlite3/statement.rb | 10 +- .../lib/sqlite3/translator.rb | 10 +- .../sqlite3-ruby-1.2.1/lib/sqlite3/value.rb | 12 +- .../sqlite3-ruby-1.2.1/lib/sqlite3/version.rb | 10 +- .../test/driver/dl/tc_driver.rb | 10 +- vendor/gems/sqlite3-ruby-1.2.1/test/mocks.rb | 10 +- .../sqlite3-ruby-1.2.1/test/tc_database.rb | 16 +- .../gems/sqlite3-ruby-1.2.1/test/tc_errors.rb | 10 +- .../sqlite3-ruby-1.2.1/test/tc_integration.rb | 16 +- vendor/gems/sqlite3-ruby-1.2.1/test/tests.rb | 10 +- vendor/plugins/jrails/LICENSE | 6 +- vendor/plugins/jrails/VERSION.yml | 4 +- .../jrails/lib/jquery_selector_assertions.rb | 30 +- vendor/plugins/jrails/lib/jrails.rb | 124 ++--- vendor/plugins/jrails/tasks/jrails.rake | 2 +- vendor/plugins/passive_record/README.rdoc | 24 +- .../passive_record/lib/passive_record.rb | 32 +- .../lib/serializers/xml_serializer.rb | 4 +- .../passive_record/rdoc/fr_class_index.html | 2 +- .../passive_record/rdoc/fr_file_index.html | 2 +- .../passive_record/rdoc/fr_method_index.html | 2 +- vendor/rails/actionmailer/CHANGELOG | 8 +- vendor/rails/actionmailer/README | 22 +- vendor/rails/actionmailer/Rakefile | 6 +- .../lib/action_mailer/mail_helper.rb | 4 +- .../actionmailer/lib/action_mailer/part.rb | 20 +- .../lib/action_mailer/part_container.rb | 12 +- .../vendor/tmail-1.2.3/tmail/address.rb | 80 +-- .../vendor/tmail-1.2.3/tmail/attachments.rb | 8 +- .../vendor/tmail-1.2.3/tmail/compat.rb | 2 +- .../vendor/tmail-1.2.3/tmail/config.rb | 2 +- .../tmail-1.2.3/tmail/core_extensions.rb | 2 +- .../vendor/tmail-1.2.3/tmail/encode.rb | 16 +- .../vendor/tmail-1.2.3/tmail/header.rb | 8 +- .../vendor/tmail-1.2.3/tmail/index.rb | 2 +- .../vendor/tmail-1.2.3/tmail/mail.rb | 64 +-- .../vendor/tmail-1.2.3/tmail/mailbox.rb | 44 +- .../vendor/tmail-1.2.3/tmail/net.rb | 18 +- .../vendor/tmail-1.2.3/tmail/obsolete.rb | 2 +- .../vendor/tmail-1.2.3/tmail/parser.rb | 4 +- .../vendor/tmail-1.2.3/tmail/port.rb | 8 +- .../vendor/tmail-1.2.3/tmail/stringio.rb | 4 +- .../vendor/tmail-1.2.3/tmail/utils.rb | 44 +- .../actionmailer/test/delivery_method_test.rb | 8 +- .../actionmailer/test/fixtures/raw_email2 | 2 +- .../actionmailer/test/fixtures/raw_email3 | 2 +- .../actionmailer/test/fixtures/raw_email8 | 2 +- .../test/fixtures/templates/signed_up.erb | 2 +- ...custom_templating_extension.text.html.haml | 4 +- ...ustom_templating_extension.text.plain.haml | 4 +- .../fixtures/test_mailer/signed_up.html.erb | 2 +- .../test_mailer/signed_up_with_url.erb | 2 +- .../actionmailer/test/mail_helper_test.rb | 6 +- .../actionmailer/test/test_helper_test.rb | 24 +- vendor/rails/actionmailer/test/url_test.rb | 8 +- vendor/rails/actionpack/CHANGELOG | 516 +++++++++--------- vendor/rails/actionpack/README | 72 +-- vendor/rails/actionpack/RUNNING_UNIT_TESTS | 4 +- vendor/rails/actionpack/Rakefile | 12 +- .../assertions/dom_assertions.rb | 4 +- .../assertions/response_assertions.rb | 2 +- .../assertions/tag_assertions.rb | 6 +- .../actionpack/lib/action_controller/base.rb | 12 +- .../lib/action_controller/benchmarking.rb | 4 +- .../lib/action_controller/caching/actions.rb | 4 +- .../lib/action_controller/cgi_ext/cookie.rb | 2 +- .../lib/action_controller/failsafe.rb | 4 +- .../lib/action_controller/filters.rb | 2 +- .../lib/action_controller/helpers.rb | 28 +- .../lib/action_controller/mime_responds.rb | 4 +- .../lib/action_controller/mime_type.rb | 20 +- .../action_controller/polymorphic_routes.rb | 2 +- .../action_controller/record_identifier.rb | 8 +- .../request_forgery_protection.rb | 10 +- .../lib/action_controller/resources.rb | 2 +- .../lib/action_controller/routing.rb | 2 +- .../lib/action_controller/routing/builder.rb | 2 +- .../lib/action_controller/routing/route.rb | 2 +- .../action_controller/routing/route_set.rb | 10 +- .../lib/action_controller/routing/segments.rb | 14 +- .../vendor/html-scanner/html/document.rb | 4 +- .../vendor/html-scanner/html/node.rb | 58 +- .../vendor/html-scanner/html/sanitizer.rb | 50 +- .../vendor/html-scanner/html/selector.rb | 2 +- .../vendor/html-scanner/html/tokenizer.rb | 16 +- .../lib/action_controller/verification.rb | 68 +-- .../action_view/helpers/benchmark_helper.rb | 10 +- .../lib/action_view/helpers/capture_helper.rb | 18 +- .../lib/action_view/helpers/form_helper.rb | 6 +- .../helpers/form_options_helper.rb | 16 +- .../action_view/helpers/form_tag_helper.rb | 4 +- .../action_view/helpers/record_tag_helper.rb | 4 +- .../helpers/scriptaculous_helper.rb | 100 ++-- .../action_view/helpers/translation_helper.rb | 2 +- .../lib/action_view/helpers/url_helper.rb | 4 +- .../actionpack/lib/action_view/locale/en.yml | 14 +- .../rails/actionpack/lib/action_view/paths.rb | 4 +- .../lib/action_view/reloadable_template.rb | 2 +- .../lib/action_view/template_error.rb | 4 +- .../controller/action_pack_assertions_test.rb | 16 +- .../actionpack/test/controller/base_test.rb | 26 +- .../test/controller/dom_assertions_test.rb | 16 +- .../test/controller/failsafe_test.rb | 16 +- .../test/controller/fake_controllers.rb | 2 +- .../test/controller/filters_test.rb | 6 +- .../actionpack/test/controller/flash_test.rb | 12 +- .../actionpack/test/controller/header_test.rb | 4 +- .../actionpack/test/controller/helper_test.rb | 2 +- .../controller/html-scanner/document_test.rb | 2 +- .../test/controller/html-scanner/node_test.rb | 18 +- .../controller/html-scanner/sanitizer_test.rb | 34 +- .../controller/html-scanner/tag_node_test.rb | 46 +- .../controller/html-scanner/text_node_test.rb | 10 +- .../controller/html-scanner/tokenizer_test.rb | 20 +- .../http_basic_authentication_test.rb | 6 +- .../test/controller/logging_test.rb | 6 +- .../test/controller/mime_type_test.rb | 8 +- .../test/controller/record_identifier_test.rb | 4 +- .../actionpack/test/controller/render_test.rb | 24 +- .../controller/request/test_request_test.rb | 16 +- .../request_forgery_protection_test.rb | 40 +- .../test/controller/resources_test.rb | 2 +- .../test/controller/selector_test.rb | 8 +- .../test/controller/send_file_test.rb | 2 +- .../controller/session/test_session_test.rb | 20 +- .../test/controller/translation_test.rb | 8 +- .../test/controller/url_rewriter_test.rb | 4 +- .../test/controller/view_paths_test.rb | 2 +- .../actionpack/test/fixtures/companies.yml | 2 +- .../rails/actionpack/test/fixtures/company.rb | 2 +- .../test/fixtures/db_definitions/sqlite.sql | 20 +- .../actionpack/test/fixtures/replies.yml | 2 +- .../fixtures/test/hello_xml_world.builder | 2 +- .../rails/actionpack/test/fixtures/topics.yml | 2 +- .../active_record_helper_i18n_test.rb | 4 +- .../test/template/asset_tag_helper_test.rb | 4 +- .../test/template/benchmark_helper_test.rb | 2 +- .../test/template/date_helper_i18n_test.rb | 2 +- .../actionpack/test/template/erb_util_test.rb | 2 +- .../test/template/form_helper_test.rb | 6 +- .../test/template/form_options_helper_test.rb | 12 +- .../actionpack/test/template/render_test.rb | 2 +- .../template/scriptaculous_helper_test.rb | 20 +- .../test/template/tag_helper_test.rb | 6 +- .../actionpack/test/template/template_test.rb | 6 +- .../test/template/translation_helper_test.rb | 8 +- .../test/template/url_helper_test.rb | 8 +- vendor/rails/activerecord/CHANGELOG | 508 ++++++++--------- vendor/rails/activerecord/README | 60 +- vendor/rails/activerecord/RUNNING_UNIT_TESTS | 16 +- .../lib/active_record/associations.rb | 22 +- .../associations/association_collection.rb | 26 +- .../associations/belongs_to_association.rb | 4 +- .../has_and_belongs_to_many_association.rb | 2 +- .../associations/has_many_association.rb | 10 +- .../has_many_through_association.rb | 6 +- .../associations/has_one_association.rb | 10 +- .../lib/active_record/attribute_methods.rb | 30 +- .../activerecord/lib/active_record/base.rb | 26 +- .../activerecord/lib/active_record/batches.rb | 4 +- .../lib/active_record/calculations.rb | 6 +- .../lib/active_record/callbacks.rb | 2 +- .../abstract/database_statements.rb | 4 +- .../connection_adapters/abstract_adapter.rb | 2 +- .../connection_adapters/mysql_adapter.rb | 2 +- .../connection_adapters/sqlite_adapter.rb | 4 +- .../lib/active_record/locale/en.yml | 6 +- .../lib/active_record/migration.rb | 44 +- .../lib/active_record/named_scope.rb | 4 +- .../lib/active_record/schema_dumper.rb | 18 +- .../serializers/json_serializer.rb | 2 +- .../lib/active_record/session_store.rb | 2 +- .../lib/active_record/timestamp.rb | 4 +- .../lib/active_record/transactions.rb | 8 +- .../test/cases/active_schema_test_mysql.rb | 6 +- .../belongs_to_associations_test.rb | 2 +- .../cascaded_eager_loading_test.rb | 2 +- .../test/cases/associations/eager_test.rb | 10 +- ...s_and_belongs_to_many_associations_test.rb | 2 +- .../has_many_through_associations_test.rb | 44 +- .../associations/has_one_associations_test.rb | 2 +- .../has_one_through_associations_test.rb | 12 +- .../cases/associations/join_model_test.rb | 10 +- .../test/cases/attribute_methods_test.rb | 6 +- .../test/cases/autosave_association_test.rb | 2 +- .../activerecord/test/cases/batches_test.rb | 4 +- .../test/cases/calculations_test.rb | 2 +- .../test/cases/connection_pool_test.rb | 6 +- .../activerecord/test/cases/defaults_test.rb | 6 +- .../activerecord/test/cases/fixtures_test.rb | 14 +- .../activerecord/test/cases/i18n_test.rb | 4 +- .../test/cases/inheritance_test.rb | 4 +- .../activerecord/test/cases/locking_test.rb | 2 +- .../test/cases/named_scope_test.rb | 2 +- .../activerecord/test/cases/timestamp_test.rb | 28 +- .../test/cases/transactions_test.rb | 28 +- .../activerecord/test/fixtures/comments.yml | 4 +- .../activerecord/test/fixtures/companies.yml | 10 +- .../activerecord/test/fixtures/items.yml | 1 - .../test/fixtures/memberships.yml | 2 +- .../activerecord/test/fixtures/mixins.yml | 2 +- .../activerecord/test/fixtures/taggings.yml | 2 +- .../rails/activerecord/test/fixtures/tags.yml | 2 +- .../rails/activerecord/test/models/author.rb | 2 +- .../rails/activerecord/test/models/company.rb | 2 +- vendor/rails/activerecord/test/models/post.rb | 2 +- .../rails/activerecord/test/models/topic.rb | 2 +- vendor/rails/activeresource/CHANGELOG | 24 +- vendor/rails/activeresource/README | 12 +- vendor/rails/activeresource/Rakefile | 14 +- .../lib/active_resource/base.rb | 6 +- .../lib/active_resource/http_mock.rb | 8 +- .../lib/active_resource/validations.rb | 26 +- .../activeresource/test/authorization_test.rb | 18 +- .../test/base/custom_methods_test.rb | 10 +- .../activeresource/test/base/load_test.rb | 2 +- vendor/rails/activeresource/test/base_test.rb | 2 +- .../activeresource/test/connection_test.rb | 4 +- vendor/rails/activesupport/CHANGELOG | 66 +-- vendor/rails/activesupport/README | 2 +- .../lib/active_support/backtrace_cleaner.rb | 12 +- .../lib/active_support/base64.rb | 6 +- .../activesupport/lib/active_support/cache.rb | 8 +- .../active_support/core_ext/array/access.rb | 2 +- .../core_ext/array/conversions.rb | 10 +- .../active_support/core_ext/array/grouping.rb | 2 +- .../core_ext/base64/encoding.rb | 4 +- .../core_ext/class/delegating_attributes.rb | 4 +- .../active_support/core_ext/class/removal.rb | 6 +- .../core_ext/date_time/conversions.rb | 12 +- .../lib/active_support/core_ext/enumerable.rb | 6 +- .../active_support/core_ext/file/atomic.rb | 4 +- .../lib/active_support/core_ext/float/time.rb | 2 +- .../core_ext/hash/conversions.rb | 8 +- .../core_ext/hash/indifferent_access.rb | 8 +- .../active_support/core_ext/integer/time.rb | 6 +- .../module/attr_accessor_with_default.rb | 4 +- .../core_ext/module/attribute_accessors.rb | 6 +- .../core_ext/module/delegation.rb | 2 +- .../core_ext/module/inclusion.rb | 8 +- .../core_ext/module/synchronization.rb | 4 +- .../lib/active_support/core_ext/name_error.rb | 4 +- .../lib/active_support/core_ext/numeric.rb | 4 +- .../active_support/core_ext/numeric/time.rb | 18 +- .../core_ext/object/instance_variables.rb | 10 +- .../active_support/core_ext/object/misc.rb | 8 +- .../core_ext/range/conversions.rb | 2 +- .../active_support/core_ext/string/access.rb | 14 +- .../core_ext/string/inflections.rb | 12 +- .../core_ext/string/multibyte.rb | 4 +- .../core_ext/string/starts_ends_with.rb | 2 +- .../lib/active_support/core_ext/time.rb | 2 +- .../core_ext/time/calculations.rb | 4 +- .../core_ext/time/conversions.rb | 2 +- .../lib/active_support/core_ext/time/zones.rb | 18 +- .../lib/active_support/core_ext/try.rb | 6 +- .../lib/active_support/duration.rb | 2 +- .../lib/active_support/locale/en.yml | 6 +- .../lib/active_support/message_encryptor.rb | 34 +- .../lib/active_support/message_verifier.rb | 14 +- .../lib/active_support/multibyte/chars.rb | 8 +- .../lib/active_support/ordered_hash.rb | 2 +- .../i18n-0.1.3/test/simple_backend_test.rb | 14 +- .../vendor/memcache-client-1.7.4/memcache.rb | 6 +- .../vendor/tzinfo-0.3.12/tzinfo.rb | 4 +- .../tzinfo-0.3.12/tzinfo/data_timezone.rb | 16 +- .../tzinfo/data_timezone_info.rb | 104 ++-- .../tzinfo/definitions/Africa/Algiers.rb | 4 +- .../tzinfo/definitions/Africa/Cairo.rb | 4 +- .../tzinfo/definitions/Africa/Casablanca.rb | 4 +- .../tzinfo/definitions/Africa/Harare.rb | 4 +- .../tzinfo/definitions/Africa/Johannesburg.rb | 4 +- .../tzinfo/definitions/Africa/Monrovia.rb | 4 +- .../tzinfo/definitions/Africa/Nairobi.rb | 4 +- .../America/Argentina/Buenos_Aires.rb | 4 +- .../definitions/America/Argentina/San_Juan.rb | 4 +- .../tzinfo/definitions/America/Bogota.rb | 4 +- .../tzinfo/definitions/America/Caracas.rb | 4 +- .../tzinfo/definitions/America/Chicago.rb | 4 +- .../tzinfo/definitions/America/Chihuahua.rb | 4 +- .../tzinfo/definitions/America/Denver.rb | 4 +- .../tzinfo/definitions/America/Godthab.rb | 4 +- .../tzinfo/definitions/America/Guatemala.rb | 4 +- .../tzinfo/definitions/America/Halifax.rb | 4 +- .../America/Indiana/Indianapolis.rb | 4 +- .../tzinfo/definitions/America/Juneau.rb | 4 +- .../tzinfo/definitions/America/La_Paz.rb | 4 +- .../tzinfo/definitions/America/Lima.rb | 4 +- .../tzinfo/definitions/America/Los_Angeles.rb | 4 +- .../tzinfo/definitions/America/Mazatlan.rb | 4 +- .../tzinfo/definitions/America/Mexico_City.rb | 4 +- .../tzinfo/definitions/America/Monterrey.rb | 4 +- .../tzinfo/definitions/America/New_York.rb | 4 +- .../tzinfo/definitions/America/Phoenix.rb | 4 +- .../tzinfo/definitions/America/Regina.rb | 4 +- .../tzinfo/definitions/America/Santiago.rb | 4 +- .../tzinfo/definitions/America/Sao_Paulo.rb | 4 +- .../tzinfo/definitions/America/St_Johns.rb | 4 +- .../tzinfo/definitions/America/Tijuana.rb | 4 +- .../tzinfo/definitions/Asia/Almaty.rb | 4 +- .../tzinfo/definitions/Asia/Baghdad.rb | 4 +- .../tzinfo/definitions/Asia/Baku.rb | 4 +- .../tzinfo/definitions/Asia/Bangkok.rb | 4 +- .../tzinfo/definitions/Asia/Chongqing.rb | 4 +- .../tzinfo/definitions/Asia/Colombo.rb | 4 +- .../tzinfo/definitions/Asia/Dhaka.rb | 4 +- .../tzinfo/definitions/Asia/Hong_Kong.rb | 4 +- .../tzinfo/definitions/Asia/Irkutsk.rb | 4 +- .../tzinfo/definitions/Asia/Jakarta.rb | 4 +- .../tzinfo/definitions/Asia/Jerusalem.rb | 4 +- .../tzinfo/definitions/Asia/Kabul.rb | 4 +- .../tzinfo/definitions/Asia/Kamchatka.rb | 4 +- .../tzinfo/definitions/Asia/Karachi.rb | 4 +- .../tzinfo/definitions/Asia/Katmandu.rb | 4 +- .../tzinfo/definitions/Asia/Kolkata.rb | 4 +- .../tzinfo/definitions/Asia/Krasnoyarsk.rb | 4 +- .../tzinfo/definitions/Asia/Kuala_Lumpur.rb | 4 +- .../tzinfo/definitions/Asia/Kuwait.rb | 4 +- .../tzinfo/definitions/Asia/Magadan.rb | 4 +- .../tzinfo/definitions/Asia/Muscat.rb | 4 +- .../tzinfo/definitions/Asia/Novosibirsk.rb | 4 +- .../tzinfo/definitions/Asia/Rangoon.rb | 4 +- .../tzinfo/definitions/Asia/Riyadh.rb | 4 +- .../tzinfo/definitions/Asia/Seoul.rb | 4 +- .../tzinfo/definitions/Asia/Shanghai.rb | 4 +- .../tzinfo/definitions/Asia/Singapore.rb | 4 +- .../tzinfo/definitions/Asia/Taipei.rb | 4 +- .../tzinfo/definitions/Asia/Tashkent.rb | 4 +- .../tzinfo/definitions/Asia/Tbilisi.rb | 4 +- .../tzinfo/definitions/Asia/Tehran.rb | 4 +- .../tzinfo/definitions/Asia/Tokyo.rb | 4 +- .../tzinfo/definitions/Asia/Ulaanbaatar.rb | 4 +- .../tzinfo/definitions/Asia/Urumqi.rb | 4 +- .../tzinfo/definitions/Asia/Vladivostok.rb | 4 +- .../tzinfo/definitions/Asia/Yakutsk.rb | 4 +- .../tzinfo/definitions/Asia/Yekaterinburg.rb | 4 +- .../tzinfo/definitions/Asia/Yerevan.rb | 4 +- .../tzinfo/definitions/Atlantic/Azores.rb | 4 +- .../tzinfo/definitions/Atlantic/Cape_Verde.rb | 4 +- .../definitions/Atlantic/South_Georgia.rb | 4 +- .../tzinfo/definitions/Australia/Adelaide.rb | 4 +- .../tzinfo/definitions/Australia/Brisbane.rb | 4 +- .../tzinfo/definitions/Australia/Darwin.rb | 4 +- .../tzinfo/definitions/Australia/Hobart.rb | 4 +- .../tzinfo/definitions/Australia/Melbourne.rb | 4 +- .../tzinfo/definitions/Australia/Perth.rb | 4 +- .../tzinfo/definitions/Australia/Sydney.rb | 4 +- .../tzinfo/definitions/Etc/UTC.rb | 4 +- .../tzinfo/definitions/Europe/Amsterdam.rb | 4 +- .../tzinfo/definitions/Europe/Athens.rb | 4 +- .../tzinfo/definitions/Europe/Belgrade.rb | 4 +- .../tzinfo/definitions/Europe/Berlin.rb | 4 +- .../tzinfo/definitions/Europe/Bratislava.rb | 2 +- .../tzinfo/definitions/Europe/Brussels.rb | 4 +- .../tzinfo/definitions/Europe/Bucharest.rb | 4 +- .../tzinfo/definitions/Europe/Budapest.rb | 4 +- .../tzinfo/definitions/Europe/Copenhagen.rb | 4 +- .../tzinfo/definitions/Europe/Dublin.rb | 4 +- .../tzinfo/definitions/Europe/Helsinki.rb | 4 +- .../tzinfo/definitions/Europe/Istanbul.rb | 4 +- .../tzinfo/definitions/Europe/Kiev.rb | 4 +- .../tzinfo/definitions/Europe/Lisbon.rb | 4 +- .../tzinfo/definitions/Europe/Ljubljana.rb | 2 +- .../tzinfo/definitions/Europe/London.rb | 4 +- .../tzinfo/definitions/Europe/Madrid.rb | 4 +- .../tzinfo/definitions/Europe/Minsk.rb | 4 +- .../tzinfo/definitions/Europe/Moscow.rb | 4 +- .../tzinfo/definitions/Europe/Paris.rb | 4 +- .../tzinfo/definitions/Europe/Prague.rb | 4 +- .../tzinfo/definitions/Europe/Riga.rb | 4 +- .../tzinfo/definitions/Europe/Rome.rb | 4 +- .../tzinfo/definitions/Europe/Sarajevo.rb | 2 +- .../tzinfo/definitions/Europe/Skopje.rb | 2 +- .../tzinfo/definitions/Europe/Sofia.rb | 4 +- .../tzinfo/definitions/Europe/Stockholm.rb | 4 +- .../tzinfo/definitions/Europe/Tallinn.rb | 4 +- .../tzinfo/definitions/Europe/Vienna.rb | 4 +- .../tzinfo/definitions/Europe/Vilnius.rb | 4 +- .../tzinfo/definitions/Europe/Warsaw.rb | 4 +- .../tzinfo/definitions/Europe/Zagreb.rb | 2 +- .../tzinfo/definitions/Pacific/Auckland.rb | 4 +- .../tzinfo/definitions/Pacific/Fiji.rb | 4 +- .../tzinfo/definitions/Pacific/Guam.rb | 4 +- .../tzinfo/definitions/Pacific/Honolulu.rb | 4 +- .../tzinfo/definitions/Pacific/Majuro.rb | 4 +- .../tzinfo/definitions/Pacific/Midway.rb | 4 +- .../tzinfo/definitions/Pacific/Noumea.rb | 4 +- .../tzinfo/definitions/Pacific/Pago_Pago.rb | 4 +- .../definitions/Pacific/Port_Moresby.rb | 4 +- .../tzinfo/definitions/Pacific/Tongatapu.rb | 4 +- .../tzinfo-0.3.12/tzinfo/info_timezone.rb | 16 +- .../tzinfo-0.3.12/tzinfo/linked_timezone.rb | 14 +- .../tzinfo/linked_timezone_info.rb | 12 +- .../tzinfo-0.3.12/tzinfo/offset_rationals.rb | 18 +- .../tzinfo-0.3.12/tzinfo/time_or_datetime.rb | 106 ++-- .../vendor/tzinfo-0.3.12/tzinfo/timezone.rb | 230 ++++---- .../tzinfo/timezone_definition.rb | 14 +- .../tzinfo-0.3.12/tzinfo/timezone_info.rb | 10 +- .../tzinfo/timezone_offset_info.rb | 38 +- .../tzinfo-0.3.12/tzinfo/timezone_period.rb | 94 ++-- .../tzinfo/timezone_transition_info.rb | 60 +- .../lib/active_support/whiny_nil.rb | 2 +- vendor/rails/railties/CHANGELOG | 146 ++--- vendor/rails/railties/README | 12 +- vendor/rails/railties/Rakefile | 28 +- .../railties/configs/databases/mysql.yml | 2 +- .../railties/configs/databases/oracle.yml | 2 +- .../configs/initializers/inflections.rb | 2 +- .../configs/initializers/session_store.rb | 2 +- vendor/rails/railties/configs/routes.rb | 2 +- vendor/rails/railties/configs/seeds.rb | 2 +- .../guides/files/stylesheets/main.css | 28 +- vendor/rails/railties/guides/rails_guides.rb | 2 +- .../railties/guides/rails_guides/generator.rb | 4 +- .../guides/source/2_3_release_notes.textile | 10 +- .../source/action_controller_overview.textile | 14 +- .../source/active_record_querying.textile | 12 +- ...activerecord_validations_callbacks.textile | 36 +- .../guides/source/caching_with_rails.textile | 20 +- .../guides/source/command_line.textile | 2 +- .../source/contributing_to_rails.textile | 32 +- .../rails/railties/guides/source/i18n.textile | 4 +- .../source/layouts_and_rendering.textile | 20 +- .../guides/source/nested_model_forms.textile | 14 +- .../guides/source/rails_on_rack.textile | 2 +- .../railties/guides/source/security.textile | 2 +- vendor/rails/railties/helpers/test_helper.rb | 2 +- vendor/rails/railties/html/index.html | 54 +- vendor/rails/railties/lib/code_statistics.rb | 8 +- vendor/rails/railties/lib/commands.rb | 2 +- .../lib/commands/performance/benchmarker.rb | 2 +- vendor/rails/railties/lib/commands/plugin.rb | 206 +++---- vendor/rails/railties/lib/commands/server.rb | 2 +- .../railties/lib/rails/backtrace_cleaner.rb | 4 +- .../rails/railties/lib/rails/gem_builder.rb | 6 +- vendor/rails/railties/lib/rails/plugin.rb | 30 +- .../railties/lib/rails/plugin/locator.rb | 24 +- vendor/rails/railties/lib/rails_generator.rb | 2 +- .../railties/lib/rails_generator/base.rb | 28 +- .../railties/lib/rails_generator/commands.rb | 4 +- .../rails_generator/generated_attribute.rb | 4 +- .../applications/app/app_generator.rb | 30 +- .../components/mailer/templates/mailer.rb | 4 +- .../generators/components/migration/USAGE | 12 +- .../migration/migration_generator.rb | 6 +- .../components/model/model_generator.rb | 4 +- .../railties/lib/rails_generator/lookup.rb | 8 +- .../rails/railties/lib/tasks/databases.rake | 2 +- .../railties/lib/tasks/documentation.rake | 4 +- .../rails/railties/lib/tasks/framework.rake | 10 +- vendor/rails/railties/lib/tasks/misc.rake | 6 +- .../rails/railties/lib/tasks/statistics.rake | 2 +- vendor/rails/railties/lib/webrick_server.rb | 22 +- 601 files changed, 5019 insertions(+), 5001 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac8f968 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so +*.pyc + +# Logs and databases # +###################### +*.log + +# OS generated files # +###################### +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db diff --git a/app/helpers/api_request_helper.rb b/app/helpers/api_request_helper.rb index 53464ae..762ae57 100644 --- a/app/helpers/api_request_helper.rb +++ b/app/helpers/api_request_helper.rb @@ -9,7 +9,7 @@ def request_content_types(default = nil) end buffer end - + def access_tokens_for_select options = @access_tokens.collect{|at| [ at.to_s, at.id ]} options << [ "Two-Legged Request", "two-legged" ] diff --git a/app/models/access_token.rb b/app/models/access_token.rb index 8e850b5..284d259 100644 --- a/app/models/access_token.rb +++ b/app/models/access_token.rb @@ -5,7 +5,7 @@ def to_oauth_access_token consumer = self.service_provider.to_oauth_consumer OAuth::AccessToken.from_hash(consumer, { :oauth_token => self.oauth_token, :oauth_token_secret => self.oauth_token_secret}) end - + def to_s(with_service_provider = false) string = "#{self.label} (#{self.oauth_token[0..5]})" if with_service_provider diff --git a/app/views/api_request/make_request.html.erb b/app/views/api_request/make_request.html.erb index 9db247a..11f9a57 100644 --- a/app/views/api_request/make_request.html.erb +++ b/app/views/api_request/make_request.html.erb @@ -12,7 +12,7 @@ HTTP Method
<%= @api_request.method.to_s %>
- + Request Body
<%=h @api_request.postdata(true) %>
diff --git a/app/views/service_providers/new.html.erb b/app/views/service_providers/new.html.erb index ce50f84..8e46609 100644 --- a/app/views/service_providers/new.html.erb +++ b/app/views/service_providers/new.html.erb @@ -3,7 +3,7 @@ <% form_for(@service_provider) do |f| %> <%= f.error_messages %> <%= render :partial => "form", :locals => {:f => f} %> - +

<%= f.submit 'Create' %>

diff --git a/app/views/the_dance/index.html.erb b/app/views/the_dance/index.html.erb index 2e14b80..2090e71 100644 --- a/app/views/the_dance/index.html.erb +++ b/app/views/the_dance/index.html.erb @@ -16,7 +16,7 @@ <% end %> diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index d531b8b..9e8b013 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format +# Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 8a6a2e8..a8a5698 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -2,7 +2,7 @@ # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! -# Make sure the secret is at least 30 characters and all random, +# Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. ActionController::Base.session = { :key => '_oauth-dancer_session', diff --git a/config/routes.rb b/config/routes.rb index 52b6d62..db6d3e9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,7 +18,7 @@ # Sample resource route with sub-resources: # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller - + # Sample resource route with more complex sub-resources # map.resources :products do |products| # products.resources :comments @@ -60,5 +60,5 @@ # PUT /service_providers/:id(.:format) {:action=>"update", :controller=>"service_providers"} # DELETE /service_providers/:id(.:format) {:action=>"destroy", :controller=>"service_providers"} # root / {:action=>"index", :controller=>"home"} -# /:controller/:action/:id -# /:controller/:action/:id(.:format) +# /:controller/:action/:id +# /:controller/:action/:id(.:format) diff --git a/db/migrate/20100225193633_create_service_providers.rb b/db/migrate/20100225193633_create_service_providers.rb index b246ec1..58e76a8 100644 --- a/db/migrate/20100225193633_create_service_providers.rb +++ b/db/migrate/20100225193633_create_service_providers.rb @@ -12,7 +12,7 @@ def self.up t.string :default_response_content_type, :default => "application/x-www-form-urlencoded; charset=utf-8" t.string :default_request_content_type, :default => "application/x-www-form-urlencoded; charset=utf-8" t.string :oauth_scheme, :default => "header" - t.boolean :use_out_of_band, :default => false + t.boolean :use_out_of_band, :default => false t.boolean :use_post_for_authentication_steps, :default => true t.timestamps end diff --git a/db/schema.rb b/db/schema.rb index bb5b88f..03047f3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,4 @@ -# This file is auto-generated from the current state of the database. Instead of editing this file, +# This file is auto-generated from the current state of the database. Instead of editing this file, # please use the migrations feature of Active Record to incrementally modify your database, and # then regenerate this schema definition. # diff --git a/db/seeds.rb b/db/seeds.rb index 3174d0c..663890e 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -2,6 +2,6 @@ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: -# +# # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Major.create(:name => 'Daley', :city => cities.first) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index ef5b82f..2d20986 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -20,12 +20,12 @@ table td { text-align: left; padding: 2px 2px 2px 2px;} div.api_result { margin-left: 10px; margin-bottom:10px;} -div#home-instructions { - position: relative; +div#home-instructions { + position: relative; background: black url("/images/oauth-dance.jpg") no-repeat fixed top left; width: 100%; height: 595px; - color:white; + color:white; } diff --git a/test/test_helper.rb b/test/test_helper.rb index b9fe251..e222496 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -16,7 +16,7 @@ class ActiveSupport::TestCase # don't care one way or the other, switching from MyISAM to InnoDB tables # is recommended. # - # The only drawback to using transactional fixtures is when you actually + # The only drawback to using transactional fixtures is when you actually # need to test transactions. Since your test is bracketed by a transaction, # any transactions started in your code will be automatically rolled back. self.use_transactional_fixtures = true diff --git a/vendor/gems/coderay-0.9.1/.specification b/vendor/gems/coderay-0.9.1/.specification index 3532016..66fbc5c 100644 --- a/vendor/gems/coderay-0.9.1/.specification +++ b/vendor/gems/coderay-0.9.1/.specification @@ -1,34 +1,34 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: coderay -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 0 - 9 - 1 version: 0.9.1 platform: ruby -authors: +authors: - murphy -autorequire: +autorequire: bindir: bin cert_chain: [] date: 2009-12-31 00:00:00 -08:00 -default_executable: +default_executable: dependencies: [] description: " CodeRay is a Ruby library for syntax highlighting.\n I try to make CodeRay easy to use and intuitive, but at the same time\n fully featured, complete, fast and efficient.\n\n Usage is simple:\n CodeRay.scan(code, :ruby).div\n" email: murphy@rubychan.de -executables: +executables: - coderay - coderay_stylesheet extensions: [] -extra_rdoc_files: +extra_rdoc_files: - ./lib/README - ./FOLDERS -files: +files: - ./lib/coderay/duo.rb - ./lib/coderay/encoder.rb - ./lib/coderay/encoders/_map.rb @@ -99,35 +99,35 @@ has_rdoc: true homepage: http://coderay.rubychan.de licenses: [] -post_install_message: -rdoc_options: +post_install_message: +rdoc_options: - -SNw2 - -mlib/README - -a - -t CodeRay Documentation -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 1 - 8 - 2 version: 1.8.2 -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] rubyforge_project: coderay rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 3 summary: CodeRay is a fast syntax highlighter engine for many languages. test_files: [] diff --git a/vendor/gems/coderay-0.9.1/LICENSE b/vendor/gems/coderay-0.9.1/LICENSE index c00103d..4ef65b3 100644 --- a/vendor/gems/coderay-0.9.1/LICENSE +++ b/vendor/gems/coderay-0.9.1/LICENSE @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an diff --git a/vendor/gems/coderay-0.9.1/lib/README b/vendor/gems/coderay-0.9.1/lib/README index 7beb924..f1afb6a 100644 --- a/vendor/gems/coderay-0.9.1/lib/README +++ b/vendor/gems/coderay-0.9.1/lib/README @@ -40,7 +40,7 @@ CodeRay needs Ruby 1.8.6 or later. It also runs with Ruby 1.9.1+ and JRuby 1.1+. (Forgive me, but this is not highlighted.) require 'coderay' - + tokens = CodeRay.scan "puts 'Hello, world!'", :ruby page = tokens.html :line_numbers => :inline, :wrap => :page puts page @@ -92,7 +92,7 @@ Please report errors in this documentation to . * The folks at redmine.org - thank you for using and fixing CodeRay! * matz and all Ruby gods and gurus * The inventors of: the computer, the internet, the true color display, HTML & - CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime, + CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime, manga, coke and green ice tea. Where would we be without all those people? diff --git a/vendor/gems/coderay-0.9.1/lib/coderay.rb b/vendor/gems/coderay-0.9.1/lib/coderay.rb index 894dd71..6d89203 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay.rb @@ -4,18 +4,18 @@ # # I try to make CodeRay easy to use and intuitive, but at the same time fully featured, complete, # fast and efficient. -# +# # See README. -# +# # It consists mainly of # * the main engine: CodeRay (Scanners::Scanner, Tokens/TokenStream, Encoders::Encoder), PluginHost # * the scanners in CodeRay::Scanners # * the encoders in CodeRay::Encoders -# +# # Here's a fancy graphic to light up this gray docu: -# +# # http://rd.cYcnus.de/coderay/scheme.png -# +# # == Documentation # # See CodeRay, Encoders, Scanners, Tokens. @@ -26,32 +26,32 @@ # -rubygems option if required. # # === Highlight Ruby code in a string as html -# +# # require 'coderay' # print CodeRay.scan('puts "Hello, world!"', :ruby).html # # # prints something like this: # puts "Hello, world!" -# -# +# +# # === Highlight C code from a file in a html div -# +# # require 'coderay' # print CodeRay.scan(File.read('ruby.h'), :c).div # print CodeRay.scan_file('ruby.h').html.div -# +# # You can include this div in your page. The used CSS styles can be printed with -# +# # % coderay_stylesheet -# +# # === Highlight without typing too much -# +# # If you are one of the hasty (or lazy, or extremely curious) people, just run this file: -# +# # % ruby -rubygems /path/to/coderay/coderay.rb > example.html -# +# # and look at the file it created in your browser. -# +# # = CodeRay Module # # The CodeRay module provides convenience methods for the engine. @@ -62,38 +62,38 @@ # the Encoder / Scanner. # * Input and language are always sorted in this order: +code+, +lang+. # (This is in alphabetical order, if you need a mnemonic ;) -# +# # You should be able to highlight everything you want just using these methods; # so there is no need to dive into CodeRay's deep class hierarchy. # # The examples in the demo directory demonstrate common cases using this interface. -# +# # = Basic Access Ways # # Read this to get a general view what CodeRay provides. -# +# # == Scanning -# +# # Scanning means analysing an input string, splitting it up into Tokens. # Each Token knows about what type it is: string, comment, class name, etc. # # Each +lang+ (language) has its own Scanner; for example, :ruby code is # handled by CodeRay::Scanners::Ruby. -# +# # CodeRay.scan:: Scan a string in a given language into Tokens. # This is the most common method to use. # CodeRay.scan_file:: Scan a file and guess the language using FileType. -# +# # The Tokens object you get from these methods can encode itself; see Tokens. -# +# # == Encoding # # Encoding means compiling Tokens into an output. This can be colored HTML or # LaTeX, a textual statistic or just the number of non-whitespace tokens. -# +# # Each Encoder provides output in a specific +format+, so you select Encoders via # formats like :html or :statistic. -# +# # CodeRay.encode:: Scan and encode a string in a given language. # CodeRay.encode_tokens:: Encode the given tokens. # CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. @@ -120,9 +120,9 @@ # To make use of CodeRay.scanner, use CodeRay::Scanner::code=. # # The scanning methods provide more flexibility; we recommend to use these. -# +# # == Reusing Scanners and Encoders -# +# # If you want to re-use scanners and encoders (because that is faster), see # CodeRay::Duo for the most convenient (and recommended) interface. module CodeRay @@ -222,7 +222,7 @@ def highlight code, lang, options = { :css => :class }, format = :div # Use this together with CodeRay.scan: # # require 'coderay' - # + # # # Highlight a short Ruby code example in a HTML span # tokens = CodeRay.scan '1 + 2', :ruby # puts CodeRay.encode_tokens(tokens, :span) @@ -259,10 +259,10 @@ def highlight_file filename, options = { :css => :class }, format = :div # # Example: # require 'coderay' - # + # # stats = CodeRay.encoder(:statistic) # stats.encode("puts 17 + 4\n", :ruby) - # + # # puts '%d out of %d tokens have the kind :integer.' % [ # stats.type_stats[:integer].count, # stats.real_token_count diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/duo.rb b/vendor/gems/coderay-0.9.1/lib/coderay/duo.rb index 5468dda..dbb000f 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/duo.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/duo.rb @@ -1,40 +1,40 @@ module CodeRay - + # = Duo # # A Duo is a convenient way to use CodeRay. You just create a Duo, # giving it a lang (language of the input code) and a format (desired # output format), and call Duo#highlight with the code. - # + # # Duo makes it easy to re-use both scanner and encoder for a repetitive # task. It also provides a very easy interface syntax: - # + # # require 'coderay' # CodeRay::Duo[:python, :div].highlight 'import this' - # + # # Until you want to do uncommon things with CodeRay, I recommend to use # this method, since it takes care of everything. class Duo attr_accessor :lang, :format, :options - + # Create a new Duo, holding a lang and a format to highlight code. - # + # # simple: # CodeRay::Duo[:ruby, :page].highlight 'bla 42' - # + # # streaming: # CodeRay::Duo[:ruby, :page].highlight 'bar 23', :stream => true - # + # # with options: # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' - # + # # alternative syntax without options: # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end' - # + # # alternative syntax with options: # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc' - # + # # The options are forwarded to scanner and encoder # (see CodeRay.get_scanner_options). def initialize lang = nil, format = nil, options = {} @@ -57,12 +57,12 @@ class << self def scanner @scanner ||= CodeRay.scanner @lang, CodeRay.get_scanner_options(@options) end - + # The encoder of the duo. Only created once. def encoder @encoder ||= CodeRay.encoder @format, @options end - + # Tokenize and highlight the code using +scanner+ and +encoder+. # # If the :stream option is set, the Duo will go into streaming mode, diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoder.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoder.rb index 3ae2924..9ba2fdd 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoder.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoder.rb @@ -140,18 +140,18 @@ def token content, kind end append_encoded_token_to_output encoded_token end - + def append_encoded_token_to_output encoded_token @out << encoded_token if encoded_token && defined?(@out) && @out end - + # Called for each text token ([text, kind]), where text is a String. def text_token text, kind end - + # Called for each block (non-text) token ([action, kind]), # where +action+ is a Symbol. - # + # # Calls open_token, close_token, begin_line, and end_line according to # the value of +action+. def block_token action, kind @@ -168,19 +168,19 @@ def block_token action, kind raise 'unknown block action: %p' % action end end - + # Called for each block token at the start of the block ([:open, kind]). def open_token kind end - + # Called for each block token end of the block ([:close, kind]). def close_token kind end - + # Called for each line token block at the start of the line ([:begin_line, kind]). def begin_line kind end - + # Called for each line token block at the end of the line ([:end_line, kind]). def end_line kind end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/comment_filter.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/comment_filter.rb index 4d3fb54..7922e0b 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/comment_filter.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/comment_filter.rb @@ -1,18 +1,18 @@ ($:.unshift '../..'; require 'coderay') unless defined? CodeRay module CodeRay module Encoders - + load :token_class_filter - + class CommentFilter < TokenClassFilter - + register_for :comment_filter - + DEFAULT_OPTIONS = superclass::DEFAULT_OPTIONS.merge \ :exclude => [:comment] - + end - + end end @@ -26,7 +26,7 @@ class CommentFilter < TokenClassFilter require 'test/unit' class CommentFilterTest < Test::Unit::TestCase - + def test_filtering_comments tokens = CodeRay.scan <<-RUBY, :ruby #!/usr/bin/env ruby @@ -39,5 +39,5 @@ def test_filtering_comments puts "Hello world!" RUBY_FILTERED end - + end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/filter.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/filter.rb index 5e4b34d..8f10828 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/filter.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/filter.rb @@ -1,34 +1,34 @@ ($:.unshift '../..'; require 'coderay') unless defined? CodeRay module CodeRay module Encoders - + class Filter < Encoder - + register_for :filter - + protected def setup options @out = Tokens.new end - + def text_token text, kind [text, kind] if include_text_token? text, kind end - + def include_text_token? text, kind true end - + def block_token action, kind [action, kind] if include_block_token? action, kind end - + def include_block_token? action, kind true end - + end - + end end @@ -42,7 +42,7 @@ def include_block_token? action, kind require 'test/unit' class FilterTest < Test::Unit::TestCase - + def test_creation assert CodeRay::Encoders::Filter < CodeRay::Encoders::Encoder filter = nil @@ -51,7 +51,7 @@ def test_creation end assert_kind_of CodeRay::Encoders::Encoder, filter end - + def test_filtering_text_tokens tokens = CodeRay::Tokens.new 10.times do |i| @@ -60,7 +60,7 @@ def test_filtering_text_tokens assert_equal tokens, CodeRay::Encoders::Filter.new.encode_tokens(tokens) assert_equal tokens, tokens.filter end - + def test_filtering_block_tokens tokens = CodeRay::Tokens.new 10.times do |i| @@ -71,5 +71,5 @@ def test_filtering_block_tokens assert_equal tokens, CodeRay::Encoders::Filter.new.encode_tokens(tokens) assert_equal tokens, tokens.filter end - + end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html.rb index 89290d0..7550fac 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html.rb @@ -15,7 +15,7 @@ module Encoders # puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span) # #-> Some /code/ # puts CodeRay.scan('Some /code/', :ruby).span #-> the same - # + # # puts CodeRay.scan('Some code', :ruby).html( # :wrap => nil, # :line_numbers => :inline, @@ -42,7 +42,7 @@ module Encoders # Default: nil # # === :title - # + # # The title of the HTML page (works only when :wrap is set to :page.) # # Default: 'CodeRay output' @@ -63,10 +63,10 @@ module Encoders # Default: 10 # # === :highlight_lines - # + # # Highlights certain line numbers. # Can be any Enumerable, typically just an Array or Range, of numbers. - # + # # Bolding is deactivated when :highlight_lines is set. It only makes sense # in combination with :line_numbers. # @@ -239,10 +239,10 @@ def finish options def token text, type = :plain case text - + when nil - # raise 'Token with nil as text was given: %p' % [[text, type]] - + # raise 'Token with nil as text was given: %p' % [[text, type]] + when String if text =~ /#{HTML_ESCAPE_PATTERN}/o text = text.gsub(/#{HTML_ESCAPE_PATTERN}/o) { |m| @HTML_ESCAPE[m] } @@ -253,8 +253,8 @@ def token text, type = :plain else @out << text end - - + + # token groups, eg. strings when :open @opened[0] = type @@ -271,7 +271,7 @@ def token text, type = :plain @out << '' @opened.pop end - + # whole lines to be highlighted, eg. a deleted line in a diff when :begin_line @opened[0] = type @@ -292,10 +292,10 @@ def token text, type = :plain @out << '' @opened.pop end - + else raise 'unknown token kind: %p' % [text] - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html/output.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html/output.rb index 28574a5..3376e17 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html/output.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/html/output.rb @@ -86,7 +86,7 @@ def wrap_in! template Template.wrap! self, template, 'CONTENT' self end - + def apply_title! title self.sub!(/()(<\/title>)/) { $1 + title + $2 } self diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/json.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/json.rb index 7aa077c..71d4dda 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/json.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/json.rb @@ -1,13 +1,13 @@ ($:.unshift '../..'; require 'coderay') unless defined? CodeRay module CodeRay module Encoders - + # = JSON Encoder class JSON < Encoder - + register_for :json FILE_EXTENSION = 'json' - + protected def setup options begin @@ -18,21 +18,21 @@ def setup options end @out = [] end - + def text_token text, kind { :type => 'text', :text => text, :kind => kind } end - + def block_token action, kind { :type => 'block', :action => action, :kind => kind } end - + def finish options @out.to_json end - + end - + end end @@ -48,7 +48,7 @@ def finish options require 'rubygems' if RUBY_VERSION < '1.9' class JSONEncoderTest < Test::Unit::TestCase - + def test_json_output tokens = CodeRay.scan <<-RUBY, :ruby puts "Hello world!" @@ -65,5 +65,5 @@ def test_json_output {"type"=>"text", "text"=>"\n", "kind"=>"space"} ], JSON.load(tokens.json) end - + end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/lines_of_code.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/lines_of_code.rb index b24145e..9af0462 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/lines_of_code.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/lines_of_code.rb @@ -1,26 +1,26 @@ ($:.unshift '../..'; require 'coderay') unless defined? CodeRay module CodeRay module Encoders - + # Counts the LoC (Lines of Code). Returns an Integer >= 0. - # + # # Alias: :loc - # + # # Everything that is not comment, markup, doctype/shebang, or an empty line, # is considered to be code. - # + # # For example, # * HTML files not containing JavaScript have 0 LoC # * in a Java class without comments, LoC is the number of non-empty lines - # + # # A Scanner class should define the token kinds that are not code in the # KINDS_NOT_LOC constant, which defaults to [:comment, :doctype]. class LinesOfCode < Encoder - + register_for :lines_of_code - + NON_EMPTY_LINE = /^\s*\S.*$/ - + def compile tokens, options if scanner = tokens.scanner kinds_not_loc = scanner.class::KINDS_NOT_LOC @@ -31,13 +31,13 @@ def compile tokens, options code = tokens.token_class_filter :exclude => kinds_not_loc @loc = code.text.scan(NON_EMPTY_LINE).size end - + def finish options @loc end - + end - + end end @@ -51,7 +51,7 @@ def finish options require 'test/unit' class LinesOfCodeTest < Test::Unit::TestCase - + def test_creation assert CodeRay::Encoders::LinesOfCode < CodeRay::Encoders::Encoder filter = nil @@ -64,7 +64,7 @@ def test_creation end assert_kind_of CodeRay::Encoders::LinesOfCode, filter end - + def test_lines_of_code tokens = CodeRay.scan <<-RUBY, :ruby #!/usr/bin/env ruby @@ -76,7 +76,7 @@ def test_lines_of_code assert_equal 1, tokens.lines_of_code assert_equal 1, tokens.loc end - + def test_filtering_block_tokens tokens = CodeRay::Tokens.new tokens << ["Hello\n", :world] @@ -86,5 +86,5 @@ def test_filtering_block_tokens assert_equal 2, tokens.lines_of_code assert_equal 2, tokens.loc end - + end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/term.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/term.rb index 287529f..58ffb2d 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/term.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/term.rb @@ -75,15 +75,15 @@ def setup(options) def finish(options) super end - + def token text, type = :plain case text - + when nil - # raise 'Token with nil as text was given: %p' % [[text, type]] - + # raise 'Token with nil as text was given: %p' % [[text, type]] + when String - + if color = (@subcolors || TOKEN_COLORS)[type] color = color[:self] || return if Hash === color @@ -92,7 +92,7 @@ def token text, type = :plain else @out << text end - + # token groups, eg. strings when :open @opened[0] = type @@ -116,12 +116,12 @@ def token text, type = :plain @subcolors = nil @opened.pop end - + # whole lines to be highlighted, eg. a added/modified/deleted lines in a diff when :begin_line - - when :end_line - + + when :end_line + else raise 'unknown token kind: %p' % [text] end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/token_class_filter.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/token_class_filter.rb index a9e8673..efa1a63 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/token_class_filter.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/token_class_filter.rb @@ -1,9 +1,9 @@ ($:.unshift '../..'; require 'coderay') unless defined? CodeRay module CodeRay module Encoders - + load :filter - + class TokenClassFilter < Filter include Streamable @@ -22,12 +22,12 @@ def setup options @include = options[:include] @include = Array(@include) unless @include == :all end - + def include_text_token? text, kind (@include == :all || @include.include?(kind)) && !(@exclude == :all || @exclude.include?(kind)) end - + end end @@ -43,7 +43,7 @@ def include_text_token? text, kind require 'test/unit' class TokenClassFilterTest < Test::Unit::TestCase - + def test_creation assert CodeRay::Encoders::TokenClassFilter < CodeRay::Encoders::Encoder assert CodeRay::Encoders::TokenClassFilter < CodeRay::Encoders::Filter @@ -53,7 +53,7 @@ def test_creation end assert_instance_of CodeRay::Encoders::TokenClassFilter, filter end - + def test_filtering_text_tokens tokens = CodeRay::Tokens.new for i in 1..10 @@ -67,7 +67,7 @@ def test_filtering_text_tokens assert_equal 0, CodeRay::Encoders::TokenClassFilter.new.encode_tokens(tokens, :exclude => :all).size assert_equal 0, tokens.token_class_filter(:exclude => :all).size end - + def test_filtering_block_tokens tokens = CodeRay::Tokens.new 10.times do |i| @@ -80,5 +80,5 @@ def test_filtering_block_tokens assert_equal 30, CodeRay::Encoders::TokenClassFilter.new.encode_tokens(tokens, :exclude => :index).size assert_equal 30, tokens.token_class_filter(:exclude => :index).size end - + end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/xml.rb b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/xml.rb index f32c967..b606a8d 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/encoders/xml.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/encoders/xml.rb @@ -33,7 +33,7 @@ def finish options @doc.write @out, options[:pretty], options[:transitive], true @out end - + def text_token text, kind if kind == :space token = @node diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/for_redcloth.rb b/vendor/gems/coderay-0.9.1/lib/coderay/for_redcloth.rb index 0857aba..3d57f32 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/for_redcloth.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/for_redcloth.rb @@ -1,17 +1,17 @@ module CodeRay - + # A little hack to enable CodeRay highlighting in RedCloth. - # + # # Usage: # require 'coderay' # require 'coderay/for_redcloth' # RedCloth.new('@[ruby]puts "Hello, World!"@').to_html - # + # # Make sure you have RedCloth 4.0.3 activated, for example by calling # require 'rubygems' # before RedCloth is loaded and before calling CodeRay.for_redcloth. module ForRedCloth - + def self.install gem 'RedCloth', '>= 4.0.3' rescue nil require 'redcloth' @@ -77,9 +77,9 @@ def escape_pre(text) module TextileDoc # :nodoc: attr_accessor :filter_coderay end - + end - + end CodeRay::ForRedCloth.install \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/helpers/gzip_simple.rb b/vendor/gems/coderay-0.9.1/lib/coderay/helpers/gzip_simple.rb index b979f66..f62f517 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/helpers/gzip_simple.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/helpers/gzip_simple.rb @@ -54,14 +54,14 @@ def GZip.gzip s, level = DEFAULT_GZIP_LEVEL # # # create a big string # x = 'a' * 1000 -# +# # # zip it # x_gz = x.gzip -# +# # # test the result # puts 'Zipped %d bytes to %d bytes.' % [x.size, x_gz.size] # #-> Zipped 1000 bytes to 19 bytes. -# +# # # unzipping works # p x_gz.gunzip == x #-> true class String diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/helpers/plugin.rb b/vendor/gems/coderay-0.9.1/lib/coderay/helpers/plugin.rb index 34b31a8..3a7fd87 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/helpers/plugin.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/helpers/plugin.rb @@ -1,5 +1,5 @@ module CodeRay - + # = PluginHost # # A simple subclass plugin system. @@ -8,12 +8,12 @@ module CodeRay # class Generators < PluginHost # plugin_path 'app/generators' # end -# +# # class Generator # extend Plugin # PLUGIN_HOST = Generators # end -# +# # class FancyGenerator < Generator # register_for :fancy # end @@ -280,7 +280,7 @@ def included mod def register_for *ids plugin_host.register self, *ids end - + # Returns the title of the plugin, or sets it to the # optional argument +title+. def title title = nil @@ -311,9 +311,9 @@ def plugin_host host = nil # # The above example loads the file myplugin/my_helper.rb relative to the # file in which MyPlugin was defined. - # + # # You can also load a helper from a different plugin: - # + # # helper 'other_plugin/helper_name' def helper *helpers for helper in helpers diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/helpers/word_list.rb b/vendor/gems/coderay-0.9.1/lib/coderay/helpers/word_list.rb index 9b4f456..9ae27d7 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/helpers/word_list.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/helpers/word_list.rb @@ -1,9 +1,9 @@ module CodeRay # = WordList -# +# # <b>A Hash subclass designed for mapping word lists to token types.</b> -# +# # Copyright (c) 2006 by murphy (Kornelius Kalnbach) <murphy rubychan de> # # License:: LGPL / ask the author @@ -24,16 +24,16 @@ module CodeRay # asm break case continue default do else # ... # ] -# +# # PREDEFINED_TYPES = %w[ # int long short char void # ... # ] -# +# # PREDEFINED_CONSTANTS = %w[ # EOF NULL ... # ] -# +# # # make a WordList # IDENT_KIND = WordList.new(:ident). # add(RESERVED_WORDS, :reserved). @@ -44,7 +44,7 @@ module CodeRay # # def scan_tokens tokens, options # ... -# +# # elsif scan(/[A-Za-z_][A-Za-z_0-9]*/) # # use it # kind = IDENT_KIND[match] @@ -52,9 +52,9 @@ module CodeRay class WordList < Hash # Creates a new WordList with +default+ as default value. - # + # # You can activate +caching+ to store the results for every [] request. - # + # # With caching, methods like +include?+ or +delete+ may no longer behave # as you expect. Therefore, it is recommended to use the [] method only. def initialize default = false, caching = false, &block @@ -73,7 +73,7 @@ def initialize default = false, caching = false, &block end # Add words to the list and associate them with +kind+. - # + # # Returns +self+, so you can concat add calls. def add words, kind = true words.each do |word| @@ -87,16 +87,16 @@ def add words, kind = true # A CaseIgnoringWordList is like a WordList, only that # keys are compared case-insensitively. -# +# # Ignoring the text case is realized by sending the +downcase+ message to # all keys. -# +# # Caching usually makes a CaseIgnoringWordList faster, but it has to be # activated explicitely. class CaseIgnoringWordList < WordList # Creates a new case-insensitive WordList with +default+ as default value. - # + # # You can activate caching to store the results for every [] request. # This speeds up subsequent lookups for the same word, but also # uses memory. @@ -110,7 +110,7 @@ def initialize default = false, caching = false extend Uncached end end - + module Uncached # :nodoc: def [] key super(key.downcase) diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanner.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanner.rb index d6dd19f..6dd8e7f 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanner.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanner.rb @@ -30,20 +30,20 @@ module Scanners # Tokens: # # require 'coderay' - # + # # c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;" - # + # # for text, kind in c_scanner # puts text if kind == :operator # end - # + # # # prints: (*==)++; # # OK, this is a very simple example :) # You can also use +map+, +any?+, +find+ and even +sort_by+, # if you want. class Scanner < StringScanner - + extend Plugin plugin_host Scanners @@ -56,7 +56,7 @@ class Scanner < StringScanner # # Define @default_options for subclasses. DEFAULT_OPTIONS = { :stream => false } - + KINDS_NOT_LOC = [:comment, :doctype] class << self @@ -78,7 +78,7 @@ def normify code end code.to_unix end - + def file_extension extension = nil if extension @file_extension = extension.to_s @@ -116,7 +116,7 @@ def file_extension extension = nil def initialize code='', options = {}, &block raise "I am only the basic Scanner class. I can't scan "\ "anything. :( Use my subclasses." if self.class == Scanner - + @options = self.class::DEFAULT_OPTIONS.merge options super Scanner.normify(code) @@ -174,7 +174,7 @@ def tokenize new_string=nil, options = {} def tokens @cached_tokens ||= tokenize end - + # Whether the scanner is in streaming mode. def streaming? !!@options[:stream] @@ -195,7 +195,7 @@ def each &block def line string[0..pos].count("\n") + 1 end - + def column pos = self.pos return 0 if pos <= 0 string = string() @@ -205,11 +205,11 @@ def column pos = self.pos end pos - (string.rindex(?\n, pos) || 0) end - + def marshal_dump @options end - + def marshal_load options @options = options end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/c.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/c.rb index ac1d0d2..2484df1 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/c.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/c.rb @@ -4,7 +4,7 @@ module Scanners class C < Scanner include Streamable - + register_for :c file_extension 'c' @@ -52,7 +52,7 @@ def scan_tokens tokens, options kind = nil match = nil - + case state when :initial @@ -97,7 +97,7 @@ def scan_tokens tokens, options elsif scan(/\$/) kind = :ident - + elsif match = scan(/L?"/) tokens << [:open, :string] if match[0] == ?L diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/cpp.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/cpp.rb index 6af5066..b1bd9a2 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/cpp.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/cpp.rb @@ -4,11 +4,11 @@ module Scanners class CPlusPlus < Scanner include Streamable - + register_for :cpp file_extension 'cpp' title 'C++' - + # http://www.cppreference.com/wiki/keywords/start RESERVED_WORDS = [ 'and', 'and_eq', 'asm', 'bitand', 'bitor', 'break', @@ -60,7 +60,7 @@ def scan_tokens tokens, options kind = nil match = nil - + case state when :initial @@ -107,7 +107,7 @@ def scan_tokens tokens, options elsif scan(/\$/) kind = :ident - + elsif match = scan(/L?"/) tokens << [:open, :string] if match[0] == ?L @@ -183,7 +183,7 @@ def scan_tokens tokens, options next end - + when :class_name_expected if scan(/ [A-Za-z_][A-Za-z_0-9]* /x) kind = :class @@ -198,7 +198,7 @@ def scan_tokens tokens, options state = :initial end - + else raise_inspect 'Unknown state', tokens diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/css.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/css.rb index 93e8d80..96dd3a3 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/css.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/css.rb @@ -12,7 +12,7 @@ class CSS < Scanner :key, :value, :operator, :color, :float, :error, :important, ] - + module RE NonASCII = /[\x80-\xFF]/ Hex = /[0-9a-fA-F]/ @@ -51,7 +51,7 @@ module RE end def scan_tokens tokens, options - + value_expected = nil states = [:initial] @@ -85,7 +85,7 @@ def scan_tokens tokens, options kind = :directive states.push :media_before_name end - + when :block if scan(/(?>#{RE::Ident})(?!\()/ox) if value_expected @@ -100,13 +100,13 @@ def scan_tokens tokens, options kind = :type states[-1] = :media_after_name end - + when :media_after_name if scan(/\{/) kind = :operator states[-1] = :media end - + when :comment if scan(/(?:[^*\s]|\*(?!\/))+/) kind = :comment diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/debug.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/debug.rb index f43564e..cb95131 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/debug.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/debug.rb @@ -22,26 +22,26 @@ def scan_tokens tokens, options if scan(/\s+/) tokens << [matched, :space] next - + elsif scan(/ (\w+) \( ( [^\)\\]* ( \\. [^\)\\]* )* ) \) /x) kind = self[1].to_sym match = self[2].gsub(/\\(.)/, '\1') - + elsif scan(/ (\w+) < /x) kind = self[1].to_sym opened_tokens << kind match = :open - + elsif scan(/ > /x) kind = opened_tokens.pop match = :close - + else kind = :error getch end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % @@ -50,9 +50,9 @@ def scan_tokens tokens, options raise_inspect 'Empty token', tokens unless match tokens << [match, kind] - + end - + tokens end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/delphi.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/delphi.rb index fe91ae9..d15a239 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/delphi.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/delphi.rb @@ -1,11 +1,11 @@ module CodeRay module Scanners - + class Delphi < Scanner register_for :delphi file_extension 'pas' - + RESERVED_WORDS = [ 'and', 'array', 'as', 'at', 'asm', 'at', 'begin', 'case', 'class', 'const', 'constructor', 'destructor', 'dispinterface', 'div', 'do', @@ -22,7 +22,7 @@ class Delphi < Scanner DIRECTIVES = [ 'absolute', 'abstract', 'assembler', 'at', 'automated', 'cdecl', 'contains', 'deprecated', 'dispid', 'dynamic', 'export', - 'external', 'far', 'forward', 'implements', 'local', + 'external', 'far', 'forward', 'implements', 'local', 'near', 'nodefault', 'on', 'overload', 'override', 'package', 'pascal', 'platform', 'private', 'protected', 'public', 'published', 'read', 'readonly', 'register', 'reintroduce', @@ -33,7 +33,7 @@ class Delphi < Scanner IDENT_KIND = CaseIgnoringWordList.new(:ident). add(RESERVED_WORDS, :reserved). add(DIRECTIVES, :directive) - + NAME_FOLLOWS = CaseIgnoringWordList.new(false). add(%w(procedure function .)) @@ -49,32 +49,32 @@ def scan_tokens tokens, options match = nil if state == :initial - + if scan(/ \s+ /x) tokens << [matched, :space] next - + elsif scan(%r! \{ \$ [^}]* \}? | \(\* \$ (?: .*? \*\) | .* ) !mx) tokens << [matched, :preprocessor] next - + elsif scan(%r! // [^\n]* | \{ [^}]* \}? | \(\* (?: .*? \*\) | .* ) !mx) tokens << [matched, :comment] next - + elsif match = scan(/ <[>=]? | >=? | :=? | [-+=*\/;,@\^|\(\)\[\]] | \.\. /x) kind = :operator - + elsif match = scan(/\./) kind = :operator if last_token == 'end' tokens << [match, kind] next end - + elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x) kind = NAME_FOLLOWS[last_token] ? :ident : IDENT_KIND[match] - + elsif match = scan(/ ' ( [^\n']|'' ) (?:'|$) /x) tokens << [:open, :char] tokens << ["'", :delimiter] @@ -82,21 +82,21 @@ def scan_tokens tokens, options tokens << ["'", :delimiter] tokens << [:close, :char] next - + elsif match = scan(/ ' /x) tokens << [:open, :string] state = :string kind = :delimiter - + elsif scan(/ \# (?: \d+ | \$[0-9A-Fa-f]+ ) /x) kind = :char - + elsif scan(/ \$ [0-9A-Fa-f]+ /x) kind = :hex - + elsif scan(/ (?: \d+ ) (?![eE]|\.[^.]) /x) kind = :integer - + elsif scan(/ \d+ (?: \.\d+ (?: [eE][+-]? \d+ )? | [eE][+-]? \d+ ) /x) kind = :float @@ -105,7 +105,7 @@ def scan_tokens tokens, options getch end - + elsif state == :string if scan(/[^\n']+/) kind = :content @@ -123,12 +123,12 @@ def scan_tokens tokens, options else raise "else case \' reached; %p not handled." % peek(1), tokens end - + else raise 'else-case reached', tokens - + end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % @@ -138,9 +138,9 @@ def scan_tokens tokens, options last_token = match tokens << [match, kind] - + end - + tokens end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/diff.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/diff.rb index bfb400b..35de4bd 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/diff.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/diff.rb @@ -1,19 +1,19 @@ module CodeRay module Scanners - + class Diff < Scanner - + register_for :diff title 'diff output' - + def scan_tokens tokens, options - + line_kind = nil state = :initial - + until eos? kind = match = nil - + if match = scan(/\n/) if line_kind tokens << [:end_line, line_kind] @@ -22,9 +22,9 @@ def scan_tokens tokens, options tokens << [match, :space] next end - + case state - + when :initial if match = scan(/--- |\+\+\+ |=+|_+/) tokens << [:begin_line, line_kind = :head] @@ -72,7 +72,7 @@ def scan_tokens tokens, options else raise_inspect 'else case rached' end - + when :added if match = scan(/ \+/) tokens << [:begin_line, line_kind = :insert] @@ -84,22 +84,22 @@ def scan_tokens tokens, options next end end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens end raise_inspect 'Empty token', tokens unless match - + tokens << [match, kind] end - + tokens << [:end_line, line_kind] if line_kind tokens end - + end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/groovy.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/groovy.rb index e8901bf..fff6157 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/groovy.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/groovy.rb @@ -7,7 +7,7 @@ class Groovy < Java include Streamable register_for :groovy - + # TODO: Check this! GROOVY_KEYWORDS = %w[ as assert def in @@ -16,15 +16,15 @@ class Groovy < Java case instanceof new return throw typeof while as assert in ] GROOVY_MAGIC_VARIABLES = %w[ it ] - + IDENT_KIND = Java::IDENT_KIND.dup. add(GROOVY_KEYWORDS, :keyword). add(GROOVY_MAGIC_VARIABLES, :local_variable) - + ESCAPE = / [bfnrtv$\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x # no 4-byte unicode chars? U[a-fA-F0-9]{8} REGEXP_ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | \d | [bBdDsSwW\/] /x - + # TODO: interpretation inside ', ", / STRING_CONTENT_PATTERN = { "'" => /(?>\\[^\\'\n]+|[^\\'\n]+)+/, @@ -33,7 +33,7 @@ class Groovy < Java '"""' => /(?>[^\\$"]+|"(?!""))+/, '/' => /[^\\$\/\n]+/, } - + def scan_tokens tokens, options state = :initial @@ -47,7 +47,7 @@ def scan_tokens tokens, options kind = nil match = nil - + case state when :initial @@ -59,19 +59,19 @@ def scan_tokens tokens, options value_expected = true unless value_expected end next - + elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx) value_expected = true after_def = false kind = :comment - + elsif bol? && scan(/ \#!.* /x) kind = :doctype - + elsif import_clause && scan(/ (?!as) #{IDENT} (?: \. #{IDENT} )* (?: \.\* )? /ox) after_def = value_expected = false kind = :include - + elsif match = scan(/ #{IDENT} | \[\] /ox) kind = IDENT_KIND[match] value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match] @@ -90,12 +90,12 @@ def scan_tokens tokens, options import_clause = match == 'import' after_def = true if match == 'def' end - + elsif scan(/;/) import_clause = after_def = false value_expected = true kind = :operator - + elsif scan(/\{/) class_name_follows = after_def = false value_expected = true @@ -103,7 +103,7 @@ def scan_tokens tokens, options if !inline_block_stack.empty? inline_block_paren_depth += 1 end - + # TODO: ~'...', ~"..." and ~/.../ style regexps elsif match = scan(/ \.\.<? | \*?\.(?!\d)@? | \.& | \?:? | [,?:(\[] | -[->] | \+\+ | && | \|\| | \*\*=? | ==?~ | <=?>? | [-+*%^~&|>=!]=? | <<<?=? | >>>?=? /x) @@ -111,7 +111,7 @@ def scan_tokens tokens, options value_expected = :regexp if match == '~' after_def = false kind = :operator - + elsif match = scan(/ [)\]}] /x) value_expected = after_def = false if !inline_block_stack.empty? && match == '}' @@ -123,7 +123,7 @@ def scan_tokens tokens, options next end end - + elsif check(/[\d.]/) after_def = value_expected = false if scan(/0[xX][0-9A-Fa-f]+/) @@ -142,7 +142,7 @@ def scan_tokens tokens, options tokens << [:open, :string] string_delimiter = match kind = :delimiter - + # TODO: record.'name' elsif match = scan(/["']/) after_def = value_expected = false @@ -166,7 +166,7 @@ def scan_tokens tokens, options after_def = false value_expected = true kind = :operator - + else getch kind = :error @@ -176,7 +176,7 @@ def scan_tokens tokens, options when :string, :regexp, :multiline_string if scan(STRING_CONTENT_PATTERN[string_delimiter]) kind = :content - + elsif match = scan(state == :multiline_string ? /'''|"""/ : /["'\/]/) tokens << [match, :delimiter] if state == :regexp @@ -190,7 +190,7 @@ def scan_tokens tokens, options after_def = value_expected = false state = :initial next - + elsif (state == :string || state == :multiline_string) && (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)) if string_delimiter[0] == ?' && !(match == "\\\\" || match == "\\'") @@ -200,7 +200,7 @@ def scan_tokens tokens, options end elsif state == :regexp && scan(/ \\ (?: #{REGEXP_ESCAPE} | #{UNICODE_ESCAPE} ) /mox) kind = :char - + elsif match = scan(/ \$ #{IDENT} /mox) tokens << [:open, :inline] tokens << ['$', :inline_delimiter] @@ -215,19 +215,19 @@ def scan_tokens tokens, options inline_block_paren_depth = 1 state = :initial next - + elsif scan(/ \$ /mx) kind = :content - + elsif scan(/ \\. /mx) kind = :content - + elsif scan(/ \\ | \n /x) tokens << [:close, state] kind = :error after_def = value_expected = false state = :initial - + else raise_inspect "else case \" reached; %p not handled." % peek(1), tokens end @@ -243,9 +243,9 @@ def scan_tokens tokens, options [[match, kind], line], tokens end raise_inspect 'Empty token', tokens unless match - + last_token = match unless [:space, :comment, :doctype].include? kind - + tokens << [match, kind] end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/html.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/html.rb index d59fa69..cb2bb86 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/html.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/html.rb @@ -6,7 +6,7 @@ class HTML < Scanner include Streamable register_for :html - + KINDS_NOT_LOC = [ :comment, :doctype, :preprocessor, :tag, :attribute_name, :operator, diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java.rb index 17c7eaa..3027d7a 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java.rb @@ -6,7 +6,7 @@ class Java < Scanner include Streamable register_for :java helper :builtin_types - + # http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html KEYWORDS = %w[ assert break case catch continue default do else @@ -25,7 +25,7 @@ class Java < Scanner abstract extends final implements native private protected public static strictfp synchronized throws transient volatile ] - + IDENT_KIND = WordList.new(:ident). add(KEYWORDS, :keyword). add(RESERVED, :reserved). @@ -44,7 +44,7 @@ class Java < Scanner '/' => /[^\\\/]+/, } IDENT = /[a-zA-Z_][A-Za-z_0-9]*/ - + def scan_tokens tokens, options state = :initial @@ -55,7 +55,7 @@ def scan_tokens tokens, options kind = nil match = nil - + case state when :initial @@ -63,14 +63,14 @@ def scan_tokens tokens, options if match = scan(/ \s+ | \\\n /x) tokens << [match, :space] next - + elsif match = scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx) tokens << [match, :comment] next - + elsif import_clause && scan(/ #{IDENT} (?: \. #{IDENT} )* /ox) kind = :include - + elsif match = scan(/ #{IDENT} | \[\] /ox) kind = IDENT_KIND[match] if last_token_dot @@ -82,18 +82,18 @@ def scan_tokens tokens, options import_clause = true if match == 'import' class_name_follows = true if match == 'class' || match == 'interface' end - + elsif scan(/ \.(?!\d) | [,?:()\[\]}] | -- | \+\+ | && | \|\| | \*\*=? | [-+*\/%^~&|<>=!]=? | <<<?=? | >>>?=? /x) kind = :operator - + elsif scan(/;/) import_clause = false kind = :operator - + elsif scan(/\{/) class_name_follows = false kind = :operator - + elsif check(/[\d.]/) if scan(/0[xX][0-9A-Fa-f]+/) kind = :hex @@ -156,9 +156,9 @@ def scan_tokens tokens, options [[match, kind], line], tokens end raise_inspect 'Empty token', tokens unless match - + last_token_dot = match == '.' - + tokens << [match, kind] end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java/builtin_types.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java/builtin_types.rb index 8087edd..713923d 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java/builtin_types.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java/builtin_types.rb @@ -1,8 +1,8 @@ module CodeRay module Scanners - + module Java::BuiltinTypes # :nodoc: - + List = %w[ AbstractAction AbstractBorder AbstractButton AbstractCellEditor AbstractCollection AbstractColorChooserPanel AbstractDocument AbstractExecutorService AbstractInterruptibleChannel @@ -412,8 +412,8 @@ module Java::BuiltinTypes # :nodoc: XPathFactoryConfigurationException XPathFunction XPathFunctionException XPathFunctionResolver XPathVariableResolver ZipEntry ZipException ZipFile ZipInputStream ZipOutputStream ZoneView ] - + end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java_script.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java_script.rb index 772c854..a687063 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java_script.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/java_script.rb @@ -17,13 +17,13 @@ class JavaScript < Scanner PREDEFINED_CONSTANTS = %w[ false null true undefined ] - + MAGIC_VARIABLES = %w[ this arguments ] # arguments was introduced in JavaScript 1.4 - + KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[ case delete in instanceof new return throw typeof with ] - + # Reserved for future use. RESERVED_WORDS = %w[ abstract boolean byte char class debugger double enum export extends @@ -31,7 +31,7 @@ class JavaScript < Scanner private protected public short static super synchronized throws transient volatile ] - + IDENT_KIND = WordList.new(:ident). add(RESERVED_WORDS, :reserved). add(PREDEFINED_CONSTANTS, :pre_constant). @@ -63,7 +63,7 @@ def scan_tokens tokens, options kind = nil match = nil - + case state when :initial @@ -88,13 +88,13 @@ def scan_tokens tokens, options elsif scan(/\d+/) kind = :integer end - + elsif value_expected && match = scan(/<([[:alpha:]]\w*) (?: [^\/>]*\/> | .*?<\/\1>)/xim) # FIXME: scan over nested tags xml_scanner.tokenize match value_expected = false next - + elsif match = scan(/ [-+*=<>?:;,!&^|(\[{~%]+ | \.(?!\d) /x) value_expected = true last_operator = match[-1] @@ -123,7 +123,7 @@ def scan_tokens tokens, options end function_expected = (kind == :keyword) && (match == 'function') key_expected = false - + elsif match = scan(/["']/) if key_expected && check(KEY_CHECK_PATTERN[match]) state = :key @@ -195,7 +195,7 @@ def scan_tokens tokens, options [[match, kind], line], tokens end raise_inspect 'Empty token', tokens unless match - + tokens << [match, kind] end @@ -219,6 +219,6 @@ def xml_scanner end end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/json.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/json.rb index a9926b2..dc35a48 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/json.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/json.rb @@ -1,38 +1,38 @@ module CodeRay module Scanners - + class JSON < Scanner - + include Streamable - + register_for :json file_extension 'json' - + KINDS_NOT_LOC = [ :float, :char, :content, :delimiter, :error, :integer, :operator, :value, ] - + CONSTANTS = %w( true false null ) IDENT_KIND = WordList.new(:key).add(CONSTANTS, :value) - + ESCAPE = / [bfnrt\\"\/] /x UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x - + def scan_tokens tokens, options - + state = :initial stack = [] string_delimiter = nil key_expected = false - + until eos? - + kind = nil match = nil - + case state - + when :initial if match = scan(/ \s+ | \\\n /x) tokens << [match, :space] @@ -62,7 +62,7 @@ def scan_tokens tokens, options getch kind = :error end - + when :string, :key if scan(/[^\\"]+/) kind = :content @@ -82,31 +82,31 @@ def scan_tokens tokens, options else raise_inspect "else case \" reached; %p not handled." % peek(1), tokens end - + else raise_inspect 'Unknown state', tokens - + end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens end raise_inspect 'Empty token', tokens unless match - + tokens << [match, kind] - + end - + if [:string, :key].include? state tokens << [:close, state] end - + tokens end - + end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/nitro_xhtml.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/nitro_xhtml.rb index 6eb1d3b..647c5ff 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/nitro_xhtml.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/nitro_xhtml.rb @@ -13,7 +13,7 @@ class NitroXHTML < Scanner title 'Nitro XHTML' KINDS_NOT_LOC = HTML::KINDS_NOT_LOC - + NITRO_RUBY_BLOCK = / <\?r (?> @@ -115,13 +115,13 @@ def scan_tokens tokens, options elsif entity = scan(/#{NITRO_ENTITY}/o) tokens << [entity, :entity] - + elsif scan(/%/) tokens << [matched, :error] else raise_inspect 'else-case reached!', tokens - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/php.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/php.rb index 41f217d..2e350e6 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/php.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/php.rb @@ -1,27 +1,27 @@ module CodeRay module Scanners - + load :html - + # Original by Stefan Walk. class PHP < Scanner - + register_for :php file_extension 'php' - + KINDS_NOT_LOC = HTML::KINDS_NOT_LOC - + def setup @html_scanner = CodeRay.scanner :html, :tokens => @tokens, :keep_tokens => true, :keep_state => true end - + def reset_instance super @html_scanner.reset end - + module Words - + # according to http://www.php.net/manual/en/reserved.keywords.php KEYWORDS = %w[ abstract and array as break case catch class clone const continue declare default do else elseif @@ -30,16 +30,16 @@ module Words throw try use var while xor cfunction old_function ] - + TYPES = %w[ int integer float double bool boolean string array object resource ] - + LANGUAGE_CONSTRUCTS = %w[ die echo empty exit eval include include_once isset list require require_once return print unset ] - + CLASSES = %w[ Directory stdClass __PHP_Incomplete_Class exception php_user_filter Closure ] - + # according to http://php.net/quickref.php on 2009-04-21; # all functions with _ excluded (module functions) and selected additional functions BUILTIN_FUNCTIONS = %w[ @@ -131,12 +131,12 @@ module Words pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig ] # TODO: more built-in PHP functions? - + EXCEPTIONS = %w[ E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_DEPRECATED E_USER_DEPRECATED E_ALL E_STRICT ] - + CONSTANTS = %w[ null true false self parent __LINE__ __DIR__ __FILE__ __LINE__ @@ -169,13 +169,13 @@ module Words LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_PID LOG_CONS LOG_ODELAY LOG_NDELAY LOG_NOWAIT LOG_PERROR ] - + PREDEFINED = %w[ $GLOBALS $_SERVER $_GET $_POST $_FILES $_REQUEST $_SESSION $_ENV $_COOKIE $php_errormsg $HTTP_RAW_POST_DATA $http_response_header $argc $argv ] - + IDENT_KIND = CaseIgnoringWordList.new(:ident). add(KEYWORDS, :reserved). add(TYPES, :pre_type). @@ -184,30 +184,30 @@ module Words add(CLASSES, :pre_constant). add(EXCEPTIONS, :exception). add(CONSTANTS, :pre_constant) - + VARIABLE_KIND = WordList.new(:local_variable). add(PREDEFINED, :predefined) end - + module RE - + PHP_START = / <script\s+[^>]*?language\s*=\s*"php"[^>]*?> | <script\s+[^>]*?language\s*=\s*'php'[^>]*?> | <\?php\d? | <\?(?!xml) /xi - + PHP_END = %r! </script> | \?> !xi - + HTML_INDICATOR = /<!DOCTYPE html|<(?:html|body|div|p)[> ]/i - + IDENTIFIER = /[a-z_\x7f-\xFF][a-z0-9_\x7f-\xFF]*/i VARIABLE = /\$#{IDENTIFIER}/ - + OPERATOR = / \.(?!\d)=? | # dot that is not decimal point, string concatenation && | \|\| | # logic @@ -220,11 +220,11 @@ module RE [=!]=?=? | <> | # comparison and assignment <<=? | >>=? | [<>]=? # comparison and shift /x - + end - + def scan_tokens tokens, options - + if check(RE::PHP_START) || # starts with <? (match?(/\s*<\S/) && exist?(RE::PHP_START)) || # starts with tag and contains <? exist?(RE::HTML_INDICATOR) || @@ -235,21 +235,21 @@ def scan_tokens tokens, options # is just PHP, so start with PHP surrounded by HTML states = [:initial, :php] end - + label_expected = true case_expected = false - + heredoc_delimiter = nil delimiter = nil modifier = nil - + until eos? - + match = nil kind = nil - + case states.last - + when :initial # HTML if scan RE::PHP_START kind = :inline_delimiter @@ -260,15 +260,15 @@ def scan_tokens tokens, options @html_scanner.tokenize match unless match.empty? next end - + when :php if match = scan(/\s+/) tokens << [match, :space] next - + elsif scan(%r! (?m: \/\* (?: .*? \*\/ | .* ) ) | (?://|\#) .*? (?=#{RE::PHP_END}|$) !xo) kind = :comment - + elsif match = scan(RE::IDENTIFIER) kind = Words::IDENT_KIND[match] if kind == :ident && label_expected && check(/:(?!:)/) @@ -292,19 +292,19 @@ def scan_tokens tokens, options next end end - + elsif scan(/(?:\d+\.\d*|\d*\.\d+)(?:e[-+]?\d+)?|\d+e[-+]?\d+/i) label_expected = false kind = :float - + elsif scan(/0x[0-9a-fA-F]+/) label_expected = false kind = :hex - + elsif scan(/\d+/) label_expected = false kind = :integer - + elsif scan(/'/) tokens << [:open, :string] if modifier @@ -313,7 +313,7 @@ def scan_tokens tokens, options end kind = :delimiter states.push :sqstring - + elsif match = scan(/["`]/) tokens << [:open, :string] if modifier @@ -323,16 +323,16 @@ def scan_tokens tokens, options delimiter = match kind = :delimiter states.push :dqstring - + elsif match = scan(RE::VARIABLE) label_expected = false kind = Words::VARIABLE_KIND[match] - + elsif scan(/\{/) kind = :operator label_expected = true states.push :php - + elsif scan(/\}/) if states.size == 1 kind = :error @@ -349,15 +349,15 @@ def scan_tokens tokens, options label_expected = true end end - + elsif scan(/@/) label_expected = false kind = :exception - + elsif scan RE::PHP_END kind = :inline_delimiter states = [:initial] - + elsif match = scan(/<<<(?:(#{RE::IDENTIFIER})|"(#{RE::IDENTIFIER})"|'(#{RE::IDENTIFIER})')/o) tokens << [:open, :string] warn 'heredoc in heredoc?' if heredoc_delimiter @@ -365,7 +365,7 @@ def scan_tokens tokens, options kind = :delimiter states.push self[3] ? :sqstring : :dqstring heredoc_delimiter = /#{heredoc_delimiter}(?=;?$)/ - + elsif match = scan(/#{RE::OPERATOR}/o) label_expected = match == ';' if case_expected @@ -373,13 +373,13 @@ def scan_tokens tokens, options case_expected = false end kind = :operator - + else getch kind = :error - + end - + when :sqstring if scan(heredoc_delimiter ? /[^\\\n]+/ : /[^'\\]+/) kind = :content @@ -408,7 +408,7 @@ def scan_tokens tokens, options elsif scan(/\\/) kind = :error end - + when :dqstring if scan(heredoc_delimiter ? /[^${\\\n]+/ : (delimiter == '"' ? /[^"${\\]+/ : /[^`${\\]+/)) kind = :content @@ -477,7 +477,7 @@ def scan_tokens tokens, options elsif scan(/\$/) kind = :content end - + when :class_expected if scan(/\s+/) kind = :space @@ -488,7 +488,7 @@ def scan_tokens tokens, options states.pop next end - + when :function_expected if scan(/\s+/) kind = :space @@ -501,26 +501,26 @@ def scan_tokens tokens, options states.pop next end - + else raise_inspect 'Unknown state!', tokens, states end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens, states end raise_inspect 'Empty token', tokens, states unless match - + tokens << [match, kind] - + end - + tokens end - + end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/plaintext.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/plaintext.rb index 6cbb119..010ebe1 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/plaintext.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/plaintext.rb @@ -5,11 +5,11 @@ class Plaintext < Scanner register_for :plaintext, :plain title 'Plain text' - + include Streamable - + KINDS_NOT_LOC = [:plain] - + def scan_tokens tokens, options text = (scan_until(/\z/) || '') tokens << [text, :plain] diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/python.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/python.rb index b0aa82a..a04d275 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/python.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/python.rb @@ -1,15 +1,15 @@ module CodeRay module Scanners - + # Bases on pygments' PythonLexer, see # http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. class Python < Scanner - + include Streamable - + register_for :python file_extension 'py' - + KEYWORDS = [ 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', @@ -17,11 +17,11 @@ class Python < Scanner 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield', 'nonlocal', # new in Python 3 ] - + OLD_KEYWORDS = [ 'exec', 'print', # gone in Python 3 ] - + PREDEFINED_METHODS_AND_TYPES = %w[ __import__ abs all any apply basestring bin bool buffer bytearray bytes callable chr classmethod cmp coerce compile @@ -33,7 +33,7 @@ class Python < Scanner sorted staticmethod str sum super tuple type unichr unicode vars xrange zip ] - + PREDEFINED_EXCEPTIONS = %w[ ArithmeticError AssertionError AttributeError BaseException DeprecationWarning EOFError EnvironmentError @@ -48,23 +48,23 @@ class Python < Scanner UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError ] - + PREDEFINED_VARIABLES_AND_CONSTANTS = [ 'False', 'True', 'None', # "keywords" since Python 3 'self', 'Ellipsis', 'NotImplemented', ] - + IDENT_KIND = WordList.new(:ident). add(KEYWORDS, :keyword). add(OLD_KEYWORDS, :old_keyword). add(PREDEFINED_METHODS_AND_TYPES, :predefined). add(PREDEFINED_VARIABLES_AND_CONSTANTS, :pre_constant). add(PREDEFINED_EXCEPTIONS, :exception) - + NAME = / [^\W\d] \w* /x ESCAPE = / [abfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} | N\{[-\w ]+\} /x - + OPERATOR = / \.\.\. | # ellipsis \.(?!\d) | # dot but not decimal point @@ -74,40 +74,40 @@ class Python < Scanner [~`] | # binary complement and inspection <<=? | >>=? | [<>=]=? | != # comparison and assignment /x - + STRING_DELIMITER_REGEXP = Hash.new do |h, delimiter| h[delimiter] = Regexp.union delimiter end - + STRING_CONTENT_REGEXP = Hash.new do |h, delimiter| h[delimiter] = / [^\\\n]+? (?= \\ | $ | #{Regexp.escape(delimiter)} ) /x end - + DEF_NEW_STATE = WordList.new(:initial). add(%w(def), :def_expected). add(%w(import from), :include_expected). add(%w(class), :class_expected) - + DESCRIPTOR = / #{NAME} (?: \. #{NAME} )* | \* /x - + def scan_tokens tokens, options - + state = :initial string_delimiter = nil string_raw = false import_clause = class_name_follows = last_token_dot = false unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8' from_import_state = [] - + until eos? - + kind = nil match = nil - + if state == :string if scan(STRING_DELIMITER_REGEXP[string_delimiter]) tokens << [matched, :delimiter] @@ -131,25 +131,25 @@ def scan_tokens tokens, options else raise_inspect "else case \" reached; %p not handled." % peek(1), tokens, state end - + elsif match = scan(/ [ \t]+ | \\\n /x) tokens << [match, :space] next - + elsif match = scan(/\n/) tokens << [match, :space] state = :initial if state == :include_expected next - + elsif match = scan(/ \# [^\n]* /mx) tokens << [match, :comment] next - + elsif state == :initial - + if scan(/#{OPERATOR}/o) kind = :operator - + elsif match = scan(/(u?r?|b)?("""|"|'''|')/i) tokens << [:open, :string] string_delimiter = self[2] @@ -162,9 +162,9 @@ def scan_tokens tokens, options end state = :string kind = :delimiter - + # TODO: backticks - + elsif match = scan(unicode ? /#{NAME}/uo : /#{NAME}/o) kind = IDENT_KIND[match] # TODO: keyword arguments @@ -177,39 +177,39 @@ def scan_tokens tokens, options state = DEF_NEW_STATE[match] from_import_state << match.to_sym if state == :include_expected end - + elsif scan(/@[a-zA-Z0-9_.]+[lL]?/) kind = :decorator - + elsif scan(/0[xX][0-9A-Fa-f]+[lL]?/) kind = :hex - + elsif scan(/0[bB][01]+[lL]?/) kind = :bin - + elsif match = scan(/(?:\d*\.\d+|\d+\.\d*)(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+/) kind = :float if scan(/[jJ]/) match << matched kind = :imaginary end - + elsif scan(/0[oO][0-7]+|0[0-7]+(?![89.eE])[lL]?/) kind = :oct - + elsif match = scan(/\d+([lL])?/) kind = :integer if self[1] == nil && scan(/[jJ]/) match << matched kind = :imaginary end - + else getch kind = :error - + end - + elsif state == :def_expected state = :initial if match = scan(unicode ? /#{NAME}/uo : /#{NAME}/o) @@ -217,7 +217,7 @@ def scan_tokens tokens, options else next end - + elsif state == :class_expected state = :initial if match = scan(unicode ? /#{NAME}/uo : /#{NAME}/o) @@ -225,7 +225,7 @@ def scan_tokens tokens, options else next end - + elsif state == :include_expected if match = scan(unicode ? /#{DESCRIPTOR}/uo : /#{DESCRIPTOR}/o) kind = :include @@ -253,33 +253,33 @@ def scan_tokens tokens, options state = :initial next end - + else raise_inspect 'Unknown state', tokens, state - + end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens, state end raise_inspect 'Empty token', tokens, state unless match - + last_token_dot = match == '.' - + tokens << [match, kind] - + end - + if state == :string tokens << [:close, :string] end - + tokens end - + end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/rhtml.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/rhtml.rb index 581f1f8..d3d28e3 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/rhtml.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/rhtml.rb @@ -10,7 +10,7 @@ class RHTML < Scanner include Streamable register_for :rhtml title 'HTML ERB Template' - + KINDS_NOT_LOC = HTML::KINDS_NOT_LOC ERB_RUBY_BLOCK = / diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby.rb index 34a682b..4d7a969 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby.rb @@ -21,7 +21,7 @@ class Ruby < Scanner file_extension 'rb' helper :patterns - + if not defined? EncodingError EncodingError = Class.new Exception end @@ -36,9 +36,9 @@ def scan_tokens tokens, options depth = nil inline_block_stack = [] unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8' - + patterns = Patterns # avoid constant lookup - + until eos? match = nil kind = nil @@ -133,7 +133,7 @@ def scan_tokens tokens, options value_expected = true if match.index(?\n) tokens << [match, kind] next - + elsif match = scan(/\\?\n/) kind = :space if match == "\n" @@ -151,11 +151,11 @@ def scan_tokens tokens, options end tokens << [match, kind] next - + elsif bol? && match = scan(/\#!.*/) tokens << [match, :doctype] next - + elsif match = scan(/\#.*/) or ( bol? and match = scan(/#{patterns::RUBYDOC_OR_DATA}/o) ) kind = :comment @@ -179,7 +179,7 @@ def scan_tokens tokens, options end end value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o) - + elsif last_token_dot and match = scan(/#{patterns::METHOD_NAME_OPERATOR}|\(/o) kind = :ident value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o) @@ -344,7 +344,7 @@ def scan_tokens tokens, options elsif state == :alias_expected match = scan(unicode ? /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/uo : /(#{patterns::METHOD_NAME_OR_SYMBOL})([ \t]+)(#{patterns::METHOD_NAME_OR_SYMBOL})/o) - + if match tokens << [self[1], (self[1][0] == ?: ? :symbol : :method)] tokens << [self[2], :space] @@ -364,12 +364,12 @@ def scan_tokens tokens, options end # }}} - + unless kind == :error value_expected = value_expected == :set last_token_dot = last_token_dot == :set end - + if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens, state diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby/patterns.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby/patterns.rb index 576beda..008d28c 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby/patterns.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/ruby/patterns.rb @@ -88,17 +88,17 @@ module Ruby::Patterns # :nodoc: | x[0-9A-Fa-f]{1,2} | .? /mx - + CONTROL_META_ESCAPE = / (?: M-|C-|c ) (?: \\ (?: M-|C-|c ) )* (?: [^\\] | \\ #{SIMPLE_ESCAPE} )? /mox - + ESCAPE = / #{CONTROL_META_ESCAPE} | #{SIMPLE_ESCAPE} /mox - + CHARACTER = / \? (?: @@ -130,7 +130,7 @@ module Ruby::Patterns # :nodoc: .*? (?: \Z | (?=^\#CODE) ) /mx - + # Checks for a valid value to follow. This enables # value_expected in method calls without parentheses. VALUE_FOLLOWS = / @@ -188,7 +188,7 @@ class StringState < Struct.new :type, :interpreted, :delim, :heredoc, delim_pattern << Regexp.escape(closing_paren) end delim_pattern << '\\\\' unless delim == '\\' - + special_escapes = case interpreted when :regexp_symbols @@ -196,7 +196,7 @@ class StringState < Struct.new :type, :interpreted, :delim, :heredoc, when :words '| \s' end - + h[k] = if interpreted and not delim == '#' / (?= [#{delim_pattern}] | \# [{$@] #{special_escapes} ) /mx diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/scheme.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/scheme.rb index 3fc60d2..6bd2c65 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/scheme.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/scheme.rb @@ -4,10 +4,10 @@ module Scanners # Scheme scanner for CodeRay (by closure). # Thanks to murphy for putting CodeRay into public. class Scheme < Scanner - + # TODO: function defs # TODO: built-in functions - + register_for :scheme file_extension 'scm' @@ -19,7 +19,7 @@ class Scheme < Scanner IDENT_KIND = CaseIgnoringWordList.new(:ident). add(CORE_FORMS, :reserved) - + #IDENTIFIER_INITIAL = /[a-z!@\$%&\*\/\:<=>\?~_\^]/i #IDENTIFIER_SUBSEQUENT = /#{IDENTIFIER_INITIAL}|\d|\.|\+|-/ #IDENTIFIER = /#{IDENTIFIER_INITIAL}#{IDENTIFIER_SUBSEQUENT}*|\+|-|\.{3}/ @@ -68,16 +68,16 @@ class Scheme < Scanner NUM8 = /#{PREFIX8}#{COMPLEX8}/ NUM2 = /#{PREFIX2}#{COMPLEX2}/ NUM = /#{NUM10}|#{NUM16}|#{NUM8}|#{NUM2}/ - + private def scan_tokens tokens,options - + state = :initial ident_kind = IDENT_KIND - + until eos? kind = match = nil - + case state when :initial if scan(/ \s+ | \\\n /x) @@ -104,7 +104,7 @@ def scan_tokens tokens,options elsif getch kind = :error end - + when :string if scan(/[^"\\]+/) or scan(/\\.?/) kind = :content @@ -117,28 +117,28 @@ def scan_tokens tokens,options raise_inspect "else case \" reached; %p not handled." % peek(1), tokens, state end - + else raise "else case reached" end - + match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens end raise_inspect 'Empty token', tokens, state unless match - + tokens << [match, kind] - + end # until eos - + if state == :string tokens << [:close, :string] end - + tokens - + end #scan_tokens end #class end #module scanners diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/sql.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/sql.rb index 2b21c79..d26fff3 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/sql.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/sql.rb @@ -1,10 +1,10 @@ module CodeRay module Scanners - + # by Josh Goebel class SQL < Scanner register_for :sql - + RESERVED_WORDS = %w( create database table index trigger drop primary key set select insert update delete replace into @@ -13,7 +13,7 @@ class SQL < Scanner join inner outer union engine not like end using collate show columns begin ) - + PREDEFINED_TYPES = %w( char varchar enum binary text tinytext mediumtext longtext blob tinyblob mediumblob longblob timestamp @@ -21,50 +21,50 @@ class SQL < Scanner integer tinyint mediumint bigint smallint unsigned bit bool boolean hex bin oct ) - + PREDEFINED_FUNCTIONS = %w( sum cast abs pi count min max avg ) - + DIRECTIVES = %w( auto_increment unique default charset ) PREDEFINED_CONSTANTS = %w( null true false ) - + IDENT_KIND = CaseIgnoringWordList.new(:ident). add(RESERVED_WORDS, :reserved). add(PREDEFINED_TYPES, :pre_type). add(PREDEFINED_CONSTANTS, :pre_constant). add(PREDEFINED_FUNCTIONS, :predefined). add(DIRECTIVES, :directive) - + ESCAPE = / [rbfntv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | . /mx UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x - + STRING_PREFIXES = /[xnb]|_\w+/i - + def scan_tokens tokens, options - + state = :initial string_type = nil string_content = '' - + until eos? - + kind = nil match = nil - + if state == :initial - + if scan(/ \s+ | \\\n /x) kind = :space - + elsif scan(/^(?:--\s?|#).*/) kind = :comment - + elsif scan(%r! /\* (?: .*? \*/ | .* ) !mx) kind = :comment - + elsif scan(/ [-+*\/=<>;,!&^|()\[\]{}~%] | \.(?!\d) /x) kind = :operator - + elsif scan(/(#{STRING_PREFIXES})?([`"'])/o) prefix = self[1] string_type = self[2] @@ -73,28 +73,28 @@ def scan_tokens tokens, options match = string_type state = :string kind = :delimiter - + elsif match = scan(/ @? [A-Za-z_][A-Za-z_0-9]* /x) kind = match[0] == ?@ ? :variable : IDENT_KIND[match.downcase] - + elsif scan(/0[xX][0-9A-Fa-f]+/) kind = :hex - + elsif scan(/0[0-7]+(?![89.eEfF])/) kind = :oct - + elsif scan(/(?>\d+)(?![.eEfF])/) kind = :integer - + elsif scan(/\d[fF]|\d*\.\d+(?:[eE][+-]?\d+)?|\d+[eE][+-]?\d+/) kind = :float - + else getch kind = :error - + end - + elsif state == :string if match = scan(/[^\\"'`]+/) string_content << match @@ -137,26 +137,26 @@ def scan_tokens tokens, options else raise "else case \" reached; %p not handled." % peek(1), tokens end - + else raise 'else-case reached', tokens - + end - + match ||= matched unless kind raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens, state end raise_inspect 'Empty token', tokens unless match - + tokens << [match, kind] - + end tokens - + end - + end - + end end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/xml.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/xml.rb index aeabeca..0c7eab4 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/xml.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/xml.rb @@ -10,7 +10,7 @@ class XML < HTML register_for :xml file_extension 'xml' - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/yaml.rb b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/yaml.rb index 52fca90..8ecf01d 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/scanners/yaml.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/scanners/yaml.rb @@ -1,27 +1,27 @@ module CodeRay module Scanners - + # YAML Scanner # # Based on the YAML scanner from Syntax by Jamis Buck. class YAML < Scanner - + register_for :yaml file_extension 'yml' - + KINDS_NOT_LOC = :all - + def scan_tokens tokens, options - + value_expected = nil state = :initial key_indent = indent = 0 - + until eos? - + kind = nil match = nil - + if bol? key_indent = nil if $DEBUG @@ -29,17 +29,17 @@ def scan_tokens tokens, options tokens << [indent.to_s, :debug] end end - + if match = scan(/ +[\t ]*/) kind = :space - + elsif match = scan(/\n+/) kind = :space state = :initial if match.index(?\n) - + elsif match = scan(/#.*/) kind = :comment - + elsif bol? and case when match = scan(/---|\.\.\./) tokens << [:open, :head] @@ -50,7 +50,7 @@ def scan_tokens tokens, options tokens << [match, :doctype] next end - + elsif state == :value and case when !check(/(?:"[^"]*")(?=: |:$)/) && scan(/"/) tokens << [:open, :string] @@ -72,7 +72,7 @@ def scan_tokens tokens, options tokens << [matched, :string] if scan(/(?:\n+ {#{string_indent + 1}}.*)+/) next end - + elsif case when match = scan(/[-:](?= |$)/) state = :value if state == :colon && (match == ':' || match == '-') @@ -119,26 +119,26 @@ def scan_tokens tokens, options when scan(/[^:\s]+(:(?! |$)[^:\s]*)*/) kind = :error end - + else getch kind = :error - + end - + match ||= matched - + raise_inspect 'Error token %p in line %d' % [[match, kind], line], tokens if $DEBUG && !kind raise_inspect 'Empty token', tokens unless match - + tokens << [match, kind] - + end - + tokens end - + end - + end end diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/token_classes.rb b/vendor/gems/coderay-0.9.1/lib/coderay/token_classes.rb index ae35c0f..17210ef 100755 --- a/vendor/gems/coderay-0.9.1/lib/coderay/token_classes.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/token_classes.rb @@ -65,7 +65,7 @@ class Tokens :variable => 'v', :value => 'vl', :xml_text => 'xt', - + :insert => 'ins', :delete => 'del', :change => 'chg', diff --git a/vendor/gems/coderay-0.9.1/lib/coderay/tokens.rb b/vendor/gems/coderay-0.9.1/lib/coderay/tokens.rb index aa78ee7..1d45281 100644 --- a/vendor/gems/coderay-0.9.1/lib/coderay/tokens.rb +++ b/vendor/gems/coderay-0.9.1/lib/coderay/tokens.rb @@ -46,10 +46,10 @@ module CodeRay # # Tokens' subclass TokenStream allows streaming to save memory. class Tokens < Array - + # The Scanner instance that created the tokens. attr_accessor :scanner - + # Whether the object is a TokenStream. # # Returns false. @@ -157,7 +157,7 @@ def optimize def optimize! replace optimize end - + # Ensure that all :open tokens have a correspondent :close one. # # TODO: Test this! @@ -187,13 +187,13 @@ def fix tokens << token while token = opened.pop tokens end - + def fix! replace fix end - + # TODO: Scanner#split_into_lines - # + # # Makes sure that: # - newlines are single tokens # (which means all other token are single-line) @@ -303,11 +303,11 @@ def stream? # Example: # # require 'coderay' - # + # # token_stream = CodeRay::TokenStream.new do |kind, text| # puts 'kind: %s, text size: %d.' % [kind, text.size] # end - # + # # token_stream << [:regexp, '/\d+/'] # #-> kind: rexpexp, text size: 5. # @@ -356,7 +356,7 @@ def optimize require 'test/unit' class TokensTest < Test::Unit::TestCase - + def test_creation assert CodeRay::Tokens < Array tokens = nil @@ -365,7 +365,7 @@ def test_creation end assert_kind_of Array, tokens end - + def test_adding_tokens tokens = CodeRay::Tokens.new assert_nothing_raised do @@ -374,7 +374,7 @@ def test_adding_tokens end assert_equal tokens.size, 2 end - + def test_dump_undump tokens = CodeRay::Tokens.new assert_nothing_raised do @@ -387,5 +387,5 @@ def test_dump_undump end assert_equal tokens, tokens2 end - + end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.1/lib/term/ansicolor.rb b/vendor/gems/coderay-0.9.1/lib/term/ansicolor.rb index fb7dbd3..b3b11f9 100644 --- a/vendor/gems/coderay-0.9.1/lib/term/ansicolor.rb +++ b/vendor/gems/coderay-0.9.1/lib/term/ansicolor.rb @@ -25,37 +25,37 @@ # * http://term-ansicolor.rubyforge.org # # == Examples -# +# # The file examples/example.rb in the source/gem-distribution shows how # this library can be used: # require 'term/ansicolor' -# +# # # Use this trick to work around namespace cluttering that # # happens if you just include Term::ANSIColor: -# +# # class Color # class << self # include Term::ANSIColor # end # end -# +# # print Color.red, Color.bold, "No Namespace cluttering:", Color.clear, "\n" # print Color.green + "green" + Color.clear, "\n" # print Color.on_red(Color.green("green")), "\n" # print Color.yellow { Color.on_black { "yellow on_black" } }, "\n\n" -# +# # # Or shortcut Term::ANSIColor by assignment: # c = Term::ANSIColor -# +# # print c.red, c.bold, "No Namespace cluttering (alternative):", c.clear, "\n" # print c.green + "green" + c.clear, "\n" # print c.on_red(c.green("green")), "\n" # print c.yellow { c.on_black { "yellow on_black" } }, "\n\n" -# +# # # Anyway, I don't define any of Term::ANSIColor's methods in this example # # and I want to keep it short: # include Term::ANSIColor -# +# # print red, bold, "Usage as constants:", reset, "\n" # print clear, "clear", reset, reset, "reset", reset, # bold, "bold", reset, dark, "dark", reset, @@ -68,7 +68,7 @@ # on_green, "on_green", reset, on_yellow, "on_yellow", reset, # on_blue, "on_blue", reset, on_magenta, "on_magenta", reset, # on_cyan, "on_cyan", reset, on_white, "on_white", reset, "|\n\n" -# +# # print red, bold, "Usage as unary argument methods:", reset, "\n" # print clear("clear"), reset("reset"), bold("bold"), dark("dark"), # underscore("underscore"), blink("blink"), negative("negative"), @@ -78,7 +78,7 @@ # on_black("on_black"), on_red("on_red"), on_green("on_green"),# # on_yellow("on_yellow"), on_blue("on_blue"), on_magenta("on_magenta"), # on_cyan("on_cyan"), on_white("on_white"), "|\n\n" -# +# # print red { bold { "Usage as block forms:" } }, "\n" # print clear { "clear" }, reset { "reset" }, bold { "bold" }, # dark { "dark" }, underscore { "underscore" }, blink { "blink" }, @@ -90,12 +90,12 @@ # on_yellow { "on_yellow" }, on_blue { "on_blue" }, # on_magenta { "on_magenta" }, on_cyan { "on_cyan" }, # on_white { "on_white" }, "|\n\n" -# +# # # Usage as Mixin into String or its Subclasses # class String # include Term::ANSIColor # end -# +# # print "Usage as String Mixins:".red.bold, "\n" # print "clear".clear, "reset".reset, "bold".bold, "dark".dark, # "underscore".underscore, "blink".blink, "negative".negative, @@ -105,14 +105,14 @@ # "on_black".on_black, "on_red".on_red, "on_green".on_green, # "on_yellow".on_yellow, "on_blue".on_blue, "on_magenta".on_magenta, # "on_cyan".on_cyan, "on_white".on_white, "|\n\n" -# +# # symbols = Term::ANSIColor::attributes # print red { bold { "All supported attributes = " } }, # blue { symbols.inspect }, "\n\n" -# +# # print "Send symbols to strings:".send(:red).send(:bold), "\n" # print symbols[12, 8].map { |c| c.to_s.send(c) }, "\n\n" -# +# # print red { bold { "Make strings monochromatic again:" } }, "\n" # print [ "red".red, "not red anymore".red.uncolored, # uncolored { "not red anymore".red }, uncolored("not red anymore".red) @@ -123,34 +123,34 @@ module Term module ANSIColor # :stopdoc: ATTRIBUTES = [ - [ :clear , 0 ], + [ :clear , 0 ], [ :reset , 0 ], # synonym for :clear - [ :bold , 1 ], - [ :dark , 2 ], + [ :bold , 1 ], + [ :dark , 2 ], [ :italic , 3 ], # not widely implemented - [ :underline , 4 ], + [ :underline , 4 ], [ :underscore , 4 ], # synonym for :underline - [ :blink , 5 ], + [ :blink , 5 ], [ :rapid_blink , 6 ], # not widely implemented [ :negative , 7 ], # no reverse because of String#reverse - [ :concealed , 8 ], + [ :concealed , 8 ], [ :strikethrough, 9 ], # not widely implemented - [ :black , 30 ], - [ :red , 31 ], - [ :green , 32 ], - [ :yellow , 33 ], - [ :blue , 34 ], - [ :magenta , 35 ], - [ :cyan , 36 ], - [ :white , 37 ], - [ :on_black , 40 ], - [ :on_red , 41 ], - [ :on_green , 42 ], - [ :on_yellow , 43 ], - [ :on_blue , 44 ], - [ :on_magenta , 45 ], - [ :on_cyan , 46 ], - [ :on_white , 47 ], + [ :black , 30 ], + [ :red , 31 ], + [ :green , 32 ], + [ :yellow , 33 ], + [ :blue , 34 ], + [ :magenta , 35 ], + [ :cyan , 36 ], + [ :white , 37 ], + [ :on_black , 40 ], + [ :on_red , 41 ], + [ :on_green , 42 ], + [ :on_yellow , 43 ], + [ :on_blue , 44 ], + [ :on_magenta , 45 ], + [ :on_cyan , 46 ], + [ :on_white , 47 ], ] ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first diff --git a/vendor/gems/http_configuration-1.0.2/.specification b/vendor/gems/http_configuration-1.0.2/.specification index f8d8104..6dee0f2 100644 --- a/vendor/gems/http_configuration-1.0.2/.specification +++ b/vendor/gems/http_configuration-1.0.2/.specification @@ -1,8 +1,8 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: http_configuration -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 1 - 0 - 2 @@ -10,54 +10,54 @@ version: !ruby/object:Gem::Version platform: ruby authors: [] -autorequire: +autorequire: bindir: bin cert_chain: [] date: 2010-04-19 00:00:00 -07:00 -default_executable: +default_executable: dependencies: [] -description: -email: +description: +email: executables: [] extensions: [] extra_rdoc_files: [] -files: +files: - lib - lib/http_configuration.rb has_rdoc: true -homepage: +homepage: licenses: [] -post_install_message: +post_install_message: rdoc_options: [] -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] -rubyforge_project: +rubyforge_project: rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 3 -summary: +summary: test_files: [] diff --git a/vendor/gems/http_configuration-1.0.2/Rakefile b/vendor/gems/http_configuration-1.0.2/Rakefile index 22e799d..57f8be1 100644 --- a/vendor/gems/http_configuration-1.0.2/Rakefile +++ b/vendor/gems/http_configuration-1.0.2/Rakefile @@ -20,7 +20,7 @@ Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_files.include('lib/**/*.rb') end -spec = Gem::Specification.new do |s| +spec = Gem::Specification.new do |s| s.name = "http_configuration" s.version = "1.0.2" s.author = "Brian Durand" @@ -37,7 +37,7 @@ spec = Gem::Specification.new do |s| s.email = 'brian@embellishedvisions.com' s.requirements = 'rspec 1.0.8 or higher is needed to run the tests' end - -Rake::GemPackageTask.new(spec) do |pkg| - pkg.need_tar = true + +Rake::GemPackageTask.new(spec) do |pkg| + pkg.need_tar = true end \ No newline at end of file diff --git a/vendor/gems/http_configuration-1.0.2/lib/http_configuration.rb b/vendor/gems/http_configuration-1.0.2/lib/http_configuration.rb index 5e160d6..95cad13 100644 --- a/vendor/gems/http_configuration-1.0.2/lib/http_configuration.rb +++ b/vendor/gems/http_configuration-1.0.2/lib/http_configuration.rb @@ -2,35 +2,35 @@ require 'net/http' module Net - + class Protocol - + private - + # Default error type to a non-interrupt exception def timeout (secs, errorType = NetworkTimeoutError) super(secs, errorType) end - + end - + class BufferedIO - + private - + # Default error type to a non-interrupt exception def timeout (secs, errorType = NetworkTimeoutError) super(secs, errorType) end - + end - + # Error thrown by network timeouts class NetworkTimeoutError < StandardError end - + class HTTP - + class << self def new_with_configuration (address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil) config_options = Configuration.current @@ -47,22 +47,22 @@ def new_with_configuration (address, port = nil, p_addr = nil, p_port = nil, p_u p_pass = config_options[:proxy_password] end end - + http = HTTP.new_without_configuration(address, port, p_addr, p_port, p_user, p_pass) - + if config_options http.open_timeout = config_options[:open_timeout] if config_options[:open_timeout] http.read_timeout = config_options[:read_timeout] if config_options[:read_timeout] end - + return http end - + alias_method :new_without_configuration, :new alias_method :new, :new_with_configuration - + end - + # The Configuration class encapsulates a set of HTTP defaults. The configuration # can made either global or all requests, or it can be applied only within a block. # Configuration blocks can also set an additional set of options which take precedence @@ -81,17 +81,17 @@ def new_with_configuration (address, port = nil, p_addr = nil, p_port = nil, p_u # and timeouts manually if needed. Because of the way in which https calls are made, you cannot # configure a special proxy just for https calls. class Configuration - + def initialize (options = {}) @default_options = options.dup expand_proxy_config!(@default_options) end - + # Get the specified option for the configuration. def [] (name) @default_options[name] end - + # Apply the configuration to the block. If any options are provided, they will override the default options # for the configuration. def apply (options = {}) @@ -105,19 +105,19 @@ def apply (options = {}) Thread.current[:net_http_configuration].pop end end - + def self.no_proxy? (host, options) return false unless options[:no_proxy].kind_of?(Array) - + host = host.downcase options[:no_proxy].each do |pattern| pattern = pattern.downcase return true if host[-pattern.length, pattern.length] == pattern end - + return false end - + # Set the options for a global configuration used for all HTTP requests. The global configuration can be cleared # by setting nil def self.set_global (options) @@ -127,20 +127,20 @@ def self.set_global (options) @global = nil end end - + def self.global @global end - + # Get the current configuration that is in scope. def self.current stack = Thread.current[:net_http_configuration] config = stack.last if stack config || global end - + private - + def expand_proxy_config! (options) proxy_config = options[:proxy] if proxy_config @@ -160,7 +160,7 @@ def expand_proxy_config! (options) end parse_no_proxy!(options[:no_proxy], options) end - + def parse_proxy! (proxy, options) return unless proxy and proxy.length > 0 proxy_info = /(http:\/\/)?(([^:]+):([^@]+)@)?([^:]+)(:(\d+))?/i.match(proxy) @@ -171,7 +171,7 @@ def parse_proxy! (proxy, options) options[:proxy_port] = proxy_info[7].to_i if proxy_info[7] end end - + def parse_no_proxy! (no_proxy, options) return unless no_proxy and no_proxy.length > 0 if no_proxy.kind_of?(Array) @@ -181,8 +181,7 @@ def parse_no_proxy! (no_proxy, options) end end end - + end - + end - \ No newline at end of file diff --git a/vendor/gems/http_configuration-1.0.2/spec/http_configuration_spec.rb b/vendor/gems/http_configuration-1.0.2/spec/http_configuration_spec.rb index db1be38..4716ac9 100644 --- a/vendor/gems/http_configuration-1.0.2/spec/http_configuration_spec.rb +++ b/vendor/gems/http_configuration-1.0.2/spec/http_configuration_spec.rb @@ -3,14 +3,14 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'http_configuration')) describe "Net::HTTP::Configuration" do - + it "should set the default configuration options" do config = Net::HTTP::Configuration.new(:proxy_host => 'localhost', :proxy_port => 8080, :no_proxy => ['local1', 'local2']) config[:proxy_host].should == 'localhost' config[:proxy_port].should == 8080 config[:no_proxy].should == ['local1', 'local2'] end - + it "should be able to get the proxy from the environment" do ENV.should_receive(:[]).with('HTTP_PROXY').and_return('localhost:80') ENV.should_receive(:[]).with('NO_PROXY').and_return('.local1, .local2') @@ -21,13 +21,13 @@ config[:proxy_password].should == nil config[:no_proxy].should == ['.local1', '.local2'] end - + it "should be able to parse the no_proxy option" do Net::HTTP::Configuration.new(:no_proxy => 'host')[:no_proxy].should == ['host'] Net::HTTP::Configuration.new(:no_proxy => 'host1, host2')[:no_proxy].should == ['host1', 'host2'] Net::HTTP::Configuration.new(:no_proxy => ['host3', 'host4'])[:no_proxy].should == ['host3', 'host4'] end - + it "should be able to parse a proxy with user and password" do config = Net::HTTP::Configuration.new(:proxy => 'http://user:password@proxy.local:9000', :no_proxy => '.local1, .local2') config[:proxy_host].should == 'proxy.local' @@ -37,7 +37,7 @@ config[:no_proxy].should == ['.local1', '.local2'] config[:proxy].should == nil end - + it "should be able to clear the proxy" do config = Net::HTTP::Configuration.new(:proxy => :none) config[:proxy_host].should == nil @@ -45,7 +45,7 @@ config[:proxy_user].should == nil config[:proxy_password].should == nil end - + it "should be able to set a global configuration" do Net::HTTP::Configuration.set_global(:proxy_host => 'localhost', :proxy_port => 8080, :read_timeout => 5) Net::HTTP::Configuration.global[:proxy_host].should == 'localhost' @@ -54,7 +54,7 @@ Net::HTTP::Configuration.set_global(nil) Net::HTTP::Configuration.global.should == nil end - + it "should be able to apply a configuration to a block" do Net::HTTP::Configuration.set_global(nil) config = Net::HTTP::Configuration.new(:proxy_host => "proxy#{rand(1000)}", :read_timeout => 30) @@ -65,12 +65,12 @@ end retval.should == :done end - + it "should be able to determine the current configuration" do Net::HTTP::Configuration.set_global(:proxy_host => 'global') config1 = Net::HTTP::Configuration.new(:proxy_host => 'config1') config2 = Net::HTTP::Configuration.new(:proxy_host => 'config2') - + Net::HTTP::Configuration.current[:proxy_host].should == 'global' config1.apply do Net::HTTP::Configuration.current[:proxy_host].should == 'config1' @@ -80,11 +80,11 @@ Net::HTTP::Configuration.current[:proxy_host].should == 'config1' end Net::HTTP::Configuration.current[:proxy_host].should == 'global' - + Net::HTTP::Configuration.set_global(nil) Net::HTTP::Configuration.current.should == nil end - + it "should be able to determine if a host does not require a proxy" do Net::HTTP::Configuration.no_proxy?('host.local', :no_proxy => ['host.local']).should == true Net::HTTP::Configuration.no_proxy?('host.local', :no_proxy => ['not_this_one', '.local']).should == true @@ -94,16 +94,16 @@ Net::HTTP::Configuration.no_proxy?('external.host', :no_proxy => ['.local']).should == false Net::HTTP::Configuration.no_proxy?('external.host', :no_proxy => nil).should == false end - + end describe "Net::HTTP" do - + it "should work normally if no configuration has been set" do Net::HTTP.should_receive(:new_without_configuration).with('localhost', 80, nil, nil, nil, nil) Net::HTTP.new('localhost', 80) end - + it "should use proxy settings if they have been set" do config = Net::HTTP::Configuration.new(:proxy_host => 'proxy', :proxy_port => 8080, :proxy_user => 'user', :proxy_password => 'password') Net::HTTP.should_receive(:new_without_configuration).with('localhost', 80, 'proxy', 8080, 'user', 'password') @@ -111,7 +111,7 @@ Net::HTTP.new('localhost', 80) end end - + it "should honor no_proxy hosts" do config = Net::HTTP::Configuration.new(:proxy_host => 'proxy', :proxy_port => 8080, :no_proxy => ['localhost']) Net::HTTP.should_receive(:new_without_configuration).with('localhost', 80, nil, nil, nil, nil) @@ -119,7 +119,7 @@ Net::HTTP.new('localhost', 80) end end - + it "should honor proxies explicitly passed" do config = Net::HTTP::Configuration.new(:proxy_host => 'proxy', :proxy_port => 8080, :proxy_user => 'user', :proxy_password => 'password') Net::HTTP.should_receive(:new_without_configuration).with('localhost', 80, 'other_proxy', 9000, nil, nil) @@ -127,7 +127,7 @@ Net::HTTP.new('localhost', 80, 'other_proxy', 9000) end end - + it "should set read_timeout from the configuration" do config = Net::HTTP::Configuration.new(:read_timeout => 7) config.apply do @@ -135,7 +135,7 @@ http.read_timeout.should == 7 end end - + it "should set open_timeout from the configuration" do config = Net::HTTP::Configuration.new(:open_timeout => 6) config.apply do @@ -143,11 +143,11 @@ http.open_timeout.should == 6 end end - + end describe "Net::BufferedIO" do - + it "should timeout without an interrupt" do io = Net::BufferedIO.new(StringIO.new) lambda do @@ -158,12 +158,12 @@ end describe "Net::Protocol" do - + it "should timeout without an interrupt" do http = Net::HTTP.new('localhost') lambda do http.send(:timeout, 1){sleep(2)} end.should raise_error(Net::NetworkTimeoutError) end - + end diff --git a/vendor/gems/json-1.2.4/COPYING b/vendor/gems/json-1.2.4/COPYING index c3a2126..b854159 100644 --- a/vendor/gems/json-1.2.4/COPYING +++ b/vendor/gems/json-1.2.4/COPYING @@ -45,9 +45,9 @@ You can redistribute it and/or modify it under either the terms of the GPL files under the ./missing directory. See each file for the copying condition. - 5. The scripts and library files supplied as input to or produced as + 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, + copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. diff --git a/vendor/gems/json-1.2.4/README b/vendor/gems/json-1.2.4/README index c7cfefc..4597af1 100644 --- a/vendor/gems/json-1.2.4/README +++ b/vendor/gems/json-1.2.4/README @@ -234,16 +234,16 @@ extension: Comparing times (call_time_mean): 1 ParserBenchmarkExt#parser 900 repeats: - 553.922304770 ( real) -> 21.500x + 553.922304770 ( real) -> 21.500x 0.001805307 2 ParserBenchmarkYAML#parser 1000 repeats: - 224.513358139 ( real) -> 8.714x + 224.513358139 ( real) -> 8.714x 0.004454078 3 ParserBenchmarkPure#parser 1000 repeats: - 26.755020642 ( real) -> 1.038x + 26.755020642 ( real) -> 1.038x 0.037376163 4 ParserBenchmarkRails#parser 1000 repeats: - 25.763381731 ( real) -> 1.000x + 25.763381731 ( real) -> 1.000x 0.038814780 calls/sec ( time) -> speed covers secs/call @@ -260,16 +260,16 @@ overall smaller than the median of the JSON::Pure::Parser runs: Comparing times (call_time_median): 1 ParserBenchmarkExt#parser 900 repeats: - 800.592479481 ( real) -> 26.936x + 800.592479481 ( real) -> 26.936x 0.001249075 2 ParserBenchmarkYAML#parser 1000 repeats: - 271.002390644 ( real) -> 9.118x + 271.002390644 ( real) -> 9.118x 0.003690004 3 ParserBenchmarkRails#parser 1000 repeats: - 30.227910865 ( real) -> 1.017x + 30.227910865 ( real) -> 1.017x 0.033082008 4 ParserBenchmarkPure#parser 1000 repeats: - 29.722384421 ( real) -> 1.000x + 29.722384421 ( real) -> 1.000x 0.033644676 calls/sec ( time) -> speed covers secs/call @@ -280,19 +280,19 @@ speed: Comparing times (call_time_mean): 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 547.354332608 ( real) -> 15.090x + 547.354332608 ( real) -> 15.090x 0.001826970 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 443.968212317 ( real) -> 12.240x + 443.968212317 ( real) -> 12.240x 0.002252414 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 375.104545883 ( real) -> 10.341x + 375.104545883 ( real) -> 10.341x 0.002665923 4 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 49.978706968 ( real) -> 1.378x + 49.978706968 ( real) -> 1.378x 0.020008521 5 GeneratorBenchmarkRails#generator 1000 repeats: - 38.531868759 ( real) -> 1.062x + 38.531868759 ( real) -> 1.062x 0.025952543 6 GeneratorBenchmarkPure#generator_safe 1000 repeats: 36.927649925 ( real) -> 1.018x 7 (>=3859) @@ -316,19 +316,19 @@ Here are the median comparisons for completeness' sake: Comparing times (call_time_median): 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 708.258020939 ( real) -> 16.547x + 708.258020939 ( real) -> 16.547x 0.001411915 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 569.105020353 ( real) -> 13.296x + 569.105020353 ( real) -> 13.296x 0.001757145 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 482.825371244 ( real) -> 11.280x + 482.825371244 ( real) -> 11.280x 0.002071142 4 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 62.717626652 ( real) -> 1.465x + 62.717626652 ( real) -> 1.465x 0.015944481 5 GeneratorBenchmarkRails#generator 1000 repeats: - 43.965681162 ( real) -> 1.027x + 43.965681162 ( real) -> 1.027x 0.022745013 6 GeneratorBenchmarkPure#generator_safe 1000 repeats: 43.929073409 ( real) -> 1.026x 7 (>=3859) diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log index f63d7ff..73c5979 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log @@ -2,19 +2,19 @@ Comparing times (call_time_mean): 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 547.354332608 ( real) -> 15.090x + 547.354332608 ( real) -> 15.090x 0.001826970 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 443.968212317 ( real) -> 12.240x + 443.968212317 ( real) -> 12.240x 0.002252414 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 375.104545883 ( real) -> 10.341x + 375.104545883 ( real) -> 10.341x 0.002665923 4 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 49.978706968 ( real) -> 1.378x + 49.978706968 ( real) -> 1.378x 0.020008521 5 GeneratorBenchmarkRails#generator 1000 repeats: - 38.531868759 ( real) -> 1.062x + 38.531868759 ( real) -> 1.062x 0.025952543 6 GeneratorBenchmarkPure#generator_safe 1000 repeats: 36.927649925 ( real) -> 1.018x 7 (>=3859) @@ -27,19 +27,19 @@ Comparing times (call_time_mean): Comparing times (call_time_median): 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 708.258020939 ( real) -> 16.547x + 708.258020939 ( real) -> 16.547x 0.001411915 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 569.105020353 ( real) -> 13.296x + 569.105020353 ( real) -> 13.296x 0.001757145 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 482.825371244 ( real) -> 11.280x + 482.825371244 ( real) -> 11.280x 0.002071142 4 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 62.717626652 ( real) -> 1.465x + 62.717626652 ( real) -> 1.465x 0.015944481 5 GeneratorBenchmarkRails#generator 1000 repeats: - 43.965681162 ( real) -> 1.027x + 43.965681162 ( real) -> 1.027x 0.022745013 6 GeneratorBenchmarkPure#generator_safe 1000 repeats: 43.929073409 ( real) -> 1.026x 7 (>=3859) diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log index 47b0c7f..5529f83 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log @@ -5,20 +5,20 @@ Running 'GeneratorBenchmarkExt' for 1000 iterations/method (compare_time=real) This first run is only for warmup. GeneratorBenchmarkExt#generator_fast: - real total user system -sum 1.818191528 1.840000000 1.830000000 0.010000000 -min 0.001368999 0.000000000 0.000000000 0.000000000 -std- -0.000870656 -0.002702580 -0.002705600 -0.000306228 -mean 0.001818192 0.001840000 0.001830000 0.000010000 -std+ 0.004507039 0.006382580 0.006365600 0.000326228 -max 0.026389122 0.030000000 0.030000000 0.010000000 -std 0.002688848 0.004542580 0.004535600 0.000316228 -std% 147.885830391 246.879359662 247.847020509 3162.277660168 -harm 0.001475231 nan nan nan -geo 0.001529059 0.000000000 0.000000000 0.000000000 -q1 0.001397133 0.000000000 0.000000000 0.000000000 -med 0.001406908 0.000000000 0.000000000 0.000000000 -q3 0.001425028 0.000000000 0.000000000 0.000000000 + real total user system +sum 1.818191528 1.840000000 1.830000000 0.010000000 +min 0.001368999 0.000000000 0.000000000 0.000000000 +std- -0.000870656 -0.002702580 -0.002705600 -0.000306228 +mean 0.001818192 0.001840000 0.001830000 0.000010000 +std+ 0.004507039 0.006382580 0.006365600 0.000326228 +max 0.026389122 0.030000000 0.030000000 0.010000000 +std 0.002688848 0.004542580 0.004535600 0.000316228 +std% 147.885830391 246.879359662 247.847020509 3162.277660168 +harm 0.001475231 nan nan nan +geo 0.001529059 0.000000000 0.000000000 0.000000000 +q1 0.001397133 0.000000000 0.000000000 0.000000000 +med 0.001406908 0.000000000 0.000000000 0.000000000 +q3 0.001425028 0.000000000 0.000000000 0.000000000 1000 549.99706 0.001818192 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=15.00353 (alpha=0.05, df=50). 0.00000 < 0.95000 => No autocorrelation was detected. GeneratorBenchmarkExt#generator_fast: - real total user system -sum 1.826970100 1.830000000 1.820000000 0.010000000 -min 0.001377106 0.000000000 0.000000000 0.000000000 -std- -0.000992693 -0.002749527 -0.002708588 -0.000306228 -mean 0.001826970 0.001830000 0.001820000 0.000010000 -std+ 0.004646633 0.006409527 0.006348588 0.000326228 -max 0.027617931 0.030000000 0.030000000 0.010000000 -std 0.002819663 0.004579527 0.004528588 0.000316228 -std% 154.335471491 250.247404066 248.823509412 3162.277660168 -harm 0.001469225 nan nan nan -geo 0.001522946 0.000000000 0.000000000 0.000000000 -q1 0.001402140 0.000000000 0.000000000 0.000000000 -med 0.001411915 0.000000000 0.000000000 0.000000000 -q3 0.001425982 0.000000000 0.000000000 0.000000000 + real total user system +sum 1.826970100 1.830000000 1.820000000 0.010000000 +min 0.001377106 0.000000000 0.000000000 0.000000000 +std- -0.000992693 -0.002749527 -0.002708588 -0.000306228 +mean 0.001826970 0.001830000 0.001820000 0.000010000 +std+ 0.004646633 0.006409527 0.006348588 0.000326228 +max 0.027617931 0.030000000 0.030000000 0.010000000 +std 0.002819663 0.004579527 0.004528588 0.000316228 +std% 154.335471491 250.247404066 248.823509412 3162.277660168 +harm 0.001469225 nan nan nan +geo 0.001522946 0.000000000 0.000000000 0.000000000 +q1 0.001402140 0.000000000 0.000000000 0.000000000 +med 0.001411915 0.000000000 0.000000000 0.000000000 +q3 0.001425982 0.000000000 0.000000000 0.000000000 1000 547.35433 0.001826970 calls calls/sec secs/call @@ -80,20 +80,20 @@ No initial data truncated. This first run is only for warmup. GeneratorBenchmarkExt#generator_pretty: - real total user system -sum 2.625656843 2.590000000 2.580000000 0.010000000 -min 0.002025127 0.000000000 0.000000000 0.000000000 -std- -0.000656844 -0.002684440 -0.002689855 -0.000306228 -mean 0.002625657 0.002590000 0.002580000 0.000010000 -std+ 0.005908158 0.007864440 0.007849855 0.000326228 -max 0.028638124 0.030000000 0.030000000 0.010000000 -std 0.003282501 0.005274440 0.005269855 0.000316228 -std% 125.016381076 203.646340853 204.257944451 3162.277660168 -harm 0.002154247 nan nan nan -geo 0.002239052 0.000000000 0.000000000 0.000000000 -q1 0.002051830 0.000000000 0.000000000 0.000000000 -med 0.002062082 0.000000000 0.000000000 0.000000000 -q3 0.002082050 0.000000000 0.000000000 0.000000000 + real total user system +sum 2.625656843 2.590000000 2.580000000 0.010000000 +min 0.002025127 0.000000000 0.000000000 0.000000000 +std- -0.000656844 -0.002684440 -0.002689855 -0.000306228 +mean 0.002625657 0.002590000 0.002580000 0.000010000 +std+ 0.005908158 0.007864440 0.007849855 0.000326228 +max 0.028638124 0.030000000 0.030000000 0.010000000 +std 0.003282501 0.005274440 0.005269855 0.000316228 +std% 125.016381076 203.646340853 204.257944451 3162.277660168 +harm 0.002154247 nan nan nan +geo 0.002239052 0.000000000 0.000000000 0.000000000 +q1 0.002051830 0.000000000 0.000000000 0.000000000 +med 0.002062082 0.000000000 0.000000000 0.000000000 +q3 0.002082050 0.000000000 0.000000000 0.000000000 1000 380.85708 0.002625657 calls calls/sec secs/call @@ -115,20 +115,20 @@ Ljung-Box statistics: q=349.53704 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. GeneratorBenchmarkExt#generator_pretty: - real total user system -sum 2.399331093 2.360000000 2.360000000 0.000000000 -min 0.002033949 0.000000000 0.000000000 0.000000000 -std- -0.000767217 -0.002736080 -0.002736080 0.000000000 -mean 0.002665923 0.002622222 0.002622222 0.000000000 -std+ 0.006099064 0.007980525 0.007980525 0.000000000 -max 0.029814005 0.030000000 0.030000000 0.000000000 -std 0.003433140 0.005358303 0.005358303 0.000000000 -std% 128.778658745 204.342051806 204.342051806 nan -harm 0.002164550 nan nan nan -geo 0.002253865 0.000000000 0.000000000 0.000000000 -q1 0.002059937 0.000000000 0.000000000 0.000000000 -med 0.002071142 0.000000000 0.000000000 0.000000000 -q3 0.002090931 0.000000000 0.000000000 0.000000000 + real total user system +sum 2.399331093 2.360000000 2.360000000 0.000000000 +min 0.002033949 0.000000000 0.000000000 0.000000000 +std- -0.000767217 -0.002736080 -0.002736080 0.000000000 +mean 0.002665923 0.002622222 0.002622222 0.000000000 +std+ 0.006099064 0.007980525 0.007980525 0.000000000 +max 0.029814005 0.030000000 0.030000000 0.000000000 +std 0.003433140 0.005358303 0.005358303 0.000000000 +std% 128.778658745 204.342051806 204.342051806 nan +harm 0.002164550 nan nan nan +geo 0.002253865 0.000000000 0.000000000 0.000000000 +q1 0.002059937 0.000000000 0.000000000 0.000000000 +med 0.002071142 0.000000000 0.000000000 0.000000000 +q3 0.002090931 0.000000000 0.000000000 0.000000000 900 375.10455 0.002665923 calls calls/sec secs/call @@ -154,20 +154,20 @@ Truncated initial 100 measurements: 1000 -> 900 (-10.00%). This first run is only for warmup. GeneratorBenchmarkExt#generator_safe: - real total user system -sum 2.218419790 2.210000000 2.210000000 0.000000000 -min 0.001708984 0.000000000 0.000000000 0.000000000 -std- -0.000607850 -0.002484458 -0.002484458 0.000000000 -mean 0.002218420 0.002210000 0.002210000 0.000000000 -std+ 0.005044690 0.006904458 0.006904458 0.000000000 -max 0.026993036 0.030000000 0.030000000 0.000000000 -std 0.002826270 0.004694458 0.004694458 0.000000000 -std% 127.400134370 212.418923782 212.418923782 nan -harm 0.001839661 nan nan nan -geo 0.001909029 0.000000000 0.000000000 0.000000000 -q1 0.001738071 0.000000000 0.000000000 0.000000000 -med 0.001749992 0.000000000 0.000000000 0.000000000 -q3 0.001769066 0.000000000 0.000000000 0.000000000 + real total user system +sum 2.218419790 2.210000000 2.210000000 0.000000000 +min 0.001708984 0.000000000 0.000000000 0.000000000 +std- -0.000607850 -0.002484458 -0.002484458 0.000000000 +mean 0.002218420 0.002210000 0.002210000 0.000000000 +std+ 0.005044690 0.006904458 0.006904458 0.000000000 +max 0.026993036 0.030000000 0.030000000 0.000000000 +std 0.002826270 0.004694458 0.004694458 0.000000000 +std% 127.400134370 212.418923782 212.418923782 nan +harm 0.001839661 nan nan nan +geo 0.001909029 0.000000000 0.000000000 0.000000000 +q1 0.001738071 0.000000000 0.000000000 0.000000000 +med 0.001749992 0.000000000 0.000000000 0.000000000 +q3 0.001769066 0.000000000 0.000000000 0.000000000 1000 450.77131 0.002218420 calls calls/sec secs/call @@ -189,20 +189,20 @@ Ljung-Box statistics: q=24.03262 (alpha=0.05, df=50). 0.00070 < 0.95000 => No autocorrelation was detected. GeneratorBenchmarkExt#generator_safe: - real total user system -sum 2.252413511 2.250000000 2.250000000 0.000000000 -min 0.001720905 0.000000000 0.000000000 0.000000000 -std- -0.000940042 -0.002634809 -0.002634809 0.000000000 -mean 0.002252414 0.002250000 0.002250000 0.000000000 -std+ 0.005444869 0.007134809 0.007134809 0.000000000 -max 0.030152082 0.030000000 0.030000000 0.000000000 -std 0.003192455 0.004884809 0.004884809 0.000000000 -std% 141.734856492 217.102633117 217.102633117 nan -harm 0.001827244 nan nan nan -geo 0.001895755 0.000000000 0.000000000 0.000000000 -q1 0.001747131 0.000000000 0.000000000 0.000000000 -med 0.001757145 0.000000000 0.000000000 0.000000000 -q3 0.001773119 0.000000000 0.000000000 0.000000000 + real total user system +sum 2.252413511 2.250000000 2.250000000 0.000000000 +min 0.001720905 0.000000000 0.000000000 0.000000000 +std- -0.000940042 -0.002634809 -0.002634809 0.000000000 +mean 0.002252414 0.002250000 0.002250000 0.000000000 +std+ 0.005444869 0.007134809 0.007134809 0.000000000 +max 0.030152082 0.030000000 0.030000000 0.000000000 +std 0.003192455 0.004884809 0.004884809 0.000000000 +std% 141.734856492 217.102633117 217.102633117 nan +harm 0.001827244 nan nan nan +geo 0.001895755 0.000000000 0.000000000 0.000000000 +q1 0.001747131 0.000000000 0.000000000 0.000000000 +med 0.001757145 0.000000000 0.000000000 0.000000000 +q3 0.001773119 0.000000000 0.000000000 0.000000000 1000 443.96821 0.002252414 calls calls/sec secs/call @@ -229,26 +229,26 @@ No initial data truncated. Comparing times (call_time_mean): 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 547.354332608 ( real) -> 1.459x + 547.354332608 ( real) -> 1.459x 0.001826970 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 443.968212317 ( real) -> 1.184x + 443.968212317 ( real) -> 1.184x 0.002252414 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 375.104545883 ( real) -> 1.000x + 375.104545883 ( real) -> 1.000x 0.002665923 calls/sec ( time) -> speed covers secs/call Comparing times (call_time_median): 1 GeneratorBenchmarkExt#generator_fast 1000 repeats: - 708.258020939 ( real) -> 1.467x + 708.258020939 ( real) -> 1.467x 0.001411915 2 GeneratorBenchmarkExt#generator_safe 1000 repeats: - 569.105020353 ( real) -> 1.179x + 569.105020353 ( real) -> 1.179x 0.001757145 3 GeneratorBenchmarkExt#generator_pretty 900 repeats: - 482.825371244 ( real) -> 1.000x + 482.825371244 ( real) -> 1.000x 0.002071142 calls/sec ( time) -> speed covers secs/call diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log index 1d42e63..dba2918 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log @@ -5,20 +5,20 @@ Running 'GeneratorBenchmarkPure' for 1000 iterations/method (compare_time=real) This first run is only for warmup. GeneratorBenchmarkPure#generator_pretty: - real total user system -sum 27.356301069 27.380000000 27.370000000 0.010000000 -min 0.022372007 0.020000000 0.020000000 0.000000000 -std- 0.018178834 0.017248947 0.017256376 -0.000306228 -mean 0.027356301 0.027380000 0.027370000 0.000010000 -std+ 0.036533768 0.037511053 0.037483624 0.000326228 -max 0.059602976 0.060000000 0.060000000 0.010000000 -std 0.009177467 0.010131053 0.010113624 0.000316228 -std% 33.547909026 37.001655096 36.951493429 3162.277660168 -harm 0.025499974 0.024719842 0.024716787 nan -geo 0.026258699 0.025883656 0.025877881 0.000000000 -q1 0.023006916 0.020000000 0.020000000 0.000000000 -med 0.023234129 0.020000000 0.020000000 0.000000000 -q3 0.024879038 0.030000000 0.030000000 0.000000000 + real total user system +sum 27.356301069 27.380000000 27.370000000 0.010000000 +min 0.022372007 0.020000000 0.020000000 0.000000000 +std- 0.018178834 0.017248947 0.017256376 -0.000306228 +mean 0.027356301 0.027380000 0.027370000 0.000010000 +std+ 0.036533768 0.037511053 0.037483624 0.000326228 +max 0.059602976 0.060000000 0.060000000 0.010000000 +std 0.009177467 0.010131053 0.010113624 0.000316228 +std% 33.547909026 37.001655096 36.951493429 3162.277660168 +harm 0.025499974 0.024719842 0.024716787 nan +geo 0.026258699 0.025883656 0.025877881 0.000000000 +q1 0.023006916 0.020000000 0.020000000 0.000000000 +med 0.023234129 0.020000000 0.020000000 0.000000000 +q3 0.024879038 0.030000000 0.030000000 0.000000000 1000 36.55465 0.027356301 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=3705.61130 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. GeneratorBenchmarkPure#generator_pretty: - real total user system -sum 27.569372892 27.540000000 27.530000000 0.010000000 -min 0.022536039 0.020000000 0.020000000 0.000000000 -std- 0.018335894 0.017329581 0.017326902 -0.000306228 -mean 0.027569373 0.027540000 0.027530000 0.000010000 -std+ 0.036802852 0.037750419 0.037733098 0.000326228 -max 0.056230068 0.060000000 0.060000000 0.010000000 -std 0.009233479 0.010210419 0.010203098 0.000316228 -std% 33.491797772 37.074868658 37.061742557 3162.277660168 -harm 0.025675439 0.024841635 0.024836493 nan -geo 0.026453993 0.026024721 0.026017235 0.000000000 -q1 0.023056030 0.020000000 0.020000000 0.000000000 -med 0.023363113 0.020000000 0.020000000 0.000000000 -q3 0.025253892 0.030000000 0.030000000 0.000000000 + real total user system +sum 27.569372892 27.540000000 27.530000000 0.010000000 +min 0.022536039 0.020000000 0.020000000 0.000000000 +std- 0.018335894 0.017329581 0.017326902 -0.000306228 +mean 0.027569373 0.027540000 0.027530000 0.000010000 +std+ 0.036802852 0.037750419 0.037733098 0.000326228 +max 0.056230068 0.060000000 0.060000000 0.010000000 +std 0.009233479 0.010210419 0.010203098 0.000316228 +std% 33.491797772 37.074868658 37.061742557 3162.277660168 +harm 0.025675439 0.024841635 0.024836493 nan +geo 0.026453993 0.026024721 0.026017235 0.000000000 +q1 0.023056030 0.020000000 0.020000000 0.000000000 +med 0.023363113 0.020000000 0.020000000 0.000000000 +q3 0.025253892 0.030000000 0.030000000 0.000000000 1000 36.27213 0.027569373 calls calls/sec secs/call @@ -80,20 +80,20 @@ No initial data truncated. This first run is only for warmup. GeneratorBenchmarkPure#generator_safe: - real total user system -sum 26.869803667 26.870000000 26.870000000 0.000000000 -min 0.022134781 0.020000000 0.020000000 0.000000000 -std- 0.017763505 0.016750439 0.016750439 0.000000000 -mean 0.026869804 0.026870000 0.026870000 0.000000000 -std+ 0.035976103 0.036989561 0.036989561 0.000000000 -max 0.054952860 0.060000000 0.060000000 0.000000000 -std 0.009106299 0.010119561 0.010119561 0.000000000 -std% 33.890455748 37.661185483 37.661185483 nan -harm 0.024986876 0.024236549 0.024236549 nan -geo 0.025759291 0.025373850 0.025373850 0.000000000 -q1 0.022480011 0.020000000 0.020000000 0.000000000 -med 0.022669554 0.020000000 0.020000000 0.000000000 -q3 0.024562180 0.030000000 0.030000000 0.000000000 + real total user system +sum 26.869803667 26.870000000 26.870000000 0.000000000 +min 0.022134781 0.020000000 0.020000000 0.000000000 +std- 0.017763505 0.016750439 0.016750439 0.000000000 +mean 0.026869804 0.026870000 0.026870000 0.000000000 +std+ 0.035976103 0.036989561 0.036989561 0.000000000 +max 0.054952860 0.060000000 0.060000000 0.000000000 +std 0.009106299 0.010119561 0.010119561 0.000000000 +std% 33.890455748 37.661185483 37.661185483 nan +harm 0.024986876 0.024236549 0.024236549 nan +geo 0.025759291 0.025373850 0.025373850 0.000000000 +q1 0.022480011 0.020000000 0.020000000 0.000000000 +med 0.022669554 0.020000000 0.020000000 0.000000000 +q3 0.024562180 0.030000000 0.030000000 0.000000000 1000 37.21650 0.026869804 calls calls/sec secs/call @@ -115,20 +115,20 @@ Ljung-Box statistics: q=3100.69443 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. GeneratorBenchmarkPure#generator_safe: - real total user system -sum 27.079979420 27.040000000 27.030000000 0.010000000 -min 0.022160053 0.020000000 0.020000000 0.000000000 -std- 0.017839790 0.016756803 0.016774061 -0.000306228 -mean 0.027079979 0.027040000 0.027030000 0.000010000 -std+ 0.036320169 0.037323197 0.037285939 0.000326228 -max 0.056457043 0.060000000 0.060000000 0.010000000 -std 0.009240189 0.010283197 0.010255939 0.000316228 -std% 34.121847738 38.029575352 37.942800504 3162.277660168 -harm 0.025134510 0.024331887 0.024329914 nan -geo 0.025935574 0.025501913 0.025497264 0.000000000 -q1 0.022511005 0.020000000 0.020000000 0.000000000 -med 0.022763968 0.020000000 0.020000000 0.000000000 -q3 0.024686873 0.030000000 0.030000000 0.000000000 + real total user system +sum 27.079979420 27.040000000 27.030000000 0.010000000 +min 0.022160053 0.020000000 0.020000000 0.000000000 +std- 0.017839790 0.016756803 0.016774061 -0.000306228 +mean 0.027079979 0.027040000 0.027030000 0.000010000 +std+ 0.036320169 0.037323197 0.037285939 0.000326228 +max 0.056457043 0.060000000 0.060000000 0.010000000 +std 0.009240189 0.010283197 0.010255939 0.000316228 +std% 34.121847738 38.029575352 37.942800504 3162.277660168 +harm 0.025134510 0.024331887 0.024329914 nan +geo 0.025935574 0.025501913 0.025497264 0.000000000 +q1 0.022511005 0.020000000 0.020000000 0.000000000 +med 0.022763968 0.020000000 0.020000000 0.000000000 +q3 0.024686873 0.030000000 0.030000000 0.000000000 1000 36.92765 0.027079979 calls calls/sec secs/call @@ -155,20 +155,20 @@ No initial data truncated. This first run is only for warmup. GeneratorBenchmarkPure#generator_fast: - real total user system -sum 19.930217266 19.900000000 19.900000000 0.000000000 -min 0.015556812 0.010000000 0.010000000 0.000000000 -std- 0.010984683 0.009865525 0.009865525 0.000000000 -mean 0.019930217 0.019900000 0.019900000 0.000000000 -std+ 0.028875752 0.029934475 0.029934475 0.000000000 -max 0.048508883 0.050000000 0.050000000 0.000000000 -std 0.008945535 0.010034475 0.010034475 0.000000000 -std% 44.884280314 50.424498030 50.424498030 nan -harm 0.017806422 0.016056519 0.016056519 nan -geo 0.018618502 0.017792091 0.017792091 0.000000000 -q1 0.015833676 0.010000000 0.010000000 0.000000000 -med 0.016059995 0.020000000 0.020000000 0.000000000 -q3 0.016686678 0.020000000 0.020000000 0.000000000 + real total user system +sum 19.930217266 19.900000000 19.900000000 0.000000000 +min 0.015556812 0.010000000 0.010000000 0.000000000 +std- 0.010984683 0.009865525 0.009865525 0.000000000 +mean 0.019930217 0.019900000 0.019900000 0.000000000 +std+ 0.028875752 0.029934475 0.029934475 0.000000000 +max 0.048508883 0.050000000 0.050000000 0.000000000 +std 0.008945535 0.010034475 0.010034475 0.000000000 +std% 44.884280314 50.424498030 50.424498030 nan +harm 0.017806422 0.016056519 0.016056519 nan +geo 0.018618502 0.017792091 0.017792091 0.000000000 +q1 0.015833676 0.010000000 0.010000000 0.000000000 +med 0.016059995 0.020000000 0.020000000 0.000000000 +q3 0.016686678 0.020000000 0.020000000 0.000000000 1000 50.17507 0.019930217 calls calls/sec secs/call @@ -190,20 +190,20 @@ Ljung-Box statistics: q=3486.59836 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. GeneratorBenchmarkPure#generator_fast: - real total user system -sum 20.008520842 19.960000000 19.950000000 0.010000000 -min 0.015434027 0.010000000 0.010000000 0.000000000 -std- 0.010882230 0.009581845 0.009596030 -0.000306228 -mean 0.020008521 0.019960000 0.019950000 0.000010000 -std+ 0.029134812 0.030338155 0.030303970 0.000326228 -max 0.047976971 0.050000000 0.050000000 0.010000000 -std 0.009126291 0.010378155 0.010353970 0.000316228 -std% 45.612021047 51.994765712 51.899601404 3162.277660168 -harm 0.017787111 0.015944725 0.015943454 nan -geo 0.018637889 0.017737808 0.017733851 0.000000000 -q1 0.015746295 0.010000000 0.010000000 0.000000000 -med 0.015944481 0.020000000 0.020000000 0.000000000 -q3 0.016811609 0.020000000 0.020000000 0.000000000 + real total user system +sum 20.008520842 19.960000000 19.950000000 0.010000000 +min 0.015434027 0.010000000 0.010000000 0.000000000 +std- 0.010882230 0.009581845 0.009596030 -0.000306228 +mean 0.020008521 0.019960000 0.019950000 0.000010000 +std+ 0.029134812 0.030338155 0.030303970 0.000326228 +max 0.047976971 0.050000000 0.050000000 0.010000000 +std 0.009126291 0.010378155 0.010353970 0.000316228 +std% 45.612021047 51.994765712 51.899601404 3162.277660168 +harm 0.017787111 0.015944725 0.015943454 nan +geo 0.018637889 0.017737808 0.017733851 0.000000000 +q1 0.015746295 0.010000000 0.010000000 0.000000000 +med 0.015944481 0.020000000 0.020000000 0.000000000 +q3 0.016811609 0.020000000 0.020000000 0.000000000 1000 49.97871 0.020008521 calls calls/sec secs/call @@ -230,7 +230,7 @@ No initial data truncated. Comparing times (call_time_mean): 1 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 49.978706968 ( real) -> 1.378x + 49.978706968 ( real) -> 1.378x 0.020008521 2 GeneratorBenchmarkPure#generator_safe 1000 repeats: 36.927649925 ( real) -> 1.018x 3 (>=3859) @@ -243,7 +243,7 @@ Comparing times (call_time_mean): Comparing times (call_time_median): 1 GeneratorBenchmarkPure#generator_fast 1000 repeats: - 62.717626652 ( real) -> 1.465x + 62.717626652 ( real) -> 1.465x 0.015944481 2 GeneratorBenchmarkPure#generator_safe 1000 repeats: 43.929073409 ( real) -> 1.026x 3 (>=3859) diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log index 7272679..1384ec1 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log @@ -5,20 +5,20 @@ Running 'GeneratorBenchmarkRails' for 1000 iterations/method (compare_time=real) This first run is only for warmup. GeneratorBenchmarkRails#generator: - real total user system -sum 25.871086597 25.820000000 25.780000000 0.040000000 -min 0.021485090 0.020000000 0.020000000 0.000000000 -std- 0.013123732 0.012534515 0.012507179 -0.000591505 -mean 0.025871087 0.025820000 0.025780000 0.000040000 -std+ 0.038618441 0.039105485 0.039052821 0.000671505 -max 0.084933996 0.090000000 0.090000000 0.010000000 -std 0.012747354 0.013285485 0.013272821 0.000631505 -std% 49.272590131 51.454239794 51.484952060 1578.762962731 -harm 0.023654431 0.022959497 0.022933171 nan -geo 0.024373445 0.023988580 0.023955348 0.000000000 -q1 0.021737874 0.020000000 0.020000000 0.000000000 -med 0.022677064 0.020000000 0.020000000 0.000000000 -q3 0.023290575 0.030000000 0.030000000 0.000000000 + real total user system +sum 25.871086597 25.820000000 25.780000000 0.040000000 +min 0.021485090 0.020000000 0.020000000 0.000000000 +std- 0.013123732 0.012534515 0.012507179 -0.000591505 +mean 0.025871087 0.025820000 0.025780000 0.000040000 +std+ 0.038618441 0.039105485 0.039052821 0.000671505 +max 0.084933996 0.090000000 0.090000000 0.010000000 +std 0.012747354 0.013285485 0.013272821 0.000631505 +std% 49.272590131 51.454239794 51.484952060 1578.762962731 +harm 0.023654431 0.022959497 0.022933171 nan +geo 0.024373445 0.023988580 0.023955348 0.000000000 +q1 0.021737874 0.020000000 0.020000000 0.000000000 +med 0.022677064 0.020000000 0.020000000 0.000000000 +q3 0.023290575 0.030000000 0.030000000 0.000000000 1000 38.65319 0.025871087 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=1246.12050 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. GeneratorBenchmarkRails#generator: - real total user system -sum 25.952543497 25.950000000 25.930000000 0.020000000 -min 0.021454096 0.020000000 0.020000000 0.000000000 -std- 0.013029796 0.012272113 0.012258057 -0.000426990 -mean 0.025952543 0.025950000 0.025930000 0.000020000 -std+ 0.038875291 0.039627887 0.039601943 0.000466990 -max 0.083282948 0.090000000 0.090000000 0.010000000 -std 0.012922747 0.013677887 0.013671943 0.000446990 -std% 49.793760083 52.708619269 52.726351240 2234.948544149 -harm 0.023675798 0.022977187 0.022963996 nan -geo 0.024414095 0.024037524 0.024020868 0.000000000 -q1 0.021728516 0.020000000 0.020000000 0.000000000 -med 0.022745013 0.020000000 0.020000000 0.000000000 -q3 0.023253679 0.030000000 0.030000000 0.000000000 + real total user system +sum 25.952543497 25.950000000 25.930000000 0.020000000 +min 0.021454096 0.020000000 0.020000000 0.000000000 +std- 0.013029796 0.012272113 0.012258057 -0.000426990 +mean 0.025952543 0.025950000 0.025930000 0.000020000 +std+ 0.038875291 0.039627887 0.039601943 0.000466990 +max 0.083282948 0.090000000 0.090000000 0.010000000 +std 0.012922747 0.013677887 0.013671943 0.000446990 +std% 49.793760083 52.708619269 52.726351240 2234.948544149 +harm 0.023675798 0.022977187 0.022963996 nan +geo 0.024414095 0.024037524 0.024020868 0.000000000 +q1 0.021728516 0.020000000 0.020000000 0.000000000 +med 0.022745013 0.020000000 0.020000000 0.000000000 +q3 0.023253679 0.030000000 0.030000000 0.000000000 1000 38.53187 0.025952543 calls calls/sec secs/call diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log index 7df4445..86e4024 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log @@ -2,32 +2,32 @@ Comparing times (call_time_mean): 1 ParserBenchmarkExt#parser 900 repeats: - 553.922304770 ( real) -> 21.500x + 553.922304770 ( real) -> 21.500x 0.001805307 2 ParserBenchmarkYAML#parser 1000 repeats: - 224.513358139 ( real) -> 8.714x + 224.513358139 ( real) -> 8.714x 0.004454078 3 ParserBenchmarkPure#parser 1000 repeats: - 26.755020642 ( real) -> 1.038x + 26.755020642 ( real) -> 1.038x 0.037376163 4 ParserBenchmarkRails#parser 1000 repeats: - 25.763381731 ( real) -> 1.000x + 25.763381731 ( real) -> 1.000x 0.038814780 calls/sec ( time) -> speed covers secs/call Comparing times (call_time_median): 1 ParserBenchmarkExt#parser 900 repeats: - 800.592479481 ( real) -> 26.936x + 800.592479481 ( real) -> 26.936x 0.001249075 2 ParserBenchmarkYAML#parser 1000 repeats: - 271.002390644 ( real) -> 9.118x + 271.002390644 ( real) -> 9.118x 0.003690004 3 ParserBenchmarkRails#parser 1000 repeats: - 30.227910865 ( real) -> 1.017x + 30.227910865 ( real) -> 1.017x 0.033082008 4 ParserBenchmarkPure#parser 1000 repeats: - 29.722384421 ( real) -> 1.000x + 29.722384421 ( real) -> 1.000x 0.033644676 calls/sec ( time) -> speed covers secs/call diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log index ca6c64e..3b4bd27 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log @@ -5,20 +5,20 @@ Running 'ParserBenchmarkExt' for 1000 iterations/method (compare_time=real) This first run is only for warmup. ParserBenchmarkExt#parser: - real total user system -sum 1.733042240 1.770000000 1.760000000 0.010000000 -min 0.000833988 0.000000000 0.000000000 0.000000000 -std- -0.001838092 -0.003229209 -0.003232727 -0.000306228 -mean 0.001733042 0.001770000 0.001760000 0.000010000 -std+ 0.005304177 0.006769209 0.006752727 0.000326228 -max 0.032314062 0.040000000 0.040000000 0.010000000 -std 0.003571134 0.004999209 0.004992727 0.000316228 -std% 206.061583704 282.441194727 283.677695666 3162.277660168 -harm 0.001283614 nan nan nan -geo 0.001337350 0.000000000 0.000000000 0.000000000 -q1 0.001236916 0.000000000 0.000000000 0.000000000 -med 0.001246929 0.000000000 0.000000000 0.000000000 -q3 0.001260996 0.000000000 0.000000000 0.000000000 + real total user system +sum 1.733042240 1.770000000 1.760000000 0.010000000 +min 0.000833988 0.000000000 0.000000000 0.000000000 +std- -0.001838092 -0.003229209 -0.003232727 -0.000306228 +mean 0.001733042 0.001770000 0.001760000 0.000010000 +std+ 0.005304177 0.006769209 0.006752727 0.000326228 +max 0.032314062 0.040000000 0.040000000 0.010000000 +std 0.003571134 0.004999209 0.004992727 0.000316228 +std% 206.061583704 282.441194727 283.677695666 3162.277660168 +harm 0.001283614 nan nan nan +geo 0.001337350 0.000000000 0.000000000 0.000000000 +q1 0.001236916 0.000000000 0.000000000 0.000000000 +med 0.001246929 0.000000000 0.000000000 0.000000000 +q3 0.001260996 0.000000000 0.000000000 0.000000000 1000 577.01998 0.001733042 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=13.14182 (alpha=0.05, df=50). 0.00000 < 0.95000 => No autocorrelation was detected. ParserBenchmarkExt#parser: - real total user system -sum 1.624776602 1.620000000 1.620000000 0.000000000 -min 0.000819921 0.000000000 0.000000000 0.000000000 -std- -0.001936067 -0.003223194 -0.003223194 0.000000000 -mean 0.001805307 0.001800000 0.001800000 0.000000000 -std+ 0.005546681 0.006823194 0.006823194 0.000000000 -max 0.032595873 0.040000000 0.040000000 0.000000000 -std 0.003741374 0.005023194 0.005023194 0.000000000 -std% 207.243050150 279.066347558 279.066347558 nan -harm 0.001297084 nan nan nan -geo 0.001358799 0.000000000 0.000000000 0.000000000 -q1 0.001241922 0.000000000 0.000000000 0.000000000 -med 0.001249075 0.000000000 0.000000000 0.000000000 -q3 0.001264811 0.000000000 0.000000000 0.000000000 + real total user system +sum 1.624776602 1.620000000 1.620000000 0.000000000 +min 0.000819921 0.000000000 0.000000000 0.000000000 +std- -0.001936067 -0.003223194 -0.003223194 0.000000000 +mean 0.001805307 0.001800000 0.001800000 0.000000000 +std+ 0.005546681 0.006823194 0.006823194 0.000000000 +max 0.032595873 0.040000000 0.040000000 0.000000000 +std 0.003741374 0.005023194 0.005023194 0.000000000 +std% 207.243050150 279.066347558 279.066347558 nan +harm 0.001297084 nan nan nan +geo 0.001358799 0.000000000 0.000000000 0.000000000 +q1 0.001241922 0.000000000 0.000000000 0.000000000 +med 0.001249075 0.000000000 0.000000000 0.000000000 +q3 0.001264811 0.000000000 0.000000000 0.000000000 900 553.92230 0.001805307 calls calls/sec secs/call diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log index abfc0d4..34dace4 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log @@ -5,20 +5,20 @@ Running 'ParserBenchmarkPure' for 1000 iterations/method (compare_time=real) This first run is only for warmup. ParserBenchmarkPure#parser: - real total user system -sum 37.410897017 37.380000000 37.360000000 0.020000000 -min 0.032916069 0.030000000 0.030000000 0.000000000 -std- 0.029058517 0.027934111 0.027951551 -0.000426990 -mean 0.037410897 0.037380000 0.037360000 0.000020000 -std+ 0.045763277 0.046825889 0.046768449 0.000466990 -max 0.068524122 0.070000000 0.070000000 0.010000000 -std 0.008352380 0.009445889 0.009408449 0.000446990 -std% 22.326062222 25.269901841 25.183215569 2234.948544149 -harm 0.036161242 0.035525181 0.035515868 nan -geo 0.036699193 0.036372385 0.036358664 0.000000000 -q1 0.033462286 0.030000000 0.030000000 0.000000000 -med 0.033834100 0.040000000 0.040000000 0.000000000 -q3 0.036020756 0.040000000 0.040000000 0.000000000 + real total user system +sum 37.410897017 37.380000000 37.360000000 0.020000000 +min 0.032916069 0.030000000 0.030000000 0.000000000 +std- 0.029058517 0.027934111 0.027951551 -0.000426990 +mean 0.037410897 0.037380000 0.037360000 0.000020000 +std+ 0.045763277 0.046825889 0.046768449 0.000466990 +max 0.068524122 0.070000000 0.070000000 0.010000000 +std 0.008352380 0.009445889 0.009408449 0.000446990 +std% 22.326062222 25.269901841 25.183215569 2234.948544149 +harm 0.036161242 0.035525181 0.035515868 nan +geo 0.036699193 0.036372385 0.036358664 0.000000000 +q1 0.033462286 0.030000000 0.030000000 0.000000000 +med 0.033834100 0.040000000 0.040000000 0.000000000 +q3 0.036020756 0.040000000 0.040000000 0.000000000 1000 26.73018 0.037410897 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=2505.23586 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. ParserBenchmarkPure#parser: - real total user system -sum 37.376162529 37.280000000 37.260000000 0.020000000 -min 0.032336950 0.030000000 0.030000000 0.000000000 -std- 0.028895529 0.027756750 0.027774096 -0.000426990 -mean 0.037376163 0.037280000 0.037260000 0.000020000 -std+ 0.045856796 0.046803250 0.046745904 0.000466990 -max 0.068592072 0.070000000 0.070000000 0.010000000 -std 0.008480634 0.009523250 0.009485904 0.000446990 -std% 22.689953522 25.545198741 25.458680636 2234.948544149 -harm 0.036080414 0.035400319 0.035391071 nan -geo 0.036638902 0.036256656 0.036242979 0.000000000 -q1 0.033310235 0.030000000 0.030000000 0.000000000 -med 0.033644676 0.030000000 0.030000000 0.000000000 -q3 0.036110342 0.040000000 0.040000000 0.000000000 + real total user system +sum 37.376162529 37.280000000 37.260000000 0.020000000 +min 0.032336950 0.030000000 0.030000000 0.000000000 +std- 0.028895529 0.027756750 0.027774096 -0.000426990 +mean 0.037376163 0.037280000 0.037260000 0.000020000 +std+ 0.045856796 0.046803250 0.046745904 0.000466990 +max 0.068592072 0.070000000 0.070000000 0.010000000 +std 0.008480634 0.009523250 0.009485904 0.000446990 +std% 22.689953522 25.545198741 25.458680636 2234.948544149 +harm 0.036080414 0.035400319 0.035391071 nan +geo 0.036638902 0.036256656 0.036242979 0.000000000 +q1 0.033310235 0.030000000 0.030000000 0.000000000 +med 0.033644676 0.030000000 0.030000000 0.000000000 +q3 0.036110342 0.040000000 0.040000000 0.000000000 1000 26.75502 0.037376163 calls calls/sec secs/call diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log index f349db1..e595107 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log @@ -5,20 +5,20 @@ Running 'ParserBenchmarkRails' for 1000 iterations/method (compare_time=real) This first run is only for warmup. ParserBenchmarkRails#parser: - real total user system -sum 38.690086126 38.620000000 38.610000000 0.010000000 -min 0.031255007 0.030000000 0.030000000 0.000000000 -std- 0.025022178 0.024277709 0.024265187 -0.000306228 -mean 0.038690086 0.038620000 0.038610000 0.000010000 -std+ 0.052357994 0.052962291 0.052954813 0.000326228 -max 0.083594084 0.090000000 0.090000000 0.010000000 -std 0.013667908 0.014342291 0.014344813 0.000316228 -std% 35.326641197 37.136951469 37.153104057 3162.277660168 -harm 0.035964441 0.035345750 0.035335342 nan -geo 0.037048388 0.036703287 0.036692729 0.000000000 -q1 0.032610178 0.030000000 0.030000000 0.000000000 -med 0.033129930 0.030000000 0.030000000 0.000000000 -q3 0.035388470 0.040000000 0.040000000 0.000000000 + real total user system +sum 38.690086126 38.620000000 38.610000000 0.010000000 +min 0.031255007 0.030000000 0.030000000 0.000000000 +std- 0.025022178 0.024277709 0.024265187 -0.000306228 +mean 0.038690086 0.038620000 0.038610000 0.000010000 +std+ 0.052357994 0.052962291 0.052954813 0.000326228 +max 0.083594084 0.090000000 0.090000000 0.010000000 +std 0.013667908 0.014342291 0.014344813 0.000316228 +std% 35.326641197 37.136951469 37.153104057 3162.277660168 +harm 0.035964441 0.035345750 0.035335342 nan +geo 0.037048388 0.036703287 0.036692729 0.000000000 +q1 0.032610178 0.030000000 0.030000000 0.000000000 +med 0.033129930 0.030000000 0.030000000 0.000000000 +q3 0.035388470 0.040000000 0.040000000 0.000000000 1000 25.84641 0.038690086 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=5276.52020 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. ParserBenchmarkRails#parser: - real total user system -sum 38.814780235 38.730000000 38.710000000 0.020000000 -min 0.031314850 0.030000000 0.030000000 0.000000000 -std- 0.024801114 0.023975177 0.023956914 -0.000426990 -mean 0.038814780 0.038730000 0.038710000 0.000020000 -std+ 0.052828447 0.053484823 0.053463086 0.000466990 -max 0.085337162 0.090000000 0.090000000 0.010000000 -std 0.014013666 0.014754823 0.014753086 0.000446990 -std% 36.103943796 38.096625621 38.111821850 2234.948544149 -harm 0.035975867 0.035320781 0.035304155 nan -geo 0.037101026 0.036725170 0.036706415 0.000000000 -q1 0.032611191 0.030000000 0.030000000 0.000000000 -med 0.033082008 0.030000000 0.030000000 0.000000000 -q3 0.035308182 0.040000000 0.040000000 0.000000000 + real total user system +sum 38.814780235 38.730000000 38.710000000 0.020000000 +min 0.031314850 0.030000000 0.030000000 0.000000000 +std- 0.024801114 0.023975177 0.023956914 -0.000426990 +mean 0.038814780 0.038730000 0.038710000 0.000020000 +std+ 0.052828447 0.053484823 0.053463086 0.000466990 +max 0.085337162 0.090000000 0.090000000 0.010000000 +std 0.014013666 0.014754823 0.014753086 0.000446990 +std% 36.103943796 38.096625621 38.111821850 2234.948544149 +harm 0.035975867 0.035320781 0.035304155 nan +geo 0.037101026 0.036725170 0.036706415 0.000000000 +q1 0.032611191 0.030000000 0.030000000 0.000000000 +med 0.033082008 0.030000000 0.030000000 0.000000000 +q3 0.035308182 0.040000000 0.040000000 0.000000000 1000 25.76338 0.038814780 calls calls/sec secs/call diff --git a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log index d8a6aa3..3f1c339 100644 --- a/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +++ b/vendor/gems/json-1.2.4/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log @@ -5,20 +5,20 @@ Running 'ParserBenchmarkYAML' for 1000 iterations/method (compare_time=real) This first run is only for warmup. ParserBenchmarkYAML#parser: - real total user system -sum 4.506546021 4.490000000 4.480000000 0.010000000 -min 0.003598928 0.000000000 0.000000000 0.000000000 -std- 0.000288588 -0.001817113 -0.001826296 -0.000306228 -mean 0.004506546 0.004490000 0.004480000 0.000010000 -std+ 0.008724504 0.010797113 0.010786296 0.000326228 -max 0.042540073 0.040000000 0.040000000 0.010000000 -std 0.004217958 0.006307113 0.006306296 0.000316228 -std% 93.596247306 140.470232048 140.765535944 3162.277660168 -harm 0.003882332 nan nan nan -geo 0.004019118 0.000000000 0.000000000 0.000000000 -q1 0.003660917 0.000000000 0.000000000 0.000000000 -med 0.003705978 0.000000000 0.000000000 0.000000000 -q3 0.003748715 0.010000000 0.010000000 0.000000000 + real total user system +sum 4.506546021 4.490000000 4.480000000 0.010000000 +min 0.003598928 0.000000000 0.000000000 0.000000000 +std- 0.000288588 -0.001817113 -0.001826296 -0.000306228 +mean 0.004506546 0.004490000 0.004480000 0.000010000 +std+ 0.008724504 0.010797113 0.010786296 0.000326228 +max 0.042540073 0.040000000 0.040000000 0.010000000 +std 0.004217958 0.006307113 0.006306296 0.000316228 +std% 93.596247306 140.470232048 140.765535944 3162.277660168 +harm 0.003882332 nan nan nan +geo 0.004019118 0.000000000 0.000000000 0.000000000 +q1 0.003660917 0.000000000 0.000000000 0.000000000 +med 0.003705978 0.000000000 0.000000000 0.000000000 +q3 0.003748715 0.010000000 0.010000000 0.000000000 1000 221.89943 0.004506546 calls calls/sec secs/call @@ -40,20 +40,20 @@ Ljung-Box statistics: q=433.20488 (alpha=0.05, df=50). 1.00000 >= 0.95000 => Autocorrelation was detected. ParserBenchmarkYAML#parser: - real total user system -sum 4.454077959 4.430000000 4.420000000 0.010000000 -min 0.003582954 0.000000000 0.000000000 0.000000000 -std- 0.000263948 -0.001903657 -0.001912749 -0.000306228 -mean 0.004454078 0.004430000 0.004420000 0.000010000 -std+ 0.008644208 0.010763657 0.010752749 0.000326228 -max 0.035927057 0.040000000 0.040000000 0.010000000 -std 0.004190130 0.006333657 0.006332749 0.000316228 -std% 94.074019869 142.971948832 143.274853190 3162.277660168 -harm 0.003836471 nan nan nan -geo 0.003968258 0.000000000 0.000000000 0.000000000 -q1 0.003650367 0.000000000 0.000000000 0.000000000 -med 0.003690004 0.000000000 0.000000000 0.000000000 -q3 0.003731966 0.010000000 0.010000000 0.000000000 + real total user system +sum 4.454077959 4.430000000 4.420000000 0.010000000 +min 0.003582954 0.000000000 0.000000000 0.000000000 +std- 0.000263948 -0.001903657 -0.001912749 -0.000306228 +mean 0.004454078 0.004430000 0.004420000 0.000010000 +std+ 0.008644208 0.010763657 0.010752749 0.000326228 +max 0.035927057 0.040000000 0.040000000 0.010000000 +std 0.004190130 0.006333657 0.006332749 0.000316228 +std% 94.074019869 142.971948832 143.274853190 3162.277660168 +harm 0.003836471 nan nan nan +geo 0.003968258 0.000000000 0.000000000 0.000000000 +q1 0.003650367 0.000000000 0.000000000 0.000000000 +med 0.003690004 0.000000000 0.000000000 0.000000000 +q3 0.003731966 0.010000000 0.010000000 0.000000000 1000 224.51336 0.004454078 calls calls/sec secs/call diff --git a/vendor/gems/json-1.2.4/data/index.html b/vendor/gems/json-1.2.4/data/index.html index abe6fdb..26b6360 100644 --- a/vendor/gems/json-1.2.4/data/index.html +++ b/vendor/gems/json-1.2.4/data/index.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Javascript Example - + diff --git a/vendor/gems/json-1.2.4/ext/json/ext/generator/generator.c b/vendor/gems/json-1.2.4/ext/json/ext/generator/generator.c index c907c4b..deec18b 100644 --- a/vendor/gems/json-1.2.4/ext/json/ext/generator/generator.c +++ b/vendor/gems/json-1.2.4/ext/json/ext/generator/generator.c @@ -63,7 +63,7 @@ typedef struct JSON_Generator_StateStruct { JSON_Generator_State *state; \ Data_Get_Struct(self, JSON_Generator_State, state); -/* +/* * Document-module: JSON::Ext::Generator * * This is the JSON generator implemented as a C extension. It can be @@ -469,7 +469,7 @@ static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self) return result; } -/* +/* * Document-class: JSON::Ext::Generator::State * * This class is used to create State instances, that are use to hold data @@ -610,7 +610,7 @@ static VALUE cState_aref(VALUE self, VALUE name) * * *indent*: a string used to indent levels (default: ''), * * *space*: a string that is put after, a : or , delimiter (default: ''), * * *space_before*: a string that is put before a : pair delimiter (default: ''), - * * *object_nl*: a string that is put at the end of a JSON object (default: ''), + * * *object_nl*: a string that is put at the end of a JSON object (default: ''), * * *array_nl*: a string that is put at the end of a JSON array (default: ''), * * *check_circular*: true if checking for circular data structures * should be done, false (the default) otherwise. @@ -832,7 +832,7 @@ static VALUE cState_allow_nan_p(VALUE self) /* * call-seq: seen?(object) * - * Returns _true_, if _object_ was already seen during this generating run. + * Returns _true_, if _object_ was already seen during this generating run. */ static VALUE cState_seen_p(VALUE self, VALUE object) { @@ -844,7 +844,7 @@ static VALUE cState_seen_p(VALUE self, VALUE object) * call-seq: remember(object) * * Remember _object_, to find out if it was already encountered (if a cyclic - * data structure is rendered). + * data structure is rendered). */ static VALUE cState_remember(VALUE self, VALUE object) { diff --git a/vendor/gems/json-1.2.4/ext/json/ext/generator/unicode.c b/vendor/gems/json-1.2.4/ext/json/ext/generator/unicode.c index 3ddfbe0..159a334 100644 --- a/vendor/gems/json-1.2.4/ext/json/ext/generator/unicode.c +++ b/vendor/gems/json-1.2.4/ext/json/ext/generator/unicode.c @@ -6,9 +6,9 @@ /* * Copyright 2001-2004 Unicode, Inc. - * + * * Disclaimer - * + * * This source code is provided as is by Unicode, Inc. No claims are * made as to fitness for any particular purpose. No warranties of any * kind are expressed or implied. The recipient agrees to determine @@ -16,9 +16,9 @@ * purchased on magnetic or optical media from Unicode, Inc., the * sole remedy for any claim will be exchange of defective media * within 90 days of receipt. - * + * * Limitations on Rights to Redistribute This Code - * + * * Unicode, Inc. hereby grants the right to freely use the information * supplied in this file in the creation of products supporting the * Unicode Standard, and to make copies of this file in any form @@ -49,7 +49,7 @@ static const char trailingBytesForUTF8[256] = { * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ -static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, +static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; /* diff --git a/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.c b/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.c index ceb7919..dac18cc 100644 --- a/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.c +++ b/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.c @@ -84,14 +84,14 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu *result = NIL_P(object_class) ? rb_hash_new() : rb_class_new_instance(0, 0, object_class); - + #line 89 "parser.c" { cs = JSON_object_start; } #line 133 "parser.rl" - + #line 96 "parser.c" { if ( p == pe ) @@ -202,7 +202,7 @@ case 8: #line 91 "parser.rl" { VALUE v = Qnil; - char *np = JSON_parse_value(json, p, pe, &v); + char *np = JSON_parse_value(json, p, pe, &v); if (np == NULL) { p--; {p++; cs = 9; goto _out;} } else { @@ -378,32 +378,32 @@ case 26: goto st2; goto st26; } - _test_eof2: cs = 2; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; - _test_eof11: cs = 11; goto _test_eof; - _test_eof12: cs = 12; goto _test_eof; - _test_eof13: cs = 13; goto _test_eof; - _test_eof14: cs = 14; goto _test_eof; - _test_eof15: cs = 15; goto _test_eof; - _test_eof16: cs = 16; goto _test_eof; - _test_eof17: cs = 17; goto _test_eof; - _test_eof18: cs = 18; goto _test_eof; - _test_eof27: cs = 27; goto _test_eof; - _test_eof19: cs = 19; goto _test_eof; - _test_eof20: cs = 20; goto _test_eof; - _test_eof21: cs = 21; goto _test_eof; - _test_eof22: cs = 22; goto _test_eof; - _test_eof23: cs = 23; goto _test_eof; - _test_eof24: cs = 24; goto _test_eof; - _test_eof25: cs = 25; goto _test_eof; - _test_eof26: cs = 26; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof18: cs = 18; goto _test_eof; + _test_eof27: cs = 27; goto _test_eof; + _test_eof19: cs = 19; goto _test_eof; + _test_eof20: cs = 20; goto _test_eof; + _test_eof21: cs = 21; goto _test_eof; + _test_eof22: cs = 22; goto _test_eof; + _test_eof23: cs = 23; goto _test_eof; + _test_eof24: cs = 24; goto _test_eof; + _test_eof25: cs = 25; goto _test_eof; + _test_eof26: cs = 26; goto _test_eof; _test_eof: {} _out: {} @@ -443,14 +443,14 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul { int cs = EVIL; - + #line 448 "parser.c" { cs = JSON_value_start; } #line 239 "parser.rl" - + #line 455 "parser.c" { if ( p == pe ) @@ -504,7 +504,7 @@ cs = 0; goto st21; tr5: #line 203 "parser.rl" - { + { char *np; json->current_nesting++; np = JSON_parse_array(json, p, pe, result); @@ -514,7 +514,7 @@ cs = 0; goto st21; tr9: #line 211 "parser.rl" - { + { char *np; json->current_nesting++; np = JSON_parse_object(json, p, pe, result); @@ -702,26 +702,26 @@ case 20: goto tr28; goto st0; } - _test_eof21: cs = 21; goto _test_eof; - _test_eof2: cs = 2; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; - _test_eof11: cs = 11; goto _test_eof; - _test_eof12: cs = 12; goto _test_eof; - _test_eof13: cs = 13; goto _test_eof; - _test_eof14: cs = 14; goto _test_eof; - _test_eof15: cs = 15; goto _test_eof; - _test_eof16: cs = 16; goto _test_eof; - _test_eof17: cs = 17; goto _test_eof; - _test_eof18: cs = 18; goto _test_eof; - _test_eof19: cs = 19; goto _test_eof; - _test_eof20: cs = 20; goto _test_eof; + _test_eof21: cs = 21; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof18: cs = 18; goto _test_eof; + _test_eof19: cs = 19; goto _test_eof; + _test_eof20: cs = 20; goto _test_eof; _test_eof: {} _out: {} @@ -752,7 +752,7 @@ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *res { int cs = EVIL; - + #line 757 "parser.c" { cs = JSON_integer_start; @@ -760,7 +760,7 @@ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *res #line 263 "parser.rl" json->memo = p; - + #line 765 "parser.c" { if ( p == pe ) @@ -812,10 +812,10 @@ case 4: goto st4; goto tr4; } - _test_eof2: cs = 2; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; _test_eof: {} _out: {} @@ -848,7 +848,7 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul { int cs = EVIL; - + #line 853 "parser.c" { cs = JSON_float_start; @@ -856,7 +856,7 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul #line 294 "parser.rl" json->memo = p; - + #line 861 "parser.c" { if ( p == pe ) @@ -969,15 +969,15 @@ case 9: goto st9; goto st0; } - _test_eof2: cs = 2; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; _test_eof: {} _out: {} @@ -1017,14 +1017,14 @@ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *resul } *result = NIL_P(array_class) ? rb_ary_new() : rb_class_new_instance(0, 0, array_class); - + #line 1022 "parser.c" { cs = JSON_array_start; } #line 345 "parser.rl" - + #line 1029 "parser.c" { if ( p == pe ) @@ -1067,7 +1067,7 @@ case 2: #line 313 "parser.rl" { VALUE v = Qnil; - char *np = JSON_parse_value(json, p, pe, &v); + char *np = JSON_parse_value(json, p, pe, &v); if (np == NULL) { p--; {p++; cs = 3; goto _out;} } else { @@ -1222,22 +1222,22 @@ case 16: goto st2; goto st16; } - _test_eof2: cs = 2; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; - _test_eof11: cs = 11; goto _test_eof; - _test_eof12: cs = 12; goto _test_eof; - _test_eof17: cs = 17; goto _test_eof; - _test_eof13: cs = 13; goto _test_eof; - _test_eof14: cs = 14; goto _test_eof; - _test_eof15: cs = 15; goto _test_eof; - _test_eof16: cs = 16; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; _test_eof: {} _out: {} @@ -1287,7 +1287,7 @@ static VALUE json_string_unescape(char *p, char *pe) p++; break; case 'u': - if (p > pe - 4) { + if (p > pe - 4) { return Qnil; } else { p = JSON_convert_UTF16_to_UTF8(result, p, pe, strictConversion); @@ -1325,7 +1325,7 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu int cs = EVIL; *result = rb_str_new("", 0); - + #line 1330 "parser.c" { cs = JSON_string_start; @@ -1333,7 +1333,7 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu #line 438 "parser.rl" json->memo = p; - + #line 1338 "parser.c" { if ( p == pe ) @@ -1441,13 +1441,13 @@ case 7: goto st2; goto st0; } - _test_eof2: cs = 2; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; _test_eof: {} _out: {} @@ -1478,7 +1478,7 @@ static const int JSON_en_main = 1; #line 477 "parser.rl" -/* +/* * Document-class: JSON::Ext::Parser * * This is the JSON parser implemented as a C extension. It can be configured @@ -1656,7 +1656,7 @@ static VALUE cParser_parse(VALUE self) VALUE result = Qnil; GET_STRUCT; - + #line 1661 "parser.c" { cs = JSON_start; @@ -1665,7 +1665,7 @@ static VALUE cParser_parse(VALUE self) #line 658 "parser.rl" p = json->source; pe = p + json->len; - + #line 1670 "parser.c" { if ( p == pe ) @@ -1785,16 +1785,16 @@ case 9: goto st10; goto st9; } - _test_eof1: cs = 1; goto _test_eof; - _test_eof2: cs = 2; goto _test_eof; - _test_eof3: cs = 3; goto _test_eof; - _test_eof4: cs = 4; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; + _test_eof1: cs = 1; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; _test_eof: {} _out: {} diff --git a/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.rl b/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.rl index c4887dd..f6abb99 100644 --- a/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.rl +++ b/vendor/gems/json-1.2.4/ext/json/ext/parser/parser.rl @@ -90,7 +90,7 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul action parse_value { VALUE v = Qnil; - char *np = JSON_parse_value(json, fpc, pe, &v); + char *np = JSON_parse_value(json, fpc, pe, &v); if (np == NULL) { fhold; fbreak; } else { @@ -200,7 +200,7 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu fhold; fbreak; } - action parse_array { + action parse_array { char *np; json->current_nesting++; np = JSON_parse_array(json, fpc, pe, result); @@ -208,7 +208,7 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu if (np == NULL) { fhold; fbreak; } else fexec np; } - action parse_object { + action parse_object { char *np; json->current_nesting++; np = JSON_parse_object(json, fpc, pe, result); @@ -312,7 +312,7 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul action parse_value { VALUE v = Qnil; - char *np = JSON_parse_value(json, fpc, pe, &v); + char *np = JSON_parse_value(json, fpc, pe, &v); if (np == NULL) { fhold; fbreak; } else { @@ -386,7 +386,7 @@ static VALUE json_string_unescape(char *p, char *pe) p++; break; case 'u': - if (p > pe - 4) { + if (p > pe - 4) { return Qnil; } else { p = JSON_convert_UTF16_to_UTF8(result, p, pe, strictConversion); @@ -476,7 +476,7 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu ) ignore*; }%% -/* +/* * Document-class: JSON::Ext::Parser * * This is the JSON parser implemented as a C extension. It can be configured diff --git a/vendor/gems/json-1.2.4/ext/json/ext/parser/unicode.c b/vendor/gems/json-1.2.4/ext/json/ext/parser/unicode.c index 6bd29e2..6ff1bc0 100644 --- a/vendor/gems/json-1.2.4/ext/json/ext/parser/unicode.c +++ b/vendor/gems/json-1.2.4/ext/json/ext/parser/unicode.c @@ -2,9 +2,9 @@ /* * Copyright 2001-2004 Unicode, Inc. - * + * * Disclaimer - * + * * This source code is provided as is by Unicode, Inc. No claims are * made as to fitness for any particular purpose. No warranties of any * kind are expressed or implied. The recipient agrees to determine @@ -12,9 +12,9 @@ * purchased on magnetic or optical media from Unicode, Inc., the * sole remedy for any claim will be exchange of defective media * within 90 days of receipt. - * + * * Limitations on Rights to Redistribute This Code - * + * * Unicode, Inc. hereby grants the right to freely use the information * supplied in this file in the creation of products supporting the * Unicode Standard, and to make copies of this file in any form @@ -45,7 +45,7 @@ static const char trailingBytesForUTF8[256] = { * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ -static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, +static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; /* @@ -89,7 +89,7 @@ char *JSON_convert_UTF16_to_UTF8 ( UTF32 ch; unsigned short bytesToWrite = 0; const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; + const UTF32 byteMark = 0x80; ch = *tmpPtr++; /* If we have a surrogate pair, convert to UTF32 first. */ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { diff --git a/vendor/gems/json-1.2.4/lib/json/common.rb b/vendor/gems/json-1.2.4/lib/json/common.rb index c9ee0a1..07757de 100644 --- a/vendor/gems/json-1.2.4/lib/json/common.rb +++ b/vendor/gems/json-1.2.4/lib/json/common.rb @@ -169,7 +169,7 @@ def parse!(source, opts = {}) # * *indent*: a string used to indent levels (default: ''), # * *space*: a string that is put after, a : or , delimiter (default: ''), # * *space_before*: a string that is put before a : pair delimiter (default: ''), - # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), # * *array_nl*: a string that is put at the end of a JSON array (default: ''), # * *check_circular*: true if checking for circular data structures # should be done (the default), false otherwise. diff --git a/vendor/gems/json-1.2.4/lib/json/editor.rb b/vendor/gems/json-1.2.4/lib/json/editor.rb index 1e13f33..9e05f44 100644 --- a/vendor/gems/json-1.2.4/lib/json/editor.rb +++ b/vendor/gems/json-1.2.4/lib/json/editor.rb @@ -48,14 +48,14 @@ def Editor.fetch_icon(name) # Opens an error dialog on top of _window_ showing the error message # _text_. def Editor.error_dialog(window, text) - dialog = MessageDialog.new(window, Dialog::MODAL, - MessageDialog::ERROR, + dialog = MessageDialog.new(window, Dialog::MODAL, + MessageDialog::ERROR, MessageDialog::BUTTONS_CLOSE, text) dialog.show_all dialog.run rescue TypeError - dialog = MessageDialog.new(Editor.window, Dialog::MODAL, - MessageDialog::ERROR, + dialog = MessageDialog.new(Editor.window, Dialog::MODAL, + MessageDialog::ERROR, MessageDialog::BUTTONS_CLOSE, text) dialog.show_all dialog.run @@ -67,8 +67,8 @@ def Editor.error_dialog(window, text) # message _text_. If yes was answered _true_ is returned, otherwise # _false_. def Editor.question_dialog(window, text) - dialog = MessageDialog.new(window, Dialog::MODAL, - MessageDialog::QUESTION, + dialog = MessageDialog.new(window, Dialog::MODAL, + MessageDialog::QUESTION, MessageDialog::BUTTONS_YES_NO, text) dialog.show_all dialog.run do |response| @@ -465,7 +465,7 @@ def create add_separator add_item("Append new node", ?a, &method(:append_new_node)) add_item("Insert new node before", ?i, &method(:insert_new_node)) - add_separator + add_separator add_item("Collapse/Expand node (recursively)", ?e, &method(:collapse_expand)) @@ -504,7 +504,7 @@ def open_location(item) # Revert the current JSON document in the editor to the saved version. def revert(item) window.instance_eval do - @filename and file_open(@filename) + @filename and file_open(@filename) end end @@ -666,7 +666,7 @@ def collapsed_nodes(item) collapse_all else self.expanded = true - expand_all + expand_all end end @@ -885,7 +885,7 @@ def ask_for_hash_pair(parent) dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT @key = key_input.text type = ALL_TYPES[@type = type_input.active] @@ -937,7 +937,7 @@ def ask_for_element(parent = nil, default_type = nil, value_text = @content) dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT type = types[type_input.active] @content = case type @@ -982,7 +982,7 @@ def ask_for_order dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT return @order = order_input.text, reverse_checkbox.active? end @@ -1017,7 +1017,7 @@ def ask_for_find_term(search = nil) dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT begin return Regexp.new(regex_input.text, icase_checkbox.active? ? Regexp::IGNORECASE : 0) @@ -1216,7 +1216,7 @@ def file_save end end - # Save the current file as the filename + # Save the current file as the filename def file_save_as filename = select_file('Save as a JSON file') store_file(filename) @@ -1242,7 +1242,7 @@ def store_file(path) rescue SystemCallError => e Editor.error_dialog(self, "Failed to store JSON file: #{e}!") end - + # Load the file named _filename_ into the editor as a JSON document. def load_file(filename) if filename @@ -1335,7 +1335,7 @@ def ask_for_location dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT return @location = location_input.text end diff --git a/vendor/gems/json-1.2.4/lib/json/pure/generator.rb b/vendor/gems/json-1.2.4/lib/json/pure/generator.rb index be73cb1..98b5b76 100644 --- a/vendor/gems/json-1.2.4/lib/json/pure/generator.rb +++ b/vendor/gems/json-1.2.4/lib/json/pure/generator.rb @@ -110,7 +110,7 @@ def self.from_state(opts) # * *indent*: a string used to indent levels (default: ''), # * *space*: a string that is put after, a : or , delimiter (default: ''), # * *space_before*: a string that is put before a : pair delimiter (default: ''), - # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), # * *array_nl*: a string that is put at the end of a JSON array (default: ''), # * *check_circular*: true if checking for circular data structures # should be done (the default), false otherwise. @@ -172,13 +172,13 @@ def allow_nan? end # Returns _true_, if _object_ was already seen during this generating - # run. + # run. def seen?(object) @seen.key?(object.__id__) end # Remember _object_, to find out if it was already encountered (if a - # cyclic data structure is if a cyclic data structure is rendered). + # cyclic data structure is if a cyclic data structure is rendered). def remember(object) @seen[object.__id__] = true end @@ -338,7 +338,7 @@ def json_transform(state, depth) json_shift(state, depth + 1) << value.to_json(state, depth + 1) }.join(delim) result << state.array_nl - result << json_shift(state, depth) + result << json_shift(state, depth) result << ']' else '[' << map { |value| value.to_json }.join(delim) << ']' diff --git a/vendor/gems/json-1.2.4/lib/json/pure/parser.rb b/vendor/gems/json-1.2.4/lib/json/pure/parser.rb index f6de8d1..904b6f5 100644 --- a/vendor/gems/json-1.2.4/lib/json/pure/parser.rb +++ b/vendor/gems/json-1.2.4/lib/json/pure/parser.rb @@ -41,7 +41,7 @@ class Parser < StringScanner [^*/]| # normal chars /[^*]| # slashes that do not start a nested comment \*[^/]| # asterisks that do not end this comment - /(?=\*/) # single slash before this comment's end + /(?=\*/) # single slash before this comment's end )* \*/ # the End of this comment |[ \t\r\n]+ # whitespaces: space, horicontal tab, lf, cr @@ -160,7 +160,7 @@ def parse ?n => "\n", ?r => "\r", ?t => "\t", - ?u => nil, + ?u => nil, }) def parse_string diff --git a/vendor/gems/json-1.2.4/tools/fuzz.rb b/vendor/gems/json-1.2.4/tools/fuzz.rb index 4dacd95..c0fae12 100755 --- a/vendor/gems/json-1.2.4/tools/fuzz.rb +++ b/vendor/gems/json-1.2.4/tools/fuzz.rb @@ -120,7 +120,7 @@ def make_spaces if $DEBUG puts "-" * 80 puts json, json.size - else + else puts json.size end begin diff --git a/vendor/gems/oauth-0.3.6/.specification b/vendor/gems/oauth-0.3.6/.specification index 75b835c..7fe7b88 100644 --- a/vendor/gems/oauth-0.3.6/.specification +++ b/vendor/gems/oauth-0.3.6/.specification @@ -1,87 +1,87 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: oauth -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 0 - 3 - 6 version: 0.3.6 platform: ruby -authors: +authors: - Pelle Braendgaard - Blaine Cook - Larry Halff - Jesse Clark - Jon Crosby - Seth Fitzsimmons -autorequire: +autorequire: bindir: bin cert_chain: [] date: 2009-09-14 00:00:00 -07:00 default_executable: oauth -dependencies: -- !ruby/object:Gem::Dependency +dependencies: +- !ruby/object:Gem::Dependency name: ruby-hmac prerelease: false - requirement: &id001 !ruby/object:Gem::Requirement - requirements: + requirement: &id001 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 - 3 - 1 version: 0.3.1 type: :runtime version_requirements: *id001 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: newgem prerelease: false - requirement: &id002 !ruby/object:Gem::Requirement - requirements: + requirement: &id002 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 1 - 5 - 2 version: 1.5.2 type: :development version_requirements: *id002 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: actionpack prerelease: false - requirement: &id003 !ruby/object:Gem::Requirement - requirements: + requirement: &id003 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id003 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: rack prerelease: false - requirement: &id004 !ruby/object:Gem::Requirement - requirements: + requirement: &id004 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id004 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: hoe prerelease: false - requirement: &id005 !ruby/object:Gem::Requirement - requirements: + requirement: &id005 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 2 - 3 - 3 @@ -90,16 +90,16 @@ dependencies: version_requirements: *id005 description: OAuth Core Ruby implementation email: oauth-ruby@googlegroups.com -executables: +executables: - oauth extensions: [] -extra_rdoc_files: +extra_rdoc_files: - History.txt - License.txt - Manifest.txt - website/index.txt -files: +files: - History.txt - License.txt - Manifest.txt @@ -188,34 +188,34 @@ has_rdoc: true homepage: http://oauth.rubyforge.org licenses: [] -post_install_message: -rdoc_options: +post_install_message: +rdoc_options: - --main - README.txt -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] rubyforge_project: oauth rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 3 summary: OAuth Core Ruby implementation -test_files: +test_files: - test/cases/spec/1_0-final/test_construct_request_url.rb - test/cases/spec/1_0-final/test_normalize_request_parameters.rb - test/cases/spec/1_0-final/test_parameter_encodings.rb diff --git a/vendor/gems/oauth-0.3.6/README.rdoc b/vendor/gems/oauth-0.3.6/README.rdoc index a0a9531..0cd8af8 100644 --- a/vendor/gems/oauth-0.3.6/README.rdoc +++ b/vendor/gems/oauth-0.3.6/README.rdoc @@ -63,7 +63,7 @@ To submit a patch, please fork the oauth project and create a patch with tests. == License -This code is free to use under the terms of the MIT license. +This code is free to use under the terms of the MIT license. == Contact diff --git a/vendor/gems/oauth-0.3.6/lib/oauth/client/net_http.rb b/vendor/gems/oauth-0.3.6/lib/oauth/client/net_http.rb index 6c2a990..4a22ded 100644 --- a/vendor/gems/oauth-0.3.6/lib/oauth/client/net_http.rb +++ b/vendor/gems/oauth-0.3.6/lib/oauth/client/net_http.rb @@ -11,7 +11,7 @@ class Net::HTTPRequest # this may add a header, additional query string parameters, or additional POST body parameters. # The default scheme is +header+, in which the OAuth parameters as put into the +Authorization+ # header. - # + # # * http - Configured Net::HTTP instance # * consumer - OAuth::Consumer instance # * token - OAuth::Token instance @@ -40,13 +40,13 @@ def oauth!(http, consumer = nil, token = nil, options = {}) # on the options[:scheme] being used so this must match what will be used for the request # itself. The default scheme is +header+, in which the OAuth parameters as put into the +Authorization+ # header. - # + # # * http - Configured Net::HTTP instance # * consumer - OAuth::Consumer instance # * token - OAuth::Token instance # * options - Request-specific options (e.g. +request_uri+, +consumer+, +token+, +scheme+, # +signature_method+, +nonce+, +timestamp+) - # + # # See Also: {OAuth core spec version 1.0, section 9.1.1}[http://oauth.net/core/1.0#rfc.section.9.1.1] def signature_base_string(http, consumer = nil, token = nil, options = {}) options = { :request_uri => oauth_full_request_uri(http), diff --git a/vendor/gems/oauth-0.3.6/lib/oauth/helper.rb b/vendor/gems/oauth-0.3.6/lib/oauth/helper.rb index 1ad7fc6..7629121 100644 --- a/vendor/gems/oauth-0.3.6/lib/oauth/helper.rb +++ b/vendor/gems/oauth-0.3.6/lib/oauth/helper.rb @@ -5,7 +5,7 @@ module OAuth module Helper extend self - # Escape +value+ by URL encoding all non-reserved character. + # Escape +value+ by URL encoding all non-reserved character. # # See Also: {OAuth core spec version 1.0, section 5.1}[http://oauth.net/core/1.0#rfc.section.5.1] def escape(value) @@ -52,7 +52,7 @@ def normalize(params) # hash = parse_header(headers['Authorization'] || headers['WWW-Authenticate']) # hash['oauth_timestamp'] # #=>"1234567890" - # + # def parse_header(header) # decompose params = header[6,header.length].split(/[,=]/) diff --git a/vendor/gems/oauth-0.3.6/setup.rb b/vendor/gems/oauth-0.3.6/setup.rb index 424a5f3..9f0c826 100644 --- a/vendor/gems/oauth-0.3.6/setup.rb +++ b/vendor/gems/oauth-0.3.6/setup.rb @@ -659,7 +659,7 @@ def command(*args) def ruby(*args) command config('rubyprog'), *args end - + def make(task = nil) command(*[config('makeprog'), task].compact) end @@ -722,7 +722,7 @@ def srcexist?(path) def srcdirectory?(path) File.dir?(srcfile(path)) end - + def srcfile?(path) File.file?(srcfile(path)) end @@ -826,7 +826,7 @@ def invoke __send__ "exec_#{task}" end end - + def run_metaconfigs @config.load_script "#{@ardir}/metaconfig" end @@ -1404,7 +1404,7 @@ def mapdir(ents) end # picked up many entries from cvs-1.11.1/src/ignore.c - JUNK_FILES = %w( + JUNK_FILES = %w( core RCSLOG tags TAGS .make.state .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb *~ *.old *.bak *.BAK *.orig *.rej _$* *$ diff --git a/vendor/gems/oauth-0.3.6/test/cases/oauth_case.rb b/vendor/gems/oauth-0.3.6/test/cases/oauth_case.rb index 51eaa0a..a6e514d 100644 --- a/vendor/gems/oauth-0.3.6/test/cases/oauth_case.rb +++ b/vendor/gems/oauth-0.3.6/test/cases/oauth_case.rb @@ -9,9 +9,9 @@ def run(*args) return if @method_name.to_s == "default_test" super end - + protected - + # Creates a fake request def request(params={},method='GET',uri="http://photos.example.net/photos") OAuth::RequestProxy.proxy({'parameters'=>params,'method'=>method,'uri'=>uri}) diff --git a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_construct_request_url.rb b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_construct_request_url.rb index 879b74e..acf011f 100644 --- a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_construct_request_url.rb +++ b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_construct_request_url.rb @@ -19,11 +19,11 @@ class ConstructRequestUrlTest < OAuthCase - + def test_from_spec assert_request_url("http://example.com/resource","HTTP://Example.com:80/resource?id=123") end - + def test_simple_url_with_ending_slash assert_request_url("http://example.com/","http://example.com/") end @@ -31,7 +31,7 @@ def test_simple_url_with_ending_slash def test_simple_url_without_ending_slash assert_request_url("http://example.com/","http://example.com") end - + def test_of_normalized_http assert_request_url("http://example.com/resource","http://example.com/resource") end @@ -43,20 +43,20 @@ def test_of_https def test_of_normalized_https assert_request_url("https://example.com/resource","https://example.com/resource") end - + def test_of_http_with_non_standard_port assert_request_url("http://example.com:8080/resource","http://example.com:8080/resource") end - + def test_of_https_with_non_standard_port assert_request_url("https://example.com:8080/resource","https://example.com:8080/resource") end - + protected - - + + def assert_request_url(expected,given,message=nil) assert_equal expected, request({},'GET',given).normalized_uri, message end - + end \ No newline at end of file diff --git a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_normalize_request_parameters.rb b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_normalize_request_parameters.rb index 76d6e5a..e593a3a 100644 --- a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_normalize_request_parameters.rb +++ b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_normalize_request_parameters.rb @@ -3,29 +3,29 @@ # See http://oauth.net/core/1.0/#anchor14 # # 9.1.1. Normalize Request Parameters -# +# # The request parameters are collected, sorted and concatenated into a normalized string: -# +# # Parameters in the OAuth HTTP Authorization header excluding the realm parameter. # Parameters in the HTTP POST request body (with a content-type of application/x-www-form-urlencoded). # HTTP GET parameters added to the URLs in the query part (as defined by [RFC3986] section 3). # The oauth_signature parameter MUST be excluded. -# +# # The parameters are normalized into a single string as follows: -# -# Parameters are sorted by name, using lexicographical byte value ordering. +# +# Parameters are sorted by name, using lexicographical byte value ordering. # If two or more parameters share the same name, they are sorted by their value. For example: # # a=1, c=hi%20there, f=25, f=50, f=a, z=p, z=t -# Parameters are concatenated in their sorted order into a single string. For each parameter, -# the name is separated from the corresponding value by an ‘=’ character (ASCII code 61), even +# Parameters are concatenated in their sorted order into a single string. For each parameter, +# the name is separated from the corresponding value by an ‘=’ character (ASCII code 61), even # if the value is empty. Each name-value pair is separated by an ‘&’ character (ASCII code 38). For example: # a=1&c=hi%20there&f=25&f=50&f=a&z=p&z=t -# +# class NormalizeRequestParametersTest < OAuthCase - + def test_parameters_for_signature params={'a'=>1, 'c'=>'hi there', 'f'=>'25', 'f'=>'50', 'f'=>'a', 'z'=>'p', 'z'=>'t'} assert_equal params,request(params).parameters_for_signature @@ -36,7 +36,7 @@ def test_parameters_for_signature_removes_oauth_signature params={'a'=>1, 'c'=>'hi there', 'f'=>'25', 'f'=>'50', 'f'=>'a', 'z'=>'p', 'z'=>'t'} assert_equal params,request(params.merge({'oauth_signature'=>'blalbla'})).parameters_for_signature end - + def test_spec_example assert_normalized 'a=1&c=hi%20there&f=25&f=50&f=a&z=p&z=t', { 'a' => 1, 'c' => 'hi there', 'f' => ['25', '50', 'a'], 'z' => ['p', 't'] } end @@ -49,26 +49,26 @@ def test_sorts_parameters_correctly def test_empty assert_normalized "",{} end - - + + # These are from the wiki http://wiki.oauth.net/TestCases # in the section Normalize Request Parameters # Parameters have already been x-www-form-urlencoded (i.e. + = ) def test_wiki1 assert_normalized "name=",{"name"=>nil} end - + def test_wiki2 assert_normalized "a=b",{'a'=>'b'} end - + def test_wiki3 assert_normalized "a=b&c=d",{'a'=>'b','c'=>'d'} end - + def test_wiki4 assert_normalized "a=x%20y&a=x%21y",{'a'=>["x!y","x y"]} - + end def test_wiki5 @@ -76,12 +76,12 @@ def test_wiki5 end protected - - + + def assert_normalized(expected,params,message=nil) assert_equal expected, normalize_request_parameters(params), message end - + def normalize_request_parameters(params={}) request(params).normalized_parameters end diff --git a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_parameter_encodings.rb b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_parameter_encodings.rb index 3ce0726..946f436 100644 --- a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_parameter_encodings.rb +++ b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_parameter_encodings.rb @@ -3,14 +3,14 @@ # See http://oauth.net/core/1.0/#encoding_parameters # # 5.1. Parameter Encoding -# -# All parameter names and values are escaped using the [RFC3986] percent-encoding (%xx) mechanism. -# Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded. Characters -# in the unreserved character set MUST NOT be encoded. Hexadecimal characters in encodings MUST be +# +# All parameter names and values are escaped using the [RFC3986] percent-encoding (%xx) mechanism. +# Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded. Characters +# in the unreserved character set MUST NOT be encoded. Hexadecimal characters in encodings MUST be # upper case. Text names and values MUST be encoded as UTF-8 octets before percent-encoding them per [RFC3629]. -# +# # unreserved = ALPHA, DIGIT, '-', '.', '_', '~' -# +# class ParameterEncodingTest < OAuthCase def test_encodings_alpha_num diff --git a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_signature_base_strings.rb b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_signature_base_strings.rb index fc099b5..2319e2e 100644 --- a/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_signature_base_strings.rb +++ b/vendor/gems/oauth-0.3.6/test/cases/spec/1_0-final/test_signature_base_strings.rb @@ -3,18 +3,18 @@ # See http://oauth.net/core/1.0/#anchor14 # # 9.1. Signature Base String -# +# # The Signature Base String is a consistent reproducible concatenation of the request elements -# into a single string. The string is used as an input in hashing or signing algorithms. The -# HMAC-SHA1 signature method provides both a standard and an example of using the Signature -# Base String with a signing algorithm to generate signatures. All the request parameters MUST +# into a single string. The string is used as an input in hashing or signing algorithms. The +# HMAC-SHA1 signature method provides both a standard and an example of using the Signature +# Base String with a signing algorithm to generate signatures. All the request parameters MUST # be encoded as described in Parameter Encoding prior to constructing the Signature Base String. -# +# class SignatureBaseStringTest < OAuthCase - + def test_A_5_1 - parameters={ + parameters={ 'oauth_consumer_key'=>'dpf43f3p2l4k3l03', 'oauth_token'=>'nnch734d00sl2jdk', 'oauth_signature_method'=>'HMAC-SHA1', @@ -25,34 +25,34 @@ def test_A_5_1 'size'=>'original' } sbs='GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal' - + assert_signature_base_string sbs,parameters,'GET',"http://photos.example.net/photos" end - + # These are from the wiki http://wiki.oauth.net/TestCases # in the section Concatenate Test Elements - + def test_wiki_1_simple_with_ending_slash - parameters={ + parameters={ 'n'=>'v' } sbs='GET&http%3A%2F%2Fexample.com%2F&n%3Dv' - + assert_signature_base_string sbs,parameters,'GET',"http://example.com/" end - + def test_wiki_2_simple_without_ending_slash - parameters={ + parameters={ 'n'=>'v' } sbs='GET&http%3A%2F%2Fexample.com%2F&n%3Dv' - + assert_signature_base_string sbs,parameters,'GET',"http://example.com" end def test_wiki_2_request_token - parameters={ + parameters={ 'oauth_version'=>'1.0', 'oauth_consumer_key'=>'dpf43f3p2l4k3l03', 'oauth_timestamp'=>'1191242090', @@ -60,17 +60,17 @@ def test_wiki_2_request_token 'oauth_signature_method'=>'PLAINTEXT', 'oauth_signature'=>'ignored' } sbs='POST&https%3A%2F%2Fphotos.example.net%2Frequest_token&oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dhsu94j3884jdopsl%26oauth_signature_method%3DPLAINTEXT%26oauth_timestamp%3D1191242090%26oauth_version%3D1.0' - + assert_signature_base_string sbs,parameters,'POST',"https://photos.example.net/request_token" end - + protected - - + + def assert_signature_base_string(expected,params={},method='GET',uri="http://photos.example.net/photos",message="Signature Base String does not match") assert_equal expected, signature_base_string(params,method,uri), message end - + def signature_base_string(params={},method='GET',uri="http://photos.example.net/photos") request(params,method,uri).signature_base_string end diff --git a/vendor/gems/oauth-0.3.6/test/test_consumer.rb b/vendor/gems/oauth-0.3.6/test/test_consumer.rb index 36059bb..cb12552 100644 --- a/vendor/gems/oauth-0.3.6/test/test_consumer.rb +++ b/vendor/gems/oauth-0.3.6/test/test_consumer.rb @@ -7,7 +7,7 @@ # This also means you have to be online to be able to run these. class ConsumerTest < Test::Unit::TestCase def setup - @consumer=OAuth::Consumer.new( + @consumer=OAuth::Consumer.new( 'consumer_key_86cad9', '5888bf0345e5d237', { :site=>"http://blabla.bla", @@ -25,7 +25,7 @@ def setup @timestamp = "1199645624" @consumer.http=Net::HTTP.new(@request_uri.host, @request_uri.port) end - + def test_initializer assert_equal "consumer_key_86cad9",@consumer.key assert_equal "5888bf0345e5d237",@consumer.secret @@ -57,7 +57,7 @@ def test_defaults assert_equal "http://twitter.com/oauth/access_token",@consumer.access_token_url assert_equal "http://twitter.com/oauth/authorize",@consumer.authorize_url assert_equal :header,@consumer.scheme - assert_equal :post,@consumer.http_method + assert_equal :post,@consumer.http_method end def test_override_paths @@ -79,13 +79,13 @@ def test_override_paths assert_equal "http://oauth.twitter.com/access_token",@consumer.access_token_url assert_equal "http://site.twitter.com/authorize",@consumer.authorize_url assert_equal :header,@consumer.scheme - assert_equal :post,@consumer.http_method + assert_equal :post,@consumer.http_method end def test_that_signing_auth_headers_on_get_requests_works request = Net::HTTP::Get.new(@request_uri.path + "?" + request_parameters_to_s) @token.sign!(request, {:nonce => @nonce, :timestamp => @timestamp}) - + assert_equal 'GET', request.method assert_equal '/test?key=value', request.path assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"1oO2izFav1GP4kEH2EskwXkCRFg%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort @@ -98,7 +98,7 @@ def test_that_setting_signature_method_on_consumer_effects_signing consumer.options[:signature_method] = 'PLAINTEXT' token = OAuth::ConsumerToken.new(consumer, 'token_411a7f', '3196ffd991c8ebdb') token.sign!(request, {:nonce => @nonce, :timestamp => @timestamp}) - + assert_no_match( /oauth_signature_method="HMAC-SHA1"/, request['authorization']) assert_match( /oauth_signature_method="PLAINTEXT"/, request['authorization']) end @@ -108,7 +108,7 @@ def test_that_setting_signature_method_on_consumer_effects_signature_base_string request = Net::HTTP::Get.new(@request_uri.path) consumer = @consumer.dup consumer.options[:signature_method] = 'PLAINTEXT' - + request = Net::HTTP::Get.new('/') signature_base_string = consumer.signature_base_string(request) @@ -118,7 +118,7 @@ def test_that_setting_signature_method_on_consumer_effects_signature_base_string def test_that_plaintext_signature_works require 'oauth/signature/plaintext' - consumer = OAuth::Consumer.new("key", "secret", + consumer = OAuth::Consumer.new("key", "secret", :site => "http://term.ie", :signature_method => 'PLAINTEXT') access_token = OAuth::AccessToken.new(consumer, 'accesskey', 'accesssecret') response = access_token.get("/oauth/example/echo_api.php?echo=hello") @@ -137,7 +137,7 @@ def test_that_signing_auth_headers_on_post_requests_works assert_equal 'key=value', request.body assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"26g7wHTtNO6ZWJaLltcueppHYiI%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort end - + def test_that_signing_post_params_works request = Net::HTTP::Post.new(@request_uri.path) request.set_form_data( @request_parameters ) @@ -151,7 +151,7 @@ def test_that_signing_post_params_works def test_that_using_auth_headers_on_get_on_create_signed_requests_works request=@consumer.create_signed_request(:get,@request_uri.path+ "?" + request_parameters_to_s,@token,{:nonce => @nonce, :timestamp => @timestamp},@request_parameters) - + assert_equal 'GET', request.method assert_equal '/test?key=value', request.path assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"1oO2izFav1GP4kEH2EskwXkCRFg%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort @@ -173,9 +173,9 @@ def test_that_signing_post_params_works_2 assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", request.body.split("&").sort.join("&") assert_equal nil, request['authorization'] end - + def test_step_by_step_token_request - @consumer=OAuth::Consumer.new( + @consumer=OAuth::Consumer.new( "key", "secret", { @@ -186,7 +186,7 @@ def test_step_by_step_token_request :scheme=>:header }) options={:nonce=>'nonce',:timestamp=>Time.now.to_i.to_s} - + request = Net::HTTP::Get.new("/oauth/example/request_token.php") signature_base_string=@consumer.signature_base_string(request,nil,options) assert_equal "GET&http%3A%2F%2Fterm.ie%2Foauth%2Fexample%2Frequest_token.php&oauth_consumer_key%3Dkey%26oauth_nonce%3D#{options[:nonce]}%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D#{options[:timestamp]}%26oauth_version%3D1.0",signature_base_string @@ -198,9 +198,9 @@ def test_step_by_step_token_request assert_equal "200",response.code assert_equal "oauth_token=requestkey&oauth_token_secret=requestsecret",response.body end - - def test_get_token_sequence - @consumer=OAuth::Consumer.new( + + def test_get_token_sequence + @consumer=OAuth::Consumer.new( "key", "secret", { @@ -226,20 +226,20 @@ def test_get_token_sequence assert_not_nil @access_token assert_equal "accesskey",@access_token.token assert_equal "accesssecret",@access_token.secret - + @response=@access_token.get("/oauth/example/echo_api.php?ok=hello&test=this") assert_not_nil @response assert_equal "200",@response.code assert_equal( "ok=hello&test=this",@response.body) - + @response=@access_token.post("/oauth/example/echo_api.php",{'ok'=>'hello','test'=>'this'}) assert_not_nil @response assert_equal "200",@response.code - assert_equal( "ok=hello&test=this",@response.body) + assert_equal( "ok=hello&test=this",@response.body) end def test_get_token_sequence_using_fqdn - @consumer=OAuth::Consumer.new( + @consumer=OAuth::Consumer.new( "key", "secret", { @@ -254,7 +254,7 @@ def test_get_token_sequence_using_fqdn assert @consumer.request_token_url?, "Should use fully qualified request token url" assert @consumer.access_token_url?, "Should use fully qualified access token url" assert @consumer.authorize_url?, "Should use fully qualified url" - + @request_token=@consumer.get_request_token assert_not_nil @request_token assert_equal "requestkey",@request_token.token @@ -265,16 +265,16 @@ def test_get_token_sequence_using_fqdn assert_not_nil @access_token assert_equal "accesskey",@access_token.token assert_equal "accesssecret",@access_token.secret - + @response=@access_token.get("/oauth/example/echo_api.php?ok=hello&test=this") assert_not_nil @response assert_equal "200",@response.code assert_equal( "ok=hello&test=this",@response.body) - + @response=@access_token.post("/oauth/example/echo_api.php",{'ok'=>'hello','test'=>'this'}) assert_not_nil @response assert_equal "200",@response.code - assert_equal( "ok=hello&test=this",@response.body) + assert_equal( "ok=hello&test=this",@response.body) end @@ -288,16 +288,16 @@ def test_get_token_sequence_using_fqdn # consumer = OAuth::Consumer.new('token', 'secret', :site => 'https://plazes.net') # consumer.http.verify_mode = OpenSSL::SSL::VERIFY_NONE # consumer.http.get('/') -# +# # assert_nothing_raised do # # Specifically this should not raise TypeError: no marshal_dump # # is defined for class OpenSSL::SSL::SSLContext # Marshal.dump(consumer) # end # end -# +# def test_get_request_token_with_custom_arguments - @consumer=OAuth::Consumer.new( + @consumer=OAuth::Consumer.new( "key", "secret", { @@ -306,14 +306,14 @@ def test_get_request_token_with_custom_arguments :access_token_path=>"/oauth/example/access_token.php", :authorize_path=>"/oauth/example/authorize.php" }) - - + + debug = "" @consumer.http.set_debug_output(debug) - + # get_request_token should receive our custom request_options and *arguments parameters from get_request_token. @consumer.get_request_token({}, {:scope => "http://www.google.com/calendar/feeds http://picasaweb.google.com/data"}) - + # Because this is a POST request, create_http_request should take the first element of *arguments # and turn it into URL-encoded data in the body of the POST. assert_match( /^<- "scope=http%3a%2f%2fwww.google.com%2fcalendar%2ffeeds%20http%3a%2f%2fpicasaweb.google.com%2fdata"/, @@ -321,7 +321,7 @@ def test_get_request_token_with_custom_arguments end def test_post_with_body_stream - @consumer=OAuth::Consumer.new( + @consumer=OAuth::Consumer.new( "key", "secret", { @@ -330,8 +330,8 @@ def test_post_with_body_stream :access_token_path=>"/oauth/example/access_token.php", :authorize_path=>"/oauth/example/authorize.php" }) - - + + @request_token=@consumer.get_request_token @access_token=@request_token.get_access_token @@ -349,7 +349,7 @@ def test_post_with_body_stream assert_equal "200",@response.code # unfortunately I don't know of a way to test that the body data was received correctly since the test server at http://term.ie - # echos back any non-oauth parameters but not the body. However, this does test that the request is still correctly signed + # echos back any non-oauth parameters but not the body. However, this does test that the request is still correctly signed # (including the Content-Length header) and that the server received Content-Length bytes of body since it won't process the # request & respond until the full body length is received. end diff --git a/vendor/gems/oauth-0.3.6/test/test_rsa_sha1.rb b/vendor/gems/oauth-0.3.6/test/test_rsa_sha1.rb index 587da9c..b8266de 100644 --- a/vendor/gems/oauth-0.3.6/test/test_rsa_sha1.rb +++ b/vendor/gems/oauth-0.3.6/test/test_rsa_sha1.rb @@ -3,18 +3,18 @@ require 'oauth/signature/rsa/sha1' class TestSignatureRsaSha1 < Test::Unit::TestCase - + def setup @request = Net::HTTP::Get.new('/photos?file=vacaction.jpg&size=original&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_timestamp=1196666512&oauth_nonce=13917289812797014437&oauth_signature_method=RSA-SHA1') @consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03', OpenSSL::PKey::RSA.new(IO.read(File.dirname(__FILE__) + "/keys/rsa.pem"))) - + end - + def test_that_rsa_sha1_implements_rsa_sha1 assert OAuth::Signature.available_methods.include?('rsa-sha1') end - + def test_that_get_request_from_oauth_test_cases_produces_matching_signature_base_string sbs = OAuth::Signature.signature_base_string(@request, { :consumer => @consumer, :uri => 'http://photos.example.net/photos' } ) @@ -27,7 +27,7 @@ def test_that_get_request_from_oauth_test_cases_produces_matching_signature :uri => 'http://photos.example.net/photos' } ) assert_equal 'jvTp/wX1TYtByB1m+Pbyo0lnCOLIsyGCH7wke8AUs3BpnwZJtAuEJkvQL2/9n4s5wUmUl4aCI4BwpraNx4RtEXMe5qg5T1LVTGliMRpKasKsW//e+RinhejgCuzoH26dyF8iY2ZZ/5D1ilgeijhV/vBka5twt399mXwaYdCwFYE=', signature - + end def test_that_get_request_from_oauth_test_cases_produces_matching_signature_using_private_key_file @@ -48,7 +48,7 @@ def test_that_get_request_from_oauth_test_cases_verifies_signature :uri => 'http://photos.example.net/photos' } ) end - + def test_that_get_request_from_oauth_test_cases_verifies_signature_with_pem @request = Net::HTTP::Get.new('/photos?oauth_signature_method=RSA-SHA1&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_timestamp=1196666512&oauth_nonce=13917289812797014437&file=vacaction.jpg&size=original&oauth_signature=jvTp%2FwX1TYtByB1m%2BPbyo0lnCOLIsyGCH7wke8AUs3BpnwZJtAuEJkvQL2%2F9n4s5wUmUl4aCI4BwpraNx4RtEXMe5qg5T1LVTGliMRpKasKsW%2F%2Fe%2BRinhejgCuzoH26dyF8iY2ZZ%2F5D1ilgeijhV%2FvBka5twt399mXwaYdCwFYE%3D') assert OAuth::Signature.verify(@request, { :consumer => @consumer, diff --git a/vendor/gems/oauth-0.3.6/test/test_server.rb b/vendor/gems/oauth-0.3.6/test/test_server.rb index a0aa992..bae3f25 100644 --- a/vendor/gems/oauth-0.3.6/test/test_server.rb +++ b/vendor/gems/oauth-0.3.6/test/test_server.rb @@ -4,19 +4,19 @@ class ServerTest < Test::Unit::TestCase def setup @server=OAuth::Server.new "http://test.com" end - + def test_default_paths assert_equal "/oauth/request_token",@server.request_token_path assert_equal "/oauth/authorize",@server.authorize_path assert_equal "/oauth/access_token",@server.access_token_path end - + def test_default_urls assert_equal "http://test.com/oauth/request_token",@server.request_token_url assert_equal "http://test.com/oauth/authorize",@server.authorize_url assert_equal "http://test.com/oauth/access_token",@server.access_token_url end - + def test_generate_consumer_credentials consumer=@server.generate_consumer_credentials assert_not_nil consumer.key @@ -35,6 +35,6 @@ def test_create_consumer assert_equal "http://test.com/oauth/request_token",@consumer.request_token_url assert_equal "http://test.com/oauth/authorize",@consumer.authorize_url assert_equal "http://test.com/oauth/access_token",@consumer.access_token_url - end - + end + end diff --git a/vendor/gems/oauth-0.3.6/website/index.txt b/vendor/gems/oauth-0.3.6/website/index.txt index 0beea2a..c959787 100644 --- a/vendor/gems/oauth-0.3.6/website/index.txt +++ b/vendor/gems/oauth-0.3.6/website/index.txt @@ -65,7 +65,7 @@ To submit a patch, please fork the oauth project and create a patch with tests. h2. License -This code is free to use under the terms of the MIT license. +This code is free to use under the terms of the MIT license. h2. Contact diff --git a/vendor/gems/oauth-0.3.6/website/javascripts/rounded_corners_lite.inc.js b/vendor/gems/oauth-0.3.6/website/javascripts/rounded_corners_lite.inc.js index afc3ea3..4508dbf 100644 --- a/vendor/gems/oauth-0.3.6/website/javascripts/rounded_corners_lite.inc.js +++ b/vendor/gems/oauth-0.3.6/website/javascripts/rounded_corners_lite.inc.js @@ -34,7 +34,7 @@ * MA 02111-1307 USA * * * ****************************************************************/ - + var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners() { if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string") { var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);} diff --git a/vendor/gems/rack-1.0.1/.specification b/vendor/gems/rack-1.0.1/.specification index d2aa5bc..63e0b2f 100644 --- a/vendor/gems/rack-1.0.1/.specification +++ b/vendor/gems/rack-1.0.1/.specification @@ -1,120 +1,120 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: rack -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 1 - 0 - 1 version: 1.0.1 platform: ruby -authors: +authors: - Christian Neukirchen -autorequire: +autorequire: bindir: bin cert_chain: [] date: 2009-10-17 00:00:00 -07:00 default_executable: rackup -dependencies: -- !ruby/object:Gem::Dependency +dependencies: +- !ruby/object:Gem::Dependency name: test-spec prerelease: false - requirement: &id001 !ruby/object:Gem::Requirement - requirements: + requirement: &id001 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id001 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: camping prerelease: false - requirement: &id002 !ruby/object:Gem::Requirement - requirements: + requirement: &id002 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id002 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: fcgi prerelease: false - requirement: &id003 !ruby/object:Gem::Requirement - requirements: + requirement: &id003 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id003 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: memcache-client prerelease: false - requirement: &id004 !ruby/object:Gem::Requirement - requirements: + requirement: &id004 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id004 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: mongrel prerelease: false - requirement: &id005 !ruby/object:Gem::Requirement - requirements: + requirement: &id005 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id005 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: ruby-openid prerelease: false - requirement: &id006 !ruby/object:Gem::Requirement - requirements: + requirement: &id006 !ruby/object:Gem::Requirement + requirements: - - ~> - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 2 - 0 - 0 version: 2.0.0 type: :development version_requirements: *id006 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: thin prerelease: false - requirement: &id007 !ruby/object:Gem::Requirement - requirements: + requirement: &id007 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id007 description: Rack provides minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. Also see http://rack.rubyforge.org. email: chneukirchen@gmail.com -executables: +executables: - rackup extensions: [] -extra_rdoc_files: +extra_rdoc_files: - README - SPEC - RDOX - KNOWN-ISSUES -files: +files: - COPYING - KNOWN-ISSUES - README @@ -234,33 +234,33 @@ has_rdoc: true homepage: http://rack.rubyforge.org licenses: [] -post_install_message: +post_install_message: rdoc_options: [] -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] rubyforge_project: rack rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 2 summary: a modular Ruby webserver interface -test_files: +test_files: - test/spec_rack_auth_basic.rb - test/spec_rack_auth_digest.rb - test/spec_rack_auth_openid.rb diff --git a/vendor/gems/rack-1.0.1/COPYING b/vendor/gems/rack-1.0.1/COPYING index 11b4c6e..1df8259 100644 --- a/vendor/gems/rack-1.0.1/COPYING +++ b/vendor/gems/rack-1.0.1/COPYING @@ -13,6 +13,6 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/gems/rack-1.0.1/README b/vendor/gems/rack-1.0.1/README index c58009f..f7a145f 100644 --- a/vendor/gems/rack-1.0.1/README +++ b/vendor/gems/rack-1.0.1/README @@ -130,7 +130,7 @@ Either with the embedded WEBrick starter: Or with rackup: - bin/rackup -Ilib example/lobster.ru + bin/rackup -Ilib example/lobster.ru By default, the lobster is found at http://localhost:9292. @@ -349,7 +349,7 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/gems/rack-1.0.1/Rakefile b/vendor/gems/rack-1.0.1/Rakefile index c88f7af..3cde70a 100644 --- a/vendor/gems/rack-1.0.1/Rakefile +++ b/vendor/gems/rack-1.0.1/Rakefile @@ -105,7 +105,7 @@ else s.version = version s.platform = Gem::Platform::RUBY s.summary = "a modular Ruby webserver interface" - + s.description = <<-EOF Rack provides minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in @@ -123,14 +123,14 @@ Also see http://rack.rubyforge.org. s.has_rdoc = true s.extra_rdoc_files = ['README', 'SPEC', 'RDOX', 'KNOWN-ISSUES'] s.test_files = Dir['test/{test,spec}_*.rb'] - + s.author = 'Christian Neukirchen' s.email = 'chneukirchen@gmail.com' s.homepage = 'http://rack.rubyforge.org' s.rubyforge_project = 'rack' - + s.add_development_dependency 'test-spec' - + s.add_development_dependency 'camping' s.add_development_dependency 'fcgi' s.add_development_dependency 'memcache-client' @@ -150,7 +150,7 @@ end desc "Generate RDoc documentation" task :rdoc do - sh(*%w{rdoc --line-numbers --main README + sh(*%w{rdoc --line-numbers --main README --title 'Rack\ Documentation' --charset utf-8 -U -o doc} + %w{README KNOWN-ISSUES SPEC RDOX} + Dir["lib/**/*.rb"]) diff --git a/vendor/gems/rack-1.0.1/lib/rack/handler/fastcgi.rb b/vendor/gems/rack-1.0.1/lib/rack/handler/fastcgi.rb index 1739d65..b7c4ba7 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/handler/fastcgi.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/handler/fastcgi.rb @@ -33,7 +33,7 @@ def self.serve(request, app) env.delete "HTTP_CONTENT_LENGTH" env["SCRIPT_NAME"] = "" if env["SCRIPT_NAME"] == "/" - + rack_input = RewindableInput.new(request.in) env.update({"rack.version" => [1,0], diff --git a/vendor/gems/rack-1.0.1/lib/rack/handler/mongrel.rb b/vendor/gems/rack-1.0.1/lib/rack/handler/mongrel.rb index 7b44826..eb2a59d 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/handler/mongrel.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/handler/mongrel.rb @@ -10,7 +10,7 @@ def self.run(app, options={}) server = ::Mongrel::HttpServer.new(options[:Host] || '0.0.0.0', options[:Port] || 8080) # Acts like Rack::URLMap, utilizing Mongrel's own path finding methods. - # Use is similar to #run, replacing the app argument with a hash of + # Use is similar to #run, replacing the app argument with a hash of # { path=>app, ... } or an instance of Rack::URLMap. if options[:map] if app.is_a? Hash diff --git a/vendor/gems/rack-1.0.1/lib/rack/handler/scgi.rb b/vendor/gems/rack-1.0.1/lib/rack/handler/scgi.rb index bd860a5..5c8101a 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/handler/scgi.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/handler/scgi.rb @@ -7,14 +7,14 @@ module Rack module Handler class SCGI < ::SCGI::Processor attr_accessor :app - + def self.run(app, options=nil) new(options.merge(:app=>app, :host=>options[:Host], :port=>options[:Port], :socket=>options[:Socket])).listen end - + def initialize(settings = {}) @app = Rack::Chunked.new(Rack::ContentLength.new(settings[:app])) @log = Object.new @@ -22,7 +22,7 @@ def @log.info(*args); end def @log.error(*args); end super(settings) end - + def process_request(request, input_body, socket) env = {}.replace(request) env.delete "HTTP_CONTENT_TYPE" diff --git a/vendor/gems/rack-1.0.1/lib/rack/lint.rb b/vendor/gems/rack-1.0.1/lib/rack/lint.rb index 796807a..9344eb9 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/lint.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/lint.rb @@ -243,7 +243,7 @@ def check_input(input) assert("rack.input #{input} is not opened in binary mode") { input.binmode? } if input.respond_to?(:binmode?) - + ## The input stream must respond to +gets+, +each+, +read+ and +rewind+. [:gets, :each, :read, :rewind].each { |method| assert("rack.input #{input} does not respond to ##{method}") { @@ -300,9 +300,9 @@ def read(*args) args[1].kind_of?(String) } end - + v = @input.read(*args) - + assert("rack.input#read didn't return nil or a String") { v.nil? or v.instance_of? String } @@ -311,7 +311,7 @@ def read(*args) !v.nil? } end - + v end @@ -325,7 +325,7 @@ def each(*args) yield line } end - + ## * +rewind+ must be called without arguments. It rewinds the input ## stream back to the beginning. It must not raise Errno::ESPIPE: ## that is, it may not be a pipe or a socket. Therefore, handler diff --git a/vendor/gems/rack-1.0.1/lib/rack/request.rb b/vendor/gems/rack-1.0.1/lib/rack/request.rb index 2f64bd6..0ea5f75 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/request.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/request.rb @@ -92,7 +92,7 @@ def head?; request_method == "HEAD" end PARSEABLE_DATA_MEDIA_TYPES = [ 'multipart/related', 'multipart/mixed' - ] + ] # Determine whether the request body contains form-data by checking # the request media_type against registered form-data media-types: @@ -214,11 +214,11 @@ def url url end - + def path script_name + path_info end - + def fullpath query_string.empty? ? path : "#{path}?#{query_string}" end diff --git a/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb b/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb index accd96b..f3cfc27 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/rewindable_input.rb @@ -16,27 +16,27 @@ def initialize(io) @rewindable_io = nil @unlinked = false end - + def gets make_rewindable unless @rewindable_io @rewindable_io.gets end - + def read(*args) make_rewindable unless @rewindable_io @rewindable_io.read(*args) end - + def each(&block) make_rewindable unless @rewindable_io @rewindable_io.each(&block) end - + def rewind make_rewindable unless @rewindable_io @rewindable_io.rewind end - + # Closes this RewindableInput object without closing the originally # wrapped IO oject. Cleans up any temporary resources that this RewindableInput # has created. @@ -52,9 +52,9 @@ def close @rewindable_io = nil end end - + private - + # Ruby's Tempfile class has a bug. Subclass it and fix it. class Tempfile < ::Tempfile def _close @@ -78,7 +78,7 @@ def make_rewindable @rewindable_io.unlink @unlinked = true end - + buffer = "" while @io.read(1024 * 4, buffer) entire_buffer_written_out = false @@ -92,7 +92,7 @@ def make_rewindable end @rewindable_io.rewind end - + def filesystem_has_posix_semantics? RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/ end diff --git a/vendor/gems/rack-1.0.1/lib/rack/utils.rb b/vendor/gems/rack-1.0.1/lib/rack/utils.rb index d54c928..84cbfdd 100644 --- a/vendor/gems/rack-1.0.1/lib/rack/utils.rb +++ b/vendor/gems/rack-1.0.1/lib/rack/utils.rb @@ -27,7 +27,7 @@ def unescape(s) module_function :unescape DEFAULT_SEP = /[&;] */n - + # Stolen from Mongrel, with some small modifications: # Parses a query string by breaking it up at the '&' # and ';' characters. You can also use this to parse @@ -378,7 +378,7 @@ def self.parse_multipart(env) :name => name, :tempfile => body, :head => head} elsif !filename && content_type body.rewind - + # Generic multipart cases, not coming from a form data = {:type => content_type, :name => name, :tempfile => body, :head => head} diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_auth_basic.rb b/vendor/gems/rack-1.0.1/test/spec_rack_auth_basic.rb index 0176efc..ca34b7f 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_auth_basic.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_auth_basic.rb @@ -8,11 +8,11 @@ def realm 'WallysWorld' end - + def unprotected_app lambda { |env| [ 200, {'Content-Type' => 'text/plain'}, ["Hi #{env['REMOTE_USER']}"] ] } end - + def protected_app app = Rack::Auth::Basic.new(unprotected_app) { |username, password| 'Boss' == username } app.realm = realm @@ -57,7 +57,7 @@ def assert_basic_auth_challenge(response) response.body.to_s.should.equal 'Hi Boss' end end - + specify 'should return 400 Bad Request if different auth scheme used' do request 'HTTP_AUTHORIZATION' => 'Digest params' do |response| response.should.be.a.client_error diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_builder.rb b/vendor/gems/rack-1.0.1/test/spec_rack_builder.rb index 3fad981..91beb64 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_builder.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_builder.rb @@ -43,7 +43,7 @@ response.status.should.equal 401 # with auth... - response = Rack::MockRequest.new(app).get("/", + response = Rack::MockRequest.new(app).get("/", 'HTTP_AUTHORIZATION' => 'Basic ' + ["joe:secret"].pack("m*")) response.status.should.equal 200 response.body.to_s.should.equal 'Hi Boss' diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_cgi.rb b/vendor/gems/rack-1.0.1/test/spec_rack_cgi.rb index 818fabd..8ee2e94 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_cgi.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_cgi.rb @@ -3,7 +3,7 @@ context "Rack::Handler::CGI" do include TestRequest::Helpers - + setup do @host = '0.0.0.0' @port = 9203 diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_handler.rb b/vendor/gems/rack-1.0.1/test/spec_rack_handler.rb index fcf19b7..bfd08b2 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_handler.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_handler.rb @@ -12,7 +12,7 @@ class RockLobster; end Rack::Handler.get('mongrel').should.equal Rack::Handler::Mongrel Rack::Handler.get('webrick').should.equal Rack::Handler::WEBrick end - + specify "handler that doesn't exist should raise a NameError" do lambda { Rack::Handler.get('boom') @@ -27,7 +27,7 @@ class RockLobster; end Rack::Handler.register('rock_lobster', 'RockLobster') Rack::Handler.get('rock_lobster').should.equal RockLobster end - + specify "should not need registration for properly coded handlers even if not already required" do begin $:.push "test/unregistered_handler" diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_lint.rb b/vendor/gems/rack-1.0.1/test/spec_rack_lint.rb index 880a07e..f520b90 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_lint.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_lint.rb @@ -110,7 +110,7 @@ def env(*args) Rack::Lint.new(nil).call(env("rack.input" => "")) }.should.raise(Rack::Lint::LintError). message.should.match(/does not respond to #gets/) - + lambda { input = Object.new def input.binmode? @@ -119,7 +119,7 @@ def input.binmode? Rack::Lint.new(nil).call(env("rack.input" => input)) }.should.raise(Rack::Lint::LintError). message.should.match(/is not opened in binary mode/) - + lambda { input = Object.new def input.external_encoding @@ -347,25 +347,25 @@ def each yield 23 yield 42 end - + def rewind raise Errno::ESPIPE, "Errno::ESPIPE" end end - + eof_weirdio = Object.new class << eof_weirdio def gets nil end - + def read(*args) nil end - + def each end - + def rewind end end @@ -452,7 +452,7 @@ def rewind }.should.raise(Rack::Lint::LintError). message.should.match(/body was given for HEAD/) end - + specify "passes valid read calls" do lambda { Rack::Lint.new(lambda { |env| @@ -460,35 +460,35 @@ def rewind [201, {"Content-type" => "text/plain", "Content-length" => "0"}, []] }).call(env({"rack.input" => StringIO.new("hello world")})) }.should.not.raise(Rack::Lint::LintError) - + lambda { Rack::Lint.new(lambda { |env| env["rack.input"].read(0) [201, {"Content-type" => "text/plain", "Content-length" => "0"}, []] }).call(env({"rack.input" => StringIO.new("hello world")})) }.should.not.raise(Rack::Lint::LintError) - + lambda { Rack::Lint.new(lambda { |env| env["rack.input"].read(1) [201, {"Content-type" => "text/plain", "Content-length" => "0"}, []] }).call(env({"rack.input" => StringIO.new("hello world")})) }.should.not.raise(Rack::Lint::LintError) - + lambda { Rack::Lint.new(lambda { |env| env["rack.input"].read(nil) [201, {"Content-type" => "text/plain", "Content-length" => "0"}, []] }).call(env({"rack.input" => StringIO.new("hello world")})) }.should.not.raise(Rack::Lint::LintError) - + lambda { Rack::Lint.new(lambda { |env| env["rack.input"].read(nil, '') [201, {"Content-type" => "text/plain", "Content-length" => "0"}, []] }).call(env({"rack.input" => StringIO.new("hello world")})) }.should.not.raise(Rack::Lint::LintError) - + lambda { Rack::Lint.new(lambda { |env| env["rack.input"].read(1, '') diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_lobster.rb b/vendor/gems/rack-1.0.1/test/spec_rack_lobster.rb index 7be267a..d612a6c 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_lobster.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_lobster.rb @@ -7,7 +7,7 @@ specify "should be a single lambda" do Rack::Lobster::LambdaLobster.should.be.kind_of Proc end - + specify "should look like a lobster" do res = Rack::MockRequest.new(Rack::Lobster::LambdaLobster).get("/") res.should.be.ok diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_mock.rb b/vendor/gems/rack-1.0.1/test/spec_rack_mock.rb index 9c392a2..6261f29 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_mock.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_mock.rb @@ -5,13 +5,13 @@ app = lambda { |env| req = Rack::Request.new(env) - + env["mock.postdata"] = env["rack.input"].read if req.GET["error"] env["rack.errors"].puts req.GET["error"] env["rack.errors"].flush end - + Rack::Response.new(env.to_yaml, req.GET["status"] || 200, "Content-Type" => "text/yaml").finish diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_mongrel.rb b/vendor/gems/rack-1.0.1/test/spec_rack_mongrel.rb index d73e884..0e5d159 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_mongrel.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_mongrel.rb @@ -6,14 +6,14 @@ require 'rack/lint' require 'testrequest' require 'timeout' - + Thread.abort_on_exception = true $tcp_defer_accept_opts = nil $tcp_cork_opts = nil context "Rack::Handler::Mongrel" do include TestRequest::Helpers - + setup do server = Mongrel::HttpServer.new(@host='0.0.0.0', @port=9201) server.register('/test', diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_recursive.rb b/vendor/gems/rack-1.0.1/test/spec_rack_recursive.rb index afc1a0d..ef04400 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_recursive.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_recursive.rb @@ -44,7 +44,7 @@ get("/app2") res.should.be.ok - res.body.should.equal "App2App1" + res.body.should.equal "App2App1" end specify "should raise error on requests not below the app" do diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_response.rb b/vendor/gems/rack-1.0.1/test/spec_rack_response.rb index eb59b5c..63b05b4 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_response.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_response.rb @@ -30,10 +30,10 @@ response.write "bar" response.write "baz" end - + parts = [] body.each { |part| parts << part } - + parts.should.equal ["foo", "bar", "baz"] end @@ -46,7 +46,7 @@ specify "can set cookies" do response = Rack::Response.new - + response.set_cookie "foo", "bar" response["Set-Cookie"].should.equal "foo=bar" response.set_cookie "foo2", "bar2" @@ -57,7 +57,7 @@ specify "formats the Cookie expiration date accordingly to RFC 2109" do response = Rack::Response.new - + response.set_cookie "foo", {:value => "bar", :expires => Time.now+10} response["Set-Cookie"].should.match( /expires=..., \d\d-...-\d\d\d\d \d\d:\d\d:\d\d .../) @@ -130,7 +130,7 @@ str.should.equal "foo" status.should.equal 404 end - + specify "doesn't return invalid responses" do r = Rack::Response.new(["foo", "bar"], 204) status, header, body = r.finish diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_rewindable_input.rb b/vendor/gems/rack-1.0.1/test/spec_rack_rewindable_input.rb index 78bebfc..1b206d5 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_rewindable_input.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_rewindable_input.rb @@ -6,47 +6,47 @@ setup do @rio = Rack::RewindableInput.new(@io) end - + teardown do @rio.close end - + specify "should be able to handle to read()" do @rio.read.should.equal "hello world" end - + specify "should be able to handle to read(nil)" do @rio.read(nil).should.equal "hello world" end - + specify "should be able to handle to read(length)" do @rio.read(1).should.equal "h" end - + specify "should be able to handle to read(length, buffer)" do buffer = "" result = @rio.read(1, buffer) result.should.equal "h" result.object_id.should.equal buffer.object_id end - + specify "should be able to handle to read(nil, buffer)" do buffer = "" result = @rio.read(nil, buffer) result.should.equal "hello world" result.object_id.should.equal buffer.object_id end - + specify "should rewind to the beginning when #rewind is called" do @rio.read(1) @rio.rewind @rio.read.should.equal "hello world" end - + specify "should be able to handle gets" do @rio.gets.should == "hello world" end - + specify "should be able to handle each" do array = [] @rio.each do |data| @@ -54,11 +54,11 @@ end array.should.equal(["hello world"]) end - + specify "should not buffer into a Tempfile if no data has been read yet" do @rio.instance_variable_get(:@rewindable_io).should.be.nil end - + specify "should buffer into a Tempfile when data has been consumed for the first time" do @rio.read(1) tempfile = @rio.instance_variable_get(:@rewindable_io) @@ -67,18 +67,18 @@ tempfile2 = @rio.instance_variable_get(:@rewindable_io) tempfile2.should.equal tempfile end - + specify "should close the underlying tempfile upon calling #close" do @rio.read(1) tempfile = @rio.instance_variable_get(:@rewindable_io) @rio.close tempfile.should.be.closed end - + specify "should be possibel to call #close when no data has been buffered yet" do @rio.close end - + specify "should be possible to call #close multiple times" do @rio.close @rio.close @@ -90,10 +90,10 @@ setup do @io = StringIO.new("hello world") end - + it_should_behave_like "a rewindable IO object" end - + context "given an IO object that is not rewindable" do setup do @io = StringIO.new("hello world") @@ -101,10 +101,10 @@ undef :rewind end end - + it_should_behave_like "a rewindable IO object" end - + context "given an IO object whose rewind method raises Errno::ESPIPE" do setup do @io = StringIO.new("hello world") @@ -112,7 +112,7 @@ def @io.rewind raise Errno::ESPIPE, "You can't rewind this!" end end - + it_should_behave_like "a rewindable IO object" end end diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_session_cookie.rb b/vendor/gems/rack-1.0.1/test/spec_rack_session_cookie.rb index 3be88b4..f41c166 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_session_cookie.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_session_cookie.rb @@ -46,7 +46,7 @@ get("/", :fatal => true) }.should.raise(Rack::MockRequest::FatalWarning) end - + specify "creates a new cookie with integrity hash" do res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')).get("/") if RUBY_VERSION < "1.9" @@ -55,7 +55,7 @@ res["Set-Cookie"].should.match("rack.session=BAh7BkkiDGNvdW50ZXIGOg1lbmNvZGluZyINVVMtQVNDSUlpBg%3D%3D%0A--d7a6637b94d2728194a96c18484e1f7ed9074a83") end end - + specify "loads from a cookie wih integrity hash" do res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')).get("/") cookie = res["Set-Cookie"] @@ -67,7 +67,7 @@ get("/", "HTTP_COOKIE" => cookie) res.body.should.equal '{"counter"=>3}' end - + specify "ignores tampered with session cookies" do app = Rack::Session::Cookie.new(incrementor, :secret => 'test') response1 = Rack::MockRequest.new(app).get("/") @@ -75,7 +75,7 @@ tampered_with_cookie = "hackerman-was-here" + "--" + digest response2 = Rack::MockRequest.new(app).get("/", "HTTP_COOKIE" => tampered_with_cookie) - + # The tampered-with cookie is ignored, so we get back an identical Set-Cookie response2["Set-Cookie"].should.equal(response1["Set-Cookie"]) end diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_thin.rb b/vendor/gems/rack-1.0.1/test/spec_rack_thin.rb index 324f649..94eac5d 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_thin.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_thin.rb @@ -4,10 +4,10 @@ require 'rack/handler/thin' require 'testrequest' require 'timeout' - + context "Rack::Handler::Thin" do include TestRequest::Helpers - + setup do @app = Rack::Lint.new(TestRequest.new) @server = nil diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_utils.rb b/vendor/gems/rack-1.0.1/test/spec_rack_utils.rb index f270e87..efee860 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_utils.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_utils.rb @@ -190,26 +190,26 @@ h = Rack::Utils::HeaderHash.new("foo" => ["bar", "baz"]) h.to_hash.should.equal({ "foo" => "bar\nbaz" }) end - + specify "should be able to delete the given key case-sensitively" do h = Rack::Utils::HeaderHash.new("foo" => "bar") h.delete("foo") h["foo"].should.be.nil h["FOO"].should.be.nil end - + specify "should be able to delete the given key case-insensitively" do h = Rack::Utils::HeaderHash.new("foo" => "bar") h.delete("FOO") h["foo"].should.be.nil h["FOO"].should.be.nil end - + specify "should return the deleted value when #delete is called on an existing key" do h = Rack::Utils::HeaderHash.new("foo" => "bar") h.delete("Foo").should.equal("bar") end - + specify "should return nil when #delete is called on a non-existant key" do h = Rack::Utils::HeaderHash.new("foo" => "bar") h.delete("Hello").should.be.nil diff --git a/vendor/gems/rack-1.0.1/test/spec_rack_webrick.rb b/vendor/gems/rack-1.0.1/test/spec_rack_webrick.rb index 3e63ea6..e5ef18e 100644 --- a/vendor/gems/rack-1.0.1/test/spec_rack_webrick.rb +++ b/vendor/gems/rack-1.0.1/test/spec_rack_webrick.rb @@ -9,7 +9,7 @@ context "Rack::Handler::WEBrick" do include TestRequest::Helpers - + setup do @server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0', :Port => @port=9202, @@ -60,7 +60,7 @@ response["REQUEST_PATH"].should.equal "/" response["PATH_INFO"].should.equal "/foo" response["QUERY_STRING"].should.equal "quux=1" - + GET("/test/foo%25encoding?quux=1") response["REQUEST_METHOD"].should.equal "GET" response["SCRIPT_NAME"].should.equal "/test" diff --git a/vendor/gems/rack-1.1.0/.specification b/vendor/gems/rack-1.1.0/.specification index 254f0ea..c075d0b 100644 --- a/vendor/gems/rack-1.1.0/.specification +++ b/vendor/gems/rack-1.1.0/.specification @@ -1,90 +1,90 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: rack -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 1 - 1 - 0 version: 1.1.0 platform: ruby -authors: +authors: - Christian Neukirchen -autorequire: +autorequire: bindir: bin cert_chain: [] date: 2010-01-03 00:00:00 -08:00 default_executable: rackup -dependencies: -- !ruby/object:Gem::Dependency +dependencies: +- !ruby/object:Gem::Dependency name: test-spec prerelease: false - requirement: &id001 !ruby/object:Gem::Requirement - requirements: + requirement: &id001 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id001 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: camping prerelease: false - requirement: &id002 !ruby/object:Gem::Requirement - requirements: + requirement: &id002 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id002 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: fcgi prerelease: false - requirement: &id003 !ruby/object:Gem::Requirement - requirements: + requirement: &id003 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id003 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: memcache-client prerelease: false - requirement: &id004 !ruby/object:Gem::Requirement - requirements: + requirement: &id004 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id004 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: mongrel prerelease: false - requirement: &id005 !ruby/object:Gem::Requirement - requirements: + requirement: &id005 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development version_requirements: *id005 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: thin prerelease: false - requirement: &id006 !ruby/object:Gem::Requirement - requirements: + requirement: &id006 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" type: :development @@ -95,19 +95,19 @@ description: | the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. - + Also see http://rack.rubyforge.org. email: chneukirchen@gmail.com -executables: +executables: - rackup extensions: [] -extra_rdoc_files: +extra_rdoc_files: - README - SPEC - KNOWN-ISSUES -files: +files: - bin/rackup - contrib/rack_logo.svg - example/lobster.ru @@ -224,33 +224,33 @@ has_rdoc: true homepage: http://rack.rubyforge.org licenses: [] -post_install_message: +post_install_message: rdoc_options: [] -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] rubyforge_project: rack rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 3 summary: a modular Ruby webserver interface -test_files: +test_files: - test/spec_rack_auth_basic.rb - test/spec_rack_auth_digest.rb - test/spec_rack_builder.rb diff --git a/vendor/gems/rest-open-uri-1.0.0/.specification b/vendor/gems/rest-open-uri-1.0.0/.specification index 753282e..43434b8 100644 --- a/vendor/gems/rest-open-uri-1.0.0/.specification +++ b/vendor/gems/rest-open-uri-1.0.0/.specification @@ -1,20 +1,20 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: rest-open-uri -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 1 - 0 - 0 version: 1.0.0 platform: ruby -authors: +authors: - Leonard Richardson -autorequire: +autorequire: bindir: bin -cert_chain: +cert_chain: date: 2006-12-20 00:00:00 -08:00 -default_executable: +default_executable: dependencies: [] description: rest-open-uri is a hack of, and drop-in replacement for, open-uri. It supports all standard HTTP methods (not just GET) and allows you to send an entity-body. This gem will be deprecated if and when equivalent functionality makes it into core Ruby. @@ -23,41 +23,41 @@ executables: [] extensions: [] -extra_rdoc_files: +extra_rdoc_files: - CHANGELOG -files: +files: - lib/rest-open-uri.rb - CHANGELOG has_rdoc: true homepage: http://rubyforge.org/tracker/?func=detail&aid=6321&group_id=426&atid=1700 licenses: [] -post_install_message: +post_install_message: rdoc_options: [] -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 - 0 - 0 version: 0.0.0 -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] -rubyforge_project: +rubyforge_project: rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 1 summary: A drop-in replacement for open-uri for use in REST clients. test_files: [] diff --git a/vendor/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb b/vendor/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb index cdfd68b..b2720f2 100644 --- a/vendor/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb +++ b/vendor/gems/rest-open-uri-1.0.0/lib/rest-open-uri.rb @@ -104,9 +104,9 @@ module OpenURI } # xxx: I'd like a better way of representing this trivial mapping. - Methods = { + Methods = { :copy => Net::HTTP::Copy, - :delete => Net::HTTP::Delete, + :delete => Net::HTTP::Delete, :get => Net::HTTP::Get, :head => Net::HTTP::Head, :lock => Net::HTTP::Lock, @@ -118,7 +118,7 @@ module OpenURI :put => Net::HTTP::Put, :trace => Net::HTTP::Trace, :unlock => Net::HTTP::Unlock, - } + } def OpenURI.check_options(options) # :nodoc: @@ -131,7 +131,7 @@ def OpenURI.check_options(options) # :nodoc: m = options[:method] if m && !Methods[m] - raise ArgumentError, "unrecognized HTTP method symbol: #{m}" + raise ArgumentError, "unrecognized HTTP method symbol: #{m}" end end @@ -493,7 +493,7 @@ module OpenRead # :proxy => true # :proxy => false # :proxy => nil - # + # # If :proxy option is specified, the value should be String, URI, # boolean or nil. # When String or URI is given, it is treated as proxy URI. @@ -515,14 +515,14 @@ module OpenRead # [:content_length_proc] # Synopsis: # :content_length_proc => lambda {|content_length| ... } - # + # # If :content_length_proc option is specified, the option value procedure # is called before actual transfer is started. # It takes one argument which is expected content length in bytes. - # + # # If two or more transfer is done by HTTP redirection, the procedure # is called only one for a last transfer. - # + # # When expected content length is unknown, the procedure is called with # nil. # It is happen when HTTP response has no Content-Length header. diff --git a/vendor/gems/ruby-hmac-0.4.0/.specification b/vendor/gems/ruby-hmac-0.4.0/.specification index 11a2631..9c2ead8 100644 --- a/vendor/gems/ruby-hmac-0.4.0/.specification +++ b/vendor/gems/ruby-hmac-0.4.0/.specification @@ -1,59 +1,59 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: ruby-hmac -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 0 - 4 - 0 version: 0.4.0 platform: ruby -authors: +authors: - Daiki Ueno - Geoffrey Grosenbach -autorequire: +autorequire: bindir: bin cert_chain: [] date: 2010-01-20 00:00:00 -08:00 -default_executable: -dependencies: -- !ruby/object:Gem::Dependency +default_executable: +dependencies: +- !ruby/object:Gem::Dependency name: rubyforge prerelease: false - requirement: &id001 !ruby/object:Gem::Requirement - requirements: + requirement: &id001 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 2 - 0 - 3 version: 2.0.3 type: :development version_requirements: *id001 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: gemcutter prerelease: false - requirement: &id002 !ruby/object:Gem::Requirement - requirements: + requirement: &id002 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 - 2 - 1 version: 0.2.1 type: :development version_requirements: *id002 -- !ruby/object:Gem::Dependency +- !ruby/object:Gem::Dependency name: hoe prerelease: false - requirement: &id003 !ruby/object:Gem::Requirement - requirements: + requirement: &id003 !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 2 - 5 - 0 @@ -62,20 +62,20 @@ dependencies: version_requirements: *id003 description: |- This module provides common interface to HMAC functionality. HMAC is a kind of "Message Authentication Code" (MAC) algorithm whose standard is documented in RFC2104. Namely, a MAC provides a way to check the integrity of information transmitted over or stored in an unreliable medium, based on a secret key. - + Originally written by Daiki Ueno. Converted to a RubyGem by Geoffrey Grosenbach -email: +email: - "" - boss@topfunky.com executables: [] extensions: [] -extra_rdoc_files: +extra_rdoc_files: - History.txt - Manifest.txt - README.txt -files: +files: - History.txt - Manifest.txt - README.txt @@ -91,32 +91,32 @@ has_rdoc: true homepage: http://ruby-hmac.rubyforge.org licenses: [] -post_install_message: -rdoc_options: +post_install_message: +rdoc_options: - --main - README.txt -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] rubyforge_project: ruby-hmac rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 3 summary: This module provides common interface to HMAC functionality -test_files: +test_files: - test/test_hmac.rb diff --git a/vendor/gems/ruby-hmac-0.4.0/README.txt b/vendor/gems/ruby-hmac-0.4.0/README.txt index 56e71af..fcebfe9 100644 --- a/vendor/gems/ruby-hmac-0.4.0/README.txt +++ b/vendor/gems/ruby-hmac-0.4.0/README.txt @@ -3,7 +3,7 @@ * http://ruby-hmac.rubyforge.org == DESCRIPTION: - + This module provides common interface to HMAC functionality. HMAC is a kind of "Message Authentication Code" (MAC) algorithm whose standard is documented in RFC2104. Namely, a MAC provides a way to check the integrity of information transmitted over or stored in an unreliable medium, based on a secret key. Originally written by Daiki Ueno. Converted to a RubyGem by Geoffrey Grosenbach diff --git a/vendor/gems/sqlite3-ruby-1.2.1/.specification b/vendor/gems/sqlite3-ruby-1.2.1/.specification index 969c43c..16253a1 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/.specification +++ b/vendor/gems/sqlite3-ruby-1.2.1/.specification @@ -1,31 +1,31 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: sqlite3-ruby -version: !ruby/object:Gem::Version +version: !ruby/object:Gem::Version prerelease: false - segments: + segments: - 1 - 2 - 1 version: 1.2.1 platform: ruby -authors: +authors: - Jamis Buck autorequire: sqlite3 bindir: bin -cert_chain: +cert_chain: date: 2007-02-02 00:00:00 -08:00 -default_executable: +default_executable: dependencies: [] -description: +description: email: jamis@37signals.com executables: [] -extensions: +extensions: - ext/sqlite3_api/extconf.rb -extra_rdoc_files: +extra_rdoc_files: - README -files: +files: - doc/faq - doc/faq/faq.html - doc/faq/faq.rb @@ -70,34 +70,34 @@ has_rdoc: true homepage: http://sqlite-ruby.rubyforge.org/sqlite3 licenses: [] -post_install_message: -rdoc_options: +post_install_message: +rdoc_options: - --main - README -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: +required_ruby_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 1 - 8 - 0 version: 1.8.0 -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: - - ">=" - - !ruby/object:Gem::Version - segments: + - !ruby/object:Gem::Version + segments: - 0 version: "0" requirements: [] -rubyforge_project: +rubyforge_project: rubygems_version: 1.3.6 -signing_key: +signing_key: specification_version: 1 summary: SQLite3/Ruby is a module to allow Ruby scripts to interface with a SQLite3 database. -test_files: +test_files: - test/tests.rb diff --git a/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.html b/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.html index f87ebec..be77cf0 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.html +++ b/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.html @@ -232,7 +232,7 @@

SQLite/Ruby FAQ

   db.prepare( "select * from table where a = :name and b = ?" ) do |stmt|
-    stmt.execute "value", "name" => "bob" 
+    stmt.execute "value", "name" => "bob"
   end
 
diff --git a/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.rb b/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.rb index 130f712..a979449 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.yml b/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.yml index f4bb4c1..a6688bf 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.yml +++ b/vendor/gems/sqlite3-ruby-1.2.1/doc/faq/faq.yml @@ -86,7 +86,7 @@ Database#prepare method. It returns a Statement object, and you can then invoke #execute on that to get the ResultSet: - +
       stmt = db.prepare( "select * from person" )
 
@@ -184,7 +184,7 @@
 
     You can also bind explicitly using the Statement object itself. Just pass
     additional parameters to the Statement#execute statement:
-    
+
 
     
       db.prepare( "select * from table where a = :name and b = ?" ) do |stmt|
@@ -209,7 +209,7 @@
     
- "How do I discover metadata about a query?": >- - + If you ever want to know the names or types of the columns in a result set, you can do it in several ways. @@ -351,7 +351,7 @@ as selects, but in general the Database#execute method will be most convenient: - +
       db.execute( "insert into table values ( ?, ? )", *bind_vars )
     
diff --git a/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/Makefile b/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/Makefile index 75942cc..9b918ee 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/Makefile +++ b/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/Makefile @@ -36,13 +36,13 @@ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -CFLAGS = -fno-common -O -pipe -I/opt/local/include -fno-common -pipe -fno-common +CFLAGS = -fno-common -O -pipe -I/opt/local/include -fno-common -pipe -fno-common CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -DHAVE_SQLITE3_H -I/usr/local/include -O -pipe -I/opt/local/include -CXXFLAGS = $(CFLAGS) -DLDFLAGS = -L/opt/local/lib +CXXFLAGS = $(CFLAGS) +DLDFLAGS = -L/opt/local/lib LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace AR = ar -EXEEXT = +EXEEXT = RUBY_INSTALL_NAME = ruby RUBY_SO_NAME = ruby @@ -61,25 +61,25 @@ COPY = cp #### End of system configuration section. #### -preload = +preload = libpath = /usr/local/lib $(libdir) LIBPATH = -L"/usr/local/lib" -L"$(libdir)" -DEFFILE = +DEFFILE = -CLEANFILES = -DISTCLEANFILES = +CLEANFILES = +DISTCLEANFILES = -extout = -extout_prefix = -target_prefix = -LOCAL_LIBS = -LIBS = $(LIBRUBYARG_SHARED) -lsqlite3 -lpthread -ldl -lobjc +extout = +extout_prefix = +target_prefix = +LOCAL_LIBS = +LIBS = $(LIBRUBYARG_SHARED) -lsqlite3 -lpthread -ldl -lobjc SRCS = sqlite3_api_wrap.c OBJS = sqlite3_api_wrap.o TARGET = sqlite3_api DLLIB = $(TARGET).bundle -STATIC_LIB = +STATIC_LIB = RUBYCOMMONDIR = $(sitedir)$(target_prefix) RUBYLIBDIR = $(sitelibdir)$(target_prefix) diff --git a/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api.i b/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api.i index 8254570..e85b357 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api.i +++ b/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api.i @@ -60,7 +60,7 @@ void Sqlite3_ruby_function_step(sqlite3_context* ctx,int n, VALUE rb_args; VALUE *rb_context; int idx; - + data = (CallbackData*)sqlite3_user_data(ctx); if( data->proc2 != Qnil ) { @@ -84,7 +84,7 @@ void Sqlite3_ruby_function_step(sqlite3_context* ctx,int n, void Sqlite3_ruby_function_final(sqlite3_context *ctx) { VALUE *rb_context; CallbackData *data; - + rb_context = (VALUE*)sqlite3_aggregate_context(ctx,sizeof(VALUE)); if( *rb_context == 0 ) { *rb_context = rb_hash_new(); diff --git a/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api_wrap.c b/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api_wrap.c index e0167d1..fcb919c 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api_wrap.c +++ b/vendor/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/sqlite3_api_wrap.c @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.27 - * - * This file is not intended to be easily readable and contains a number of + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ /*********************************************************************** @@ -20,7 +20,7 @@ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # else -# define SWIGTEMPLATEDISAMBIGUATOR +# define SWIGTEMPLATEDISAMBIGUATOR # endif #endif @@ -36,9 +36,9 @@ /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) || defined(__ICC) -# define SWIGUNUSED __attribute__ ((unused)) +# define SWIGUNUSED __attribute__ ((unused)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif @@ -71,7 +71,7 @@ # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif @@ -134,7 +134,7 @@ * can be passed as an argument to API functions like Data_Wrap_Struct() * and Data_Make_Struct(). */ - + #ifdef __cplusplus # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) @@ -218,7 +218,7 @@ typedef struct { You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the swig runtime code. In 99.9% of the cases, swig just needs to declare them as 'static'. - + But only do this if is strictly necessary, ie, if you have problems with your compiler or so. */ @@ -270,7 +270,7 @@ typedef struct swig_module_info { } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -371,7 +371,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -414,7 +414,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -422,14 +422,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -437,14 +437,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { @@ -453,11 +453,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); - if (compare == 0) { + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -482,14 +482,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -508,13 +508,13 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * @@ -530,7 +530,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * @@ -544,21 +544,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -801,15 +801,15 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) { int own = flags & SWIG_POINTER_OWN; int track = flags & SWIG_TRACK_OBJECTS; - + char *klass_name; swig_class *sklass; VALUE klass; VALUE obj; - + if (!ptr) return Qnil; - + /* Have we already wrapped this pointer? */ if (track) { obj = SWIG_RubyInstanceFor(ptr); @@ -817,7 +817,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) return obj; } } - + if (type->clientdata) { sklass = (swig_class *) type->clientdata; obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr); @@ -829,12 +829,12 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) obj = Data_Wrap_Struct(klass, 0, 0, ptr); } rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name)); - + /* Keep track of this object if necessary */ if (track) { SWIG_RubyAddTracking(ptr, obj); } - + return obj; } @@ -871,21 +871,21 @@ SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags) } else { Data_Get_Struct(obj, void, *ptr); } - + /* Check to see if the input object is giving up ownership of the underlying C struct or C++ object. If so then we - need to reset the destructor since the Ruby object no - longer owns the underlying C++ object.*/ + need to reset the destructor since the Ruby object no + longer owns the underlying C++ object.*/ if (flags & SWIG_POINTER_DISOWN) { if (flags & SWIG_TRACK_OBJECTS) { /* We are tracking objects. Thus we change the destructor * to SWIG_RubyRemoveTracking. This allows us to * remove the mapping from the C++ to Ruby object * when the Ruby object is garbage collected. If we don't - * do this, then it is possible we will return a reference + * do this, then it is possible we will return a reference * to a Ruby object that no longer exists thereby crashing Ruby. */ RDATA(obj)->dfree = SWIG_RubyRemoveTracking; - } else { + } else { RDATA(obj)->dfree = 0; } } @@ -1120,7 +1120,7 @@ void Sqlite3_ruby_function_step(sqlite3_context* ctx,int n, VALUE rb_args; VALUE *rb_context; int idx; - + data = (CallbackData*)sqlite3_user_data(ctx); if( data->proc2 != Qnil ) { @@ -1144,7 +1144,7 @@ void Sqlite3_ruby_function_step(sqlite3_context* ctx,int n, void Sqlite3_ruby_function_final(sqlite3_context *ctx) { VALUE *rb_context; CallbackData *data; - + rb_context = (VALUE*)sqlite3_aggregate_context(ctx,sizeof(VALUE)); if( *rb_context == 0 ) { *rb_context = rb_hash_new(); @@ -1165,13 +1165,13 @@ static VALUE _wrap_CallbackData_proc_set(int argc, VALUE *argv, VALUE self) { struct CallbackData *arg1 = (struct CallbackData *) 0 ; VALUE arg2 ; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_CallbackData, 0); arg2 = argv[0]; if (arg1) (arg1)->proc = arg2; - + return Qnil; } @@ -1181,12 +1181,12 @@ _wrap_CallbackData_proc_get(int argc, VALUE *argv, VALUE self) { struct CallbackData *arg1 = (struct CallbackData *) 0 ; VALUE result; VALUE vresult = Qnil; - + if ((argc < 0) || (argc > 0)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_CallbackData, 0); result = (VALUE) ((arg1)->proc); - + vresult = result; return vresult; } @@ -1196,13 +1196,13 @@ static VALUE _wrap_CallbackData_proc2_set(int argc, VALUE *argv, VALUE self) { struct CallbackData *arg1 = (struct CallbackData *) 0 ; VALUE arg2 ; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_CallbackData, 0); arg2 = argv[0]; if (arg1) (arg1)->proc2 = arg2; - + return Qnil; } @@ -1212,12 +1212,12 @@ _wrap_CallbackData_proc2_get(int argc, VALUE *argv, VALUE self) { struct CallbackData *arg1 = (struct CallbackData *) 0 ; VALUE result; VALUE vresult = Qnil; - + if ((argc < 0) || (argc > 0)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_CallbackData, 0); result = (VALUE) ((arg1)->proc2); - + vresult = result; return vresult; } @@ -1227,13 +1227,13 @@ static VALUE _wrap_CallbackData_data_set(int argc, VALUE *argv, VALUE self) { struct CallbackData *arg1 = (struct CallbackData *) 0 ; VALUE arg2 ; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_CallbackData, 0); arg2 = argv[0]; if (arg1) (arg1)->data = arg2; - + return Qnil; } @@ -1243,12 +1243,12 @@ _wrap_CallbackData_data_get(int argc, VALUE *argv, VALUE self) { struct CallbackData *arg1 = (struct CallbackData *) 0 ; VALUE result; VALUE vresult = Qnil; - + if ((argc < 0) || (argc > 0)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_CallbackData, 0); result = (VALUE) ((arg1)->data); - + vresult = result; return vresult; } @@ -1261,25 +1261,25 @@ _wrap_CallbackData_allocate(VALUE self) { static VALUE _wrap_CallbackData_allocate(int argc, VALUE *argv, VALUE self) { #endif - - + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CallbackData); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } - + static VALUE _wrap_new_CallbackData(int argc, VALUE *argv, VALUE self) { struct CallbackData *result; - + if ((argc < 0) || (argc > 0)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); result = (struct CallbackData *)(struct CallbackData *) calloc(1, sizeof(struct CallbackData)); DATA_PTR(self) = result; - + return self; } @@ -1293,11 +1293,11 @@ static VALUE _wrap_sqlite3_libversion(int argc, VALUE *argv, VALUE self) { char *result; VALUE vresult = Qnil; - + if ((argc < 0) || (argc > 0)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); result = (char *)sqlite3_libversion(); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -1310,12 +1310,12 @@ _wrap_sqlite3_close(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = (int)sqlite3_close(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1326,12 +1326,12 @@ _wrap_sqlite3_last_insert_rowid(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; sqlite_int64 result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = sqlite3_last_insert_rowid(arg1); - + { vresult = rb_ll2inum( result ); } @@ -1344,12 +1344,12 @@ _wrap_sqlite3_changes(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = (int)sqlite3_changes(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1360,12 +1360,12 @@ _wrap_sqlite3_total_changes(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = (int)sqlite3_total_changes(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1374,12 +1374,12 @@ _wrap_sqlite3_total_changes(int argc, VALUE *argv, VALUE self) { static VALUE _wrap_sqlite3_interrupt(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); sqlite3_interrupt(arg1); - + return Qnil; } @@ -1389,12 +1389,12 @@ _wrap_sqlite3_complete(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); arg1 = StringValuePtr(argv[0]); result = (int)sqlite3_complete((char const *)arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1405,14 +1405,14 @@ _wrap_sqlite3_complete16(int argc, VALUE *argv, VALUE self) { void *arg1 = (void *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); { arg1 = (void*)RSTRING(argv[0])->ptr; } result = (int)sqlite3_complete16((void const *)arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1425,14 +1425,14 @@ _wrap_sqlite3_busy_handler(int argc, VALUE *argv, VALUE self) { void *arg3 = (void *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_f_p_void_int__int, 0); SWIG_ConvertPtr(argv[2], (void **) &arg3, 0, SWIG_POINTER_EXCEPTION|0); result = (int)sqlite3_busy_handler(arg1,arg2,arg3); - + vresult = INT2NUM(result); return vresult; } @@ -1444,13 +1444,13 @@ _wrap_sqlite3_busy_timeout(int argc, VALUE *argv, VALUE self) { int arg2 ; int result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); arg2 = NUM2INT(argv[1]); result = (int)sqlite3_busy_timeout(arg1,arg2); - + vresult = INT2NUM(result); return vresult; } @@ -1463,14 +1463,14 @@ _wrap_sqlite3_set_authorizer(int argc, VALUE *argv, VALUE self) { void *arg3 = (void *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int, 0); SWIG_ConvertPtr(argv[2], (void **) &arg3, 0, SWIG_POINTER_EXCEPTION|0); result = (int)sqlite3_set_authorizer(arg1,arg2,arg3); - + vresult = INT2NUM(result); return vresult; } @@ -1483,14 +1483,14 @@ _wrap_sqlite3_trace(int argc, VALUE *argv, VALUE self) { void *arg3 = (void *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_f_p_void_p_q_const__char__void, 0); SWIG_ConvertPtr(argv[2], (void **) &arg3, 0, SWIG_POINTER_EXCEPTION|0); result = (int)sqlite3_trace(arg1,arg2,arg3); - + vresult = INT2NUM(result); return vresult; } @@ -1502,7 +1502,7 @@ _wrap_sqlite3_open(int argc, VALUE *argv, VALUE self) { sqlite3 **arg2 = (sqlite3 **) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); { @@ -1510,7 +1510,7 @@ _wrap_sqlite3_open(int argc, VALUE *argv, VALUE self) { arg2 = (sqlite3**)malloc( sizeof( sqlite3* ) ); } result = (int)sqlite3_open((char const *)arg1,arg2); - + vresult = INT2NUM(result); { VALUE ary; @@ -1530,7 +1530,7 @@ _wrap_sqlite3_open16(int argc, VALUE *argv, VALUE self) { sqlite3 **arg2 = (sqlite3 **) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); { @@ -1538,7 +1538,7 @@ _wrap_sqlite3_open16(int argc, VALUE *argv, VALUE self) { arg2 = (sqlite3**)malloc( sizeof( sqlite3* ) ); } result = (int)sqlite3_open16((void const *)arg1,arg2); - + vresult = INT2NUM(result); { VALUE ary; @@ -1557,12 +1557,12 @@ _wrap_sqlite3_errcode(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = (int)sqlite3_errcode(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1573,12 +1573,12 @@ _wrap_sqlite3_errmsg(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; char *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = (char *)sqlite3_errmsg(arg1); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -1591,12 +1591,12 @@ _wrap_sqlite3_errmsg16(int argc, VALUE *argv, VALUE self) { sqlite3 *arg1 = (sqlite3 *) 0 ; void *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); result = (void *)sqlite3_errmsg16(arg1); - + { int i; if( result ) { @@ -1619,7 +1619,7 @@ _wrap_sqlite3_prepare(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *stmt2 ; char *errmsg2 ; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); @@ -1630,7 +1630,7 @@ _wrap_sqlite3_prepare(int argc, VALUE *argv, VALUE self) { arg5 = &errmsg2; } result = (int)sqlite3_prepare(arg1,(char const *)arg2,arg3,arg4,(char const **)arg5); - + vresult = INT2NUM(result); { VALUE ary; @@ -1655,7 +1655,7 @@ _wrap_sqlite3_prepare16(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *stmt2 ; void *errmsg2 ; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); @@ -1666,14 +1666,14 @@ _wrap_sqlite3_prepare16(int argc, VALUE *argv, VALUE self) { arg5 = &errmsg2; } result = (int)sqlite3_prepare16(arg1,(void const *)arg2,arg3,arg4,(void const **)arg5); - + vresult = INT2NUM(result); { VALUE ary; int i; - + for( i = 0; ((char*)errmsg2)[i]; i += 2 ); - + ary = rb_ary_new2(3); rb_ary_push( ary, vresult ); rb_ary_push( ary, SWIG_NewPointerObj( stmt2, SWIGTYPE_p_sqlite3_stmt, 0 ) ); @@ -1693,7 +1693,7 @@ _wrap_sqlite3_bind_blob(int argc, VALUE *argv, VALUE self) { void (*arg5)(void *) = (void (*)(void *)) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); @@ -1704,7 +1704,7 @@ _wrap_sqlite3_bind_blob(int argc, VALUE *argv, VALUE self) { arg5 = SQLITE_TRANSIENT; } result = (int)sqlite3_bind_blob(arg1,arg2,(void const *)arg3,arg4,arg5); - + vresult = INT2NUM(result); return vresult; } @@ -1717,14 +1717,14 @@ _wrap_sqlite3_bind_double(int argc, VALUE *argv, VALUE self) { double arg3 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); arg3 = (double) NUM2DBL(argv[2]); result = (int)sqlite3_bind_double(arg1,arg2,arg3); - + vresult = INT2NUM(result); return vresult; } @@ -1737,14 +1737,14 @@ _wrap_sqlite3_bind_int(int argc, VALUE *argv, VALUE self) { int arg3 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); arg3 = NUM2INT(argv[2]); result = (int)sqlite3_bind_int(arg1,arg2,arg3); - + vresult = INT2NUM(result); return vresult; } @@ -1757,7 +1757,7 @@ _wrap_sqlite3_bind_int64(int argc, VALUE *argv, VALUE self) { sqlite_int64 arg3 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); @@ -1766,7 +1766,7 @@ _wrap_sqlite3_bind_int64(int argc, VALUE *argv, VALUE self) { arg3 = rb_big2ll( argv[2] ); } result = (int)sqlite3_bind_int64(arg1,arg2,arg3); - + vresult = INT2NUM(result); return vresult; } @@ -1778,13 +1778,13 @@ _wrap_sqlite3_bind_null(int argc, VALUE *argv, VALUE self) { int arg2 ; int result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (int)sqlite3_bind_null(arg1,arg2); - + vresult = INT2NUM(result); return vresult; } @@ -1799,7 +1799,7 @@ _wrap_sqlite3_bind_text(int argc, VALUE *argv, VALUE self) { void (*arg5)(void *) = (void (*)(void *)) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); @@ -1810,7 +1810,7 @@ _wrap_sqlite3_bind_text(int argc, VALUE *argv, VALUE self) { arg5 = SQLITE_TRANSIENT; } result = (int)sqlite3_bind_text(arg1,arg2,(char const *)arg3,arg4,arg5); - + vresult = INT2NUM(result); return vresult; } @@ -1825,7 +1825,7 @@ _wrap_sqlite3_bind_text16(int argc, VALUE *argv, VALUE self) { void (*arg5)(void *) = (void (*)(void *)) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); @@ -1836,7 +1836,7 @@ _wrap_sqlite3_bind_text16(int argc, VALUE *argv, VALUE self) { arg5 = SQLITE_TRANSIENT; } result = (int)sqlite3_bind_text16(arg1,arg2,(void const *)arg3,arg4,arg5); - + vresult = INT2NUM(result); return vresult; } @@ -1847,12 +1847,12 @@ _wrap_sqlite3_bind_parameter_count(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); result = (int)sqlite3_bind_parameter_count(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1864,13 +1864,13 @@ _wrap_sqlite3_bind_parameter_name(int argc, VALUE *argv, VALUE self) { int arg2 ; char *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (char *)sqlite3_bind_parameter_name(arg1,arg2); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -1884,13 +1884,13 @@ _wrap_sqlite3_bind_parameter_index(int argc, VALUE *argv, VALUE self) { char *arg2 = (char *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = StringValuePtr(argv[1]); result = (int)sqlite3_bind_parameter_index(arg1,(char const *)arg2); - + vresult = INT2NUM(result); return vresult; } @@ -1901,12 +1901,12 @@ _wrap_sqlite3_column_count(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); result = (int)sqlite3_column_count(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -1918,13 +1918,13 @@ _wrap_sqlite3_column_name(int argc, VALUE *argv, VALUE self) { int arg2 ; char *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (char *)sqlite3_column_name(arg1,arg2); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -1938,13 +1938,13 @@ _wrap_sqlite3_column_name16(int argc, VALUE *argv, VALUE self) { int arg2 ; void *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (void *)sqlite3_column_name16(arg1,arg2); - + { int i; if( result ) { @@ -1962,13 +1962,13 @@ _wrap_sqlite3_column_decltype(int argc, VALUE *argv, VALUE self) { int arg2 ; char *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (char *)sqlite3_column_decltype(arg1,arg2); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -1982,13 +1982,13 @@ _wrap_sqlite3_column_decltype16(int argc, VALUE *argv, VALUE self) { int arg2 ; void *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (void *)sqlite3_column_decltype16(arg1,arg2); - + { int i; if( result ) { @@ -2005,12 +2005,12 @@ _wrap_sqlite3_step(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); result = (int)sqlite3_step(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2021,12 +2021,12 @@ _wrap_sqlite3_data_count(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); result = (int)sqlite3_data_count(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2038,13 +2038,13 @@ _wrap_sqlite3_column_blob(int argc, VALUE *argv, VALUE self) { int arg2 ; BLOB *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (BLOB *)sqlite3_column_blob(arg1,arg2); - + { vresult = result ? rb_str_new( (char*)result, sqlite3_column_bytes( arg1, arg2 ) ) : Qnil; @@ -2059,13 +2059,13 @@ _wrap_sqlite3_column_bytes(int argc, VALUE *argv, VALUE self) { int arg2 ; int result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (int)sqlite3_column_bytes(arg1,arg2); - + vresult = INT2NUM(result); return vresult; } @@ -2077,13 +2077,13 @@ _wrap_sqlite3_column_bytes16(int argc, VALUE *argv, VALUE self) { int arg2 ; int result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (int)sqlite3_column_bytes16(arg1,arg2); - + vresult = INT2NUM(result); return vresult; } @@ -2095,13 +2095,13 @@ _wrap_sqlite3_column_double(int argc, VALUE *argv, VALUE self) { int arg2 ; double result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (double)sqlite3_column_double(arg1,arg2); - + vresult = rb_float_new(result); return vresult; } @@ -2113,13 +2113,13 @@ _wrap_sqlite3_column_int(int argc, VALUE *argv, VALUE self) { int arg2 ; double result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (double)sqlite3_column_int(arg1,arg2); - + vresult = rb_float_new(result); return vresult; } @@ -2131,13 +2131,13 @@ _wrap_sqlite3_column_int64(int argc, VALUE *argv, VALUE self) { int arg2 ; sqlite_int64 result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = sqlite3_column_int64(arg1,arg2); - + { vresult = rb_ll2inum( result ); } @@ -2151,13 +2151,13 @@ _wrap_sqlite3_column_text(int argc, VALUE *argv, VALUE self) { int arg2 ; char *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (char *)sqlite3_column_text(arg1,arg2); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -2171,13 +2171,13 @@ _wrap_sqlite3_column_text16(int argc, VALUE *argv, VALUE self) { int arg2 ; void *result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (void *)sqlite3_column_text16(arg1,arg2); - + { int i; if( result ) { @@ -2195,13 +2195,13 @@ _wrap_sqlite3_column_type(int argc, VALUE *argv, VALUE self) { int arg2 ; int result; VALUE vresult = Qnil; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); arg2 = NUM2INT(argv[1]); result = (int)sqlite3_column_type(arg1,arg2); - + vresult = INT2NUM(result); return vresult; } @@ -2212,12 +2212,12 @@ _wrap_sqlite3_finalize(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); result = (int)sqlite3_finalize(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2228,12 +2228,12 @@ _wrap_sqlite3_reset(int argc, VALUE *argv, VALUE self) { sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_stmt, 0); result = (int)sqlite3_reset(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2251,7 +2251,7 @@ _wrap_sqlite3_create_function(int argc, VALUE *argv, VALUE self) { void (*arg8)(sqlite3_context *) = (void (*)(sqlite3_context *)) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 8) || (argc > 8)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); @@ -2263,7 +2263,7 @@ _wrap_sqlite3_create_function(int argc, VALUE *argv, VALUE self) { SWIG_ConvertPtr(argv[6], (void **) &arg7, SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void, 0); SWIG_ConvertPtr(argv[7], (void **) &arg8, SWIGTYPE_p_f_p_sqlite3_context__void, 0); result = (int)sqlite3_create_function(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8); - + vresult = INT2NUM(result); return vresult; } @@ -2281,7 +2281,7 @@ _wrap_sqlite3_create_function16(int argc, VALUE *argv, VALUE self) { void (*arg8)(sqlite3_context *) = (void (*)(sqlite3_context *)) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 8) || (argc > 8)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3, 0); @@ -2295,7 +2295,7 @@ _wrap_sqlite3_create_function16(int argc, VALUE *argv, VALUE self) { SWIG_ConvertPtr(argv[6], (void **) &arg7, SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void, 0); SWIG_ConvertPtr(argv[7], (void **) &arg8, SWIGTYPE_p_f_p_sqlite3_context__void, 0); result = (int)sqlite3_create_function16(arg1,(void const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8); - + vresult = INT2NUM(result); return vresult; } @@ -2306,12 +2306,12 @@ _wrap_sqlite3_aggregate_count(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); result = (int)sqlite3_aggregate_count(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2322,12 +2322,12 @@ _wrap_sqlite3_value_blob(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; VALBLOB *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (VALBLOB *)sqlite3_value_blob(arg1); - + { vresult = result ? rb_str_new( (char*)result, sqlite3_value_bytes( arg1 ) ) : Qnil; } @@ -2340,12 +2340,12 @@ _wrap_sqlite3_value_bytes(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (int)sqlite3_value_bytes(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2356,12 +2356,12 @@ _wrap_sqlite3_value_bytes16(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (int)sqlite3_value_bytes16(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2372,12 +2372,12 @@ _wrap_sqlite3_value_double(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; double result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (double)sqlite3_value_double(arg1); - + vresult = rb_float_new(result); return vresult; } @@ -2388,12 +2388,12 @@ _wrap_sqlite3_value_int(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (int)sqlite3_value_int(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2404,12 +2404,12 @@ _wrap_sqlite3_value_int64(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; sqlite_int64 result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = sqlite3_value_int64(arg1); - + { vresult = rb_ll2inum( result ); } @@ -2422,12 +2422,12 @@ _wrap_sqlite3_value_text(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; char *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (char *)sqlite3_value_text(arg1); - + { vresult = result ? rb_str_new2(result) : Qnil; } @@ -2440,12 +2440,12 @@ _wrap_sqlite3_value_text16(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; void *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (void *)sqlite3_value_text16(arg1); - + { int i; if( result ) { @@ -2462,12 +2462,12 @@ _wrap_sqlite3_value_text16le(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; void *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (void *)sqlite3_value_text16le(arg1); - + { int i; if( result ) { @@ -2484,12 +2484,12 @@ _wrap_sqlite3_value_text16be(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; void *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (void *)sqlite3_value_text16be(arg1); - + { int i; if( result ) { @@ -2506,12 +2506,12 @@ _wrap_sqlite3_value_type(int argc, VALUE *argv, VALUE self) { sqlite3_value *arg1 = (sqlite3_value *) 0 ; int result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_value, 0); result = (int)sqlite3_value_type(arg1); - + vresult = INT2NUM(result); return vresult; } @@ -2523,7 +2523,7 @@ _wrap_sqlite3_result_blob(int argc, VALUE *argv, VALUE self) { void *arg2 = (void *) 0 ; int arg3 ; void (*arg4)(void *) = (void (*)(void *)) 0 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2533,7 +2533,7 @@ _wrap_sqlite3_result_blob(int argc, VALUE *argv, VALUE self) { arg4 = SQLITE_TRANSIENT; } sqlite3_result_blob(arg1,(void const *)arg2,arg3,arg4); - + return Qnil; } @@ -2542,13 +2542,13 @@ static VALUE _wrap_sqlite3_result_double(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; double arg2 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); arg2 = (double) NUM2DBL(argv[1]); sqlite3_result_double(arg1,arg2); - + return Qnil; } @@ -2558,7 +2558,7 @@ _wrap_sqlite3_result_error(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2567,7 +2567,7 @@ _wrap_sqlite3_result_error(int argc, VALUE *argv, VALUE self) { arg3 = RSTRING(argv[1])->len; } sqlite3_result_error(arg1,(char const *)arg2,arg3); - + return Qnil; } @@ -2577,7 +2577,7 @@ _wrap_sqlite3_result_error16(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; void *arg2 = (void *) 0 ; int arg3 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2586,7 +2586,7 @@ _wrap_sqlite3_result_error16(int argc, VALUE *argv, VALUE self) { arg3 = RSTRING(argv[1])->len; } sqlite3_result_error16(arg1,(void const *)arg2,arg3); - + return Qnil; } @@ -2595,13 +2595,13 @@ static VALUE _wrap_sqlite3_result_int(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; int arg2 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); arg2 = NUM2INT(argv[1]); sqlite3_result_int(arg1,arg2); - + return Qnil; } @@ -2610,7 +2610,7 @@ static VALUE _wrap_sqlite3_result_int64(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; sqlite_int64 arg2 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2618,7 +2618,7 @@ _wrap_sqlite3_result_int64(int argc, VALUE *argv, VALUE self) { arg2 = rb_big2ll( argv[1] ); } sqlite3_result_int64(arg1,arg2); - + return Qnil; } @@ -2629,7 +2629,7 @@ _wrap_sqlite3_result_text(int argc, VALUE *argv, VALUE self) { char *arg2 = (char *) 0 ; int arg3 ; void (*arg4)(void *) = (void (*)(void *)) 0 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2639,7 +2639,7 @@ _wrap_sqlite3_result_text(int argc, VALUE *argv, VALUE self) { arg4 = SQLITE_TRANSIENT; } sqlite3_result_text(arg1,(char const *)arg2,arg3,arg4); - + return Qnil; } @@ -2650,7 +2650,7 @@ _wrap_sqlite3_result_text16(int argc, VALUE *argv, VALUE self) { void *arg2 = (void *) 0 ; int arg3 ; void (*arg4)(void *) = (void (*)(void *)) 0 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2660,7 +2660,7 @@ _wrap_sqlite3_result_text16(int argc, VALUE *argv, VALUE self) { arg4 = SQLITE_TRANSIENT; } sqlite3_result_text16(arg1,(void const *)arg2,arg3,arg4); - + return Qnil; } @@ -2671,7 +2671,7 @@ _wrap_sqlite3_result_text16le(int argc, VALUE *argv, VALUE self) { void *arg2 = (void *) 0 ; int arg3 ; void (*arg4)(void *) = (void (*)(void *)) 0 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2681,7 +2681,7 @@ _wrap_sqlite3_result_text16le(int argc, VALUE *argv, VALUE self) { arg4 = SQLITE_TRANSIENT; } sqlite3_result_text16le(arg1,(void const *)arg2,arg3,arg4); - + return Qnil; } @@ -2692,7 +2692,7 @@ _wrap_sqlite3_result_text16be(int argc, VALUE *argv, VALUE self) { void *arg2 = (void *) 0 ; int arg3 ; void (*arg4)(void *) = (void (*)(void *)) 0 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); @@ -2702,7 +2702,7 @@ _wrap_sqlite3_result_text16be(int argc, VALUE *argv, VALUE self) { arg4 = SQLITE_TRANSIENT; } sqlite3_result_text16be(arg1,(void const *)arg2,arg3,arg4); - + return Qnil; } @@ -2711,13 +2711,13 @@ static VALUE _wrap_sqlite3_result_value(int argc, VALUE *argv, VALUE self) { sqlite3_context *arg1 = (sqlite3_context *) 0 ; sqlite3_value *arg2 = (sqlite3_value *) 0 ; - + if ((argc < 2) || (argc > 2)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sqlite3_context, 0); SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_sqlite3_value, 0); sqlite3_result_value(arg1,arg2); - + return Qnil; } @@ -2728,7 +2728,7 @@ _wrap_sqlite3_aggregate_context(int argc, VALUE *argv, VALUE self) { int arg2 ; VALUE *result; VALUE vresult = Qnil; - + if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); { @@ -2736,7 +2736,7 @@ _wrap_sqlite3_aggregate_context(int argc, VALUE *argv, VALUE self) { arg2 = 4; } result = (VALUE *)sqlite3_aggregate_context(arg1,arg2); - + { vresult = *(VALUE*)result; } @@ -2832,18 +2832,18 @@ static swig_cast_info *swig_cast_initial[] = { /************************************************************************* * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop though that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the @@ -2853,17 +2853,17 @@ static swig_cast_info *swig_cast_initial[] = { * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -2902,7 +2902,7 @@ SWIG_InitializeModule(void *clientdata) { swig_module.next = &swig_module; SWIG_SetModule(clientdata, &swig_module); } - + /* Now work on filling in swig_module.types */ for (i = 0; i < swig_module.size; ++i) { type = 0; @@ -2921,7 +2921,7 @@ SWIG_InitializeModule(void *clientdata) { /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { - + /* Don't need to add information already in the list */ ret = 0; if (swig_module.next != &swig_module) { @@ -2931,7 +2931,7 @@ SWIG_InitializeModule(void *clientdata) { cast->type = ret; ret = 0; } - + if (!ret) { if (type->cast) { type->cast->prev = cast; @@ -2987,20 +2987,20 @@ extern "C" #endif SWIGEXPORT void Init_API(void) { size_t i; - + SWIG_InitRuntime(); mAPI = rb_define_module("SQLite3"); mAPI = rb_define_module_under(mAPI, "Driver"); mAPI = rb_define_module_under(mAPI, "Native"); mAPI = rb_define_module_under(mAPI, "API"); - + SWIG_InitializeModule(0); for (i = 0; i < swig_module.size; i++) { SWIG_define_class(swig_module.types[i]); } - + SWIG_RubyInitializeTrackings(); - + cCallbackData.klass = rb_define_class_under(mAPI, "CallbackData", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_CallbackData, (void *) &cCallbackData); rb_define_alloc_func(cCallbackData.klass, _wrap_CallbackData_allocate); diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3.rb index ff8af02..7e8996f 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/constants.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/constants.rb index 5a20e46..3493d21 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/constants.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/constants.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb index 6a130f9..3ab3860 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -269,7 +269,7 @@ def execute_batch( sql, *bind_vars ) # # You must be sure to call +close+ on the ResultSet instance that is # returned, or you could have problems with locks on the table. If called - # with a block, +close+ will be invoked implicitly when the block + # with a block, +close+ will be invoked implicitly when the block # terminates. def query( sql, *bind_vars ) result = prepare( sql ).execute( *bind_vars ) diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/api.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/api.rb index 9cea866..002fa4f 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/api.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/api.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/driver.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/driver.rb index ac72e0d..4db5a6b 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/driver.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/dl/driver.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/native/driver.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/native/driver.rb index cef0cdc..69236d9 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/native/driver.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/driver/native/driver.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -53,7 +53,7 @@ def busy_handler( db, data=nil, &block ) cb.proc = block cb.data = data result = API.sqlite3_busy_handler( db, API::Sqlite3_ruby_busy_handler, cb ) - # Reference the Callback object so that + # Reference the Callback object so that # it is not deleted by the GC @busy_handler[db] = cb else diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb index f83adc5..c362f8c 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/pragmas.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/pragmas.rb index 20b3180..eb038de 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/pragmas.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/pragmas.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -196,7 +196,7 @@ def default_temp_store def default_temp_store=( mode ) set_enum_pragma "default_temp_store", mode, TEMP_STORE_MODES end - + def temp_store get_enum_pragma "temp_store" end @@ -212,7 +212,7 @@ def full_column_names def full_column_names=( mode ) set_boolean_pragma "full_column_names", mode end - + def parser_trace get_boolean_pragma "parser_trace" end @@ -220,7 +220,7 @@ def parser_trace def parser_trace=( mode ) set_boolean_pragma "parser_trace", mode end - + def vdbe_trace get_boolean_pragma "vdbe_trace" end diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb index ed2cb58..2852c9d 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb index 09f24d9..e01e82f 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/translator.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/translator.rb index 14d28b6..6e6ea60 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/translator.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/translator.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/value.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/value.rb index fb76376..5dd1c9c 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/value.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/value.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -83,7 +83,7 @@ def type when Constants::ColumnType::NULL then :null end end - + end end diff --git a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/version.rb b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/version.rb index 2398c0a..3c73747 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/version.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/lib/sqlite3/version.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/test/driver/dl/tc_driver.rb b/vendor/gems/sqlite3-ruby-1.2.1/test/driver/dl/tc_driver.rb index b8a4680..b9b19dd 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/test/driver/dl/tc_driver.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/test/driver/dl/tc_driver.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/test/mocks.rb b/vendor/gems/sqlite3-ruby-1.2.1/test/mocks.rb index 4a1d753..5944277 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/test/mocks.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/test/mocks.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/test/tc_database.rb b/vendor/gems/sqlite3-ruby-1.2.1/test/tc_database.rb index 1aa2400..dec2145 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/test/tc_database.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/test/tc_database.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -55,19 +55,19 @@ def test_open assert !db.results_as_hash assert !db.type_translation end - + def test_with_type_translation db = SQLite3::Database.open( "foo.db", :driver => Driver, :type_translation => true ) assert db.type_translation end - + def test_with_results_as_hash db = SQLite3::Database.open( "foo.db", :driver => Driver, :results_as_hash => true ) assert db.results_as_hash end - + def test_with_type_translation_and_results_as_hash db = SQLite3::Database.open( "foo.db", :driver => Driver, :results_as_hash => true, diff --git a/vendor/gems/sqlite3-ruby-1.2.1/test/tc_errors.rb b/vendor/gems/sqlite3-ruby-1.2.1/test/tc_errors.rb index cb3ecc5..3c3385d 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/test/tc_errors.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/test/tc_errors.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/vendor/gems/sqlite3-ruby-1.2.1/test/tc_integration.rb b/vendor/gems/sqlite3-ruby-1.2.1/test/tc_integration.rb index 9d78313..a2db8de 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/test/tc_integration.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/test/tc_integration.rb @@ -27,8 +27,8 @@ module Integration # == TC_OpenClose ========================================================= - test_case = Class.new( Test::Unit::TestCase ) do - define_method( "test_create_close" ) do + test_case = Class.new( Test::Unit::TestCase ) do + define_method( "test_create_close" ) do begin db = SQLite3::Database.new( "test-create.db", :driver => driver ) @@ -39,7 +39,7 @@ module Integration end end - define_method( "test_open_close" ) do + define_method( "test_open_close" ) do begin File.open( "test-open.db", "w" ) { |f| } assert File.exist?( "test-open.db" ) @@ -51,7 +51,7 @@ module Integration end end - define_method( "test_bad_open" ) do + define_method( "test_bad_open" ) do assert_raise( SQLite3::CantOpenException ) do SQLite3::Database.new( ".", :driver => driver ) end @@ -61,7 +61,7 @@ module Integration # == TC_Database ========================================================== - test_case = Class.new( Test::Unit::TestCase ) do + test_case = Class.new( Test::Unit::TestCase ) do define_method( "setup" ) do @db = SQLite3::Database.new( "test.db", :driver=>driver ) @db.transaction do @@ -244,7 +244,7 @@ module Integration assert [ "a", "b" ], row unless called == 0 called += 1 end - assert_equal 1, called + assert_equal 1, called end define_method( "test_execute2_no_block_with_bind_no_match" ) do @@ -679,7 +679,7 @@ class << self # == TC_Statement ========================================================= - test_case = Class.new( Test::Unit::TestCase ) do + test_case = Class.new( Test::Unit::TestCase ) do define_method( "setup" ) do @db = SQLite3::Database.new( "test.db", :driver=>driver ) @db.transaction do @@ -876,7 +876,7 @@ class << self # == TC_ResultSet ========================================================= - test_case = Class.new( Test::Unit::TestCase ) do + test_case = Class.new( Test::Unit::TestCase ) do define_method( "setup" ) do @db = SQLite3::Database.new( "test.db", :driver=>driver ) @db.transaction do diff --git a/vendor/gems/sqlite3-ruby-1.2.1/test/tests.rb b/vendor/gems/sqlite3-ruby-1.2.1/test/tests.rb index 3bded2c..0910503 100644 --- a/vendor/gems/sqlite3-ruby-1.2.1/test/tests.rb +++ b/vendor/gems/sqlite3-ruby-1.2.1/test/tests.rb @@ -2,21 +2,21 @@ # ============================================================================= # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu) # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # * The names of its contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE diff --git a/vendor/plugins/jrails/LICENSE b/vendor/plugins/jrails/LICENSE index 66afde4..fa23999 100644 --- a/vendor/plugins/jrails/LICENSE +++ b/vendor/plugins/jrails/LICENSE @@ -1,15 +1,15 @@ Copyright (c) 2008 Aaron Eisenberger - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR diff --git a/vendor/plugins/jrails/VERSION.yml b/vendor/plugins/jrails/VERSION.yml index 60695f5..a89a6ed 100644 --- a/vendor/plugins/jrails/VERSION.yml +++ b/vendor/plugins/jrails/VERSION.yml @@ -1,5 +1,5 @@ ---- -:build: +--- +:build: :patch: 0 :major: 0 :minor: 6 diff --git a/vendor/plugins/jrails/lib/jquery_selector_assertions.rb b/vendor/plugins/jrails/lib/jquery_selector_assertions.rb index bdba57b..38713f4 100644 --- a/vendor/plugins/jrails/lib/jquery_selector_assertions.rb +++ b/vendor/plugins/jrails/lib/jquery_selector_assertions.rb @@ -7,9 +7,9 @@ # like this: # assert_select_rjs :replace_html, '#someid' # instead of prototype convention: -# assert_select_rjs :replace_html, 'someid' +# assert_select_rjs :replace_html, 'someid' # -# We monkey-patch some RJS-matching constants for assert_select_rjs to work +# We monkey-patch some RJS-matching constants for assert_select_rjs to work # with jQuery-based code as opposed to Prototype's: # module ActionController @@ -20,7 +20,7 @@ module SelectorAssertions # RJS_ANY_ID = "\"([^\"])*\"" # better match with single or double quoted ids RJS_ANY_ID = "[\"']([^\"])*[\"']" - + RJS_STATEMENTS = { :chained_replace => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.replaceWith\\(#{RJS_PATTERN_HTML}\\)", :chained_replace_html => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.updateWith\\(#{RJS_PATTERN_HTML}\\)", @@ -30,24 +30,24 @@ module SelectorAssertions :insert_bottom => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.append\\(#{RJS_PATTERN_HTML}\\)", :effect => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\(", :highlight => "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.effect\\('highlight'" - -=begin TODO: + +=begin TODO: I've never used the chained_* so I don't know if they work. I couldn't seem to get assert_select_rjs to actually match the single quoted ids -which are created by some of the effects like ... +which are created by some of the effects like ... ... jQuery('#item_1559').effect('highlight',{},1000); -so I modified jrails/lib/jrails.rb line 337 +so I modified jrails/lib/jrails.rb line 337 ... javascript = "#{JQUERY_VAR}('#{jquery_id(element_id)}').#{mode || 'effect'}('#{name}'" to ... javascript = "#{JQUERY_VAR}(\"#{jquery_id(element_id)}\").#{mode || 'effect'}('#{name}'" -so it writes double quotes like most of the others. This change should probably be +so it writes double quotes like most of the others. This change should probably be done to the others, but as I don't use them so haven't tested them. My other option seemed to require modifying rails' selector_assertions.rb line 427 ... id ? statement.gsub(RJS_ANY_ID, "\"#{id}\"") : statement -which forces the expectation that the id is double quoted. If I changed it to +which forces the expectation that the id is double quoted. If I changed it to ... statement.gsub(RJS_ANY_ID, "[\"']{1}#{id}[\"']{1}") I believe that it would work as the logic seemed to work in some testing. I have not actually tried to modify rails, as this file doesn't seem to @@ -59,17 +59,17 @@ module SelectorAssertions :insert_after => "", :insert_before => "", =end - + } - + [:remove, :show, :hide, :toggle, :reset ].each do |action| RJS_STATEMENTS[action] = "\(jQuery|$\)\\(#{RJS_ANY_ID}\\)\\.#{action}\\(\\)" end - - # TODO: - #RJS_STATEMENTS[:insert_html] = "Element.insert\\(#{RJS_ANY_ID}, \\{ (#{RJS_INSERTIONS.join('|')}): + + # TODO: + #RJS_STATEMENTS[:insert_html] = "Element.insert\\(#{RJS_ANY_ID}, \\{ (#{RJS_INSERTIONS.join('|')}): #{RJS_PATTERN_HTML} \\}\\)" - + RJS_STATEMENTS[:any] = Regexp.new("(#{RJS_STATEMENTS.values.join('|')})") RJS_PATTERN_UNICODE_ESCAPED_CHAR = /\\u([0-9a-zA-Z]{4})/ end diff --git a/vendor/plugins/jrails/lib/jrails.rb b/vendor/plugins/jrails/lib/jrails.rb index 11935bb..98a2306 100644 --- a/vendor/plugins/jrails/lib/jrails.rb +++ b/vendor/plugins/jrails/lib/jrails.rb @@ -1,8 +1,8 @@ module ActionView module Helpers - + module JavaScriptHelper - + # This function can be used to render rjs inline # # <%= javascript_function do |page| @@ -17,25 +17,25 @@ def javascript_function(*args, &block) function = update_page(&block) if block_given? javascript_tag(function) end - + def jquery_id(id) id.to_s.count('#.*,>+~:[/ ') == 0 ? "##{id}" : id end - + def jquery_ids(ids) Array(ids).map{|id| jquery_id(id)}.join(',') end end - + module PrototypeHelper - + USE_PROTECTION = const_defined?(:DISABLE_JQUERY_FORGERY_PROTECTION) ? !DISABLE_JQUERY_FORGERY_PROTECTION : true unless const_defined? :JQUERY_VAR JQUERY_VAR = 'jQuery' end - + unless const_defined? :JQCALLBACKS JQCALLBACKS = Set.new([ :beforeSend, :complete, :error, :success ] + (100..599).to_a) #instance_eval { remove_const :AJAX_OPTIONS } @@ -44,13 +44,13 @@ module PrototypeHelper :asynchronous, :method, :insertion, :position, :form, :with, :update, :script ]).merge(JQCALLBACKS) end - + def periodically_call_remote(options = {}) frequency = options[:frequency] || 10 # every ten seconds by default code = "setInterval(function() {#{remote_function(options)}}, #{frequency} * 1000)" javascript_tag(code) end - + def remote_function(options) javascript_options = options_for_ajax(options) @@ -72,33 +72,33 @@ def remote_function(options) function = "if (confirm('#{escape_javascript(options[:confirm])}')) { #{function}; }" if options[:confirm] return function end - + class JavaScriptGenerator module GeneratorMethods - + def insert_html(position, id, *options_for_render) insertion = position.to_s.downcase insertion = 'append' if insertion == 'bottom' insertion = 'prepend' if insertion == 'top' call "#{JQUERY_VAR}(\"#{jquery_id(id)}\").#{insertion}", render(*options_for_render) end - + def replace_html(id, *options_for_render) insert_html(:html, id, *options_for_render) end - + def replace(id, *options_for_render) call "#{JQUERY_VAR}(\"#{jquery_id(id)}\").replaceWith", render(*options_for_render) end - + def remove(*ids) call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").remove" end - + def show(*ids) call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").show" end - + def hide(*ids) call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").hide" end @@ -106,29 +106,29 @@ def hide(*ids) def toggle(*ids) call "#{JQUERY_VAR}(\"#{jquery_ids(ids)}\").toggle" end - + def jquery_id(id) id.to_s.count('#.*,>+~:[/ ') == 0 ? "##{id}" : id end - + def jquery_ids(ids) Array(ids).map{|id| jquery_id(id)}.join(',') end - + end end - + protected def options_for_ajax(options) js_options = build_callbacks(options) - + url_options = options[:url] url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash) js_options['url'] = "'#{url_for(url_options)}'" js_options['async'] = false if options[:type] == :synchronous js_options['type'] = options[:method] ? method_option_to_s(options[:method]) : ( options[:form] ? "'post'" : nil ) js_options['dataType'] = options[:datatype] ? "'#{options[:datatype]}'" : (options[:update] ? nil : "'script'") - + if options[:form] js_options['data'] = "#{JQUERY_VAR}.param(#{JQUERY_VAR}(this).serializeArray())" elsif options[:submit] @@ -136,7 +136,7 @@ def options_for_ajax(options) elsif options[:with] js_options['data'] = options[:with].gsub("Form.serialize(this.form)","#{JQUERY_VAR}.param(#{JQUERY_VAR}(this.form).serializeArray())") end - + js_options['type'] ||= "'post'" if options[:method] if method_option_to_s(options[:method]) == "'put'" || method_option_to_s(options[:method]) == "'delete'" @@ -149,7 +149,7 @@ def options_for_ajax(options) js_options['data'] << "_method=#{options[:method]}'" end end - + if USE_PROTECTION && respond_to?('protect_against_forgery?') && protect_against_forgery? if js_options['data'] js_options['data'] << " + '&" @@ -161,7 +161,7 @@ def options_for_ajax(options) js_options['data'] = "''" if js_options['type'] == "'post'" && js_options['data'].nil? options_for_javascript(js_options.reject {|key, value| value.nil?}) end - + def build_update_for_success(html_id, insertion=nil) insertion = build_insertion(insertion) "#{JQUERY_VAR}('#{jquery_id(html_id)}').#{insertion}(request);" @@ -195,7 +195,7 @@ def build_observer(klass, name, options = {}) javascript << ")" javascript_tag(javascript) end - + def build_callbacks(options) callbacks = {} options[:beforeSend] = ''; @@ -203,7 +203,7 @@ def build_callbacks(options) options[:beforeSend] << (options[key].last == ';' ? options.delete(key) : options.delete(key) << ';') if options[key] end options.delete(:beforeSend) if options[:beforeSend].blank? - options[:complete] = options.delete(:loaded) if options[:loaded] + options[:complete] = options.delete(:loaded) if options[:loaded] options[:error] = options.delete(:failure) if options[:failure] if options[:update] if options[:update].is_a?(Hash) @@ -225,21 +225,21 @@ def build_callbacks(options) end callbacks end - + end - + class JavaScriptElementProxy < JavaScriptProxy #:nodoc: - + unless const_defined? :JQUERY_VAR JQUERY_VAR = PrototypeHelper::JQUERY_VAR end - + def initialize(generator, id) id = id.to_s.count('#.*,>+~:[/ ') == 0 ? "##{id}" : id @id = id super(generator, "#{JQUERY_VAR}(\"#{id}\")") end - + def replace_html(*options_for_render) call 'html', @generator.send(:render, *options_for_render) end @@ -247,11 +247,11 @@ def replace_html(*options_for_render) def replace(*options_for_render) call 'replaceWith', @generator.send(:render, *options_for_render) end - + def reload(options_for_replace={}) replace(options_for_replace.merge({ :partial => @id.to_s.sub(/^#/,'') })) end - + def value() call 'val()' end @@ -259,26 +259,26 @@ def value() def value=(value) call 'val', value end - + end - + class JavaScriptElementCollectionProxy < JavaScriptCollectionProxy #:nodoc:\ - + unless const_defined? :JQUERY_VAR JQUERY_VAR = PrototypeHelper::JQUERY_VAR end - + def initialize(generator, pattern) super(generator, "#{JQUERY_VAR}(#{pattern.to_json})") end end - + module ScriptaculousHelper - + unless const_defined? :JQUERY_VAR JQUERY_VAR = PrototypeHelper::JQUERY_VAR end - + unless const_defined? :SCRIPTACULOUS_EFFECTS SCRIPTACULOUS_EFFECTS = { :appear => {:method => 'fadeIn'}, @@ -307,28 +307,28 @@ module ScriptaculousHelper :toggle_blind => {:method => 'blind', :mode => 'toggle', :options => {:direction => 'vertical'}}, } end - + def visual_effect(name, element_id = false, js_options = {}) element = element_id ? element_id : "this" - + if SCRIPTACULOUS_EFFECTS.has_key? name.to_sym effect = SCRIPTACULOUS_EFFECTS[name.to_sym] name = effect[:method] mode = effect[:mode] js_options = js_options.merge(effect[:options]) if effect[:options] end - + [:color, :direction, :startcolor, :endcolor].each do |option| js_options[option] = "'#{js_options[option]}'" if js_options[option] end - + if js_options.has_key? :duration speed = js_options.delete :duration speed = (speed * 1000).to_i unless speed.nil? else speed = js_options.delete :speed end - + if ['fadeIn','fadeOut','fadeToggle'].include?(name) # 090905 - Jake - changed ' to \" so it passes assert_select_rjs with an id javascript = "#{JQUERY_VAR}(\"#{jquery_id(element_id)}\").#{name}(" @@ -341,9 +341,9 @@ def visual_effect(name, element_id = false, js_options = {}) javascript << ",#{speed}" unless speed.nil? javascript << ");" end - + end - + def sortable_element_js(element_id, options = {}) #:nodoc: #convert similar attributes options[:handle] = ".#{options[:handle]}" if options[:handle] @@ -369,7 +369,7 @@ def sortable_element_js(element_id, options = {}) #:nodoc: options.delete(:axis) if options[:axis].nil? options.delete(:overlap) options.delete(:ghosting) - + if options[:onUpdate] || options[:url] if options[:format] options[:with] ||= "#{JQUERY_VAR}(this).sortable('serialize',{key:'#{element_id}[]', expression:#{options[:format]}})" @@ -377,47 +377,47 @@ def sortable_element_js(element_id, options = {}) #:nodoc: else options[:with] ||= "#{JQUERY_VAR}(this).sortable('serialize',{key:'#{element_id}[]'})" end - + options[:onUpdate] ||= "function(){" + remote_function(options) + "}" end - + options.delete_if { |key, value| PrototypeHelper::AJAX_OPTIONS.include?(key) } options[:update] = options.delete(:onUpdate) if options[:onUpdate] - + [:axis, :cancel, :containment, :cursor, :handle, :tolerance, :items, :placeholder].each do |option| options[option] = "'#{options[option]}'" if options[option] end - + options[:connectWith] = array_or_string_for_javascript(options[:connectWith]) if options[:connectWith] - + %(#{JQUERY_VAR}('#{jquery_id(element_id)}').sortable(#{options_for_javascript(options)});) end - + def draggable_element_js(element_id, options = {}) %(#{JQUERY_VAR}("#{jquery_id(element_id)}").draggable(#{options_for_javascript(options)});) end - + def drop_receiving_element_js(element_id, options = {}) #convert similar options options[:hoverClass] = options.delete(:hoverclass) if options[:hoverclass] options[:drop] = options.delete(:onDrop) if options[:onDrop] - + if options[:drop] || options[:url] options[:with] ||= "'id=' + encodeURIComponent(#{JQUERY_VAR}(ui.draggable).attr('id'))" options[:drop] ||= "function(ev, ui){" + remote_function(options) + "}" end - + options.delete_if { |key, value| PrototypeHelper::AJAX_OPTIONS.include?(key) } - options[:accept] = array_or_string_for_javascript(options[:accept]) if options[:accept] + options[:accept] = array_or_string_for_javascript(options[:accept]) if options[:accept] [:activeClass, :hoverClass, :tolerance].each do |option| options[option] = "'#{options[option]}'" if options[option] end - + %(#{JQUERY_VAR}('#{jquery_id(element_id)}').droppable(#{options_for_javascript(options)});) end - + end - + end end diff --git a/vendor/plugins/jrails/tasks/jrails.rake b/vendor/plugins/jrails/tasks/jrails.rake index b91d82b..7f3df0f 100644 --- a/vendor/plugins/jrails/tasks/jrails.rake +++ b/vendor/plugins/jrails/tasks/jrails.rake @@ -21,5 +21,5 @@ namespace :jrails do puts "files removed successfully." end end - + end diff --git a/vendor/plugins/passive_record/README.rdoc b/vendor/plugins/passive_record/README.rdoc index dad82f5..cb6d457 100644 --- a/vendor/plugins/passive_record/README.rdoc +++ b/vendor/plugins/passive_record/README.rdoc @@ -1,6 +1,6 @@ = PassiveRecord -PassiveRecord provides ActiveRecord-like behavior for static, non-database models. +PassiveRecord provides ActiveRecord-like behavior for static, non-database models. PassiveRecord was developed by {Art of Mission, Inc.}[http://artofmission.com] for Sharp Sync, a new product by {Ministry Centered Technologies}[http://www.planningcenteronline.com/] @@ -8,7 +8,7 @@ PassiveRecord was developed by {Art of Mission, Inc.}[http://artofmission.com] f Download PassiveRecord from Github: http://github.com/artofmission/passive_record -=== Install using Git Submodules: +=== Install using Git Submodules: git submodule add http://github.com/artofmission/passive_record vendor/plugins/passive_record git submodule init @@ -24,32 +24,32 @@ Download PassiveRecord from Github: http://github.com/artofmission/passive_recor define_fields :first_name, :middle_name, :last_name end -...will create a new Name model with id, address, and location attributes. +...will create a new Name model with id, address, and location attributes. class Person < PassiveRecord::Base has_many :names end - + @person = Person.new(:names => [Name.new(:first_name => "Dima", :last_name => "Dozen")]) -This would a Person object that has many names. You can now access the names hash just like you would an ActiveRecord object. +This would a Person object that has many names. You can now access the names hash just like you would an ActiveRecord object. @person.names #=> [#] - - -You can serialize a PassiveRecord object into another database object for storage: - + + +You can serialize a PassiveRecord object into another database object for storage: + class Address < PassiveRecord::Base define_fields :street, :city, :state, :postal_code, :country end - + class Company < ActiveRecord serialize :address end - + @company.address = Address.new(:street1 => "123 4th St", :city => "Wellington", :country => "NZ") -== Resources for Non-ActiveRecord models +== Resources for Non-ActiveRecord models * http://railscasts.com/episodes/121-non-active-record-model diff --git a/vendor/plugins/passive_record/lib/passive_record.rb b/vendor/plugins/passive_record/lib/passive_record.rb index 209af6a..2a70dc7 100644 --- a/vendor/plugins/passive_record/lib/passive_record.rb +++ b/vendor/plugins/passive_record/lib/passive_record.rb @@ -1,14 +1,14 @@ module PassiveRecord class Base - + # Assign values to each of the attributes passed in the params hash def initialize(params = {}) params.each { |k, v| send("#{k}=", v)} end - - # Date accessors to be consistent with ActiveRecord: + + # Date accessors to be consistent with ActiveRecord: attr_accessor :created_at, :updated_at - + # Return a hash of the class's attribute names and values # @name.attributes => {:first_name=>"Dima", :last_name=>"Dozen"} def attributes @@ -16,21 +16,21 @@ def attributes self.class.fields.flatten.each {|att| @attributes[att] = self.send(att) } @attributes end - - # Compare this object with another object of the same class. - # Returns true if the attributes and values are identical. + + # Compare this object with another object of the same class. + # Returns true if the attributes and values are identical. # @name === @name #=> true # @name === @name2 #=> false def ===(other) self.attributes == other.attributes end - + def new_record? self.respond_to?(:id) and !id.blank? ? false : true end - + class_inheritable_accessor :fields, :associations - + class << self # Provide some basic ActiveRecord-like methods for working with non-ActiveRecord objects # class Person < PassiveRecord::Base @@ -42,7 +42,7 @@ def has_many(*associations) associations.each {|association| attr_accessor association} end alias_method :belongs_to, :has_many - + # Creates instance methods for each item in the list. Expects an array # class Address < PassiveRecord::Base # define_fields :street, :city, :state, :postal_code, :country @@ -54,18 +54,18 @@ def define_fields(*attrs) # Assign attr_accessor for each attribute in the list attrs.each {|att| attr_accessor att} end - + # Return the list of available fields for the class - # + # # Name.fields #=> [:id, :first_name, :last_name] # def fields # @fields # end - + # Returns the list of available has_many associations - # + # # Model.associations #=> [:names, :addresses] end - + end end \ No newline at end of file diff --git a/vendor/plugins/passive_record/lib/serializers/xml_serializer.rb b/vendor/plugins/passive_record/lib/serializers/xml_serializer.rb index 646f6e8..0db3978 100644 --- a/vendor/plugins/passive_record/lib/serializers/xml_serializer.rb +++ b/vendor/plugins/passive_record/lib/serializers/xml_serializer.rb @@ -13,7 +13,7 @@ class XmlSerializer # Including aditional methods: # Post < PassiveRecord # define_attributes [:title, :content, :created_by] - # + # # def complete_title # "#{self.title} by #{self.created_by}" # end @@ -55,7 +55,7 @@ def methods_of(record, methods) end methods_hashed end - + def includes_of(record, includes) if includes.nil? return {} diff --git a/vendor/plugins/passive_record/rdoc/fr_class_index.html b/vendor/plugins/passive_record/rdoc/fr_class_index.html index fbcd6c3..f6fe7e6 100644 --- a/vendor/plugins/passive_record/rdoc/fr_class_index.html +++ b/vendor/plugins/passive_record/rdoc/fr_class_index.html @@ -1,6 +1,6 @@ - diff --git a/vendor/plugins/passive_record/rdoc/fr_file_index.html b/vendor/plugins/passive_record/rdoc/fr_file_index.html index bf351ce..155b8ec 100644 --- a/vendor/plugins/passive_record/rdoc/fr_file_index.html +++ b/vendor/plugins/passive_record/rdoc/fr_file_index.html @@ -1,6 +1,6 @@ - diff --git a/vendor/plugins/passive_record/rdoc/fr_method_index.html b/vendor/plugins/passive_record/rdoc/fr_method_index.html index c588e86..0e33fb9 100644 --- a/vendor/plugins/passive_record/rdoc/fr_method_index.html +++ b/vendor/plugins/passive_record/rdoc/fr_method_index.html @@ -1,6 +1,6 @@ - diff --git a/vendor/rails/actionmailer/CHANGELOG b/vendor/rails/actionmailer/CHANGELOG index 9f1a7ca..dc0a639 100644 --- a/vendor/rails/actionmailer/CHANGELOG +++ b/vendor/rails/actionmailer/CHANGELOG @@ -128,7 +128,7 @@ * ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, Marcel Molina Jr.] -* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.] +* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.] * Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.] @@ -274,7 +274,7 @@ * Added that deliver_* will now return the email that was sent -* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck] +* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck] * Fixed quoting for all address headers, not just to #955 [Jamis Buck] @@ -313,7 +313,7 @@ @body = "Nothing to see here." @charset = "iso-8859-1" end - + def unencoded_subject(recipient) @recipients = recipient @subject = "testing unencoded subject" @@ -322,7 +322,7 @@ @encode_subject = false @charset = "iso-8859-1" end - + *0.6.1* (January 18th, 2005) diff --git a/vendor/rails/actionmailer/README b/vendor/rails/actionmailer/README index 0e16ea6..031f229 100644 --- a/vendor/rails/actionmailer/README +++ b/vendor/rails/actionmailer/README @@ -23,14 +23,14 @@ are all set up this way. An example of such a method: end The body of the email is created by using an Action View template (regular -ERb) that has the content of the body hash parameter available as instance variables. +ERb) that has the content of the body hash parameter available as instance variables. So the corresponding body template for the method above could look like this: - Hello there, + Hello there, Mr. <%= @recipient %> - -And if the recipient was given as "david@loudthinking.com", the email + +And if the recipient was given as "david@loudthinking.com", the email generated would look like this: Date: Sun, 12 Dec 2004 00:00:00 +0100 @@ -38,7 +38,7 @@ generated would look like this: To: david@loudthinking.com Subject: [Signed up] Welcome david@loudthinking.com - Hello there, + Hello there, Mr. david@loudthinking.com @@ -54,7 +54,7 @@ ApplicationMailer, it would look like this: == Receiving emails To receive emails, you need to implement a public instance method called receive that takes a -tmail object as its single parameter. The Action Mailer framework has a corresponding class method, +tmail object as its single parameter. The Action Mailer framework has a corresponding class method, which is also called receive, that accepts a raw, unprocessed email as a string, which it then turns into the tmail object and calls the receive instance method. @@ -69,7 +69,7 @@ Example: if email.has_attachments? for attachment in email.attachments - page.attachments.create({ + page.attachments.create({ :file => attachment, :description => email.subject }) end @@ -77,13 +77,13 @@ Example: end end -This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the +This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the trivial case like this: ./script/runner 'Mailman.receive(STDIN.read)' -However, invoking Rails in the runner for each mail to be received is very resource intensive. A single -instance of Rails should be run within a daemon if it is going to be utilized to process more than just +However, invoking Rails in the runner for each mail to be received is very resource intensive. A single +instance of Rails should be run within a daemon if it is going to be utilized to process more than just a limited number of email. == Configuration @@ -119,7 +119,7 @@ The latest version of Action Mailer can be found at * http://rubyforge.org/project/showfiles.php?group_id=361 -Documentation can be found at +Documentation can be found at * http://actionmailer.rubyonrails.org diff --git a/vendor/rails/actionmailer/Rakefile b/vendor/rails/actionmailer/Rakefile index 2d099a9..263d27a 100644 --- a/vendor/rails/actionmailer/Rakefile +++ b/vendor/rails/actionmailer/Rakefile @@ -65,7 +65,7 @@ spec = Gem::Specification.new do |s| s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) } s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) } end - + Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = true @@ -74,14 +74,14 @@ end desc "Publish the API documentation" -task :pgem => [:package] do +task :pgem => [:package] do require 'rake/contrib/sshpublisher' Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` end desc "Publish the API documentation" -task :pdoc => [:rdoc] do +task :pdoc => [:rdoc] do require 'rake/contrib/sshpublisher' Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload end diff --git a/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb b/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb index 351b966..3e895a0 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb @@ -2,12 +2,12 @@ module MailHelper # Uses Text::Format to take the text and format it, indented two spaces for # each line, and wrapped at 72 columns. def block_format(text) - formatted = text.split(/\n\r\n/).collect { |paragraph| + formatted = text.split(/\n\r\n/).collect { |paragraph| Text::Format.new( :columns => 72, :first_indent => 2, :body_indent => 2, :text => paragraph ).format }.join("\n") - + # Make list points stand on their own line formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { |s| " #{$1} #{$2.strip}\n" } formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { |s| " #{$1} #{$2.strip}\n" } diff --git a/vendor/rails/actionmailer/lib/action_mailer/part.rb b/vendor/rails/actionmailer/lib/action_mailer/part.rb index 2bbb59c..c346a0a 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/part.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/part.rb @@ -11,24 +11,24 @@ class Part # into the body of a subpart you can do it with the mailer's +render+ method # and assign the result here. adv_attr_accessor :body - + # Specify the charset for this subpart. By default, it will be the charset # of the containing part or mailer. adv_attr_accessor :charset - + # The content disposition of this part, typically either "inline" or # "attachment". adv_attr_accessor :content_disposition - + # The content type of the part. adv_attr_accessor :content_type - + # The filename to use for this subpart (usually for attachments). adv_attr_accessor :filename - + # Accessor for specifying additional headers to include with this part. adv_attr_accessor :headers - + # The transfer encoding to use for this subpart, like "base64" or # "quoted-printable". adv_attr_accessor :transfer_encoding @@ -75,19 +75,19 @@ def to_mail(defaults) squish("filename" => filename).merge(ctype_attrs)) else part.set_content_type(real_content_type, nil, ctype_attrs) - part.set_content_disposition(content_disposition) - end + part.set_content_disposition(content_disposition) + end else if String === body @parts.unshift Part.new(:charset => charset, :body => @body, :content_type => 'text/plain') @body = nil end - + @parts.each do |p| prt = (TMail::Mail === p ? p : p.to_mail(defaults)) part.parts << prt end - + if real_content_type =~ /multipart/ ctype_attrs.delete 'charset' part.set_content_type(real_content_type, nil, ctype_attrs) diff --git a/vendor/rails/actionmailer/lib/action_mailer/part_container.rb b/vendor/rails/actionmailer/lib/action_mailer/part_container.rb index abfd8f8..15b6542 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/part_container.rb @@ -39,13 +39,13 @@ def attachment(params, &block) end private - + def parse_content_type(defaults=nil) - if content_type.blank? - return defaults ? - [ defaults.content_type, { 'charset' => defaults.charset } ] : - [ nil, {} ] - end + if content_type.blank? + return defaults ? + [ defaults.content_type, { 'charset' => defaults.charset } ] : + [ nil, {} ] + end ctype, *attrs = content_type.split(/;\s*/) attrs = attrs.inject({}) { |h,s| k,v = s.split(/=/, 2); h[k] = v; h } [ctype, {"charset" => charset || defaults && defaults.charset}.merge(attrs)] diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb index 982ad5b..938ae01 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb @@ -36,16 +36,16 @@ module TMail # = Class Address - # + # # Provides a complete handling library for email addresses. Can parse a string of an # address directly or take in preformatted addresses themselves. Allows you to add # and remove phrases from the front of the address and provides a compare function for # email addresses. - # + # # == Parsing and Handling a Valid Address: - # + # # Just pass the email address in as a string to Address.parse: - # + # # email = TMail::Address.parse('Mikel Lindsaar ) # #=> # # email.address @@ -56,12 +56,12 @@ module TMail # #=> "lindsaar.net" # email.name # Aliased as phrase as well # #=> "Mikel Lindsaar" - # + # # == Detecting an Invalid Address - # + # # If you want to check the syntactical validity of an email address, just pass it to # Address.parse and catch any SyntaxError: - # + # # begin # TMail::Mail.parse("mikel 2@@@@@ me .com") # rescue TMail::SyntaxError @@ -73,17 +73,17 @@ module TMail class Address include TextUtils #:nodoc: - + # Sometimes you need to parse an address, TMail can do it for you and provide you with # a fairly robust method of detecting a valid address. - # + # # Takes in a string, returns a TMail::Address object. - # + # # Raises a TMail::SyntaxError on invalid email format def Address.parse( str ) Parser.parse :ADDRESS, special_quote_address(str) end - + def Address.special_quote_address(str) #:nodoc: # Takes a string which is an address and adds quotation marks to special # edge case methods that the RACC parser can not handle. @@ -100,7 +100,7 @@ def Address.special_quote_address(str) #:nodoc: # Returns: # "mikel@me.com" # - # Any other address not matching these patterns just gets returned as is. + # Any other address not matching these patterns just gets returned as is. case # This handles the missing "" in an older version of Apple Mail.app # around the display name when the display name contains a '@' @@ -123,15 +123,15 @@ def address_group? #:nodoc: end # Address.new(local, domain) - # + # # Accepts: - # + # # * local - Left of the at symbol - # + # # * domain - Array of the domain split at the periods. - # + # # For example: - # + # # Address.new("mikel", ["lindsaar", "net"]) # #=> "#" def initialize( local, domain ) @@ -140,7 +140,7 @@ def initialize( local, domain ) raise SyntaxError, 'empty word in domain' if s.empty? end end - + # This is to catch an unquoted "@" symbol in the local part of the # address. Handles addresses like <"@"@me.com> and makes sure they # stay like <"@"@me.com> (previously were becoming <@@me.com>) @@ -156,9 +156,9 @@ def initialize( local, domain ) end # Provides the name or 'phrase' of the email address. - # + # # For Example: - # + # # email = TMail::Address.parse("Mikel Lindsaar ") # email.name # #=> "Mikel Lindsaar" @@ -167,9 +167,9 @@ def name end # Setter method for the name or phrase of the email - # + # # For Example: - # + # # email = TMail::Address.parse("mikel@lindsaar.net") # email.name # #=> nil @@ -185,15 +185,15 @@ def name=( str ) alias phrase name alias phrase= name= #:startdoc: - + # This is still here from RFC 822, and is now obsolete per RFC2822 Section 4. - # + # # "When interpreting addresses, the route portion SHOULD be ignored." - # + # # It is still here, so you can access it. - # + # # Routes return the route portion at the front of the email address, if any. - # + # # For Example: # email = TMail::Address.parse( "<@sa,@another:Mikel@me.com>") # => # @@ -204,15 +204,15 @@ def name=( str ) def routes @routes end - + def inspect #:nodoc: "#<#{self.class} #{address()}>" end # Returns the local part of the email address - # + # # For Example: - # + # # email = TMail::Address.parse("mikel@lindsaar.net") # email.local # #=> "mikel" @@ -228,9 +228,9 @@ def local end # Returns the domain part of the email address - # + # # For Example: - # + # # email = TMail::Address.parse("mikel@lindsaar.net") # email.local # #=> "lindsaar.net" @@ -240,9 +240,9 @@ def domain end # Returns the full specific address itself - # + # # For Example: - # + # # email = TMail::Address.parse("mikel@lindsaar.net") # email.address # #=> "mikel@lindsaar.net" @@ -260,9 +260,9 @@ def spec # Provides == function to the email. Only checks the actual address # and ignores the name/phrase component - # + # # For Example - # + # # addr1 = TMail::Address.parse("My Address ") # #=> "#" # addr2 = TMail::Address.parse("Another ") @@ -277,7 +277,7 @@ def ==( other ) # Provides a unique hash value for this record against the local and domain # parts, ignores the name/phrase value - # + # # email = TMail::Address.parse("mikel@lindsaar.net") # email.hash # #=> 18767598 @@ -286,7 +286,7 @@ def hash end # Duplicates a TMail::Address object returning the duplicate - # + # # addr1 = TMail::Address.parse("mikel@lindsaar.net") # addr2 = addr1.dup # addr1.id == addr2.id @@ -338,7 +338,7 @@ def initialize( name, addrs ) end attr_reader :name - + def ==( other ) other.respond_to? :to_a and @addresses == other.to_a end @@ -396,7 +396,7 @@ def add( a ) end alias push add - + def delete( a ) @addresses.delete a end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb index 5dc5efa..a222862 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb @@ -22,7 +22,7 @@ def attachment?(part) def attachments if multipart? - parts.collect { |part| + parts.collect { |part| if part.multipart? part.attachments elsif attachment?(part) @@ -31,16 +31,16 @@ def attachments part['content-location'].body) || part.sub_header("content-type", "name") || part.sub_header("content-disposition", "filename") - + next if file_name.blank? || content.blank? - + attachment = Attachment.new(content) attachment.original_filename = file_name.strip attachment.content_type = part.content_type attachment end }.flatten.compact - end + end end end end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb index 1275df7..b942969 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/compat.rb @@ -1,5 +1,5 @@ #:stopdoc: -unless Enumerable.method_defined?(:map) +unless Enumerable.method_defined?(:map) module Enumerable #:nodoc: alias map collect end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb index 3a876dc..1613485 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/config.rb @@ -51,7 +51,7 @@ def new_body_port( mail ) alias new_preamble_port new_body_port alias new_part_port new_body_port - + end DEFAULT_CONFIG = Config.new(false) diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb index da62c33..08a184e 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/core_extensions.rb @@ -1,7 +1,7 @@ #:stopdoc: unless Object.respond_to?(:blank?) class Object - # Check first to see if we are in a Rails environment, no need to + # Check first to see if we are in a Rails environment, no need to # define these methods if we are # An object is blank if it's nil, empty, or a whitespace string. diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb index 458dbbf..afce5bc 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/encode.rb @@ -34,7 +34,7 @@ module TMail - + #:stopdoc: class << self attr_accessor :KCODE @@ -62,12 +62,12 @@ def create_dest( obj ) # You should call this before you are packaging up your email to # correctly escape all the values that need escaping in the email, line # wrap the email etc. - # + # # It is also a good idea to call this before you marshal or serialize # a TMail object. - # + # # For Example: - # + # # email = TMail::Load(my_email_file) # email_to_send = email.encoded def encoded( eol = "\r\n", charset = 'j', dest = nil ) @@ -76,13 +76,13 @@ def encoded( eol = "\r\n", charset = 'j', dest = nil ) # Returns the TMail object decoded and ready to be used by you, your # program etc. - # + # # You should call this before you are packaging up your email to # correctly escape all the values that need escaping in the email, line # wrap the email etc. - # + # # For Example: - # + # # email = TMail::Load(my_email_file) # email_to_send = email.encoded def decoded( eol = "\n", charset = 'e', dest = nil ) @@ -340,7 +340,7 @@ def scanadd( str, force = false ) types = '' strs = [] if str.respond_to?(:encoding) - enc = str.encoding + enc = str.encoding str.force_encoding(Encoding::ASCII_8BIT) end until str.empty? diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb index dbdefcf..998de19 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb @@ -58,14 +58,14 @@ def new( name, body, conf = DEFAULT_CONFIG ) # if you want the From address of the email itself, pass in 'From'. # # This is because a mailbox doesn't have the : after the From that designates the - # beginning of the envelope sender (which can be different to the from address of + # beginning of the envelope sender (which can be different to the from address of # the email) # # Other fields can be passed as normal, "Reply-To", "Received" etc. # # Note: Change of behaviour in 1.2.1 => returns nil if it does not find the specified # header field, otherwise returns an instantiated object of the correct header class - # + # # For example: # port = TMail::FilePort.new("/test/fixtures/raw_email_simple") # h = TMail::HeaderField.new_from_port(port, "From") @@ -106,7 +106,7 @@ def initialize( body, conf, intern = false ) @illegal = false @parsed = false - + if intern @parsed = true parse_init @@ -916,7 +916,7 @@ def do_accept( strategy ) strategy.kv_pair k, unquote(v) end end - + end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb index 554e2fd..49c793e 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/index.rb @@ -1,5 +1,5 @@ #:stopdoc: -# This is here for Rolls. +# This is here for Rolls. # Rolls uses this instead of lib/tmail.rb. require 'tmail/version' diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb index c3a8803..1657990 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb @@ -29,7 +29,7 @@ # with permission of Minero Aoki. #++ - + require 'tmail/interface' require 'tmail/encode' @@ -44,37 +44,37 @@ module TMail # == Mail Class - # + # # Accessing a TMail object done via the TMail::Mail class. As email can be fairly complex # creatures, you will find a large amount of accessor and setter methods in this class! - # + # # Most of the below methods handle the header, in fact, what TMail does best is handle the # header of the email object. There are only a few methods that deal directly with the body # of the email, such as base64_encode and base64_decode. - # + # # === Using TMail inside your code - # + # # The usual way is to install the gem (see the {README}[link:/README] on how to do this) and # then put at the top of your class: - # + # # require 'tmail' - # + # # You can then create a new TMail object in your code with: - # + # # @email = TMail::Mail.new - # + # # Or if you have an email as a string, you can initialize a new TMail::Mail object and get it # to parse that string for you like so: - # + # # @email = TMail::Mail.parse(email_text) - # + # # You can also read a single email off the disk, for example: - # + # # @email = TMail::Mail.load('filename.txt') - # + # # Also, you can read a mailbox (usual unix mbox format) and end up with an array of TMail # objects by doing something like this: - # + # # # Note, we pass true as the last variable to open the mailbox read only # mailbox = TMail::UNIXMbox.new("mailbox", nil, true) # @emails = [] @@ -83,37 +83,37 @@ module TMail class Mail class << self - + # Opens an email that has been saved out as a file by itself. - # + # # This function will read a file non-destructively and then parse # the contents and return a TMail::Mail object. - # + # # Does not handle multiple email mailboxes (like a unix mbox) for that # use the TMail::UNIXMbox class. - # + # # Example: # mail = TMail::Mail.load('filename') - # + # def load( fname ) new(FilePort.new(fname)) end alias load_from load alias loadfrom load - + # Parses an email from the supplied string and returns a TMail::Mail # object. - # + # # Example: # require 'rubygems'; require 'tmail' # email_string =< # bodyport=nil> @@ -142,7 +142,7 @@ def initialize( port = nil, conf = DEFAULT_CONFIG ) #:nodoc: end # Provides access to the port this email is using to hold it's data - # + # # Example: # mail = TMail::Mail.parse(email_string) # mail.port @@ -264,7 +264,7 @@ def sub_header(key, param) # @mail['to'] = nil # @mail['to'].to_s # => nil # @mail.encoded # => "\r\n" - # + # # Note: setting mail[] = nil actually deletes the header field in question from the object, # it does not just set the value of the hash to nil def []=( key, val ) @@ -298,7 +298,7 @@ def []=( key, val ) end alias store []= - + # Allows you to loop through each header in the TMail::Mail object in a block # Example: # @mail['to'] = 'mikel@elsewhere.org' @@ -462,12 +462,12 @@ def quoted_body= str def body=( str ) # Sets the body of the email to a new (encoded) string. - # + # # We also reparses the email if the body is ever reassigned, this is a performance hit, however when # you assign the body, you usually want to be able to make sure that you can access the attachments etc. - # + # # Usage: - # + # # mail.body = "Hello, this is\nthe body text" # # => "Hello, this is\nthe body" # mail.body @@ -497,11 +497,11 @@ def parts parse_body @parts end - + def each_part( &block ) parts().each(&block) end - + # Returns true if the content type of this part of the email is # a disposition attachment def disposition_is_attachment? @@ -545,7 +545,7 @@ def parse_body_0( f ) } end end - + def read_multipart( src ) bound = @header['content-type'].params['boundary'] is_sep = /\A--#{Regexp.quote bound}(?:--)?[ \t]*(?:\n|\r\n|\r)/ diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb index b0bc6a7..2b0f621 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mailbox.rb @@ -149,44 +149,44 @@ def next_file_name class UNIXMbox - + class << self alias newobj new end # Creates a new mailbox object that you can iterate through to collect the - # emails from with "each_port". - # + # emails from with "each_port". + # # You need to pass it a filename of a unix mailbox format file, the format of this # file can be researched at this page at {wikipedia}[link:http://en.wikipedia.org/wiki/Mbox] - # + # # ==== Parameters - # + # # +filename+: The filename of the mailbox you want to open - # + # # +tmpdir+: Can be set to override TMail using the system environment's temp dir. TMail will first # use the temp dir specified by you (if any) or then the temp dir specified in the Environment's TEMP # value then the value in the Environment's TMP value or failing all of the above, '/tmp' - # + # # +readonly+: If set to false, each email you take from the mail box will be removed from the mailbox. # default is *false* - ie, it *WILL* truncate your mailbox file to ZERO once it has read the emails out. - # + # # ==== Options: - # + # # None - # + # # ==== Examples: - # + # # # First show using readonly true: - # + # # require 'ftools' # File.size("../test/fixtures/mailbox") # #=> 20426 # - # mailbox = TMail::UNIXMbox.new("../test/fixtures/mailbox", nil, true) + # mailbox = TMail::UNIXMbox.new("../test/fixtures/mailbox", nil, true) # #=> # # - # mailbox.each_port do |port| + # mailbox.each_port do |port| # mail = TMail::Mail.new(port) # puts mail.subject # end @@ -197,13 +197,13 @@ class << self # require 'ftools' # File.size?("../test/fixtures/mailbox") # #=> 20426 - # + # # # Now show with readonly set to the default false - # - # mailbox = TMail::UNIXMbox.new("../test/fixtures/mailbox") + # + # mailbox = TMail::UNIXMbox.new("../test/fixtures/mailbox") # #=> # # - # mailbox.each_port do |port| + # mailbox.each_port do |port| # mail = TMail::Mail.new(port) # puts mail.subject # end @@ -211,7 +211,7 @@ class << self # #Testing mailbox 2 # #Testing mailbox 3 # #Testing mailbox 4 - # + # # File.size?("../test/fixtures/mailbox") # #=> nil def UNIXMbox.new( filename, tmpdir = nil, readonly = false ) @@ -431,7 +431,7 @@ def new_port begin fname = "#{Time.now.to_i}.#{$$}_#{Maildir.unique_number}.#{Socket.gethostname}" - + tmpfname = "#{@tmp}/#{fname}" newfname = "#{@new}/#{fname}" end while FileTest.exist? tmpfname @@ -460,7 +460,7 @@ def each_new_port def check_tmp old = Time.now.to_i - TOO_OLD - + each_filename(@tmp) do |full, fname| if FileTest.file? full and File.stat(full).mtime.to_i < old @@ -487,7 +487,7 @@ def each_filename( dir ) end end end - + end # Maildir MaildirLoader = Maildir diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb index 6514722..cb29803 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/net.rb @@ -31,7 +31,7 @@ module TMail class Mail - + def send_to( smtp ) do_send_to(smtp) do ready_to_send @@ -124,7 +124,7 @@ def mime_encode_multipart( top = true ) 'using C.T.Encoding with multipart mail is not permitted' end end - + end #:stopdoc: @@ -149,7 +149,7 @@ def exec( mail ) end delete_if {|n,v| v.empty? } if @delete_empty_fields end - + end #:startdoc: @@ -165,7 +165,7 @@ def initialize( fqdn = nil ) def exec( mail ) mail.message_id = ::TMail::new_msgid(@fqdn) end - + end #:startdoc: @@ -175,7 +175,7 @@ class AddDate def exec( mail ) mail.date = Time.now end - + end #:startdoc: @@ -195,10 +195,10 @@ def exec( mail ) then @multipart_composer else @singlepart_composer end.exec mail end - + end #:startdoc: - + #:stopdoc: class MimeEncodeSingle @@ -223,10 +223,10 @@ def on_binary( body ) mail.set_content_type 'application', 'octet-stream' mail.encoding = 'Base64' end - + end #:startdoc: - + #:stopdoc: class MimeEncodeMulti diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb index 22b0a12..1eb7248 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb @@ -87,7 +87,7 @@ class Address alias route routes alias addr spec - def spec=( str ) + def spec=( str ) @local, @domain = str.split(/@/,2).map {|s| s.split(/\./) } end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb index 0ddc525..a2e2568 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb @@ -404,7 +404,7 @@ def racc_reduce(toks, sim, tstack, vstack) toks.each {|t| out.print ' ', racc_token2str(t) } end out.puts " --> #{racc_token2str(sim)}" - + racc_print_stacks tstack, vstack @racc_debug_out.puts end @@ -516,7 +516,7 @@ def parse_in( &block ) yield @first @scanner.scan(&block) end - + def on_error( t, val, vstack ) raise SyntaxError, "parse error on token #{racc_token2str t}" end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb index 445f0e6..a676cfa 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/port.rb @@ -184,7 +184,7 @@ def procinfostr( str, tag, true_p ) a.delete tag unless true_p a.compact.sort.join('').squeeze end - + end @@ -193,7 +193,7 @@ class MhPort < FilePort include MailFlags private - + def set_status( tag, flag ) begin tmpfile = @filename + '.tmailtmp.' + $$.to_s @@ -239,7 +239,7 @@ def get_status( tag ) } false end - + end @@ -288,7 +288,7 @@ def get_status( tag ) m = MAIL_FILE.match(File.basename(@filename)) or return false m[2] == '2' and m[3].to_s.include?(tag[0]) end - + end diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb index 8357398..cb14e46 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/stringio.rb @@ -50,7 +50,7 @@ def new( str ) end alias open new - + end def initialize( str ) @@ -191,7 +191,7 @@ def new( str = '' ) end alias open new - + end def initialize( str = '' ) diff --git a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb index dc594a4..b75c77c 100644 --- a/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb +++ b/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb @@ -25,29 +25,29 @@ #++ # = TMail - The EMail Swiss Army Knife for Ruby -# +# # The TMail library provides you with a very complete way to handle and manipulate EMails # from within your Ruby programs. -# +# # Used as the backbone for email handling by the Ruby on Rails and Nitro web frameworks as # well as a bunch of other Ruby apps including the Ruby-Talk mailing list to newsgroup email # gateway, it is a proven and reliable email handler that won't let you down. -# +# # Originally created by Minero Aoki, TMail has been recently picked up by Mikel Lindsaar and # is being actively maintained. Numerous backlogged bug fixes have been applied as well as # Ruby 1.9 compatibility and a swath of documentation to boot. -# +# # TMail allows you to treat an email totally as an object and allow you to get on with your # own programming without having to worry about crafting the perfect email address validation # parser, or assembling an email from all it's component parts. -# +# # TMail handles the most complex part of the email - the header. It generates and parses # headers and provides you with instant access to their innards through simple and logically # named accessor and setter methods. -# +# # TMail also provides a wrapper to Net/SMTP as well as Unix Mailbox handling methods to # directly read emails from your unix mailbox, parse them and use them. -# +# # Following is the comprehensive list of methods to access TMail::Mail objects. You can also # check out TMail::Mail, TMail::Address and TMail::Headers for other lists. module TMail @@ -57,9 +57,9 @@ class SyntaxError < StandardError; end # Provides a new email boundary to separate parts of the email. This is a random # string based off the current time, so should be fairly unique. - # + # # For Example: - # + # # TMail.new_boundary # #=> "mimepart_47bf656968207_25a8fbb80114" # TMail.new_boundary @@ -70,12 +70,12 @@ def TMail.new_boundary # Provides a new email message ID. You can use this to generate unique email message # id's for your email so you can track them. - # - # Optionally takes a fully qualified domain name (default to the current hostname + # + # Optionally takes a fully qualified domain name (default to the current hostname # returned by Socket.gethostname) that will be appended to the message ID. - # + # # For Example: - # + # # email.message_id = TMail.new_message_id # #=> "<47bf66845380e_25a8fbb80332@baci.local.tmail>" # email.to_s @@ -102,10 +102,10 @@ def TMail.random_tag #:nodoc: @uniq = 0 #:startdoc: - + # Text Utils provides a namespace to define TOKENs, ATOMs, PHRASEs and CONTROL characters that # are OK per RFC 2822. - # + # # It also provides methods you can call to determine if a string is safe module TextUtils @@ -118,19 +118,19 @@ module TextUtils ATOM_UNSAFE = /[#{Regexp.quote aspecial}#{control}#{lwsp}]/n PHRASE_UNSAFE = /[#{Regexp.quote aspecial}#{control}]/n TOKEN_UNSAFE = /[#{Regexp.quote tspecial}#{control}#{lwsp}]/n - + # Returns true if the string supplied is free from characters not allowed as an ATOM def atom_safe?( str ) not ATOM_UNSAFE === str end - # If the string supplied has ATOM unsafe characters in it, will return the string quoted + # If the string supplied has ATOM unsafe characters in it, will return the string quoted # in double quotes, otherwise returns the string unmodified def quote_atom( str ) (ATOM_UNSAFE === str) ? dquote(str) : str end - # If the string supplied has PHRASE unsafe characters in it, will return the string quoted + # If the string supplied has PHRASE unsafe characters in it, will return the string quoted # in double quotes, otherwise returns the string unmodified def quote_phrase( str ) (PHRASE_UNSAFE === str) ? dquote(str) : str @@ -141,7 +141,7 @@ def token_safe?( str ) not TOKEN_UNSAFE === str end - # If the string supplied has TOKEN unsafe characters in it, will return the string quoted + # If the string supplied has TOKEN unsafe characters in it, will return the string quoted # in double quotes, otherwise returns the string unmodified def quote_token( str ) (TOKEN_UNSAFE === str) ? dquote(str) : str @@ -163,7 +163,7 @@ def dquote( str ) #:nodoc: def unquote( str ) str =~ /^"(.*?)"$/ ? $1 : str end - + # Provides a method to join a domain name by it's parts and also makes it # ATOM safe by quoting it as needed def join_domain( arr ) @@ -256,7 +256,7 @@ def time2str( tm ) MESSAGE_ID = /<[^\@>]+\@[^>\@]+>/ - + def message_id?( str ) MESSAGE_ID === str end @@ -267,7 +267,7 @@ def message_id?( str ) def mime_encoded?( str ) MIME_ENCODED === str end - + def decode_params( hash ) new = Hash.new diff --git a/vendor/rails/actionmailer/test/delivery_method_test.rb b/vendor/rails/actionmailer/test/delivery_method_test.rb index 0731512..4cf86b6 100644 --- a/vendor/rails/actionmailer/test/delivery_method_test.rb +++ b/vendor/rails/actionmailer/test/delivery_method_test.rb @@ -11,7 +11,7 @@ class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase def setup set_delivery_method :smtp end - + def teardown restore_delivery_method end @@ -25,11 +25,11 @@ class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase def setup set_delivery_method :smtp end - + def teardown restore_delivery_method end - + def test_should_be_the_default_smtp assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method end @@ -39,7 +39,7 @@ class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase def setup set_delivery_method :smtp end - + def teardown restore_delivery_method end diff --git a/vendor/rails/actionmailer/test/fixtures/raw_email2 b/vendor/rails/actionmailer/test/fixtures/raw_email2 index 3999fcc..9f87bb2 100644 --- a/vendor/rails/actionmailer/test/fixtures/raw_email2 +++ b/vendor/rails/actionmailer/test/fixtures/raw_email2 @@ -32,7 +32,7 @@ To: xxxxx xxxx Subject: Fwd: Signed email causes file attachments In-Reply-To: Mime-Version: 1.0 -Content-Type: multipart/mixed; +Content-Type: multipart/mixed; boundary="----=_Part_5028_7368284.1115579351471" References: diff --git a/vendor/rails/actionmailer/test/fixtures/raw_email3 b/vendor/rails/actionmailer/test/fixtures/raw_email3 index 771a963..3a09274 100644 --- a/vendor/rails/actionmailer/test/fixtures/raw_email3 +++ b/vendor/rails/actionmailer/test/fixtures/raw_email3 @@ -31,7 +31,7 @@ Reply-To: Test Tester To: xxxx@xxxx.com, xxxx@xxxx.com Subject: Another PDF Mime-Version: 1.0 -Content-Type: multipart/mixed; +Content-Type: multipart/mixed; boundary="----=_Part_2192_32400445.1115745999735" X-Virus-Scanned: amavisd-new at textdrive.com diff --git a/vendor/rails/actionmailer/test/fixtures/raw_email8 b/vendor/rails/actionmailer/test/fixtures/raw_email8 index 2382dfd..7999636 100644 --- a/vendor/rails/actionmailer/test/fixtures/raw_email8 +++ b/vendor/rails/actionmailer/test/fixtures/raw_email8 @@ -8,7 +8,7 @@ To: xxxxx xxxx Subject: Fwd: Signed email causes file attachments In-Reply-To: Mime-Version: 1.0 -Content-Type: multipart/mixed; +Content-Type: multipart/mixed; boundary="----=_Part_5028_7368284.1115579351471" References: diff --git a/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb b/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb index a85d5fa..7afe1f6 100644 --- a/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +++ b/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb @@ -1,3 +1,3 @@ -Hello there, +Hello there, Mr. <%= @recipient %> \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml b/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml index 847d065..8dcf974 100644 --- a/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +++ b/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml @@ -1,6 +1,6 @@ -%p Hello there, +%p Hello there, -%p +%p Mr. = @recipient from haml \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml b/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml index 847d065..8dcf974 100644 --- a/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +++ b/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml @@ -1,6 +1,6 @@ -%p Hello there, +%p Hello there, -%p +%p Mr. = @recipient from haml \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb b/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb index a85d5fa..7afe1f6 100644 --- a/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb +++ b/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.html.erb @@ -1,3 +1,3 @@ -Hello there, +Hello there, Mr. <%= @recipient %> \ No newline at end of file diff --git a/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb b/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb index 4c5806d..6e7875c 100644 --- a/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +++ b/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb @@ -1,4 +1,4 @@ -Hello there, +Hello there, Mr. <%= @recipient %>. Please see our greeting at <%= @welcome_url %> <%= welcome_url %> diff --git a/vendor/rails/actionmailer/test/mail_helper_test.rb b/vendor/rails/actionmailer/test/mail_helper_test.rb index e94aeff..0d5cc7d 100644 --- a/vendor/rails/actionmailer/test/mail_helper_test.rb +++ b/vendor/rails/actionmailer/test/mail_helper_test.rb @@ -27,7 +27,7 @@ def use_mail_helper(recipient) recipients recipient subject "using mailing helpers" from "tester@example.com" - self.body = { :text => + self.body = { :text => "But soft! What light through yonder window breaks? It is the east, " + "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " + "which is sick and pale with grief that thou, her maid, art far more " + @@ -66,11 +66,11 @@ def setup @recipient = 'test@localhost' end - + def teardown restore_delivery_method end - + def test_use_helper mail = HelperMailer.create_use_helper(@recipient) assert_match %r{Mr. Joe Person}, mail.encoded diff --git a/vendor/rails/actionmailer/test/test_helper_test.rb b/vendor/rails/actionmailer/test/test_helper_test.rb index 65b07a7..bb3d7bb 100644 --- a/vendor/rails/actionmailer/test/test_helper_test.rb +++ b/vendor/rails/actionmailer/test/test_helper_test.rb @@ -30,7 +30,7 @@ def test_determine_default_mailer_raises_correct_error self.class.determine_default_mailer("NotAMailerTest") end end - + def test_charset_is_utf_8 assert_equal "utf-8", charset end @@ -46,14 +46,14 @@ def test_assert_emails end end end - + def test_repeated_assert_emails_calls assert_nothing_raised do assert_emails 1 do TestHelperMailer.deliver_test end end - + assert_nothing_raised do assert_emails 2 do TestHelperMailer.deliver_test @@ -61,20 +61,20 @@ def test_repeated_assert_emails_calls end end end - + def test_assert_emails_with_no_block assert_nothing_raised do TestHelperMailer.deliver_test assert_emails 1 end - + assert_nothing_raised do TestHelperMailer.deliver_test TestHelperMailer.deliver_test assert_emails 3 end end - + def test_assert_no_emails assert_nothing_raised do assert_no_emails do @@ -82,17 +82,17 @@ def test_assert_no_emails end end end - + def test_assert_emails_too_few_sent error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 2 do TestHelperMailer.deliver_test end end - + assert_match /2 .* but 1/, error.message end - + def test_assert_emails_too_many_sent error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 1 do @@ -100,17 +100,17 @@ def test_assert_emails_too_many_sent TestHelperMailer.deliver_test end end - + assert_match /1 .* but 2/, error.message end - + def test_assert_no_emails_failure error = assert_raise ActiveSupport::TestCase::Assertion do assert_no_emails do TestHelperMailer.deliver_test end end - + assert_match /0 .* but 1/, error.message end end diff --git a/vendor/rails/actionmailer/test/url_test.rb b/vendor/rails/actionmailer/test/url_test.rb index 71286bd..7b22476 100644 --- a/vendor/rails/actionmailer/test/url_test.rb +++ b/vendor/rails/actionmailer/test/url_test.rb @@ -1,9 +1,9 @@ require 'abstract_unit' class TestMailer < ActionMailer::Base - + default_url_options[:host] = 'www.basecamphq.com' - + def signed_up_with_url(recipient) @recipients = recipient @subject = "[Signed up] Welcome #{recipient}" @@ -52,8 +52,8 @@ def teardown end def test_signed_up_with_url - ActionController::Routing::Routes.draw do |map| - map.connect ':controller/:action/:id' + ActionController::Routing::Routes.draw do |map| + map.connect ':controller/:action/:id' map.welcome 'welcome', :controller=>"foo", :action=>"bar" end diff --git a/vendor/rails/actionpack/CHANGELOG b/vendor/rails/actionpack/CHANGELOG index 3875bbe..764f8c8 100644 --- a/vendor/rails/actionpack/CHANGELOG +++ b/vendor/rails/actionpack/CHANGELOG @@ -8,7 +8,7 @@ * Improvements to ActionView::TestCase -* Compatiblity with the rails_xss plugin +* Compatiblity with the rails_xss plugin *2.3.4 (September 4, 2009)* @@ -130,14 +130,14 @@ # Instead of <%= render :partial => "account" %> <%= render "account" %> - + # Instead of <%= render :partial => "account", :locals => { :account => @buyer } %> <%= render "account", :account => @buyer %> - + # @account is an Account instance, so it uses the RecordIdentifier to replace # <%= render :partial => "accounts/account", :locals => { :account => @account } %> <%= render(@account) %> - + # @posts is an array of Post instances, so it uses the RecordIdentifier to replace # <%= render :partial => "posts/post", :collection => @posts %> <%= render(@posts) %> @@ -228,7 +228,7 @@ * Make PrototypeHelper#submit_to_remote a wrapper around PrototypeHelper#button_to_remote. [Tarmo Tänav] -* Set HttpOnly for the cookie session store's cookie. #1046 +* Set HttpOnly for the cookie session store's cookie. #1046 * Added FormTagHelper#image_submit_tag confirm option #784 [Alastair Brunton] @@ -245,7 +245,7 @@ Completed in 0.10000 (4 reqs/sec) | Rendering: 0.04000 (40%) | DB: 0.00400 (4%) | 200 OK [http://example.com] ...to: - + Completed in 100ms (View: 40, DB: 4) | 200 OK [http://example.com] * Add support for shallow nesting of routes. #838 [S. Brent Faulkner] @@ -330,7 +330,7 @@ * Deprecated TemplateHandler line offset [Josh Peek] * Allow caches_action to accept cache store options. #416. [José Valim]. Example: - + caches_action :index, :redirected, :if => Proc.new { |c| !c.request.format.json? }, :expires_in => 1.hour * Remove define_javascript_functions, javascript_include_tag and friends are far superior. [Michael Koziarski] @@ -340,7 +340,7 @@ * Add :as option to render a collection of partials with a custom local variable name. #509 [Simon Jefford, Pratik Naik] render :partial => 'other_people', :collection => @people, :as => :person - + This will let you access objects of @people as 'person' local variable inside 'other_people' partial template. * time_zone_select: support for regexp matching of priority zones. Resolves #195 [Ernie Miller] @@ -494,7 +494,7 @@ * Remove support for multivalued (e.g., '&'-delimited) cookies. [Jamis Buck] -* Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime] +* Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime] * Added support for naming concrete classes in sweeper declarations [David Heinemeier Hansson] @@ -517,7 +517,7 @@ * Make assert_routing aware of the HTTP method used. #8039 [mpalmer] e.g. assert_routing({ :method => 'put', :path => '/product/321' }, { :controller => "product", :action => "update", :id => "321" }) -* Make map.root accept a single symbol as an argument to declare an alias. #10818 [bscofield] +* Make map.root accept a single symbol as an argument to declare an alias. #10818 [bscofield] e.g. map.dashboard '/dashboard', :controller=>'dashboard' map.root :dashboard @@ -526,7 +526,7 @@ * Add label_tag helper for generating elements. #10802 [DefV] -* Introduce TemplateFinder to handle view paths and lookups. #10800 [Pratik Naik] +* Introduce TemplateFinder to handle view paths and lookups. #10800 [Pratik Naik] * Performance: optimize route recognition. Large speedup for apps with many resource routes. #10835 [oleganza] @@ -751,7 +751,7 @@ * ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick Olson] -* Only accept session ids from cookies, prevents session fixation attacks. [bradediger] +* Only accept session ids from cookies, prevents session fixation attacks. [bradediger] *2.0.0 [Preview Release]* (September 29th, 2007) [Includes duplicates of changes from 1.12.2 - 1.13.3] @@ -810,7 +810,7 @@ def index @posts = Post.find(:all) - + respond_to do |format| format.html # => renders index.html.erb and uses "text/html" as the content type format.iphone # => renders index.iphone.erb and uses "text/html" as the content type @@ -904,7 +904,7 @@ After filters will *no longer* be run if an around_filter fails to yield, users relying on this behaviour are advised to put the code in question after a yield statement in an around filter. - + * Allow you to delete cookies with options. Closes #3685 [Josh Peek, Chris Wanstrath] @@ -1004,13 +1004,13 @@ * Update to Prototype 1.5.1. [Sam Stephenson] -* Allow routes to be decalred under namespaces [Tobias Lütke]: - +* Allow routes to be decalred under namespaces [Tobias Lütke]: + map.namespace :admin do |admin| - admin.root :controller => "products" + admin.root :controller => "products" admin.feed 'feed.xml', :controller => 'products', :action => 'feed', :format => 'xml' end - + * Update to script.aculo.us 1.7.1_beta3. [Thomas Fuchs] * observe_form always sends the serialized form. #5271 [Manfred Stienstra, normelton@gmail.com] @@ -1022,7 +1022,7 @@ * Added url_for usage on render :location, which allows for record identification [David Heinemeier Hansson]. Example: render :xml => person, :status => :created, :location => person - + ...expands the location to person_url(person). * Introduce the request.body stream. Lazy-read to parse parameters rather than always setting RAW_POST_DATA. Reduces the memory footprint of large binary PUT requests. [Jeremy Kemper] @@ -1050,21 +1050,21 @@ <% form_for(@post) do |f| %> ... <% end %> - + This will expand to be the same as: - + <% form_for :post, @post, :url => post_path(@post), :html => { :method => :put, :class => "edit_post", :id => "edit_post_45" } do |f| %> ... <% end %> - + And for new records: - + <% form_for(Post.new) do |f| %> ... <% end %> - + This will expand to be the same as: - + <% form_for :post, @post, :url => posts_path, :html => { :class => "new_post", :id => "new_post" } do |f| %> ... <% end %> @@ -1076,7 +1076,7 @@ redirect_to(post) # => redirect_to(posts_url(post)) => Location: http://example.com/posts/1 link_to(post.title, post) # => link_to(post.title, posts_url(post)) => Hello world - Any method that calls url_for on its parameters will automatically benefit from this. + Any method that calls url_for on its parameters will automatically benefit from this. * Removed deprecated parameters_for_method_reference concept (legacy from before named routes) [David Heinemeier Hansson] @@ -1120,14 +1120,14 @@ * Added map.namespace to deal with the common situation of admin sections and the like [David Heinemeier Hansson] Before: - + map.resources :products, :path_prefix => "admin", :controller => "admin/products", :collection => { :inventory => :get }, :member => { :duplicate => :post } map.resources :tags, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_tags" map.resources :images, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_images" map.resources :variants, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_variants" After: - + map.namespace(:admin) do |admin| admin.resources :products, :collection => { :inventory => :get }, @@ -1143,28 +1143,28 @@ emails.resources :comments, :name_prefix => "email_" emails.resources :attachments, :name_prefix => "email_" end - + After: map.resources :emails do |emails| emails.resources :comments emails.resources :attachments end - + This does mean that if you intended to have comments_url go to /emails/5/comments, then you'll have to set :name_prefix to nil explicitly. * Added :has_many and :has_one for declaring plural and singular resources beneath the current [David Heinemeier Hansson] Before: - + map.resources :notes do |notes| notes.resources :comments notes.resources :attachments notes.resource :author end - + After: - + map.resources :notes, :has_many => [ :comments, :attachments ], :has_one => :author * Added that render :xml will try to call to_xml if it can [David Heinemeier Hansson]. Makes these work: @@ -1192,9 +1192,9 @@ * Default xml template goes from #{action_name}.rxml => #{action_name}.xml.builder. * Default rjs template goes from #{action_name}.rjs => #{action_name}.js.rjs. - + You can still specify your old templates: - + respond_to do |format| format.xml do render :action => "#{action_name}.rxml" @@ -1222,8 +1222,8 @@ * Allow configuration of the default action cache path for #caches_action calls. [Rick Olson] class ListsController < ApplicationController - caches_action :index, :cache_path => Proc.new { |controller| - controller.params[:user_id] ? + caches_action :index, :cache_path => Proc.new { |controller| + controller.params[:user_id] ? controller.send(:user_lists_url, c.params[:user_id]) : controller.send(:lists_url) } end @@ -1296,7 +1296,7 @@ Roos] - + stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true => @@ -1452,7 +1452,7 @@ superclass' view_paths. [Rick Olson] * Add singleton resources. [Rick Olson] map.resource :account - + GET /account GET /account;edit UPDATE /account @@ -1491,7 +1491,7 @@ superclass' view_paths. [Rick Olson] * Added the option for extension aliases to mime type registration [David Heinemeier Hansson]. Example (already in the default routes): Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml ) - + ...will respond on both .html and .xhtml. * @response.redirect_url works with 201 Created responses: just return headers['Location'] rather than checking the response status. [Jeremy Kemper] @@ -1560,7 +1560,7 @@ superclass' view_paths. [Rick Olson] <% content_tag :div, :class => "strong" %> Hello world! <% end %> - + Will output:
Hello world!
@@ -1619,7 +1619,7 @@ superclass' view_paths. [Rick Olson] Gives: - + Which is needed for dealing with the IE6 DOM when it's not yet fully loaded. * Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [Mike Naberezny] @@ -1676,9 +1676,9 @@ superclass' view_paths. [Rick Olson] * Added proper getters and setters for content type and charset [David Heinemeier Hansson]. Example of what we used to do: response.headers["Content-Type"] = "application/atom+xml; charset=utf-8" - + ...now: - + response.content_type = Mime::ATOM response.charset = "utf-8" @@ -1721,7 +1721,7 @@ superclass' view_paths. [Rick Olson] * Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [David Heinemeier Hansson]. So what used to require a nil, like this: link_to("Hider", nil, :class => "hider_link") { |p| p[:something].hide } - + ...can be written like this: link_to("Hider", :class => "hider_link") { |p| p[:something].hide } @@ -1739,7 +1739,7 @@ superclass' view_paths. [Rick Olson] * Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch] -* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [David Heinemeier Hansson] +* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [David Heinemeier Hansson] * Fixed FormOptionsHelper#select to respect :selected value #5813 @@ -1936,7 +1936,7 @@ superclass' view_paths. [Rick Olson] class WeblogController < ActionController::Base def index @posts = Post.find :all - + respond_to do |format| format.html format.xml { render :xml => @posts.to_xml } @@ -1944,26 +1944,26 @@ superclass' view_paths. [Rick Olson] end end end - + # returns HTML when requested by a browser, since the browser # has the HTML mimetype at the top of its priority list Accept: text/html - GET /weblog - - # returns the XML + GET /weblog + + # returns the XML Accept: application/xml - GET /weblog + GET /weblog - # returns the HTML + # returns the HTML Accept: application/xml GET /weblog.html # returns the XML Accept: text/html GET /weblog.xml - + All this relies on the fact that you have a route that includes .:format. - + * Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [David Heinemeier Hansson] * Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [David Heinemeier Hansson] @@ -1999,12 +1999,12 @@ superclass' view_paths. [Rick Olson] * Fixes bad rendering of JavaScriptMacrosHelper rdoc (closes #4910) [Frederick Ros] * Allow error_messages_for to report errors for multiple objects, as well as support for customizing the name of the object in the error summary header. Closes #4186. [andrew@redlinesoftware.com, Marcel Molina Jr.] - + error_messages_for :account, :user, :subscription, :object_name => :account * Enhance documentation for setting headers in integration tests. Skip auto HTTP prepending when its already there. Closes #4079. [Rick Olson] -* Documentation for AbstractRequest. Closes #4895. [Kevin Clark] +* Documentation for AbstractRequest. Closes #4895. [Kevin Clark] * Refactor various InstanceTag instance method to class methods. Closes #4800. [Stefan Kaes] @@ -2037,8 +2037,8 @@ superclass' view_paths. [Rick Olson] * Modify routing so that you can say :require => { :method => :post } for a route, and the route will never be selected unless the request method is POST. Only works for route recognition, not for route generation. [Jamis Buck] * Added :add_headers option to verify which merges a hash of name/value pairs into the response's headers hash if the prerequisites cannot be satisfied. [Sam Stephenson] - ex. verify :only => :speak, :method => :post, - :render => { :status => 405, :text => "Must be post" }, + ex. verify :only => :speak, :method => :post, + :render => { :status => 405, :text => "Must be post" }, :add_headers => { "Allow" => "POST" } * Added ActionController.filter_parameter_logging that makes it easy to remove passwords, credit card numbers, and other sensitive information from being logged when a request is handled #1897 [jeremye@bsa.ca.gov] @@ -2204,7 +2204,7 @@ superclass' view_paths. [Rick Olson] <% content_tag :div, :class => "strong" %> Hello world! <% end %> - + Will output:
Hello world!
@@ -2257,7 +2257,7 @@ superclass' view_paths. [Rick Olson] Gives: - + Which is needed for dealing with the IE6 DOM when it's not yet fully loaded. * Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [Mike Naberezny] @@ -2312,9 +2312,9 @@ superclass' view_paths. [Rick Olson] * Added proper getters and setters for content type and charset [David Heinemeier Hansson]. Example of what we used to do: response.headers["Content-Type"] = "application/atom+xml; charset=utf-8" - + ...now: - + response.content_type = Mime::ATOM response.charset = "utf-8" @@ -2349,7 +2349,7 @@ superclass' view_paths. [Rick Olson] * Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [David Heinemeier Hansson]. So what used to require a nil, like this: link_to("Hider", nil, :class => "hider_link") { |p| p[:something].hide } - + ...can be written like this: link_to("Hider", :class => "hider_link") { |p| p[:something].hide } @@ -2363,7 +2363,7 @@ superclass' view_paths. [Rick Olson] * Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch] -* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [David Heinemeier Hansson] +* Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [David Heinemeier Hansson] * Fixed FormOptionsHelper#select to respect :selected value #5813 @@ -2529,7 +2529,7 @@ superclass' view_paths. [Rick Olson] class WeblogController < ActionController::Base def index @posts = Post.find :all - + respond_to do |format| format.html format.xml { render :xml => @posts.to_xml } @@ -2537,26 +2537,26 @@ superclass' view_paths. [Rick Olson] end end end - + # returns HTML when requested by a browser, since the browser # has the HTML mimetype at the top of its priority list Accept: text/html - GET /weblog - - # returns the XML + GET /weblog + + # returns the XML Accept: application/xml - GET /weblog + GET /weblog - # returns the HTML + # returns the HTML Accept: application/xml GET /weblog.html # returns the XML Accept: text/html GET /weblog.xml - + All this relies on the fact that you have a route that includes .:format. - + * Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [David Heinemeier Hansson] * Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [David Heinemeier Hansson] @@ -2578,7 +2578,7 @@ superclass' view_paths. [Rick Olson] * Use #flush between switching from #write to #syswrite. Closes #4907. [Blair Zajac ] * Allow error_messages_for to report errors for multiple objects, as well as support for customizing the name of the object in the error summary header. Closes #4186. [andrew@redlinesoftware.com, Marcel Molina Jr.] - + error_messages_for :account, :user, :subscription, :object_name => :account * Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick Olson] @@ -2600,8 +2600,8 @@ superclass' view_paths. [Rick Olson] * Modify routing so that you can say :require => { :method => :post } for a route, and the route will never be selected unless the request method is POST. Only works for route recognition, not for route generation. [Jamis Buck] * Added :add_headers option to verify which merges a hash of name/value pairs into the response's headers hash if the prerequisites cannot be satisfied. [Sam Stephenson] - ex. verify :only => :speak, :method => :post, - :render => { :status => 405, :text => "Must be post" }, + ex. verify :only => :speak, :method => :post, + :render => { :status => 405, :text => "Must be post" }, :add_headers => { "Allow" => "POST" } @@ -2666,7 +2666,7 @@ superclass' view_paths. [Rick Olson] * Added automated timestamping to AssetTagHelper methods for stylesheets, javascripts, and images when Action Controller is run under Rails [David Heinemeier Hansson]. Example: image_tag("rails.png") # => 'Rails' - + ...to avoid frequent stats (not a problem for most people), you can set RAILS_ASSET_ID in the ENV to avoid stats: ENV["RAILS_ASSET_ID"] = "2345" @@ -2686,9 +2686,9 @@ superclass' view_paths. [Rick Olson] * Change #form_for and #fields_for so that the second argument is not required [Dave Thomas] <% form_for :post, @post, :url => { :action => 'create' } do |f| -%> - + becomes... - + <% form_for :post, :url => { :action => 'create' } do |f| -%> * Update to script.aculo.us 1.6 [Thomas Fuchs] @@ -2706,11 +2706,11 @@ superclass' view_paths. [Rick Olson] * Added nicer message for assert_redirected_to (closes #4294) [court3nay] assert_redirected_to :action => 'other_host', :only_path => false - + when it was expecting... - + redirected_to :action => 'other_host', :only_path => true, :host => 'other.test.host' - + gives the error message... response is not a redirection to all of the options supplied (redirection is <{:only_path=>false, :host=>"other.test.host", :action=>"other_host"}>), difference: <{:only_path=>"true", :host=>"other.test.host"}> @@ -2757,11 +2757,11 @@ superclass' view_paths. [Rick Olson] * CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason [David Heinemeier Hansson] * Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [David Heinemeier Hansson]. Example: - + class WeblogController < ActionController::Base def index @posts = Post.find :all - + respond_to do |type| type.html # using defaults, which will render weblog/index.rhtml type.xml { render :action => "index.rxml" } @@ -2775,7 +2775,7 @@ superclass' view_paths. [Rick Olson] class WeblogController < ActionController::Base def create @post = Post.create(params[:post]) - + respond_to do |type| type.js { render } # renders create.rjs type.html { redirect_to :action => "index" } @@ -2801,16 +2801,16 @@ superclass' view_paths. [Rick Olson] * Added plugin support for parameter parsers, which allows for better support for REST web services. By default, posts submitted with the application/xml content type is handled by creating a XmlSimple hash with the same name as the root element of the submitted xml. More handlers can easily be registered like this: # Assign a new param parser to a new content type - ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data| - node = REXML::Document.new(post) + ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data| + node = REXML::Document.new(post) { node.root.name => node.root } end # Assign the default XmlSimple to a new content type ActionController::Base.param_parsers['application/backpack+xml'] = :xml_simple - + Default YAML web services were retired, ActionController::Base.param_parsers carries an example which shows how to get this functionality back. As part of this new plugin support, request.[formatted_post?, xml_post?, yaml_post? and post_format] were all deprecated in favor of request.content_type [Tobias Lütke] - + * Fixed Effect.Appear in effects.js to work with floats in Safari #3524, #3813, #3044 [Thomas Fuchs] * Fixed that default image extension was not appended when using a full URL with AssetTagHelper#image_tag #4032, #3728 [rubyonrails@beautifulpixel.com] @@ -2848,7 +2848,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car page['blank_slate'] # => $('blank_slate'); page['blank_slate'].show # => $('blank_slate').show(); page['blank_slate'].show('first').up # => $('blank_slate').show('first').up(); - + page.select('p') # => $$('p'); page.select('p.welcome b').first # => $$('p.welcome b').first(); page.select('p.welcome b').first.hide # => $$('p.welcome b').first().hide(); @@ -2986,7 +2986,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Add session ID to default logging, but remove the verbose description of every step [David Heinemeier Hansson] * Add the following RJS methods: [Sam Stephenson] - + * alert - Displays an alert() dialog * redirect_to - Changes window.location.href to simulate a browser redirect * call - Calls a JavaScript function @@ -3068,13 +3068,13 @@ Default YAML web services were retired, ActionController::Base.param_parsers car page.visual_effect :highlight, 'list' page.hide 'status-indicator', 'cancel-link' end - + generates the following JavaScript: - + new Insertion.Bottom("list", "
  • Last item
  • "); new Effect.Highlight("list"); ["status-indicator", "cancel-link"].each(Element.hide); - + * Refactored JavaScriptHelper into PrototypeHelper and ScriptaculousHelper [Sam Stephenson] * Update to latest script.aculo.us version (as of [3031]) @@ -3097,12 +3097,12 @@ Default YAML web services were retired, ActionController::Base.param_parsers car <% form_for :person, person, :url => { :action => "update" } do |person_form| %> First name: <%= person_form.text_field :first_name %> Last name : <%= person_form.text_field :last_name %> - + <% fields_for :permission => person.permission do |permission_fields| %> Admin? : <%= permission_fields.check_box :admin %> <% end %> <% end %> - + * options_for_select allows any objects which respond_to? :first and :last rather than restricting to Array and Range. #2824 [Jacob Robbins , Jeremy Kemper] * The auto_link text helper accepts an optional block to format the link text for each url and email address. Example: auto_link(post.body) { |text| truncate(text, 10) } [Jeremy Kemper] @@ -3133,11 +3133,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car class ApplicationController < ActionController::Base before_filter :authenticate end - + class WeblogController < ApplicationController # will run the :authenticate filter end - + class SignupController < ActionController::Base # will not run the :authenticate filter skip_before_filter :authenticate @@ -3283,7 +3283,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added easy assignment of fragment cache store through use of symbols for included stores (old way still works too) Before: - ActionController::Base.fragment_cache_store = + ActionController::Base.fragment_cache_store = ActionController::Base::Caching::Fragments::FileStore.new("/path/to/cache/directory") After: @@ -3446,7 +3446,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added incremental and local autocompleting and loads of documentation to controls.js [Ivan Krstic] * Extended the auto_complete_field helper to accept tokens option * Changed object extension mechanism to favor Object.extend to make script.aculo.us easily adaptable to support 3rd party libs like IE7.js [David Zülke] - + * Fixed that named routes didn't use the default values for action and possible other parameters #1534 [Nicholas Seckar] * Fixed JavascriptHelper#visual_effect to use camelize such that :blind_up will work #1639 [pelletierm@eastmedia.net] @@ -3502,13 +3502,13 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added support for graceful error handling of Ajax calls #1217 [Jamis Buck/Thomas Fuchs]. Example: link_to_remote( - "test", - :url => { :action => "faulty" }, + "test", + :url => { :action => "faulty" }, :update => { :success => "good", :failure => "bad" }, 403 => "alert('Forbidden- got ya!')", - 404 => "alert('Nothing there...?')", + 404 => "alert('Nothing there...?')", :failure => "alert('Unkown error ' + request.status)") - + * Attempt to explicitly flush the output at the end of CgiProcess#out * Fixed assert_redirected_to to handle absolute controller paths properly #1472 [Rick Olson/Nicholas Seckar] @@ -3519,7 +3519,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed prototype to consider all fields it doesn't know as text (such as Safari's search) just like the browser in its serialization #1497 [Sean Treadway] -* Improved performance of Routes generation by a factor of 5 #1434 [Nicholas Seckar] +* Improved performance of Routes generation by a factor of 5 #1434 [Nicholas Seckar] * Added named routes (NEEDS BETTER DESCRIPTION) #1434 [Nicholas Seckar] @@ -3550,8 +3550,8 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Correct distance_of_time_in_words for integer arguments and make the second arg optional, treating the first arg as a duration in seconds. #1458 [madrobby ] -* Fixed query parser to deal gracefully with equal signs inside keys and values #1345 [gorou]. - Example: /?sig=abcdef=:foobar=&x=y will pass now. +* Fixed query parser to deal gracefully with equal signs inside keys and values #1345 [gorou]. + Example: /?sig=abcdef=:foobar=&x=y will pass now. * Added Cuba to country list #1351 [todd] @@ -3571,7 +3571,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Ensure that helpers are only available to the controllers where they are defined and their subclasses. #1394 [kdole@tamu.edu] -* render("foo/bar") works with a layout again +* render("foo/bar") works with a layout again * Fixed double-singularization on scaffolded pagination call (Address would be turned into Addres) #1216, #1404 [nilsga] @@ -3619,7 +3619,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car | render_text "hello world!" | render :text => "hello world!" | | render_partial_collection "person", @people, nil, :a => 1 | render :partial => "person", :collection => @people, | | | :locals => { :a => 1 } | - +---------------------------------------------------------------+-------------------------------------------------------+ + +---------------------------------------------------------------+-------------------------------------------------------+ * Deprecated redirect_to_path and redirect_to_url in favor of letting redirect_to do the right thing when passed either a path or url. @@ -3647,7 +3647,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car Content-Type: application/xml HelloWorld - + ...is the same as: Content-Type: application/x-yaml @@ -3656,11 +3656,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car content: HelloWorld ...is the same as: - + item[content]=HelloWorld - + Which in the end turns into { "item" => { "content" => "HelloWorld" } }. This makes it a lot easier to publish REST web services on top of your regular actions (as they won't care). - + Example Curl call: curl -H 'Content-Type: application/xml' -d 'KillMeMore' http://www.example.com/service @@ -3704,11 +3704,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Removed dumping of template assigns on the rescue page as it would very easily include a ton of data making page loads take seconds (and the information was rarely helpful) #1222 * Added BenchmarkHelper that can measure the execution time of a block in a template and reports the result to the log. Example: - + <% benchmark "Notes section" do %> <%= expensive_notes_operation %> <% end %> - + Will add something like "Notes section (0.345234)" to the log. * Added ActionController::Caching::Sweeper as an improved an easier to use sweeper. The new sweepers work on a single-step approach instead of two-steps like the old ones. Before @@ -3716,7 +3716,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car def after_save(record) @list = record.is_a?(List) ? record : record.list end - + def filter(controller) controller.expire_page(:controller => "lists", :action => %w( show public feed ), :id => @list.id) controller.expire_action(:controller => "lists", :action => "all") @@ -3733,7 +3733,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car end The new sweepers can also observe on the actions themselves by implementing methods according to (before|after)_$controller_$action. Example of a callback that'll be called after PagesController#update_title has been performed: - + def after_pages_update_title expire_fragment(%r{pages/#{controller.assigns["page"].id}/.*}) end @@ -3772,16 +3772,16 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added a wide range of new Javascript effects: * Effect.Puff zooms the element out and makes it smoothly transparent at the same time, giving a "puff" illusion #996 [thomas@fesch.at] - After the animation is completed, the display property will be set to none. + After the animation is completed, the display property will be set to none. This effect will work on relative and absolute positioned elements. - + * Effect.Appear as the opposite of Effect.Fade #990 [thomas@fesch.at] You should return elements with style="display:none;" or a like class for this to work best and have no chance of flicker. - + * Effect.Squish for scaling down an element and making it disappear at the end #972 [thomas@fesch.at] - + * Effect.Scale for smoothly scaling images or text up and down #972 [thomas@fesch.at] - + * Effect.Fade which smoothly turns opacity from 100 to 0 and then hides the element #960 [thomas@fesch.at] * Added Request#xml_http_request? (and an alias xhr?) to that'll return true when the request came from one of the Javascript helper methods (Ajax). This can be used to give one behavior for modern browsers supporting Ajax, another to old browsers #1127 [Sam Stephenson] @@ -3789,11 +3789,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Changed render_partial to take local assigns as the second parameter instead of an explicit object and then the assigns. So the API changes from: <%= render_partial "account", person, "rules" => regulations.rules %> - + ...to: - + <%= render_partial "account", :account => person, :rules => regulations.rules %> - + The old API will still work, though, and render_partial "account" will still assume :account => @account. * Added support for web servers that use PATH_INFO instead of REQUEST_URI like IIS #1014 [BradG/Nicholas Seckar] @@ -3934,7 +3934,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car flash.now[:message] = 'Save failed, review' render_action 'edit' end - end + end end * Added to_param call for parameters when composing an url using url_for from something else than strings #812 [Sam Stephenson]. Example: @@ -3972,7 +3972,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car A request for /categories/top-level-cat, would give @params[:path_info] with "top-level-cat". A request for /categories/top-level-cat/level-1-cat, would give @params[:path_info] with "top-level-cat/level-1-cat" and so forth. - + The @params[:path_info] return is really an array, but where to_s has been overwritten to do join("/"). * Fixed options_for_select on selected line issue #624 [Florian Weber] @@ -4093,11 +4093,11 @@ Default YAML web services were retired, ActionController::Base.param_parsers car def test_create_post post :create, "post" => { "title" => "Exciting!" } assert_redirected_to :action => "show" - + follow_redirect assert_rendered_file "post/show" end - + Limitation: Only works for redirects to other actions within the same controller. * Fixed double requiring of models with the same name as the controller @@ -4122,9 +4122,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car <%= text_field "student[]", "last_name" %> <%= text_field "student[]", "grade", :size => "5" %> <% end %> - + ...would produce, for say David Black with id 123 and a grace of C+: - + @@ -4154,7 +4154,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car class WeblogController before_filter { |c| c.send(:redirect_to_url("http://www.farfaraway.com")}) } - + def hello render_text "I will never be called" end @@ -4167,7 +4167,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car redirect_to :action => "elsewhere" render_action "overthere" end - + Only the redirect happens. The rendering call is simply ignored. @@ -4177,12 +4177,12 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added assert_cookie_equal to assert the contents of a named cookie -* Fixed bug in page caching that prevented it from working at all +* Fixed bug in page caching that prevented it from working at all *1.3.0* (January 17th, 2005) -* Added an extensive caching module that offers three levels of granularity (page, action, fragment) and a variety of stores. +* Added an extensive caching module that offers three levels of granularity (page, action, fragment) and a variety of stores. Read more in ActionController::Caching. * Added the option of passing a block to ActiveRecordHelper#form in order to add more to the auto-generated form #469 [dom@sisna.com] @@ -4221,9 +4221,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Fixed three issues with retrying breakpoints #417 [Florian Gross] - 1. Don't screw up pages that use multiple values for the same parameter (?foo=bar&foo=qux was converted to ?foo=barqux) - 2. Don't screw up all forms when you click the "Retry with Breakpoint" link multiple times instead of reloading - (This caused the parameters to be added multiple times for GET forms leading to trouble.) + 1. Don't screw up pages that use multiple values for the same parameter (?foo=bar&foo=qux was converted to ?foo=barqux) + 2. Don't screw up all forms when you click the "Retry with Breakpoint" link multiple times instead of reloading + (This caused the parameters to be added multiple times for GET forms leading to trouble.) 3. Don't add ?BP-RETRY=1 multiple times * Added that all renders and redirects now return false, so they can be used as the last line in before_filters to stop execution. @@ -4235,7 +4235,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car return false end end - + After: def authenticate redirect_to(:controller => "account", :action => "login") unless @session[:authenticated] @@ -4246,7 +4246,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car class JournalController < ActionController::Base # only require authentication if the current action is edit or delete before_filter :authorize, :only_on => [ :edit, :delete ] - + private def authorize # redirect to login unless authenticated @@ -4290,7 +4290,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added more informative exception when using helper :some_helper and the helper requires another file that fails, you'll get an error message tells you what file actually failed to load, rather than falling back on assuming it was the helper file itself #346 [dblack] -* Added use of *_before_type_cast for all input and text fields. This is helpful for getting "100,000" back on a integer-based +* Added use of *_before_type_cast for all input and text fields. This is helpful for getting "100,000" back on a integer-based validation where the value would normally be "100". * Added Request#port_string to get something like ":8080" back on 8080 and "" on 80 (or 443 with https). @@ -4337,15 +4337,15 @@ Default YAML web services were retired, ActionController::Base.param_parsers car scaffold :<%= singular_name %> <% end %> helper :post - + ...produces this on post as singular_name: class SomeController < ApplicationController - + scaffold :post - + helper :post - + ...where as: class SomeController < ApplicationController @@ -4353,18 +4353,18 @@ Default YAML web services were retired, ActionController::Base.param_parsers car scaffold :<%= singular_name %> <% end -%> helper :post - + ...produces: class SomeController < ApplicationController scaffold :post helper :post - + [This undocumented gem for ERb was uncovered by bitsweat] * Fixed CgiRequest so that it'll now accept session options with Symbols as keys (as the documentation points out) [Suggested by Andreas] -* Added that render_partial will always by default include a counter with value 1 unless there is a counter passed in via the +* Added that render_partial will always by default include a counter with value 1 unless there is a counter passed in via the local_assigns hash that overrides it. As a result, render_collection_of_partials can still be written in terms of render_partial and partials that make use of a counter can be called without problems from both render_collection_of_partials as well as render_partial #295 [Marcel Molina Jr.] @@ -4379,12 +4379,12 @@ Default YAML web services were retired, ActionController::Base.param_parsers car link:classes/ActionController/Base.html#M000021. It's also possible to pass a string instead of an options hash to get a link tag that just points without consideration. The html_options works jointly for the image and ahref tag by letting the following special values enter the options on the image and the rest goes to the ahref: - + ::alt: If no alt text is given, the file name part of the +src+ is used (capitalized and without the extension) ::size: Supplied as "XxY", so "30x45" becomes width="30" and height="45" ::align: Sets the alignment, no special features - - The +src+ can be supplied as a... + + The +src+ can be supplied as a... * full path, like "/my_images/image.gif" * file name, like "rss.gif", that gets expanded to "/images/rss.gif" * file name without extension, like "logo", that gets expanded to "/images/logo.png" @@ -4399,10 +4399,10 @@ Default YAML web services were retired, ActionController::Base.param_parsers car # Calls Controller#miletone with a GET request process :milestone - + # Calls Controller#miletone with a POST request that has parameters post :milestone, { "name" => "David" } - + # Calls Controller#milestone with a HEAD request that has both parameters and session data head :milestone, { "id" => 1 }, { "user_id" => 23 } @@ -4412,7 +4412,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Added indifference to whether @headers["Content-Type"], @headers["Content-type"], or @headers["content-type"] is used. -* Added TestSession#session_id that returns an empty string to make it easier to functional test applications that doesn't use +* Added TestSession#session_id that returns an empty string to make it easier to functional test applications that doesn't use cookie-based sessions #275 [jcf] * Fixed that cached template loading would still check the file system to see if the file existed #258 [Andreas Schwarz] @@ -4427,9 +4427,9 @@ Default YAML web services were retired, ActionController::Base.param_parsers car cookies["user_name"] = "david" # => Will set a simple session cookie cookies["login"] = { "value" => "XJ-122", "expires" => Time.now + 360} # => Will set a cookie that expires in 1 hour - + Examples for reading: - + cookies["user_name"] # => "david" cookies.size # => 2 @@ -4464,14 +4464,14 @@ Default YAML web services were retired, ActionController::Base.param_parsers car class MsgController < ApplicationController helper :msg end - + ...you can just do: - + class MsgController < ApplicationController end * Added dependencies_on(layer) to query the dependencies of a controller. Examples: - + MsgController.dependencies_on(:model) # => [ :post, :comment, :attachment ] MsgController.dependencies_on(:service) # => [ :notification_service ] MsgController.dependencies_on(:observer) # => [ :comment_observer ] @@ -4526,7 +4526,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car class WeblogController < ActionController::Base include WeblogHelper end - + After: module WeblogHelper @@ -4562,10 +4562,10 @@ Default YAML web services were retired, ActionController::Base.param_parsers car * Changed scaffolding of forms to use