raffle_v1 0.0.5 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/Rakefile +3 -9
- data/app/assets/javascripts/raffle_v1/application.js +6 -5
- data/app/assets/stylesheets/raffle_v1/application.css.scss +4 -31
- data/app/assets/stylesheets/raffle_v1/framework_and_overrides.css.scss +422 -0
- data/app/controllers/raffle_v1/admin/base_controller.rb +11 -0
- data/app/controllers/raffle_v1/admin/users_controller.rb +69 -0
- data/app/controllers/raffle_v1/application_controller.rb +51 -78
- data/app/controllers/raffle_v1/pages_controller.rb +11 -178
- data/app/helpers/raffle_v1/application_helper.rb +5 -0
- data/app/models/raffle_v1/user.rb +61 -107
- data/app/views/layouts/raffle_v1/application.html.erb +28 -5
- data/app/views/raffle_v1/admin/base/index.html.erb +39 -0
- data/app/views/raffle_v1/admin/users/edit.html.erb +65 -0
- data/app/views/raffle_v1/admin/users/index.html.erb +55 -0
- data/app/views/raffle_v1/devise/confirmations/new.html.erb +31 -0
- data/app/views/raffle_v1/devise/mailer/confirmation_instructions.html.erb +12 -0
- data/app/views/raffle_v1/devise/mailer/reset_password_instructions.html.erb +15 -0
- data/app/views/raffle_v1/devise/passwords/edit.html.erb +43 -0
- data/app/views/raffle_v1/devise/passwords/new.html.erb +31 -0
- data/app/views/raffle_v1/devise/registrations/edit.html.erb +63 -0
- data/app/views/raffle_v1/devise/registrations/new.html.erb +58 -0
- data/app/views/raffle_v1/devise/sessions/new.html.erb +45 -0
- data/app/views/raffle_v1/devise/shared/_links.erb +29 -0
- data/app/views/raffle_v1/layouts/_footer.html.erb +17 -0
- data/app/views/raffle_v1/layouts/_messages.html.erb +9 -0
- data/app/views/raffle_v1/layouts/_navigation.html.erb +18 -0
- data/app/views/raffle_v1/layouts/_navigation_links.html.erb +13 -0
- data/app/views/raffle_v1/layouts/application.html.erb +37 -0
- data/app/views/raffle_v1/pages/home.html.erb +3 -0
- data/app/views/raffle_v1/pages/inside.html.erb +3 -0
- data/config/add_files/date_format.rb +27 -0
- data/config/add_files/devise.rb +267 -0
- data/config/add_files/filter_parameter_logging.rb +4 -0
- data/config/add_files/friendly_id.rb +88 -0
- data/config/add_files/kaminari_config.rb +10 -0
- data/config/add_files/rafflev1.rb +4 -0
- data/config/initializers/rafflev1.rb +1 -6
- data/config/locales/devise.en.yml +59 -0
- data/config/routes.rb +30 -5
- data/db/migrate/20130123214645_devise_create_raffle_v1_users.rb +56 -0
- data/db/migrate/{20130123214645_devise_create_users.rb → 20130124004626_devise_create_raffle_v1_admins.rb} +7 -7
- data/db/migrate/{20130124231541_create_versions.rb → 20130124231541_create_raffle_v1_versions.rb} +5 -5
- data/db/migrate/20140719165853_create_raffle_v1_friendly_id_slugs.rb +15 -0
- data/db/seeds.rb +24 -77
- data/lib/generators/raffle_v1/install/install_generator.rb +142 -54
- data/lib/generators/raffle_v1/install/templates/assets/images/raffle_v1/game.png +0 -0
- data/lib/generators/raffle_v1/install/templates/assets/images/raffle_v1/gift.png +0 -0
- data/lib/generators/raffle_v1/install/templates/assets/images/raffle_v1/lifesaver.png +0 -0
- data/lib/generators/raffle_v1/install/templates/assets/images/raffle_v1/person01.jpg +0 -0
- data/lib/generators/raffle_v1/install/templates/assets/javascripts/raffle_v1/application.js +17 -0
- data/lib/generators/raffle_v1/install/templates/assets/stylesheets/raffle_v1/application.css.scss +7 -0
- data/lib/generators/raffle_v1/install/templates/assets/stylesheets/raffle_v1/framework_and_overrides.css.scss +422 -0
- data/lib/generators/raffle_v1/install/templates/config/initializers/date_format.rb +27 -0
- data/lib/generators/raffle_v1/install/templates/config/initializers/devise.rb +269 -0
- data/lib/generators/raffle_v1/install/templates/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/generators/raffle_v1/install/templates/config/initializers/friendly_id.rb +89 -0
- data/lib/generators/raffle_v1/install/templates/config/initializers/kaminari_config.rb +11 -0
- data/lib/generators/raffle_v1/install/templates/config/initializers/rafflev1.rb +4 -0
- data/lib/generators/raffle_v1/install/templates/db/seeds.rb +28 -0
- data/lib/raffle_v1/version.rb +2 -2
- data/test/controllers/raffle_v1/locales_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/page_layouts_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/pages_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/program_locales_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/program_settings_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/programs_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/role_users_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/roles_controller_test.rb +51 -0
- data/test/controllers/raffle_v1/style_sheets_controller_test.rb +51 -0
- data/test/dummy/Guardfile +24 -0
- data/test/dummy/README.rdoc +15 -248
- data/test/dummy/Rakefile +1 -2
- data/test/dummy/app/assets/javascripts/application.js +3 -5
- data/test/dummy/app/assets/stylesheets/application.css +5 -3
- data/test/dummy/app/controllers/application_controller.rb +3 -1
- data/test/dummy/app/models/user.rb +4 -0
- data/test/dummy/app/views/layouts/application.html.erb +2 -2
- data/test/dummy/assets/javascripts/application.js +17 -0
- data/test/dummy/assets/stylesheets/application.css.scss +7 -0
- data/test/dummy/assets/stylesheets/framework_and_overrides.css.scss +422 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +1 -1
- data/test/dummy/config/application.rb +29 -47
- data/test/dummy/config/boot.rb +4 -9
- data/test/dummy/config/database.yml +48 -13
- data/test/dummy/config/environment.rb +3 -3
- data/test/dummy/config/environments/development.rb +19 -19
- data/test/dummy/config/environments/production.rb +44 -28
- data/test/dummy/config/environments/test.rb +17 -15
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/date_format.rb +27 -0
- data/test/dummy/config/initializers/devise.rb +269 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/friendly_id.rb +89 -0
- data/test/dummy/config/initializers/inflections.rb +6 -5
- data/test/dummy/config/initializers/kaminari_config.rb +11 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -1
- data/test/dummy/config/initializers/rafflev1.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +1 -6
- data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/test/dummy/config/locales/en.yml +20 -2
- data/{lib/database_cleaner-0.7.2/examples/db/sqlite_databases_go_here → test/dummy/config/rafflev1.yml} +0 -0
- data/test/dummy/config/routes.rb +3 -1
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/migrate/20140719173448_devise_create_raffle_v1_users.raffle_v1.rb +57 -0
- data/{db/migrate/20130124004626_devise_create_admins.rb → test/dummy/db/migrate/20140719173449_devise_create_raffle_v1_admins.raffle_v1.rb} +8 -7
- data/test/dummy/db/migrate/20140719173450_create_raffle_v1_versions.raffle_v1.rb +19 -0
- data/test/dummy/db/migrate/20140719173451_create_raffle_v1_friendly_id_slugs.raffle_v1.rb +16 -0
- data/test/dummy/db/schema.rb +72 -12
- data/test/dummy/db/seeds.rb +30 -0
- data/test/dummy/public/404.html +54 -13
- data/test/dummy/public/422.html +54 -13
- data/test/dummy/public/500.html +53 -12
- data/test/dummy/spec/factories.rb +5 -0
- data/test/dummy/spec/models/user_spec.rb +5 -0
- data/test/dummy/spec/rails_helper.rb +66 -0
- data/test/dummy/spec/spec_helper.rb +78 -0
- data/test/dummy/test/factories/users.rb +6 -0
- data/test/dummy/vendor/assets/javascripts/all_file.js +0 -0
- data/test/dummy/vendor/assets/javascripts/all_raffle_v1.js +7 -0
- data/test/dummy/vendor/assets/stylesheets/all_file.css +0 -0
- data/test/dummy/vendor/assets/stylesheets/all_raffle_v1.css +9 -0
- data/test/fixtures/raffle_v1/abilities.yml +11 -0
- data/test/fixtures/raffle_v1/add_name_to_users.yml +11 -0
- data/test/fixtures/raffle_v1/admin_abilities.yml +11 -0
- data/test/fixtures/raffle_v1/admins.yml +11 -0
- data/test/fixtures/raffle_v1/locales.yml +9 -0
- data/test/fixtures/raffle_v1/page_layouts.yml +11 -0
- data/test/fixtures/raffle_v1/pages.yml +41 -0
- data/test/fixtures/raffle_v1/program_locales.yml +9 -0
- data/test/fixtures/raffle_v1/program_settings.yml +7 -0
- data/test/fixtures/raffle_v1/programs.yml +23 -0
- data/test/fixtures/raffle_v1/role_users.yml +9 -0
- data/test/fixtures/raffle_v1/roles.yml +7 -0
- data/test/fixtures/raffle_v1/style_sheets.yml +17 -0
- data/test/fixtures/raffle_v1/stylesheets.yml +11 -0
- data/test/fixtures/raffle_v1/terms_and_conditions.yml +11 -0
- data/test/fixtures/raffle_v1/testers.yml +11 -0
- data/test/fixtures/raffle_v1/translation_keys.yml +11 -0
- data/test/fixtures/raffle_v1/translation_objects.yml +11 -0
- data/test/fixtures/raffle_v1/translations.yml +11 -0
- data/test/fixtures/raffle_v1/users.yml +11 -0
- data/test/helpers/raffle_v1/locales_helper_test.rb +6 -0
- data/test/helpers/raffle_v1/page_layouts_helper_test.rb +6 -0
- data/test/{unit/helpers/raffle_v1/posts_helper_test.rb → helpers/raffle_v1/pages_helper_test.rb} +1 -1
- data/test/helpers/raffle_v1/program_locales_helper_test.rb +6 -0
- data/test/helpers/raffle_v1/program_settings_helper_test.rb +6 -0
- data/test/helpers/raffle_v1/programs_helper_test.rb +6 -0
- data/test/helpers/raffle_v1/role_users_helper_test.rb +6 -0
- data/test/helpers/raffle_v1/roles_helper_test.rb +6 -0
- data/test/helpers/raffle_v1/style_sheets_helper_test.rb +6 -0
- data/test/{unit/raffle_v1/comment_test.rb → models/raffle_v1/ability_test.rb} +1 -1
- data/test/{functional/raffle_v1/comments_controller_test.rb → models/raffle_v1/add_name_to_user_test.rb} +1 -1
- data/test/models/raffle_v1/admin_ability_test.rb +9 -0
- data/test/models/raffle_v1/admin_test.rb +9 -0
- data/test/models/raffle_v1/locale_test.rb +9 -0
- data/test/models/raffle_v1/page_layout_test.rb +9 -0
- data/test/{unit/raffle_v1/post_test.rb → models/raffle_v1/page_test.rb} +1 -1
- data/test/models/raffle_v1/program_locale_test.rb +9 -0
- data/test/models/raffle_v1/program_setting_test.rb +9 -0
- data/test/models/raffle_v1/program_test.rb +9 -0
- data/test/models/raffle_v1/role_test.rb +9 -0
- data/test/models/raffle_v1/role_user_test.rb +9 -0
- data/test/models/raffle_v1/style_sheet_test.rb +9 -0
- data/test/models/raffle_v1/stylesheet_test.rb +9 -0
- data/test/models/raffle_v1/terms_and_condition_test.rb +9 -0
- data/test/models/raffle_v1/tester_test.rb +9 -0
- data/test/models/raffle_v1/translation_key_test.rb +9 -0
- data/test/models/raffle_v1/translation_object_test.rb +9 -0
- data/test/models/raffle_v1/translation_test.rb +9 -0
- data/test/models/raffle_v1/user_test.rb +9 -0
- metadata +409 -278
- data/README.md +0 -53
- data/app/assets/javascripts/raffle_v1/comments.js +0 -2
- data/app/assets/javascripts/raffle_v1/home.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/locales.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/page_layouts.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/pages.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/posts.js +0 -2
- data/app/assets/javascripts/raffle_v1/programs.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/roles.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/stylesheets.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/terms_and_conditions.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/terms_of_conditions.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/translation_keys.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/translation_objects.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/user.js.coffee +0 -3
- data/app/assets/javascripts/raffle_v1/versions.js.coffee +0 -3
- data/app/assets/stylesheets/raffle_v1/TableTools.css +0 -264
- data/app/assets/stylesheets/raffle_v1/TableTools.css.scss +0 -264
- data/app/assets/stylesheets/raffle_v1/TableTools_JUI.css +0 -182
- data/app/assets/stylesheets/raffle_v1/TableTools_JUI.css.scss +0 -183
- data/app/assets/stylesheets/raffle_v1/_custom.css.scss +0 -3310
- data/app/assets/stylesheets/raffle_v1/_variable.scss +0 -122
- data/app/assets/stylesheets/raffle_v1/_variable_defaults.scss +0 -83
- data/app/assets/stylesheets/raffle_v1/application.css +0 -13
- data/app/assets/stylesheets/raffle_v1/application.css.scss.erb +0 -32
- data/app/assets/stylesheets/raffle_v1/bootstrap-responsive.css +0 -570
- data/app/assets/stylesheets/raffle_v1/bootstrap-responsive.css.scss +0 -570
- data/app/assets/stylesheets/raffle_v1/bootstrap.css +0 -4226
- data/app/assets/stylesheets/raffle_v1/bootstrap.css.scss +0 -4226
- data/app/assets/stylesheets/raffle_v1/colorbox.css +0 -88
- data/app/assets/stylesheets/raffle_v1/colorbox.css.scss +0 -88
- data/app/assets/stylesheets/raffle_v1/comments.css +0 -4
- data/app/assets/stylesheets/raffle_v1/grid.css.scss +0 -258
- data/app/assets/stylesheets/raffle_v1/hierarchy.css.scss +0 -16
- data/app/assets/stylesheets/raffle_v1/home.css.scss +0 -18
- data/app/assets/stylesheets/raffle_v1/jquery.dataTables.css +0 -83
- data/app/assets/stylesheets/raffle_v1/jquery.dataTables.css.scss +0 -83
- data/app/assets/stylesheets/raffle_v1/jquery.jcarousel.css +0 -206
- data/app/assets/stylesheets/raffle_v1/jquery.wysiwyg.css +0 -57
- data/app/assets/stylesheets/raffle_v1/jquery.wysiwyg.css.scss +0 -57
- data/app/assets/stylesheets/raffle_v1/jqueryui/jquery.ui.core.css +0 -38
- data/app/assets/stylesheets/raffle_v1/jqueryui/jquery.ui.core.css.scss +0 -38
- data/app/assets/stylesheets/raffle_v1/jqueryui/jquery.ui.dialog.css +0 -21
- data/app/assets/stylesheets/raffle_v1/jqueryui/jquery.ui.dialog.css.scss +0 -21
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/jquery-ui-1.8.18.custom.css +0 -563
- data/app/assets/stylesheets/raffle_v1/jqueryui/ui-lightness/jquery-ui-1.8.18.custom.css.scss +0 -563
- data/app/assets/stylesheets/raffle_v1/locales.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/page_layouts.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/pages.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/posts.css +0 -4
- data/app/assets/stylesheets/raffle_v1/programs.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/reset.css.scss +0 -96
- data/app/assets/stylesheets/raffle_v1/roles.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/scaffolds.css.scss +0 -42
- data/app/assets/stylesheets/raffle_v1/stylesheets.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/terms_and_conditions.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/terms_of_conditions.css.scss +0 -4
- data/app/assets/stylesheets/raffle_v1/translation_keys.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/translation_objects.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/ui.multiselect.css +0 -33
- data/app/assets/stylesheets/raffle_v1/ui.multiselect.css.scss +0 -33
- data/app/assets/stylesheets/raffle_v1/user.css.scss +0 -3
- data/app/assets/stylesheets/raffle_v1/versions.css.scss +0 -3
- data/app/assets/stylesheets/scaffold.css +0 -56
- data/app/controllers/raffle_v1/comments_controller.rb +0 -30
- data/app/controllers/raffle_v1/home_controller.rb +0 -15
- data/app/controllers/raffle_v1/locales_controller.rb +0 -87
- data/app/controllers/raffle_v1/page_layouts_controller.rb +0 -87
- data/app/controllers/raffle_v1/posts_controller.rb +0 -87
- data/app/controllers/raffle_v1/programs_controller.rb +0 -140
- data/app/controllers/raffle_v1/roles_controller.rb +0 -87
- data/app/controllers/raffle_v1/stylesheets_controller.rb +0 -19
- data/app/controllers/raffle_v1/terms_and_conditions_controller.rb +0 -118
- data/app/controllers/raffle_v1/translation_keys_controller.rb +0 -119
- data/app/controllers/raffle_v1/translation_objects_controller.rb +0 -87
- data/app/controllers/raffle_v1/user_controller.rb +0 -138
- data/app/controllers/raffle_v1/versions_controller.rb +0 -15
- data/app/helpers/raffle_v1/comments_helper.rb +0 -4
- data/app/helpers/raffle_v1/posts_helper.rb +0 -4
- data/app/models/raffle_v1/ability.rb +0 -30
- data/app/models/raffle_v1/admin.rb +0 -35
- data/app/models/raffle_v1/admin_ability.rb +0 -28
- data/app/models/raffle_v1/comment.rb +0 -7
- data/app/models/raffle_v1/locale.rb +0 -29
- data/app/models/raffle_v1/page.rb +0 -26
- data/app/models/raffle_v1/page_layout.rb +0 -6
- data/app/models/raffle_v1/post.rb +0 -7
- data/app/models/raffle_v1/program.rb +0 -84
- data/app/models/raffle_v1/program_locale.rb +0 -11
- data/app/models/raffle_v1/program_setting.rb +0 -5
- data/app/models/raffle_v1/role.rb +0 -5
- data/app/models/raffle_v1/roles_users.rb +0 -5
- data/app/models/raffle_v1/stylesheet.rb +0 -9
- data/app/models/raffle_v1/terms_and_condition.rb +0 -17
- data/app/models/raffle_v1/translation.rb +0 -29
- data/app/models/raffle_v1/translation_key.rb +0 -35
- data/app/models/raffle_v1/translation_object.rb +0 -11
- data/app/views/raffle_v1/comments/_comment.html.erb +0 -1
- data/app/views/raffle_v1/comments/_form.html.erb +0 -8
- data/app/views/raffle_v1/comments/index.html.erb +0 -13
- data/app/views/raffle_v1/posts/_form.html.erb +0 -25
- data/app/views/raffle_v1/posts/edit.html.erb +0 -6
- data/app/views/raffle_v1/posts/index.html.erb +0 -25
- data/app/views/raffle_v1/posts/new.html.erb +0 -5
- data/app/views/raffle_v1/posts/show.html.erb +0 -19
- data/config/rafflev1.rb +0 -6
- data/db/migrate/20130127235347_create_programs.rb +0 -9
- data/db/migrate/20130129155515_add_domain_fields_to_programs.rb +0 -6
- data/db/migrate/20130129160949_create_terms_and_conditions.rb +0 -18
- data/db/migrate/20130129183112_add_program_to_users.rb +0 -5
- data/db/migrate/20130129204204_add_username_to_users.rb +0 -6
- data/db/migrate/20130129211205_create_roles.rb +0 -9
- data/db/migrate/20130129212302_create_roles_users.rb +0 -12
- data/db/migrate/20130130013315_create_locales.rb +0 -11
- data/db/migrate/20130130154500_create_program_locales.rb +0 -8
- data/db/migrate/20130130223342_add_settings_to_users.rb +0 -5
- data/db/migrate/20130130223609_add_locale_available_to_program.rb +0 -5
- data/db/migrate/20130130223810_add_locales_to_versions.rb +0 -5
- data/db/migrate/20130130224141_add_locale_name_to_program.rb +0 -5
- data/db/migrate/20130130224327_add_admin_type_to_admins.rb +0 -5
- data/db/migrate/20130130225223_add_deleted_at_to_models.rb +0 -9
- data/db/migrate/20130130230516_create_translations.rb +0 -13
- data/db/migrate/20130131005653_add_timeout_field_to_program.rb +0 -7
- data/db/migrate/20130131144951_create_stylesheets.rb +0 -14
- data/db/migrate/20130202132442_add_tos_to_program.rb +0 -5
- data/db/migrate/20130202133149_add_programid_to_terms.rb +0 -23
- data/db/migrate/20130202193646_add_akm_to_terms_and_conditions.rb +0 -5
- data/db/migrate/20130203035054_create_translation_keys.rb +0 -10
- data/db/migrate/20130203214314_create_program_settings.rb +0 -9
- data/db/migrate/20130204025824_add_translationkey_to_translation.rb +0 -5
- data/db/migrate/20130204030555_create_translation_objects.rb +0 -39
- data/db/migrate/20130205203152_create_pages.rb +0 -25
- data/db/migrate/20130208042652_add_fields_to_page.rb +0 -6
- data/db/migrate/20130208043123_create_page_layouts.rb +0 -12
- data/db/migrate/20130208051925_add_statusitem_to_page.rb +0 -5
- data/db/migrate/20130306012135_add_fields_to_user.rb +0 -40
- data/db/migrate/20130306162357_change_bad_fields_on_user.rb +0 -11
- data/db/migrate/20130306163554_add_password_created_at_to_user.rb +0 -6
- data/db/migrate/20130306165455_add_confirmable_to_user.rb +0 -14
- data/db/migrate/20130306211253_add_username_index_to_user.rb +0 -41
- data/db/migrate/20130313011833_add_field_to_user.rb +0 -5
- data/db/migrate/20130326135125_create_raffle_v1_posts.rb +0 -10
- data/db/migrate/20130326174121_create_raffle_v1_comments.rb +0 -10
- data/lib/database_cleaner-0.7.2/Gemfile.lock +0 -163
- data/lib/database_cleaner-0.7.2/History.txt +0 -209
- data/lib/database_cleaner-0.7.2/LICENSE +0 -20
- data/lib/database_cleaner-0.7.2/README.textile +0 -223
- data/lib/database_cleaner-0.7.2/Rakefile +0 -65
- data/lib/database_cleaner-0.7.2/TODO +0 -3
- data/lib/database_cleaner-0.7.2/VERSION.yml +0 -5
- data/lib/database_cleaner-0.7.2/cucumber.yml +0 -1
- data/lib/database_cleaner-0.7.2/examples/Gemfile +0 -49
- data/lib/database_cleaner-0.7.2/examples/Gemfile.lock +0 -163
- data/lib/database_cleaner-0.7.2/examples/config/database.yml.example +0 -8
- data/lib/database_cleaner-0.7.2/examples/features/example.feature +0 -11
- data/lib/database_cleaner-0.7.2/examples/features/example_multiple_db.feature +0 -23
- data/lib/database_cleaner-0.7.2/examples/features/example_multiple_orm.feature +0 -22
- data/lib/database_cleaner-0.7.2/examples/features/step_definitions/activerecord_steps.rb +0 -31
- data/lib/database_cleaner-0.7.2/examples/features/step_definitions/couchpotato_steps.rb +0 -31
- data/lib/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb +0 -37
- data/lib/database_cleaner-0.7.2/examples/features/step_definitions/mongoid_steps.rb +0 -23
- data/lib/database_cleaner-0.7.2/examples/features/step_definitions/mongomapper_steps.rb +0 -31
- data/lib/database_cleaner-0.7.2/examples/features/step_definitions/translation_steps.rb +0 -55
- data/lib/database_cleaner-0.7.2/examples/features/support/env.rb +0 -62
- data/lib/database_cleaner-0.7.2/examples/lib/activerecord_models.rb +0 -41
- data/lib/database_cleaner-0.7.2/examples/lib/couchpotato_models.rb +0 -61
- data/lib/database_cleaner-0.7.2/examples/lib/datamapper_models.rb +0 -50
- data/lib/database_cleaner-0.7.2/examples/lib/mongoid_models.rb +0 -49
- data/lib/database_cleaner-0.7.2/examples/lib/mongomapper_models.rb +0 -51
- data/lib/database_cleaner-0.7.2/features/cleaning.feature +0 -22
- data/lib/database_cleaner-0.7.2/features/cleaning_default_strategy.feature +0 -19
- data/lib/database_cleaner-0.7.2/features/cleaning_multiple_dbs.feature +0 -21
- data/lib/database_cleaner-0.7.2/features/cleaning_multiple_orms.feature +0 -29
- data/lib/database_cleaner-0.7.2/features/step_definitions/database_cleaner_steps.rb +0 -32
- data/lib/database_cleaner-0.7.2/features/support/env.rb +0 -7
- data/lib/database_cleaner-0.7.2/features/support/feature_runner.rb +0 -39
- data/lib/database_cleaner-0.7.2/lib/database_cleaner.rb +0 -3
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/active_record/base.rb +0 -53
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/active_record/deletion.rb +0 -69
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/active_record/transaction.rb +0 -28
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/active_record/truncation.rb +0 -151
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/base.rb +0 -138
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/configuration.rb +0 -94
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/couch_potato/base.rb +0 -7
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/couch_potato/truncation.rb +0 -28
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/cucumber.rb +0 -11
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/data_mapper/base.rb +0 -21
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/data_mapper/transaction.rb +0 -26
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/data_mapper/truncation.rb +0 -175
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/generic/base.rb +0 -20
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/generic/truncation.rb +0 -37
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/mongo/truncation.rb +0 -22
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/mongo_mapper/base.rb +0 -20
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/mongo_mapper/truncation.rb +0 -19
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/mongoid/base.rb +0 -20
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/mongoid/truncation.rb +0 -20
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/null_strategy.rb +0 -15
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb +0 -22
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/sequel/transaction.rb +0 -25
- data/lib/database_cleaner-0.7.2/lib/database_cleaner/sequel/truncation.rb +0 -50
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/active_record/base_spec.rb +0 -144
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/active_record/transaction_spec.rb +0 -77
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/active_record/truncation_spec.rb +0 -76
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/base_spec.rb +0 -493
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/configuration_spec.rb +0 -294
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/couch_potato/truncation_spec.rb +0 -41
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/data_mapper/base_spec.rb +0 -30
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/data_mapper/transaction_spec.rb +0 -23
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/data_mapper/truncation_spec.rb +0 -11
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/generic/base_spec.rb +0 -22
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/generic/truncation_spec.rb +0 -78
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/mongo_mapper/base_spec.rb +0 -33
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/mongo_mapper/mongo_examples.rb +0 -8
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/mongo_mapper/truncation_spec.rb +0 -74
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/sequel/base_spec.rb +0 -32
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/sequel/transaction_spec.rb +0 -21
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/sequel/truncation_spec.rb +0 -13
- data/lib/database_cleaner-0.7.2/spec/database_cleaner/shared_strategy_spec.rb +0 -13
- data/lib/database_cleaner-0.7.2/spec/rcov.opts +0 -1
- data/lib/database_cleaner-0.7.2/spec/spec.opts +0 -7
- data/lib/database_cleaner-0.7.2/spec/spec_helper.rb +0 -19
- data/lib/generators/raffle_v1/install/USAGE +0 -8
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/script/rails +0 -6
- data/test/fixtures/raffle_v1/comments.yml +0 -9
- data/test/fixtures/raffle_v1/posts.yml +0 -9
- data/test/functional/raffle_v1/posts_controller_test.rb +0 -51
- data/test/unit/helpers/raffle_v1/comments_helper_test.rb +0 -6
@@ -1,163 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
ZenTest (4.3.3)
|
5
|
-
activerecord (2.3.8)
|
6
|
-
activesupport (= 2.3.8)
|
7
|
-
activesupport (2.3.8)
|
8
|
-
addressable (2.2.0)
|
9
|
-
bson (1.0.4)
|
10
|
-
builder (2.1.2)
|
11
|
-
columnize (0.3.1)
|
12
|
-
couch_potato (0.3.0)
|
13
|
-
couchrest (>= 0.24)
|
14
|
-
json
|
15
|
-
couchrest (1.0.1)
|
16
|
-
json (>= 1.4.6)
|
17
|
-
mime-types (>= 1.15)
|
18
|
-
rest-client (>= 1.5.1)
|
19
|
-
cucumber (0.8.5)
|
20
|
-
builder (~> 2.1.2)
|
21
|
-
diff-lcs (~> 1.1.2)
|
22
|
-
gherkin (~> 2.1.4)
|
23
|
-
json_pure (~> 1.4.3)
|
24
|
-
term-ansicolor (~> 1.0.4)
|
25
|
-
data_objects (0.10.2)
|
26
|
-
addressable (~> 2.1)
|
27
|
-
datamapper (1.0.0)
|
28
|
-
dm-aggregates (= 1.0.0)
|
29
|
-
dm-constraints (= 1.0.0)
|
30
|
-
dm-core (= 1.0.0)
|
31
|
-
dm-core (= 1.0.0)
|
32
|
-
dm-migrations (= 1.0.0)
|
33
|
-
dm-serializer (= 1.0.0)
|
34
|
-
dm-timestamps (= 1.0.0)
|
35
|
-
dm-transactions (= 1.0.0)
|
36
|
-
dm-types (= 1.0.0)
|
37
|
-
dm-validations (= 1.0.0)
|
38
|
-
diff-lcs (1.1.2)
|
39
|
-
dm-aggregates (1.0.0)
|
40
|
-
dm-core (~> 1.0.0)
|
41
|
-
dm-constraints (1.0.0)
|
42
|
-
dm-core (~> 1.0.0)
|
43
|
-
dm-migrations (~> 1.0.0)
|
44
|
-
dm-core (1.0.0)
|
45
|
-
addressable (~> 2.1)
|
46
|
-
extlib (~> 0.9.15)
|
47
|
-
dm-do-adapter (1.0.0)
|
48
|
-
data_objects (~> 0.10.1)
|
49
|
-
dm-core (~> 1.0.0)
|
50
|
-
dm-migrations (1.0.0)
|
51
|
-
dm-core (~> 1.0.0)
|
52
|
-
dm-serializer (1.0.0)
|
53
|
-
dm-core (~> 1.0.0)
|
54
|
-
fastercsv (~> 1.5.3)
|
55
|
-
json_pure (~> 1.4.3)
|
56
|
-
dm-sqlite-adapter (1.0.0)
|
57
|
-
dm-do-adapter (~> 1.0.0)
|
58
|
-
do_sqlite3 (~> 0.10.2)
|
59
|
-
dm-timestamps (1.0.0)
|
60
|
-
dm-core (~> 1.0.0)
|
61
|
-
dm-transactions (1.0.0)
|
62
|
-
dm-core (~> 1.0.0)
|
63
|
-
dm-types (1.0.0)
|
64
|
-
dm-core (~> 1.0.0)
|
65
|
-
fastercsv (~> 1.5.3)
|
66
|
-
json_pure (~> 1.4.3)
|
67
|
-
stringex (~> 1.1.0)
|
68
|
-
uuidtools (~> 2.1.1)
|
69
|
-
dm-validations (1.0.0)
|
70
|
-
dm-core (~> 1.0.0)
|
71
|
-
do_sqlite3 (0.10.2)
|
72
|
-
data_objects (= 0.10.2)
|
73
|
-
durran-validatable (2.0.1)
|
74
|
-
extlib (0.9.15)
|
75
|
-
fastercsv (1.5.3)
|
76
|
-
ffi (0.6.3)
|
77
|
-
rake (>= 0.8.7)
|
78
|
-
gemcutter (0.6.1)
|
79
|
-
gherkin (2.1.5)
|
80
|
-
trollop (~> 1.16.2)
|
81
|
-
git (1.2.5)
|
82
|
-
growl (1.0.3)
|
83
|
-
jeweler (1.4.0)
|
84
|
-
gemcutter (>= 0.1.0)
|
85
|
-
git (>= 1.2.5)
|
86
|
-
rubyforge (>= 2.0.0)
|
87
|
-
jnunemaker-validatable (1.8.4)
|
88
|
-
activesupport (>= 2.3.4)
|
89
|
-
json (1.4.6)
|
90
|
-
json_pure (1.4.6)
|
91
|
-
libnotify (0.2.0)
|
92
|
-
ffi (>= 0.6.2)
|
93
|
-
linecache (0.43)
|
94
|
-
mime-types (1.16)
|
95
|
-
mongo (1.0.7)
|
96
|
-
bson (>= 1.0.4)
|
97
|
-
mongo_mapper (0.8.2)
|
98
|
-
activesupport (>= 2.3.4)
|
99
|
-
jnunemaker-validatable (~> 1.8.4)
|
100
|
-
plucky (~> 0.3.1)
|
101
|
-
mongoid (1.9.1)
|
102
|
-
activesupport (<= 3.0.0)
|
103
|
-
bson (~> 1.0.1)
|
104
|
-
durran-validatable (>= 2.0.1)
|
105
|
-
mongo (~> 1.0.1)
|
106
|
-
will_paginate (< 2.9)
|
107
|
-
plucky (0.3.4)
|
108
|
-
mongo (~> 1.0.7)
|
109
|
-
rake (0.8.7)
|
110
|
-
rb-inotify (0.8.1)
|
111
|
-
ffi (>= 0.5.0)
|
112
|
-
rcov (0.9.8)
|
113
|
-
rest-client (1.6.0)
|
114
|
-
mime-types (>= 1.16)
|
115
|
-
rspactor (0.7.0.beta.6)
|
116
|
-
bundler (>= 1.0.0.rc.5)
|
117
|
-
growl (>= 1.0.3)
|
118
|
-
libnotify (>= 0.1.3)
|
119
|
-
rb-inotify
|
120
|
-
sys-uname (>= 0.8.4)
|
121
|
-
trollop (>= 1.16.2)
|
122
|
-
rspec (1.3.0)
|
123
|
-
ruby-debug (0.10.3)
|
124
|
-
columnize (>= 0.1)
|
125
|
-
ruby-debug-base (~> 0.10.3.0)
|
126
|
-
ruby-debug-base (0.10.3)
|
127
|
-
linecache (>= 0.3)
|
128
|
-
rubyforge (2.0.4)
|
129
|
-
json_pure (>= 1.1.7)
|
130
|
-
sequel (3.21.0)
|
131
|
-
sqlite3-ruby (1.3.1)
|
132
|
-
stringex (1.1.0)
|
133
|
-
sys-uname (0.8.4)
|
134
|
-
term-ansicolor (1.0.5)
|
135
|
-
trollop (1.16.2)
|
136
|
-
tzinfo (0.3.22)
|
137
|
-
uuidtools (2.1.1)
|
138
|
-
will_paginate (2.3.14)
|
139
|
-
|
140
|
-
PLATFORMS
|
141
|
-
ruby
|
142
|
-
|
143
|
-
DEPENDENCIES
|
144
|
-
ZenTest
|
145
|
-
activerecord (= 2.3.8)
|
146
|
-
bundler
|
147
|
-
couch_potato (= 0.3.0)
|
148
|
-
cucumber
|
149
|
-
datamapper (= 1.0.0)
|
150
|
-
dm-migrations (= 1.0.0)
|
151
|
-
dm-sqlite-adapter (= 1.0.0)
|
152
|
-
jeweler
|
153
|
-
json_pure
|
154
|
-
mongo_mapper (= 0.8.2)
|
155
|
-
mongoid (= 1.9.1)
|
156
|
-
rake
|
157
|
-
rcov
|
158
|
-
rspactor
|
159
|
-
rspec
|
160
|
-
ruby-debug
|
161
|
-
sequel (~> 3.21.0)
|
162
|
-
sqlite3-ruby
|
163
|
-
tzinfo (= 0.3.22)
|
@@ -1,209 +0,0 @@
|
|
1
|
-
== 0.7.x (in git)
|
2
|
-
|
3
|
-
== 0.7.2 2012-03-21
|
4
|
-
|
5
|
-
* Proper Mysql2Adapter fix (Jonathan Viney)
|
6
|
-
* Sequel::Transaction works with latest Sequel (David Barri)
|
7
|
-
* Documenation fixes/improvements (David Barri, Ben Mabey, Kevin Moore)
|
8
|
-
|
9
|
-
== 0.7.1 2012-01-15
|
10
|
-
|
11
|
-
=== New Features
|
12
|
-
|
13
|
-
* Support for Rails 3.2. (David Demaree)
|
14
|
-
|
15
|
-
=== Bugfixes
|
16
|
-
|
17
|
-
* Truncation resets the id count on SQLite. (Jordan Hollinger)
|
18
|
-
* AR delete strategy now disables referential integrity. (Ben Mabey)
|
19
|
-
* Fixes Postgres adapter for JRuby. (Dmytrii Nagirniak, Uģis Ozols)
|
20
|
-
* Documenation fixes. (Josh Rendek, Joshua Flanagan)
|
21
|
-
* Fixes bad error message when no database is specified for AR. (issue #72, Ben Mabey)
|
22
|
-
|
23
|
-
|
24
|
-
== 0.7.0 2011-11-12
|
25
|
-
|
26
|
-
=== New Features
|
27
|
-
|
28
|
-
* Sequel Support (Corin Langosch)
|
29
|
-
* Updates DataMapper strategies to work with DataMapper 1.1 (Xavier Shay and Anthony Williams)
|
30
|
-
* for AR and PSQL, truncate all tables with one command, improving performance due to avoiding cascades (Leonid Shevtsov)
|
31
|
-
|
32
|
-
=== Bugfixes
|
33
|
-
|
34
|
-
* Avoids trying to load the ':default' ActiveRecord config. #72 (Ben Mabey)
|
35
|
-
|
36
|
-
|
37
|
-
== 0.6.7 2011-04-21
|
38
|
-
|
39
|
-
=== Bugfixes
|
40
|
-
* Explicity require ERB. (Vít Ondruch)
|
41
|
-
* Cache DB connections, fixes referential integrity bug when using multiple DBs. (John Ferlito)
|
42
|
-
|
43
|
-
== 0.6.6 2011-03-16
|
44
|
-
|
45
|
-
=== Bugfixes
|
46
|
-
* Don't modify the array passed in with the :except key. (Eric Wollesen)
|
47
|
-
* Fixes version checking for postgresql. (Greg Barnett)
|
48
|
-
|
49
|
-
== 0.6.5 2011-03-08
|
50
|
-
|
51
|
-
=== Bugfixes
|
52
|
-
* When truncating in postgresql (>= 8.4) sequences are now reset. (Greg Barnett)
|
53
|
-
* Fixes the MongoDB truncation so non system collections starting with 'system' are not excluded for truncation. (Dmitry Naumov)
|
54
|
-
|
55
|
-
== 0.6.4 2011-02-21
|
56
|
-
|
57
|
-
=== Bugfixes
|
58
|
-
* Avoids trying to drop views in Postgres. (Bernerd Schaefer)
|
59
|
-
|
60
|
-
== 0.6.3 2011-02-09
|
61
|
-
|
62
|
-
=== New Features
|
63
|
-
* Configurable logger to aid in debugging database cleaner. (Marty Haught)
|
64
|
-
|
65
|
-
== 0.6.2 2011-02-04
|
66
|
-
|
67
|
-
=== New Features
|
68
|
-
* Support IBM_DB Adapter for table truncation. This is for DB2 >= 9.7 (GH-39 Samer Abukhait)
|
69
|
-
|
70
|
-
=== Bugfixes
|
71
|
-
* Reversed GH-41 after larger community discussion. Mongo indexes are no longer dropped. (Ben Mabey)
|
72
|
-
* Truncation strategy works on SqlServer tables with FKs. (GH-33, Hugo Freire)
|
73
|
-
|
74
|
-
== 0.6.1 2011-01-27
|
75
|
-
|
76
|
-
=== New Features
|
77
|
-
* Default strategies for all ORM libs are defined. (GH-36, GH-38 Prem Sichanugrist)
|
78
|
-
* Add a NullStrategy. (GH-6 Ben Mabey)
|
79
|
-
|
80
|
-
=== Bugfixes
|
81
|
-
* Mongo colletion indexes are dropped for collections being removed. (GH-41 Ben Mabey)
|
82
|
-
* Exclude database views from tables_to_truncate, if the connection adapter
|
83
|
-
supports reading from the ANSI standard information_schema views. (GH-25 Samer Abukhait)
|
84
|
-
* ORM types can be specified in string format and not mysteriously blowup. (GH-26 Ben Mabey)
|
85
|
-
* Do not remove MongoDB reserved system collections. (GH-24 Ches Martin)
|
86
|
-
|
87
|
-
== 0.6.0 2010-10-25 - The Multi-ORM/Connection Release
|
88
|
-
|
89
|
-
This release has the often asked for functionality of being able to clean
|
90
|
-
multiple databases within the same project. This involves being able to
|
91
|
-
clean databases managed by the same ORM (i.e. different connections) and
|
92
|
-
also being able to clean databases managed by distinct ORMs. So, for
|
93
|
-
example you can now use DatabaseCleaner on a project that has ActiveRecord
|
94
|
-
and Mongoid to help ensure all DBs all in a clean state. Please see the
|
95
|
-
README for more information. The old API has been preserved so this release
|
96
|
-
is backwards compatible.
|
97
|
-
|
98
|
-
This release is a result of Jon Rowe's hard work. Many thanks to Jon for all
|
99
|
-
of the hours and effort he put into making this feature request a reality.
|
100
|
-
|
101
|
-
=== New Features
|
102
|
-
* Ability to clean multiple database connections managed by the same ORM. (Jon Rowe)
|
103
|
-
* Ability to clean multiple DBs managed by different ORMs in same project. (Jon Rowe)
|
104
|
-
* Allows for the ActiveRecord config file (database.yml) to contain ERB and process it. (Fletcher Nichol)
|
105
|
-
* Mysql2Adapter support. (Kamal Fariz Mahyuddin and John Ferlito)
|
106
|
-
* Deletion strategy for ActiveRecord (Mikl Kurkov)
|
107
|
-
|
108
|
-
=== Bugfixes
|
109
|
-
* Updates the DataMapper truncation strategy to version 0.10.3. (Robert Rouse)
|
110
|
-
* Addresses Ruby 1.9 and 1.8 differences causing a bug in the AR PostgreSQLAdapter truncation strategy. (GH-14, James B. Byrne)
|
111
|
-
* Fixes syntax error that MySQL was throwing during DataMapper truncation. (Blake Gentry)
|
112
|
-
* Fixes truncation for PostgreSQL (Bodaniel Jeanes and Gabriel Sobrinho)
|
113
|
-
* Workaround for superclass mismatches for the ActiveRecord-jdbc-adapter (Toms Mikoss)
|
114
|
-
|
115
|
-
== 0.5.2
|
116
|
-
|
117
|
-
=== Bugfixes
|
118
|
-
* Removes extraneous puts call from configuration.rb. (Ben Mabey)
|
119
|
-
|
120
|
-
== 0.5.1 - The Mongoid Release
|
121
|
-
|
122
|
-
This release also attempts to fix AR for Rails 3 support. I have seen mixed reviews on this. Some people
|
123
|
-
claim the fixes allow for use in Rails3 while others have not had good luck with it. I plan on reworking
|
124
|
-
the way AR support is added so that it is more friendly with how Rails 3 uses autoload.
|
125
|
-
|
126
|
-
=== New features
|
127
|
-
* Clean and clean_with methods are now aliased to clean! and clean_with!. (Ben Mabey)
|
128
|
-
* Mongoid Support! (Sidney Burks)
|
129
|
-
|
130
|
-
=== Bugfixes
|
131
|
-
* Check PostgreSQL version >= 8.2 before using TRUNCATE CASCADE (James B. Byrne)
|
132
|
-
* Correct superclass is used in ActiveRecord connection adapters. (johnathan, Aslak Hellesoy, Ben Mabey)
|
133
|
-
|
134
|
-
== 0.5.0 2010-02-22 - The CouchPotato Release
|
135
|
-
|
136
|
-
=== New features
|
137
|
-
* Basic truncation support for CouchPotato / CouchDB. (Martin Rehfeld)
|
138
|
-
* SQLite3 on JRuby will fall back to delete if truncate doesn't work. (Darrin Holst)
|
139
|
-
* JDBC is used for ActiveRecord automaticaly when JRuby is detected. (Darrin Holst)
|
140
|
-
|
141
|
-
=== Bufixes
|
142
|
-
* MongoMapper truncation strategy now works with :only and :except options. (Ben Mabey)
|
143
|
-
|
144
|
-
== 0.4.3 2010-01-17
|
145
|
-
|
146
|
-
=== New features
|
147
|
-
* Truncation for ActiveRecord oracle_enhanced adapter. (Edgars Beigarts)
|
148
|
-
|
149
|
-
== 0.4.2 2010-01-12
|
150
|
-
|
151
|
-
=== Bufixes
|
152
|
-
* Datamapper truncation now uses 'select' instead of deprecated the 'query' method. (Steve Tooke)
|
153
|
-
|
154
|
-
== 0.4.1 2010-01-07
|
155
|
-
|
156
|
-
=== Bufixes
|
157
|
-
* Postgres tables with FKs now truncate (added TRUNCADE CASCADE) using Datamapper. (Ben Mabey)
|
158
|
-
|
159
|
-
== 0.4.0 2009-12-23 (The MongoMapper Edition)
|
160
|
-
|
161
|
-
=== New features
|
162
|
-
* MongoMapper support for the truncation strategy. (Aubrey Holland)
|
163
|
-
|
164
|
-
== 0.3.0 2009-12-20
|
165
|
-
|
166
|
-
=== New features
|
167
|
-
* DataMapper 0.10.0 Compatible. (Martin Gamsjaeger)
|
168
|
-
=== Bufixes
|
169
|
-
* Postgres tables with FKs now truncate (added TRUNCADE CASCADE). (Vika - yozhyk on github)
|
170
|
-
|
171
|
-
== 0.2.3 2009-05-30
|
172
|
-
|
173
|
-
=== New features
|
174
|
-
* Support for SQL Server truncation (Adam Meehan)
|
175
|
-
|
176
|
-
== 0.2.2 2009-05-08
|
177
|
-
=== Bufixes
|
178
|
-
* Added proper gemspec description and summary. (Ben Mabey, thanks to Martin Gamsjaeger)
|
179
|
-
|
180
|
-
=== New features
|
181
|
-
|
182
|
-
== 0.2.1 2009-05-08
|
183
|
-
=== Bufixes
|
184
|
-
* Removed extraneous TruncationBase class definition. (Ben Mabey)
|
185
|
-
|
186
|
-
== 0.2.0 2009-05-08 - The Datamapper Release
|
187
|
-
|
188
|
-
=== New features
|
189
|
-
* DataMapper strategies (Martin Gamsjaeger)
|
190
|
-
* Transaction
|
191
|
-
* Truncation - working SQLite3, MySQL adapters. Experimental Postgres adapter (not tested).
|
192
|
-
|
193
|
-
== 0.1.3 2009-04-30
|
194
|
-
|
195
|
-
=== New features
|
196
|
-
* PostgresSQLAdapter for AR to support the truncation strategy. (Alberto Perdomo)
|
197
|
-
=== Bufixes
|
198
|
-
* Added missing quotes around table names in truncation calls. (Michael MacDonald)
|
199
|
-
|
200
|
-
== 0.1.2 2009-03-05
|
201
|
-
=== New features
|
202
|
-
* JDBC Adapter to enable AR truncation strategy to work. (Kamal Fariz Mahyuddin)
|
203
|
-
|
204
|
-
== 0.1.1 2009-03-04 - Initial Release (Ben Mabey)
|
205
|
-
* Basic infrastructure
|
206
|
-
* Features, RSpec code examples
|
207
|
-
* ActiveRecord strategies
|
208
|
-
* Truncation - with MySQL, and SQLite3 adapters.
|
209
|
-
* Transaction - wrap your modifications and roll them back.
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2009 Ben Mabey
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,223 +0,0 @@
|
|
1
|
-
h1. Database Cleaner
|
2
|
-
|
3
|
-
Database Cleaner is a set of strategies for cleaning your database in Ruby.
|
4
|
-
The original use case was to ensure a clean state during tests. Each strategy
|
5
|
-
is a small amount of code but is code that is usually needed in any ruby app
|
6
|
-
that is testing with a database.
|
7
|
-
|
8
|
-
ActiveRecord, DataMapper, Sequel, MongoMapper, Mongoid, and CouchPotato are supported.
|
9
|
-
|
10
|
-
Here is an overview of the strategies supported for each library:
|
11
|
-
|
12
|
-
|_. ORM |_. Truncation |_. Transaction |_. Deletion |
|
13
|
-
| ActiveRecord | Yes | **Yes** | Yes |
|
14
|
-
| DataMapper | Yes | **Yes** | No |
|
15
|
-
| CouchPotato | **Yes** | No | No |
|
16
|
-
| MongoMapper | **Yes** | No | No |
|
17
|
-
| Mongoid | **Yes** | No | No |
|
18
|
-
| Sequel | **Yes** | Yes | No |
|
19
|
-
|
20
|
-
(Default strategy for each library is denoted in bold)
|
21
|
-
|
22
|
-
The ActiveRecord @:deletion@ strategy is useful for when the @:truncation@ strategy causes
|
23
|
-
locks (as reported by some Oracle DB users). The @:deletion@ option has been reported to
|
24
|
-
be faster than @:truncation@ in some cases as well. In general, the best approach is to use
|
25
|
-
@:transaction@ since it is the fastest.
|
26
|
-
|
27
|
-
Database Cleaner also includes a @null@ strategy (that does no cleaning at all) which can be used
|
28
|
-
with any ORM library. You can also explicitly use it by setting your strategy to @nil@.
|
29
|
-
|
30
|
-
For support or to discuss development please use the "Google Group":http://groups.google.com/group/database_cleaner.
|
31
|
-
|
32
|
-
h2. How to use
|
33
|
-
|
34
|
-
<pre>
|
35
|
-
require 'database_cleaner'
|
36
|
-
DatabaseCleaner.strategy = :truncation
|
37
|
-
|
38
|
-
# then, whenever you need to clean the DB
|
39
|
-
DatabaseCleaner.clean
|
40
|
-
</pre>
|
41
|
-
|
42
|
-
With the :truncation strategy you can also pass in options, for example:
|
43
|
-
<pre>
|
44
|
-
DatabaseCleaner.strategy = :truncation, {:only => %w[widgets dogs some_other_table]}
|
45
|
-
</pre>
|
46
|
-
|
47
|
-
<pre>
|
48
|
-
DatabaseCleaner.strategy = :truncation, {:except => %w[widgets]}
|
49
|
-
</pre>
|
50
|
-
|
51
|
-
(I should point out the truncation strategy will never truncate your schema_migrations table.)
|
52
|
-
|
53
|
-
Some strategies require that you call DatabaseCleaner.start before calling clean
|
54
|
-
(for example the :transaction one needs to know to open up a transaction). So
|
55
|
-
you would have:
|
56
|
-
|
57
|
-
<pre>
|
58
|
-
require 'database_cleaner'
|
59
|
-
DatabaseCleaner.strategy = :transaction
|
60
|
-
|
61
|
-
DatabaseCleaner.start # usually this is called in setup of a test
|
62
|
-
dirty_the_db
|
63
|
-
DatabaseCleaner.clean # cleanup of the test
|
64
|
-
</pre>
|
65
|
-
|
66
|
-
At times you may want to do a single clean with one strategy. For example, you may want
|
67
|
-
to start the process by truncating all the tables, but then use the faster transaction
|
68
|
-
strategy the remaining time. To accomplish this you can say:
|
69
|
-
|
70
|
-
<pre>
|
71
|
-
require 'database_cleaner'
|
72
|
-
DatabaseCleaner.clean_with :truncation
|
73
|
-
DatabaseCleaner.strategy = :transaction
|
74
|
-
# then make the DatabaseCleaner.start and DatabaseCleaner.clean calls appropriately
|
75
|
-
</pre>
|
76
|
-
|
77
|
-
h3. RSpec Example
|
78
|
-
|
79
|
-
<pre>
|
80
|
-
RSpec.configure do |config|
|
81
|
-
|
82
|
-
config.before(:suite) do
|
83
|
-
DatabaseCleaner.strategy = :transaction
|
84
|
-
DatabaseCleaner.clean_with(:truncation)
|
85
|
-
end
|
86
|
-
|
87
|
-
config.before(:each) do
|
88
|
-
DatabaseCleaner.start
|
89
|
-
end
|
90
|
-
|
91
|
-
config.after(:each) do
|
92
|
-
DatabaseCleaner.clean
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
</pre>
|
97
|
-
|
98
|
-
h3. Cucumber Example
|
99
|
-
|
100
|
-
Add this to your features/support/env.rb file:
|
101
|
-
|
102
|
-
<pre>
|
103
|
-
begin
|
104
|
-
require 'database_cleaner'
|
105
|
-
require 'database_cleaner/cucumber'
|
106
|
-
DatabaseCleaner.strategy = :truncation
|
107
|
-
rescue NameError
|
108
|
-
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
|
109
|
-
end
|
110
|
-
</pre>
|
111
|
-
|
112
|
-
A good idea is to create the before and after hooks to use the DatabaseCleaner.start and DatabaseCleaner.clean methods.
|
113
|
-
|
114
|
-
Inside features/support/hooks.rb:
|
115
|
-
|
116
|
-
<pre>
|
117
|
-
Before do
|
118
|
-
DatabaseCleaner.start
|
119
|
-
end
|
120
|
-
|
121
|
-
After do |scenario|
|
122
|
-
DatabaseCleaner.clean
|
123
|
-
end
|
124
|
-
</pre>
|
125
|
-
|
126
|
-
This should cover the basics of tear down between scenarios and keeping your database clean.
|
127
|
-
For more examples see the section "Why?"
|
128
|
-
|
129
|
-
h2. How to use with multiple ORM's
|
130
|
-
|
131
|
-
Sometimes you need to use multiple ORMs in your application. You can use DatabaseCleaner to clean multiple ORMs, and multiple connections for those ORMs.
|
132
|
-
|
133
|
-
<pre>
|
134
|
-
#How to specify particular orms
|
135
|
-
DatabaseCleaner[:active_record].strategy = :transaction
|
136
|
-
DatabaseCleaner[:mongo_mapper].strategy = :truncation
|
137
|
-
|
138
|
-
#How to specify particular connections
|
139
|
-
DatabaseCleaner[:active_record,{:connection => :two}]
|
140
|
-
</pre>
|
141
|
-
|
142
|
-
Usage beyond that remains the same with DatabaseCleaner.start calling any setup on the different configured connections, and DatabaseCleaner.clean executing afterwards.
|
143
|
-
|
144
|
-
Configuration options
|
145
|
-
|
146
|
-
|
147
|
-
|_. ORM |_. How to access |_. Notes |
|
148
|
-
| Active Record | DatabaseCleaner[:active_record] | Connection specified as :symbol keys, loaded from config/database.yml |
|
149
|
-
| Data Mapper | DatabaseCleaner[:data_mapper] | Connection specified as :symbol keys, loaded via Datamapper repositories |
|
150
|
-
| Mongo Mapper | DatabaseCleaner[:mongo_mapper] | Multiple connections not yet supported |
|
151
|
-
| Mongoid | DatabaseCleaner[:mongoid] | Multiple connections not yet supported |
|
152
|
-
| Couch Potato | DatabaseCleaner[:couch_potato] | Multiple connections not yet supported |
|
153
|
-
| Sequel | DatabaseCleaner[:sequel] | ? |
|
154
|
-
|
155
|
-
h2. Why?
|
156
|
-
|
157
|
-
One of my motivations for writing this library was to have an easy way to
|
158
|
-
turn on what Rails calls "transactional_fixtures" in my non-rails
|
159
|
-
ActiveRecord projects. For example, Cucumber ships with a Rails world that
|
160
|
-
will wrap each scenario in a transaction. This is great, but what if you are
|
161
|
-
using ActiveRecord in a non-rails project? You used to have to copy-and-paste
|
162
|
-
the needed code, but with DatabaseCleaner you can now say:
|
163
|
-
|
164
|
-
<pre>
|
165
|
-
#env.rb
|
166
|
-
require 'database_cleaner'
|
167
|
-
require 'database_cleaner/cucumber'
|
168
|
-
DatabaseCleaner.strategy = :transaction
|
169
|
-
</pre>
|
170
|
-
|
171
|
-
Now lets say you are running your features and it requires that another process be
|
172
|
-
involved (i.e. Selenium running against your app's server.) You can simply change
|
173
|
-
your strategy type:
|
174
|
-
|
175
|
-
<pre>
|
176
|
-
#env.rb
|
177
|
-
require 'database_cleaner'
|
178
|
-
require 'database_cleaner/cucumber'
|
179
|
-
DatabaseCleaner.strategy = :truncation
|
180
|
-
</pre>
|
181
|
-
|
182
|
-
You can have the best of both worlds and use the best one for the job:
|
183
|
-
<pre>
|
184
|
-
#env.rb
|
185
|
-
require 'database_cleaner'
|
186
|
-
require 'database_cleaner/cucumber'
|
187
|
-
DatabaseCleaner.strategy = (ENV['SELENIUM'] == 'true') ? :truncation : :transaction
|
188
|
-
</pre>
|
189
|
-
|
190
|
-
|
191
|
-
h2. Common Errors
|
192
|
-
|
193
|
-
h4. DatabaseCleaner is trying to use the wrong ORM
|
194
|
-
|
195
|
-
DatabaseCleaner has an autodetect mechanism where if you do not explicitly define your ORM it will use the first ORM it can detect that is loaded. Since ActiveRecord is the most common ORM used that is the first one checked for. Sometimes other libraries (e.g. ActiveAdmin) will load other ORMs (e.g. ActiveRecord) even though you are using a different ORM. This will result in DatabaseCleaner trying to use the wrong ORM (e.g. ActiveRecord) unless you explicitly define your ORM like so:
|
196
|
-
|
197
|
-
<pre>
|
198
|
-
# How to setup your ORM explicitly
|
199
|
-
DatabaseCleaner[:mongoid].strategy = :truncation
|
200
|
-
</pre>
|
201
|
-
|
202
|
-
h4. STDERR is being flooded when using Postgres
|
203
|
-
|
204
|
-
If you are using Postgres and have foreign key constraints, the truncation strategy will cause a lot of extra noise to appear on STDERR (in
|
205
|
-
the form of "NOTICE truncate cascades" messages). To silence these warnings set the following log level in your postgresql.conf file:
|
206
|
-
|
207
|
-
<pre>
|
208
|
-
client_min_messages = warning
|
209
|
-
</pre>
|
210
|
-
|
211
|
-
|
212
|
-
h2. Debugging
|
213
|
-
|
214
|
-
In rare cases DatabaseCleaner will encounter errors that it will log. By default it uses STDOUT set to the ERROR level but you can configure this to use whatever Logger you desire. Here's an example of using the Rails.logger in env.rb:
|
215
|
-
|
216
|
-
<pre>
|
217
|
-
DatabaseCleaner.logger = Rails.logger
|
218
|
-
</pre>
|
219
|
-
|
220
|
-
|
221
|
-
h2. COPYRIGHT
|
222
|
-
|
223
|
-
Copyright (c) 2009 Ben Mabey. See LICENSE for details.
|