radiant 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of radiant might be problematic. Click here for more details.
- data/CHANGELOG +33 -1
- data/CONTRIBUTORS +15 -2
- data/INSTALL +9 -7
- data/README +11 -7
- data/app/controllers/admin/layouts_controller.rb +5 -2
- data/app/controllers/admin/pages_controller.rb +8 -5
- data/app/controllers/admin/snippets_controller.rb +5 -2
- data/app/controllers/application_controller.rb +7 -0
- data/app/helpers/admin/node_helper.rb +2 -2
- data/app/helpers/application_helper.rb +2 -2
- data/app/models/radiant/config.rb +36 -4
- data/app/models/standard_tags.rb +1 -1
- data/app/views/admin/layouts/index.html.haml +15 -12
- data/app/views/admin/page_parts/_page_part.html.haml +2 -2
- data/app/views/admin/pages/index.html.haml +1 -1
- data/app/views/admin/snippets/_form.html.haml +1 -1
- data/app/views/admin/snippets/index.html.haml +14 -10
- data/config/database.db2.yml +20 -0
- data/config/environment.rb +4 -4
- data/config/environments/test.rb +1 -2
- data/features/support/env.rb +2 -1
- data/lib/generators/extension/extension_generator.rb +5 -0
- data/lib/generators/extension/templates/RSpecRakefile +11 -8
- data/lib/generators/extension/templates/cucumber.yml +1 -0
- data/lib/generators/extension/templates/cucumber_env.rb +16 -0
- data/lib/generators/extension/templates/cucumber_paths.rb +14 -0
- data/lib/generators/extension/templates/extension.rb +1 -1
- data/lib/generators/instance/instance_generator.rb +1 -1
- data/lib/generators/instance/templates/databases/db2.yml +40 -0
- data/lib/generators/instance/templates/instance_environment.rb +6 -6
- data/lib/local_time.rb +3 -9
- data/lib/radiant.rb +1 -1
- data/lib/radiant/cache.rb +10 -8
- data/lib/radiant/extension.rb +36 -0
- data/lib/radiant/extension/script.rb +1 -1
- data/lib/radiant/extension_loader.rb +5 -1
- data/lib/radiant/initializer.rb +52 -4
- data/lib/task_support.rb +33 -0
- data/lib/tasks/cucumber.rake +5 -1
- data/lib/tasks/radiant_config.rake +18 -0
- data/lib/tasks/release.rake +1 -0
- data/public/javascripts/admin/admin.js +1 -1
- data/spec/controllers/admin/layouts_controller_spec.rb +18 -12
- data/spec/controllers/admin/pages_controller_spec.rb +35 -29
- data/spec/controllers/admin/snippets_controller_spec.rb +11 -5
- data/spec/controllers/admin/welcome_controller_spec.rb +1 -1
- data/spec/controllers/application_controller_spec.rb +18 -0
- data/spec/fixtures/radiant_config.yml +10 -0
- data/spec/generators/extension_generator_spec.rb +12 -0
- data/spec/helpers/admin/node_helper_spec.rb +6 -0
- data/spec/helpers/application_helper_spec.rb +1 -1
- data/spec/lib/radiant/extension_loader_spec.rb +17 -0
- data/spec/lib/radiant/extension_spec.rb +28 -0
- data/spec/lib/radiant/initializer_spec.rb +34 -0
- data/spec/lib/task_support_spec.rb +42 -0
- data/spec/models/page_spec.rb +6 -2
- data/spec/models/radiant/config_spec.rb +42 -1
- data/spec/models/standard_tags_spec.rb +2 -2
- data/test/fixtures/extensions/01_basic/app/metal/basic_metal.rb +9 -0
- data/test/fixtures/extensions/02_overriding/app/metal/basic_metal.rb +9 -0
- data/vendor/extensions/textile_filter/textile.html +2 -2
- data/vendor/plugins/dataset/CHANGELOG +2 -1
- data/vendor/plugins/dataset/Rakefile +3 -0
- data/vendor/plugins/dataset/VERSION.yml +2 -2
- data/vendor/plugins/dataset/dataset.gemspec +9 -3
- data/vendor/plugins/dataset/lib/dataset.rb +3 -0
- data/vendor/radius/lib/radius.rb +5 -0
- data/vendor/radius/test/radius_test.rb +6 -0
- data/vendor/rails/actionmailer/CHANGELOG +8 -0
- data/vendor/rails/actionmailer/Rakefile +3 -2
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +2 -1
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
- data/vendor/rails/actionmailer/test/abstract_unit.rb +0 -3
- data/vendor/rails/actionmailer/test/mail_service_test.rb +3 -2
- data/vendor/rails/actionpack/CHANGELOG +16 -0
- data/vendor/rails/actionpack/Rakefile +5 -3
- data/vendor/rails/actionpack/lib/action_controller.rb +2 -7
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +13 -3
- data/vendor/rails/actionpack/lib/action_controller/base.rb +12 -3
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/caching/actions.rb +9 -1
- data/vendor/rails/actionpack/lib/action_controller/caching/sweeper.rb +45 -0
- data/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb +0 -42
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +21 -6
- data/vendor/rails/actionpack/lib/action_controller/failsafe.rb +40 -6
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +11 -3
- data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +7 -3
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +5 -12
- data/vendor/rails/actionpack/lib/action_controller/middlewares.rb +0 -1
- data/vendor/rails/actionpack/lib/action_controller/params_parser.rb +6 -0
- data/vendor/rails/actionpack/lib/action_controller/reloader.rb +47 -7
- data/vendor/rails/actionpack/lib/action_controller/request.rb +6 -2
- data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +2 -1
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +17 -13
- data/vendor/rails/actionpack/lib/action_controller/response.rb +8 -2
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +3 -0
- data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +20 -6
- data/vendor/rails/actionpack/lib/action_controller/streaming.rb +4 -2
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +9 -1
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +1 -1
- data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +21 -9
- data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +26 -12
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +71 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +10 -4
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +7 -7
- data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +5 -5
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +23 -14
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/locale/en.yml +4 -0
- data/vendor/rails/actionpack/lib/action_view/paths.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/template.rb +22 -33
- data/vendor/rails/actionpack/test/abstract_unit.rb +17 -1
- data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +3 -3
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +27 -0
- data/vendor/rails/actionpack/test/controller/caching_test.rb +40 -1
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +16 -0
- data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +59 -18
- data/vendor/rails/actionpack/test/controller/failsafe_test.rb +60 -0
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +3 -1
- data/vendor/rails/actionpack/test/controller/flash_test.rb +6 -1
- data/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb +25 -0
- data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +63 -9
- data/vendor/rails/actionpack/test/controller/integration_test.rb +31 -3
- data/vendor/rails/actionpack/test/controller/rack_test.rb +18 -1
- data/vendor/rails/actionpack/test/controller/redirect_test.rb +4 -1
- data/vendor/rails/actionpack/test/controller/reloader_test.rb +124 -0
- data/vendor/rails/actionpack/test/controller/render_test.rb +19 -9
- data/vendor/rails/actionpack/test/controller/request/json_params_parsing_test.rb +24 -4
- data/vendor/rails/actionpack/test/controller/request/multipart_params_parsing_test.rb +1 -62
- data/vendor/rails/actionpack/test/controller/request/test_request_test.rb +35 -0
- data/vendor/rails/actionpack/test/controller/request/url_encoded_params_parsing_test.rb +0 -38
- data/vendor/rails/actionpack/test/controller/request/xml_params_parsing_test.rb +15 -0
- data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +6 -5
- data/vendor/rails/actionpack/test/controller/request_test.rb +218 -230
- data/vendor/rails/actionpack/test/controller/resources_test.rb +52 -0
- data/vendor/rails/actionpack/test/controller/routing_test.rb +28 -2
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +12 -2
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +9 -32
- data/vendor/rails/actionpack/test/controller/test_test.rb +8 -0
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +29 -3
- data/vendor/rails/actionpack/test/fixtures/failsafe/500.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/public/absolute/test.css +23 -0
- data/vendor/rails/actionpack/test/fixtures/public/absolute/test.js +63 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +1 -1
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +46 -0
- data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +29 -0
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +143 -6
- data/vendor/rails/actionpack/test/template/form_options_helper_i18n_test.rb +27 -0
- data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +56 -0
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +23 -6
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +11 -11
- data/vendor/rails/actionpack/test/template/template_test.rb +32 -0
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +23 -0
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +8 -0
- data/vendor/rails/activerecord/CHANGELOG +18 -0
- data/vendor/rails/activerecord/Rakefile +26 -9
- data/vendor/rails/activerecord/examples/performance.rb +162 -0
- data/vendor/rails/activerecord/lib/active_record/associations.rb +104 -35
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +10 -5
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +22 -4
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +5 -1
- data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +16 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +1 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +13 -3
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb +15 -9
- data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +15 -9
- data/vendor/rails/activerecord/lib/active_record/base.rb +34 -31
- data/vendor/rails/activerecord/lib/active_record/batches.rb +23 -15
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +7 -13
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +16 -2
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +7 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +17 -8
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +98 -35
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +15 -0
- data/vendor/rails/activerecord/lib/active_record/dirty.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +14 -11
- data/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/locale/en.yml +4 -0
- data/vendor/rails/activerecord/lib/active_record/named_scope.rb +3 -8
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +6 -3
- data/vendor/rails/activerecord/lib/active_record/serialization.rb +3 -2
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +10 -18
- data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +6 -2
- data/vendor/rails/activerecord/lib/active_record/session_store.rb +9 -1
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +39 -9
- data/vendor/rails/activerecord/lib/active_record/validations.rb +149 -80
- data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
- data/vendor/rails/activerecord/test/cases/adapter_test.rb +12 -0
- data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +102 -22
- data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +5 -5
- data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +12 -0
- data/vendor/rails/activerecord/test/cases/associations/habtm_join_table_test.rb +56 -0
- data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +62 -2
- data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +46 -1
- data/vendor/rails/activerecord/test/cases/associations/has_one_through_associations_test.rb +18 -1
- data/vendor/rails/activerecord/test/cases/associations/inner_join_association_test.rb +5 -0
- data/vendor/rails/activerecord/test/cases/associations/join_model_test.rb +4 -4
- data/vendor/rails/activerecord/test/cases/autosave_association_test.rb +22 -0
- data/vendor/rails/activerecord/test/cases/base_test.rb +51 -6
- data/vendor/rails/activerecord/test/cases/calculations_test.rb +14 -14
- data/vendor/rails/activerecord/test/cases/column_definition_test.rb +34 -0
- data/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb +5 -5
- data/vendor/rails/activerecord/test/cases/dirty_test.rb +10 -0
- data/vendor/rails/activerecord/test/cases/finder_test.rb +21 -50
- data/vendor/rails/activerecord/test/cases/fixtures_test.rb +6 -1
- data/vendor/rails/activerecord/test/cases/helper.rb +1 -2
- data/vendor/rails/activerecord/test/cases/i18n_test.rb +5 -0
- data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +57 -57
- data/vendor/rails/activerecord/test/cases/method_scoping_test.rb +14 -4
- data/vendor/rails/activerecord/test/cases/migration_test.rb +39 -11
- data/vendor/rails/activerecord/test/cases/modules_test.rb +42 -0
- data/vendor/rails/activerecord/test/cases/named_scope_test.rb +6 -4
- data/vendor/rails/activerecord/test/cases/pk_test.rb +18 -0
- data/vendor/rails/activerecord/test/cases/reflection_test.rb +7 -7
- data/vendor/rails/activerecord/test/cases/schema_dumper_test.rb +35 -7
- data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +76 -0
- data/vendor/rails/activerecord/test/cases/timestamp_test.rb +75 -0
- data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +656 -624
- data/vendor/rails/activerecord/test/cases/validations_test.rb +12 -2
- data/vendor/rails/activerecord/test/cases/xml_serialization_test.rb +20 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -0
- data/vendor/rails/activerecord/test/fixtures/posts.yml +3 -0
- data/vendor/rails/activerecord/test/models/author.rb +5 -0
- data/vendor/rails/activerecord/test/models/comment.rb +5 -1
- data/vendor/rails/activerecord/test/models/company.rb +9 -7
- data/vendor/rails/activerecord/test/models/company_in_module.rb +1 -1
- data/vendor/rails/activerecord/test/models/contract.rb +5 -0
- data/vendor/rails/activerecord/test/models/developer.rb +10 -0
- data/vendor/rails/activerecord/test/models/essay.rb +3 -0
- data/vendor/rails/activerecord/test/models/organization.rb +2 -0
- data/vendor/rails/activerecord/test/models/pet.rb +1 -1
- data/vendor/rails/activerecord/test/models/project.rb +1 -1
- data/vendor/rails/activerecord/test/models/reply.rb +2 -1
- data/vendor/rails/activerecord/test/models/topic.rb +1 -2
- data/vendor/rails/activerecord/test/models/toy.rb +2 -0
- data/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb +13 -2
- data/vendor/rails/activerecord/test/schema/schema.rb +19 -0
- data/vendor/rails/activeresource/CHANGELOG +16 -0
- data/vendor/rails/activeresource/Rakefile +3 -2
- data/vendor/rails/activeresource/lib/active_resource/base.rb +89 -9
- data/vendor/rails/activeresource/lib/active_resource/connection.rb +73 -8
- data/vendor/rails/activeresource/lib/active_resource/exceptions.rb +66 -0
- data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +2 -2
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +20 -4
- data/vendor/rails/activeresource/lib/active_resource/version.rb +1 -1
- data/vendor/rails/activeresource/test/abstract_unit.rb +1 -3
- data/vendor/rails/activeresource/test/base/load_test.rb +16 -1
- data/vendor/rails/activeresource/test/base_errors_test.rb +56 -19
- data/vendor/rails/activeresource/test/base_test.rb +147 -0
- data/vendor/rails/activeresource/test/connection_test.rb +42 -0
- data/vendor/rails/activeresource/test/debug.log +7974 -0
- data/vendor/rails/activeresource/test/fixtures/proxy.rb +4 -0
- data/vendor/rails/activesupport/CHANGELOG +13 -0
- data/vendor/rails/activesupport/lib/active_support/all.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/cache.rb +14 -1
- data/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb +16 -10
- data/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +2 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +2 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +14 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +19 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/model_naming.rb +8 -6
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +15 -9
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +29 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/bytesize.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +7 -7
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +9 -9
- data/vendor/rails/activesupport/lib/active_support/duration.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/json.rb +1 -22
- data/vendor/rails/activesupport/lib/active_support/json/backends/jsongem.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/json/backends/yaml.rb +88 -0
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +23 -72
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +9 -8
- data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +9 -8
- data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +14 -9
- data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +21 -11
- data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +16 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +6 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +4 -0
- data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +5 -32
- data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +9 -8
- data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +4 -2
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +80 -9
- data/vendor/rails/activesupport/lib/active_support/memoizable.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/message_verifier.rb +16 -3
- data/vendor/rails/activesupport/lib/active_support/multibyte.rb +30 -6
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +23 -17
- data/vendor/rails/activesupport/lib/active_support/multibyte/utils.rb +61 -0
- data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/test_case.rb +9 -8
- data/vendor/rails/activesupport/lib/active_support/testing/deprecation.rb +2 -0
- data/vendor/rails/activesupport/lib/active_support/time_with_zone.rb +9 -8
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +6 -7
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/vendor/{memcache-client-1.6.5 → memcache-client-1.7.4}/memcache.rb +242 -70
- data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/xml_mini/jdom.rb +162 -0
- data/vendor/rails/railties/CHANGELOG +10 -0
- data/vendor/rails/railties/Rakefile +13 -9
- data/vendor/rails/railties/bin/about +2 -2
- data/vendor/rails/railties/bin/console +1 -1
- data/vendor/rails/railties/bin/dbconsole +1 -1
- data/vendor/rails/railties/bin/destroy +1 -1
- data/vendor/rails/railties/bin/generate +1 -1
- data/vendor/rails/railties/bin/performance/benchmarker +1 -1
- data/vendor/rails/railties/bin/performance/profiler +1 -1
- data/vendor/rails/railties/bin/plugin +1 -1
- data/vendor/rails/railties/bin/runner +1 -1
- data/vendor/rails/railties/bin/server +1 -1
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +4 -2
- data/vendor/rails/railties/configs/initializers/new_rails_defaults.rb +2 -0
- data/vendor/rails/railties/configs/routes.rb +1 -1
- data/vendor/rails/railties/configs/seeds.rb +7 -0
- data/vendor/rails/railties/environments/boot.rb +1 -1
- data/vendor/rails/railties/guides/files/javascripts/code_highlighter.js +188 -0
- data/vendor/rails/railties/guides/files/javascripts/guides.js +8 -0
- data/vendor/rails/railties/guides/files/javascripts/highlighters.js +90 -0
- data/vendor/rails/railties/guides/files/stylesheets/main.css +441 -0
- data/vendor/rails/railties/guides/files/stylesheets/print.css +52 -0
- data/vendor/rails/railties/guides/files/stylesheets/reset.css +43 -0
- data/vendor/rails/railties/guides/files/stylesheets/style.css +13 -0
- data/vendor/rails/railties/guides/files/stylesheets/syntax.css +31 -0
- data/vendor/rails/railties/guides/images/belongs_to.png +0 -0
- data/vendor/rails/railties/guides/images/book_icon.gif +0 -0
- data/vendor/rails/railties/guides/images/bullet.gif +0 -0
- data/vendor/rails/railties/guides/images/chapters_icon.gif +0 -0
- data/vendor/rails/railties/guides/images/check_bullet.gif +0 -0
- data/vendor/rails/railties/guides/images/credits_pic_blank.gif +0 -0
- data/vendor/rails/railties/guides/images/csrf.png +0 -0
- data/vendor/rails/railties/guides/images/customized_error_messages.png +0 -0
- data/vendor/rails/railties/guides/images/error_messages.png +0 -0
- data/vendor/rails/railties/guides/images/feature_tile.gif +0 -0
- data/vendor/rails/railties/guides/images/footer_tile.gif +0 -0
- data/vendor/rails/railties/guides/images/fxn.jpg +0 -0
- data/vendor/rails/railties/guides/images/grey_bullet.gif +0 -0
- data/vendor/rails/railties/guides/images/habtm.png +0 -0
- data/vendor/rails/railties/guides/images/has_many.png +0 -0
- data/vendor/rails/railties/guides/images/has_many_through.png +0 -0
- data/vendor/rails/railties/guides/images/has_one.png +0 -0
- data/vendor/rails/railties/guides/images/has_one_through.png +0 -0
- data/vendor/rails/railties/guides/images/header_backdrop.png +0 -0
- data/vendor/rails/railties/guides/images/header_tile.gif +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_localized_pirate.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_translated_en.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_translated_pirate.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_translation_missing.png +0 -0
- data/vendor/rails/railties/guides/images/i18n/demo_untranslated.png +0 -0
- data/vendor/rails/railties/guides/images/icons/README +5 -0
- data/vendor/rails/railties/guides/images/icons/callouts/1.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/10.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/11.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/12.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/13.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/14.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/15.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/2.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/3.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/4.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/5.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/6.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/7.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/8.png +0 -0
- data/vendor/rails/railties/guides/images/icons/callouts/9.png +0 -0
- data/vendor/rails/railties/guides/images/icons/caution.png +0 -0
- data/vendor/rails/railties/guides/images/icons/example.png +0 -0
- data/vendor/rails/railties/guides/images/icons/home.png +0 -0
- data/vendor/rails/railties/guides/images/icons/important.png +0 -0
- data/vendor/rails/railties/guides/images/icons/next.png +0 -0
- data/vendor/rails/railties/guides/images/icons/note.png +0 -0
- data/vendor/rails/railties/guides/images/icons/prev.png +0 -0
- data/vendor/rails/railties/guides/images/icons/tip.png +0 -0
- data/vendor/rails/railties/guides/images/icons/up.png +0 -0
- data/vendor/rails/railties/guides/images/icons/warning.png +0 -0
- data/vendor/rails/railties/guides/images/nav_arrow.gif +0 -0
- data/vendor/rails/railties/guides/images/polymorphic.png +0 -0
- data/vendor/rails/railties/guides/images/posts_index.png +0 -0
- data/vendor/rails/railties/guides/images/rails_guides_logo.gif +0 -0
- data/vendor/rails/railties/guides/images/rails_logo_remix.gif +0 -0
- data/vendor/rails/railties/guides/images/rails_welcome.png +0 -0
- data/vendor/rails/railties/guides/images/session_fixation.png +0 -0
- data/vendor/rails/railties/guides/images/tab_grey.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_info.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_note.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_red.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_yellow.gif +0 -0
- data/vendor/rails/railties/guides/images/tab_yellow.png +0 -0
- data/vendor/rails/railties/guides/images/validation_error_messages.png +0 -0
- data/vendor/rails/railties/guides/rails_guides.rb +42 -0
- data/vendor/rails/railties/guides/rails_guides/generator.rb +138 -0
- data/vendor/rails/railties/guides/rails_guides/helpers.rb +34 -0
- data/vendor/rails/railties/guides/rails_guides/indexer.rb +55 -0
- data/vendor/rails/railties/guides/rails_guides/textile_extensions.rb +41 -0
- data/vendor/rails/railties/guides/source/2_2_release_notes.textile +422 -0
- data/vendor/rails/railties/guides/source/2_3_release_notes.textile +610 -0
- data/vendor/rails/railties/guides/source/action_controller_overview.textile +776 -0
- data/vendor/rails/railties/guides/source/action_mailer_basics.textile +424 -0
- data/vendor/rails/railties/guides/source/active_record_basics.textile +135 -0
- data/vendor/rails/railties/guides/source/active_record_querying.textile +969 -0
- data/vendor/rails/railties/guides/source/activerecord_validations_callbacks.textile +1086 -0
- data/vendor/rails/railties/guides/source/association_basics.textile +1781 -0
- data/vendor/rails/railties/guides/source/caching_with_rails.textile +524 -0
- data/vendor/rails/railties/guides/source/command_line.textile +589 -0
- data/vendor/rails/railties/guides/source/configuring.textile +234 -0
- data/vendor/rails/railties/guides/source/contribute.textile +71 -0
- data/vendor/rails/railties/guides/source/contributing_to_rails.textile +239 -0
- data/vendor/rails/railties/guides/source/credits.erb.textile +52 -0
- data/vendor/rails/railties/guides/source/debugging_rails_applications.textile +709 -0
- data/vendor/rails/railties/guides/source/form_helpers.textile +766 -0
- data/vendor/rails/railties/guides/source/getting_started.textile +1297 -0
- data/vendor/rails/railties/guides/source/i18n.textile +912 -0
- data/vendor/rails/railties/guides/source/index.erb.textile +124 -0
- data/vendor/rails/railties/guides/source/layout.html.erb +103 -0
- data/vendor/rails/railties/guides/source/layouts_and_rendering.textile +979 -0
- data/vendor/rails/railties/guides/source/migrations.textile +591 -0
- data/vendor/rails/railties/guides/source/nested_model_forms.textile +222 -0
- data/vendor/rails/railties/guides/source/performance_testing.textile +531 -0
- data/vendor/rails/railties/guides/source/plugins.textile +1512 -0
- data/vendor/rails/railties/guides/source/rails_on_rack.textile +309 -0
- data/vendor/rails/railties/guides/source/routing.textile +903 -0
- data/vendor/rails/railties/guides/source/security.textile +986 -0
- data/vendor/rails/railties/guides/source/testing.textile +951 -0
- data/vendor/rails/railties/lib/commands/dbconsole.rb +8 -4
- data/vendor/rails/railties/lib/commands/performance/profiler.rb +1 -1
- data/vendor/rails/railties/lib/initializer.rb +27 -4
- data/vendor/rails/railties/lib/rails/gem_dependency.rb +35 -6
- data/vendor/rails/railties/lib/rails/plugin.rb +12 -0
- data/vendor/rails/railties/lib/rails/plugin/loader.rb +7 -0
- data/vendor/rails/railties/lib/rails/rack/metal.rb +1 -1
- data/vendor/rails/railties/lib/rails/version.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/base.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +5 -0
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/template_runner.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +9 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +1 -0
- data/vendor/rails/railties/lib/tasks/databases.rake +17 -4
- data/vendor/rails/railties/lib/tasks/gems.rake +19 -6
- data/vendor/rails/railties/lib/tasks/routes.rake +4 -3
- data/vendor/rails/railties/lib/test_help.rb +4 -1
- metadata +158 -58
- data/spec/lib/local_time_spec.rb +0 -40
- data/vendor/rails/actionpack/lib/action_controller/rewindable_input.rb +0 -28
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack.rb +0 -89
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/adapter/camping.rb +0 -22
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/handler.rb +0 -37
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/abstract/request.rb +0 -37
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/basic.rb +0 -58
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/md5.rb +0 -124
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/nonce.rb +0 -51
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/params.rb +0 -55
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/digest/request.rb +0 -40
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/auth/openid.rb +0 -480
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/builder.rb +0 -63
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/cascade.rb +0 -36
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/chunked.rb +0 -49
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/commonlogger.rb +0 -61
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/conditionalget.rb +0 -45
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/content_length.rb +0 -29
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/content_type.rb +0 -23
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/deflater.rb +0 -85
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/directory.rb +0 -153
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/file.rb +0 -88
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler.rb +0 -48
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/cgi.rb +0 -61
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/evented_mongrel.rb +0 -8
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/fastcgi.rb +0 -89
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/lsws.rb +0 -55
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb +0 -84
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/scgi.rb +0 -59
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/swiftiplied_mongrel.rb +0 -8
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/thin.rb +0 -18
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb +0 -67
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/head.rb +0 -19
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lint.rb +0 -462
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lobster.rb +0 -65
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/lock.rb +0 -16
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb +0 -27
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/mime.rb +0 -204
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/mock.rb +0 -160
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/recursive.rb +0 -57
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/reloader.rb +0 -64
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/request.rb +0 -241
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/response.rb +0 -179
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/abstract/id.rb +0 -142
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/cookie.rb +0 -91
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/memcache.rb +0 -109
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/session/pool.rb +0 -100
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/showexceptions.rb +0 -349
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/showstatus.rb +0 -106
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/static.rb +0 -38
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/urlmap.rb +0 -55
- data/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/rack/utils.rb +0 -392
@@ -0,0 +1,20 @@
|
|
1
|
+
# This is only an example configuration. Please see the Rails
|
2
|
+
# documentation for more details.
|
3
|
+
|
4
|
+
development:
|
5
|
+
adapter: ibm_db
|
6
|
+
database: rad_dev
|
7
|
+
username: db2inst1
|
8
|
+
password:
|
9
|
+
|
10
|
+
test:
|
11
|
+
adapter: ibm_db
|
12
|
+
database: rad_test
|
13
|
+
username: db2inst1
|
14
|
+
password:
|
15
|
+
|
16
|
+
production:
|
17
|
+
adapter: ibm_db
|
18
|
+
database: radiant
|
19
|
+
username: db2inst1
|
20
|
+
password:
|
data/config/environment.rb
CHANGED
@@ -35,16 +35,16 @@ Radiant::Initializer.run do |config|
|
|
35
35
|
#
|
36
36
|
# Additional options:
|
37
37
|
# :use_x_sendfile => true
|
38
|
-
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd
|
38
|
+
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd.
|
39
39
|
# :use_x_accel_redirect => '/some/virtual/path'
|
40
40
|
# Turns on X-Accel-Redirect support for nginx. You have to provide
|
41
41
|
# a path that corresponds to a virtual location in your webserver
|
42
42
|
# configuration.
|
43
|
-
# :entitystore => "radiant:cache/entity"
|
43
|
+
# :entitystore => "radiant:tmp/cache/entity"
|
44
44
|
# Sets the entity store type (preceding the colon) and storage
|
45
45
|
# location (following the colon, relative to Rails.root).
|
46
46
|
# We recommend you use radiant: since this will enable manual expiration.
|
47
|
-
# :metastore => "radiant:cache/meta"
|
47
|
+
# :metastore => "radiant:tmp/cache/meta"
|
48
48
|
# Sets the meta store type and storage location. We recommend you use
|
49
49
|
# radiant: since this will enable manual expiration and acceleration headers.
|
50
50
|
config.middleware.use ::Radiant::Cache
|
@@ -58,7 +58,7 @@ Radiant::Initializer.run do |config|
|
|
58
58
|
config.active_record.observers = :user_action_observer
|
59
59
|
|
60
60
|
# Make Active Record use UTC-base instead of local time
|
61
|
-
config.
|
61
|
+
config.time_zone = 'UTC'
|
62
62
|
|
63
63
|
# Set the default field error proc
|
64
64
|
config.action_view.field_error_proc = Proc.new do |html, instance|
|
data/config/environments/test.rb
CHANGED
@@ -30,7 +30,6 @@ config.action_controller.allow_forgery_protection = false
|
|
30
30
|
# ActionMailer::Base.deliveries array.
|
31
31
|
config.action_mailer.delivery_method = :test
|
32
32
|
|
33
|
-
config.gem "rspec", :version => "1.2.6", :lib => false
|
34
|
-
config.gem "rspec-rails", :version => "1.2.6", :lib => false
|
33
|
+
config.gem "rspec-rails", :version => "~>1.2.6", :lib => false
|
35
34
|
config.gem "webrat", :version => "~>0.4.4", :lib => false
|
36
35
|
config.gem "cucumber", :version => "~>0.3.9", :lib => false
|
data/features/support/env.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Sets up the Rails environment for Cucumber
|
2
2
|
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
3
|
+
rails_env = File.expand_path(Dir.pwd + '/config/environment')
|
4
|
+
require rails_env if File.exist?(rails_env+'.rb')
|
4
5
|
|
5
6
|
require 'cucumber/rails/world'
|
6
7
|
require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
|
@@ -35,10 +35,15 @@ class ExtensionGenerator < Rails::Generator::NamedBase
|
|
35
35
|
m.directory "#{extension_path}/spec/models"
|
36
36
|
m.directory "#{extension_path}/spec/views"
|
37
37
|
m.directory "#{extension_path}/spec/helpers"
|
38
|
+
m.directory "#{extension_path}/features/support"
|
39
|
+
m.directory "#{extension_path}/features/step_definitions/admin"
|
38
40
|
|
39
41
|
m.template 'RSpecRakefile', "#{extension_path}/Rakefile"
|
40
42
|
m.template 'spec_helper.rb', "#{extension_path}/spec/spec_helper.rb"
|
41
43
|
m.file 'spec.opts', "#{extension_path}/spec/spec.opts"
|
44
|
+
m.file 'cucumber.yml', "#{extension_path}/cucumber.yml"
|
45
|
+
m.template 'cucumber_env.rb', "#{extension_path}/features/support/env.rb"
|
46
|
+
m.template 'cucumber_paths.rb', "#{extension_path}/features/support/paths.rb"
|
42
47
|
end
|
43
48
|
end
|
44
49
|
end
|
@@ -24,7 +24,8 @@ require 'rake/testtask'
|
|
24
24
|
rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
|
25
25
|
$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
|
26
26
|
require 'spec/rake/spectask'
|
27
|
-
|
27
|
+
require 'cucumber'
|
28
|
+
require 'cucumber/rake/task'
|
28
29
|
|
29
30
|
# Cleanup the RADIANT_ROOT constant so specs will load the environment
|
30
31
|
Object.send(:remove_const, :RADIANT_ROOT)
|
@@ -40,6 +41,8 @@ Spec::Rake::SpecTask.new(:spec) do |t|
|
|
40
41
|
t.spec_files = FileList['spec/**/*_spec.rb']
|
41
42
|
end
|
42
43
|
|
44
|
+
task :features => 'spec:integration'
|
45
|
+
|
43
46
|
namespace :spec do
|
44
47
|
desc "Run all specs in spec directory with RCov"
|
45
48
|
Spec::Rake::SpecTask.new(:rcov) do |t|
|
@@ -63,13 +66,13 @@ namespace :spec do
|
|
63
66
|
end
|
64
67
|
end
|
65
68
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
69
|
+
desc "Run the Cucumber features"
|
70
|
+
Cucumber::Rake::Task.new(:integration) do |t|
|
71
|
+
t.fork = true
|
72
|
+
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
|
73
|
+
# t.feature_pattern = "#{extension_root}/features/**/*.feature"
|
74
|
+
t.profile = "default"
|
75
|
+
end
|
73
76
|
|
74
77
|
# Setup specs for stats
|
75
78
|
task :statsetup do
|
@@ -0,0 +1 @@
|
|
1
|
+
default: --format progress features --tags ~@proposed,~@in_progress
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Sets up the Rails environment for Cucumber
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
# Extension root
|
4
|
+
extension_env = File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment')
|
5
|
+
require extension_env+'.rb'
|
6
|
+
|
7
|
+
Dir.glob(File.join(RADIANT_ROOT, "features", "**", "*.rb")).each {|step| require step}
|
8
|
+
|
9
|
+
Cucumber::Rails::World.class_eval do
|
10
|
+
include Dataset
|
11
|
+
datasets_directory "#{RADIANT_ROOT}/spec/datasets"
|
12
|
+
Dataset::Resolver.default = Dataset::DirectoryResolver.new("#{RADIANT_ROOT}/spec/datasets", File.dirname(__FILE__) + '/../../spec/datasets', File.dirname(__FILE__) + '/../datasets')
|
13
|
+
self.datasets_database_dump_path = "#{Rails.root}/tmp/dataset"
|
14
|
+
|
15
|
+
# dataset :<%= file_name %>
|
16
|
+
end
|
@@ -4,7 +4,7 @@ class InstanceGenerator < Rails::Generator::Base
|
|
4
4
|
DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
|
5
5
|
Config::CONFIG['ruby_install_name'])
|
6
6
|
|
7
|
-
DATABASES = %w( mysql postgresql sqlite3 sqlserver )
|
7
|
+
DATABASES = %w( mysql postgresql sqlite3 sqlserver db2 )
|
8
8
|
|
9
9
|
MYSQL_SOCKET_LOCATIONS = [
|
10
10
|
"/tmp/mysql.sock", # default
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# DB2 9.7
|
2
|
+
#
|
3
|
+
# Home Page
|
4
|
+
# http://rubyforge.org/projects/rubyibm/
|
5
|
+
#
|
6
|
+
# To install the ibm_db gem:
|
7
|
+
# On Linux:
|
8
|
+
# $ sudo -s
|
9
|
+
# $ . /home/db2inst1/sqllib/db2profile
|
10
|
+
# $ export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib
|
11
|
+
# $ export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
12
|
+
# $ gem install ibm_db
|
13
|
+
#
|
14
|
+
# On Windows:
|
15
|
+
# Issue the command: gem install ibm_db
|
16
|
+
# If prompted, select the mswin32 option
|
17
|
+
#
|
18
|
+
# For more details on the installation and the available connection parameters refer to:
|
19
|
+
# http://rubyforge.org/docman/?group_id=2361
|
20
|
+
|
21
|
+
development:
|
22
|
+
adapter: ibm_db
|
23
|
+
database: <%= app_name[0,4] %>_dev
|
24
|
+
username: db2inst1
|
25
|
+
password:
|
26
|
+
|
27
|
+
# Warning: The database defined as 'test' will be erased and
|
28
|
+
# re-generated from your development database when you run 'rake'.
|
29
|
+
# Do not set this db to the same as development or production.
|
30
|
+
test:
|
31
|
+
adapter: ibm_db
|
32
|
+
database: <%= app_name[0,4] %>_tst
|
33
|
+
username: db2inst1
|
34
|
+
password:
|
35
|
+
|
36
|
+
production:
|
37
|
+
adapter: ibm_db
|
38
|
+
database: <%= app_name[0,4] %>_prd
|
39
|
+
username: db2inst1
|
40
|
+
password:
|
@@ -29,7 +29,7 @@ Radiant::Initializer.run do |config|
|
|
29
29
|
}
|
30
30
|
|
31
31
|
# Comment out this line if you want to turn off all caching, or
|
32
|
-
# add options to modify the behavior. In the majority of deployment
|
32
|
+
# add options to modify the behavior. In the majority of deployment
|
33
33
|
# scenarios it is desirable to leave Radiant's cache enabled and in
|
34
34
|
# the default configuration.
|
35
35
|
#
|
@@ -38,13 +38,13 @@ Radiant::Initializer.run do |config|
|
|
38
38
|
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd.
|
39
39
|
# :use_x_accel_redirect => '/some/virtual/path'
|
40
40
|
# Turns on X-Accel-Redirect support for nginx. You have to provide
|
41
|
-
# a path that corresponds to a virtual location in your webserver
|
41
|
+
# a path that corresponds to a virtual location in your webserver
|
42
42
|
# configuration.
|
43
|
-
# :entitystore => "radiant:cache/entity"
|
44
|
-
# Sets the entity store type (preceding the colon) and storage
|
43
|
+
# :entitystore => "radiant:tmp/cache/entity"
|
44
|
+
# Sets the entity store type (preceding the colon) and storage
|
45
45
|
# location (following the colon, relative to Rails.root).
|
46
46
|
# We recommend you use radiant: since this will enable manual expiration.
|
47
|
-
# :metastore => "radiant:cache/meta"
|
47
|
+
# :metastore => "radiant:tmp/cache/meta"
|
48
48
|
# Sets the meta store type and storage location. We recommend you use
|
49
49
|
# radiant: since this will enable manual expiration and acceleration headers.
|
50
50
|
config.middleware.use ::Radiant::Cache
|
@@ -58,7 +58,7 @@ Radiant::Initializer.run do |config|
|
|
58
58
|
config.active_record.observers = :user_action_observer
|
59
59
|
|
60
60
|
# Make Active Record use UTC-base instead of local time
|
61
|
-
config.
|
61
|
+
config.time_zone = 'UTC'
|
62
62
|
|
63
63
|
# Set the default field error proc
|
64
64
|
config.action_view.field_error_proc = Proc.new do |html, instance|
|
data/lib/local_time.rb
CHANGED
@@ -1,12 +1,6 @@
|
|
1
|
-
require 'radiant/config'
|
2
1
|
module LocalTime
|
3
2
|
def adjust_time(time)
|
4
|
-
|
5
|
-
|
6
|
-
# adjust time
|
7
|
-
time.in_time_zone(timezone).time
|
8
|
-
else
|
9
|
-
time
|
10
|
-
end
|
3
|
+
::ActiveSupport::Deprecation.warn("`adjust_time' is deprecated. All time output is now auto-adjusted to Radiant::Config['local.timezone'] or the default ActiveRecord time zone.", caller)
|
4
|
+
time
|
11
5
|
end
|
12
|
-
end
|
6
|
+
end
|
data/lib/radiant.rb
CHANGED
data/lib/radiant/cache.rb
CHANGED
@@ -16,9 +16,11 @@ module Radiant
|
|
16
16
|
self.use_x_sendfile = options.delete(:use_x_sendfile) if options[:use_x_sendfile]
|
17
17
|
self.use_x_accel_redirect = options.delete(:use_x_accel_redirect) if options[:use_x_accel_redirect]
|
18
18
|
Rack::Cache.new(app, {
|
19
|
-
:entitystore => "radiant:cache/entity",
|
20
|
-
:metastore => "radiant:cache/meta",
|
21
|
-
:verbose => false
|
19
|
+
:entitystore => "radiant:tmp/cache/entity",
|
20
|
+
:metastore => "radiant:tmp/cache/meta",
|
21
|
+
:verbose => false,
|
22
|
+
:allow_reload => false,
|
23
|
+
:allow_revalidate => false}.merge(options))
|
22
24
|
end
|
23
25
|
|
24
26
|
def self.clear
|
@@ -27,7 +29,7 @@ module Radiant
|
|
27
29
|
end
|
28
30
|
|
29
31
|
class EntityStore < Rack::Cache::EntityStore::Disk
|
30
|
-
def initialize(root="#{Rails.root}/cache/entity")
|
32
|
+
def initialize(root="#{Rails.root}/tmp/cache/entity")
|
31
33
|
super
|
32
34
|
Radiant::Cache.entity_stores << self
|
33
35
|
end
|
@@ -38,7 +40,7 @@ module Radiant
|
|
38
40
|
end
|
39
41
|
|
40
42
|
class MetaStore < Rack::Cache::MetaStore::Disk
|
41
|
-
def initialize(root="#{Rails.root}/cache/meta")
|
43
|
+
def initialize(root="#{Rails.root}/tmp/cache/meta")
|
42
44
|
super
|
43
45
|
Radiant::Cache.meta_stores << self
|
44
46
|
end
|
@@ -48,7 +50,7 @@ module Radiant
|
|
48
50
|
end
|
49
51
|
|
50
52
|
private
|
51
|
-
def restore_response(hash, body)
|
53
|
+
def restore_response(hash, body=nil)
|
52
54
|
# Cribbed from the Rack::Cache source
|
53
55
|
status = hash.delete('X-Status').to_i
|
54
56
|
response = Rack::Cache::Response.new(status, hash, body)
|
@@ -57,14 +59,14 @@ module Radiant
|
|
57
59
|
if Radiant::Cache.use_x_sendfile
|
58
60
|
accelerate(response, 'X-Sendfile', File.expand_path(body.path))
|
59
61
|
elsif Radiant::Cache.use_x_accel_redirect
|
60
|
-
virtual_path = File.expand_path(body.path)
|
62
|
+
virtual_path = File.expand_path(body.path)
|
61
63
|
entity_path = File.expand_path(Radiant::Cache.entity_stores.first.root)
|
62
64
|
virtual_path[entity_path] = Radiant::Cache.use_x_accel_redirect
|
63
65
|
accelerate(response,'X-Accel-Redirect', virtual_path)
|
64
66
|
end
|
65
67
|
response
|
66
68
|
end
|
67
|
-
|
69
|
+
|
68
70
|
def accelerate(response, header, value)
|
69
71
|
response.headers[header] = value
|
70
72
|
response.body = []
|
data/lib/radiant/extension.rb
CHANGED
@@ -15,6 +15,14 @@ module Radiant
|
|
15
15
|
@active
|
16
16
|
end
|
17
17
|
|
18
|
+
def migrated?
|
19
|
+
migrator.new(:up, migrations_path).pending_migrations.empty?
|
20
|
+
end
|
21
|
+
|
22
|
+
def enabled?
|
23
|
+
active? and migrated?
|
24
|
+
end
|
25
|
+
|
18
26
|
def migrations_path
|
19
27
|
File.join(self.root, 'db', 'migrate')
|
20
28
|
end
|
@@ -31,6 +39,20 @@ module Radiant
|
|
31
39
|
AdminUI.instance
|
32
40
|
end
|
33
41
|
|
42
|
+
# Determine if another extension is installed and up to date.
|
43
|
+
#
|
44
|
+
# if MyExtension.extension_enabled?(:third_party)
|
45
|
+
# ThirdPartyExtension.extend(MyExtension::IntegrationPoints)
|
46
|
+
# end
|
47
|
+
def extension_enabled?(extension)
|
48
|
+
begin
|
49
|
+
extension = (extension.to_s.camelcase + 'Extension').constantize
|
50
|
+
extension.enabled?
|
51
|
+
rescue NameError
|
52
|
+
false
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
34
56
|
class << self
|
35
57
|
|
36
58
|
def activate_extension
|
@@ -59,6 +81,20 @@ module Radiant
|
|
59
81
|
def route_definitions
|
60
82
|
@route_definitions ||= []
|
61
83
|
end
|
84
|
+
|
85
|
+
# Expose the configuration object for depencencies, init hooks, &c
|
86
|
+
# class MyExtension < ActiveRecord::Base
|
87
|
+
# extension_config do |config|
|
88
|
+
# config.gem 'gem_name'
|
89
|
+
# config.extension 'radiant-extension-name'
|
90
|
+
# config.after_initialize do
|
91
|
+
# run_something
|
92
|
+
# end
|
93
|
+
# end
|
94
|
+
# end
|
95
|
+
def extension_config(&block)
|
96
|
+
yield Rails.configuration
|
97
|
+
end
|
62
98
|
end
|
63
99
|
end
|
64
100
|
end
|
@@ -63,6 +63,10 @@ module Radiant
|
|
63
63
|
def view_paths
|
64
64
|
extensions.map { |extension| "#{extension.root}/app/views" }.select { |d| File.directory?(d) }.reverse
|
65
65
|
end
|
66
|
+
|
67
|
+
def metal_paths
|
68
|
+
load_extension_roots.map { |extension| "#{extension}/app/metal" }.select { |d| File.directory?(d) }.reverse
|
69
|
+
end
|
66
70
|
|
67
71
|
# Load the extensions
|
68
72
|
def load_extensions
|
@@ -101,7 +105,7 @@ module Radiant
|
|
101
105
|
|
102
106
|
def load_paths_for(dir)
|
103
107
|
if File.directory?(dir)
|
104
|
-
%w(lib app/models app/controllers app/helpers test/helpers).collect do |p|
|
108
|
+
%w(lib app/models app/controllers app/metal app/helpers test/helpers).collect do |p|
|
105
109
|
path = "#{dir}/#{p}"
|
106
110
|
path if File.directory?(path)
|
107
111
|
end.compact << dir
|
data/lib/radiant/initializer.rb
CHANGED
@@ -12,10 +12,12 @@ module Radiant
|
|
12
12
|
attr_accessor :extension_paths
|
13
13
|
attr_writer :extensions
|
14
14
|
attr_accessor :view_paths
|
15
|
+
attr_accessor :extension_dependencies
|
15
16
|
|
16
17
|
def initialize
|
17
18
|
self.view_paths = []
|
18
19
|
self.extension_paths = default_extension_paths
|
20
|
+
self.extension_dependencies = []
|
19
21
|
super
|
20
22
|
end
|
21
23
|
|
@@ -35,13 +37,45 @@ module Radiant
|
|
35
37
|
def all_available_extensions
|
36
38
|
extension_paths.map do |path|
|
37
39
|
Dir["#{path}/*"].select {|f| File.directory?(f) }
|
38
|
-
end.flatten.map {|f| File.basename(f).sub(/^\d+_/, '') }.sort.map
|
40
|
+
end.flatten.map {|f| File.basename(f).sub(/^\d+_/, '') }.sort.map {|e| e.to_sym }
|
39
41
|
end
|
40
42
|
|
41
43
|
def admin
|
42
44
|
AdminUI.instance
|
43
45
|
end
|
44
46
|
|
47
|
+
# Declare another extension as a dependency. Does not allow for the
|
48
|
+
# specification of versions.
|
49
|
+
# class MyExtension < Radiant::Extension
|
50
|
+
# extension_config do |config|
|
51
|
+
# config.extension 'multisite'
|
52
|
+
# end
|
53
|
+
# end
|
54
|
+
def extension(ext)
|
55
|
+
@extension_dependencies << ext unless @extension_dependencies.include?(ext)
|
56
|
+
end
|
57
|
+
|
58
|
+
def check_extension_dependencies
|
59
|
+
unloaded_extensions = []
|
60
|
+
@extension_dependencies.each do |ext|
|
61
|
+
extension = ext.camelcase + 'Extension'
|
62
|
+
begin
|
63
|
+
extension_class = extension.constantize
|
64
|
+
unloaded_extensions << extension unless defined?(extension_class) && (extension_class.active?)
|
65
|
+
rescue NameError
|
66
|
+
unloaded_extensions << extension
|
67
|
+
end
|
68
|
+
end
|
69
|
+
if unloaded_extensions.any?
|
70
|
+
abort <<-end_error
|
71
|
+
Missing these required extensions:
|
72
|
+
#{unloaded_extensions}
|
73
|
+
end_error
|
74
|
+
else
|
75
|
+
return true
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
45
79
|
private
|
46
80
|
|
47
81
|
def library_directories
|
@@ -75,12 +109,10 @@ module Radiant
|
|
75
109
|
# Add the app's controller directory
|
76
110
|
paths.concat(Dir["#{RADIANT_ROOT}/app/controllers/"])
|
77
111
|
|
78
|
-
# Then components subdirectories.
|
79
|
-
paths.concat(Dir["#{RADIANT_ROOT}/components/[_a-z]*"])
|
80
|
-
|
81
112
|
# Followed by the standard includes.
|
82
113
|
paths.concat %w(
|
83
114
|
app
|
115
|
+
app/metal
|
84
116
|
app/models
|
85
117
|
app/controllers
|
86
118
|
app/helpers
|
@@ -120,6 +152,18 @@ module Radiant
|
|
120
152
|
extension_loader.add_extension_paths
|
121
153
|
super
|
122
154
|
end
|
155
|
+
|
156
|
+
# override Rails initializer to insert extension metals
|
157
|
+
def initialize_metal
|
158
|
+
Rails::Rack::Metal.requested_metals = configuration.metals
|
159
|
+
Rails::Rack::Metal.metal_paths = ["#{RADIANT_ROOT}/app/metal"] # reset Rails default to RADIANT_ROOT
|
160
|
+
Rails::Rack::Metal.metal_paths += plugin_loader.engine_metal_paths
|
161
|
+
Rails::Rack::Metal.metal_paths += extension_loader.metal_paths
|
162
|
+
|
163
|
+
configuration.middleware.insert_before(
|
164
|
+
:"ActionController::ParamsParser",
|
165
|
+
Rails::Rack::Metal, :if => Rails::Rack::Metal.metals.any?)
|
166
|
+
end
|
123
167
|
|
124
168
|
def add_plugin_load_paths
|
125
169
|
# checks for plugins within extensions:
|
@@ -130,11 +174,15 @@ module Radiant
|
|
130
174
|
def load_plugins
|
131
175
|
super
|
132
176
|
extension_loader.load_extensions
|
177
|
+
add_gem_load_paths
|
178
|
+
load_gems
|
179
|
+
check_gem_dependencies
|
133
180
|
end
|
134
181
|
|
135
182
|
def after_initialize
|
136
183
|
super
|
137
184
|
extension_loader.activate_extensions
|
185
|
+
configuration.check_extension_dependencies
|
138
186
|
end
|
139
187
|
|
140
188
|
def initialize_default_admin_tabs
|