lockbox_middleware 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lockbox_middleware.rb +1 -1
- data/spec/lib/lockbox_middleware_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -2
- metadata +36 -756
- data/.gitignore +0 -15
- data/Capfile +0 -4
- data/Gemfile +0 -11
- data/Rakefile +0 -12
- data/VERSION +0 -1
- data/app/controllers/admin/partners_controller.rb +0 -14
- data/app/controllers/admin_controller.rb +0 -8
- data/app/controllers/application_controller.rb +0 -32
- data/app/controllers/authentication_controller.rb +0 -58
- data/app/controllers/confirmation_controller.rb +0 -14
- data/app/controllers/fetch_password_controller.rb +0 -44
- data/app/controllers/home_controller.rb +0 -11
- data/app/controllers/partner_sessions_controller.rb +0 -30
- data/app/controllers/partners_controller.rb +0 -58
- data/app/helpers/admin/partners_helper.rb +0 -3
- data/app/helpers/admin_helper.rb +0 -2
- data/app/helpers/application_helper.rb +0 -20
- data/app/helpers/authentication_helper.rb +0 -2
- data/app/helpers/fetch_password_helper.rb +0 -2
- data/app/helpers/home_helper.rb +0 -2
- data/app/helpers/labeled_builder.rb +0 -76
- data/app/helpers/partners_helper.rb +0 -2
- data/app/models/partner.rb +0 -129
- data/app/models/partner_mailer.rb +0 -25
- data/app/models/partner_session.rb +0 -2
- data/app/views/admin/show.html.erb +0 -6
- data/app/views/authentication/four_two_oh.html.erb +0 -4
- data/app/views/fetch_password/index.html.erb +0 -4
- data/app/views/fetch_password/show.html.erb +0 -6
- data/app/views/home/show.html.erb +0 -20
- data/app/views/layouts/admin.html.erb +0 -42
- data/app/views/layouts/application.html.erb +0 -48
- data/app/views/partner_mailer/confirmation.text.html.erb +0 -30
- data/app/views/partner_mailer/confirmation.text.plain.erb +0 -5
- data/app/views/partner_mailer/fetch_password.text.html.erb +0 -32
- data/app/views/partner_mailer/fetch_password.text.plain.erb +0 -5
- data/app/views/partner_sessions/new.html.erb +0 -9
- data/app/views/partners/_form.html.erb +0 -7
- data/app/views/partners/edit.html.erb +0 -5
- data/app/views/partners/index.html.erb +0 -0
- data/app/views/partners/new.html.erb +0 -6
- data/app/views/partners/show.html.erb +0 -48
- data/app/views/shared/_footer.html.erb +0 -0
- data/app/views/shared/_header.html.erb +0 -3
- data/app/views/shared/_logged_in_menu.html.erb +0 -1
- data/app/views/shared/_logged_out_menu.html.erb +0 -2
- data/config/asset_packages.yml +0 -19
- data/config/boot.rb +0 -110
- data/config/database.yml.example +0 -25
- data/config/environment.rb +0 -56
- data/config/environments/development.rb +0 -22
- data/config/environments/production.rb +0 -30
- data/config/environments/test.rb +0 -35
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/inflections.rb +0 -10
- data/config/initializers/mime_types.rb +0 -7
- data/config/initializers/new_rails_defaults.rb +0 -21
- data/config/initializers/session_store.rb +0 -15
- data/config/initializers/settings.rb +0 -1
- data/config/initializers/string.rb +0 -25
- data/config/locales/en.yml +0 -5
- data/config/lockbox.yml.example +0 -12
- data/config/routes.rb +0 -23
- data/db/migrate/20091104170848_create_partners.rb +0 -34
- data/db/migrate/20091106213802_add_index_on_api_key.rb +0 -9
- data/db/migrate/20100507193948_add_partner_slug.rb +0 -11
- data/db/seeds.rb +0 -7
- data/lib/admin_authentication.rb +0 -9
- data/lib/authentication.rb +0 -48
- data/lib/rfc822.rb +0 -18
- data/lib/tasks/jeweler.rake +0 -14
- data/lib/tasks/rspec.rake +0 -144
- data/public/404.html +0 -30
- data/public/422.html +0 -30
- data/public/500.html +0 -30
- data/public/blank.html +0 -33
- data/public/favicon.ico +0 -0
- data/public/images/active_scaffold/DO_NOT_EDIT +0 -2
- data/public/images/active_scaffold/default/add.gif +0 -0
- data/public/images/active_scaffold/default/arrow_down.gif +0 -0
- data/public/images/active_scaffold/default/arrow_up.gif +0 -0
- data/public/images/active_scaffold/default/close.gif +0 -0
- data/public/images/active_scaffold/default/cross.png +0 -0
- data/public/images/active_scaffold/default/indicator-small.gif +0 -0
- data/public/images/active_scaffold/default/indicator.gif +0 -0
- data/public/images/active_scaffold/default/magnifier.png +0 -0
- data/public/images/rails.png +0 -0
- data/public/javascripts/active_scaffold/DO_NOT_EDIT +0 -2
- data/public/javascripts/active_scaffold/default/active_scaffold.js +0 -434
- data/public/javascripts/active_scaffold/default/dhtml_history.js +0 -867
- data/public/javascripts/active_scaffold/default/form_enhancements.js +0 -117
- data/public/javascripts/active_scaffold/default/rico_corner.js +0 -370
- data/public/javascripts/application.js +0 -2
- data/public/javascripts/controls.js +0 -963
- data/public/javascripts/csshover.htc +0 -120
- data/public/javascripts/dragdrop.js +0 -973
- data/public/javascripts/effects.js +0 -1128
- data/public/javascripts/prototype.js +0 -4320
- data/public/robots.txt +0 -5
- data/public/stylesheets/active_scaffold/DO_NOT_EDIT +0 -2
- data/public/stylesheets/active_scaffold/default/stylesheet-ie.css +0 -35
- data/public/stylesheets/active_scaffold/default/stylesheet.css +0 -822
- data/public/stylesheets/application.css +0 -189
- data/public/stylesheets/ie.css +0 -11
- data/public/stylesheets/reset.css +0 -42
- data/public/stylesheets/screen.css +0 -257
- data/script/about +0 -4
- data/script/autospec +0 -6
- data/script/console +0 -3
- data/script/cucumber +0 -17
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
- data/script/spec +0 -10
- data/spec/controllers/admin/partners_controller_spec.rb +0 -55
- data/spec/controllers/admin_controller_spec.rb +0 -29
- data/spec/controllers/application_controller_spec.rb +0 -36
- data/spec/controllers/authentication_controller_spec.rb +0 -120
- data/spec/controllers/confirmation_controller_spec.rb +0 -36
- data/spec/controllers/fetch_password_controller_spec.rb +0 -155
- data/spec/controllers/home_controller_spec.rb +0 -15
- data/spec/controllers/partner_sessions_controller_spec.rb +0 -84
- data/spec/controllers/partners_controller_spec.rb +0 -132
- data/spec/factories/partners.rb +0 -14
- data/spec/models/partner_mailer_spec.rb +0 -47
- data/spec/models/partner_spec.rb +0 -155
- data/spec/rcov.opts +0 -1
- data/vendor/gems/authlogic-2.1.3/.gitignore +0 -9
- data/vendor/gems/authlogic-2.1.3/CHANGELOG.rdoc +0 -345
- data/vendor/gems/authlogic-2.1.3/LICENSE +0 -20
- data/vendor/gems/authlogic-2.1.3/README.rdoc +0 -246
- data/vendor/gems/authlogic-2.1.3/Rakefile +0 -42
- data/vendor/gems/authlogic-2.1.3/VERSION.yml +0 -5
- data/vendor/gems/authlogic-2.1.3/authlogic.gemspec +0 -217
- data/vendor/gems/authlogic-2.1.3/generators/session/session_generator.rb +0 -9
- data/vendor/gems/authlogic-2.1.3/generators/session/templates/session.rb +0 -2
- data/vendor/gems/authlogic-2.1.3/init.rb +0 -1
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/base.rb +0 -107
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/email.rb +0 -110
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/logged_in_status.rb +0 -60
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/login.rb +0 -141
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/magic_columns.rb +0 -24
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/password.rb +0 -344
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/perishable_token.rb +0 -105
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/persistence_token.rb +0 -68
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/restful_authentication.rb +0 -61
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/session_maintenance.rb +0 -139
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/single_access_token.rb +0 -65
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/acts_as_authentic/validations_scope.rb +0 -32
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/authenticates_many/association.rb +0 -42
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/authenticates_many/base.rb +0 -55
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/controller_adapters/abstract_adapter.rb +0 -67
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/controller_adapters/merb_adapter.rb +0 -30
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/controller_adapters/rails_adapter.rb +0 -48
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/controller_adapters/sinatra_adapter.rb +0 -61
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/aes256.rb +0 -43
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/bcrypt.rb +0 -90
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/md5.rb +0 -34
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/sha1.rb +0 -35
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/sha256.rb +0 -50
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/sha512.rb +0 -50
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/crypto_providers/wordpress.rb +0 -43
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/i18n/translator.rb +0 -15
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/i18n.rb +0 -83
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/random.rb +0 -33
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/regex.rb +0 -25
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/activation.rb +0 -58
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/active_record_trickery.rb +0 -61
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/base.rb +0 -37
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/brute_force_protection.rb +0 -96
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/callbacks.rb +0 -88
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/cookies.rb +0 -130
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/existence.rb +0 -93
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/foundation.rb +0 -63
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/http_auth.rb +0 -58
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/id.rb +0 -41
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/klass.rb +0 -78
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/magic_columns.rb +0 -95
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/magic_states.rb +0 -59
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/params.rb +0 -101
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/password.rb +0 -240
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/perishable_token.rb +0 -18
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/persistence.rb +0 -70
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/priority_record.rb +0 -34
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/scopes.rb +0 -101
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/session.rb +0 -62
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/timeout.rb +0 -82
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/unauthorized_record.rb +0 -50
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/session/validation.rb +0 -82
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/test_case/mock_controller.rb +0 -45
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/test_case/mock_cookie_jar.rb +0 -14
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/test_case/mock_logger.rb +0 -10
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/test_case/mock_request.rb +0 -19
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/test_case/rails_request_adapter.rb +0 -30
- data/vendor/gems/authlogic-2.1.3/lib/authlogic/test_case.rb +0 -120
- data/vendor/gems/authlogic-2.1.3/lib/authlogic.rb +0 -57
- data/vendor/gems/authlogic-2.1.3/rails/init.rb +0 -1
- data/vendor/gems/authlogic-2.1.3/shoulda_macros/authlogic.rb +0 -69
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/base_test.rb +0 -18
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/email_test.rb +0 -97
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/logged_in_status_test.rb +0 -36
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/login_test.rb +0 -109
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/magic_columns_test.rb +0 -27
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/password_test.rb +0 -236
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/perishable_token_test.rb +0 -90
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/persistence_token_test.rb +0 -55
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/restful_authentication_test.rb +0 -40
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/session_maintenance_test.rb +0 -84
- data/vendor/gems/authlogic-2.1.3/test/acts_as_authentic_test/single_access_test.rb +0 -44
- data/vendor/gems/authlogic-2.1.3/test/authenticates_many_test.rb +0 -16
- data/vendor/gems/authlogic-2.1.3/test/crypto_provider_test/aes256_test.rb +0 -14
- data/vendor/gems/authlogic-2.1.3/test/crypto_provider_test/bcrypt_test.rb +0 -14
- data/vendor/gems/authlogic-2.1.3/test/crypto_provider_test/sha1_test.rb +0 -23
- data/vendor/gems/authlogic-2.1.3/test/crypto_provider_test/sha256_test.rb +0 -14
- data/vendor/gems/authlogic-2.1.3/test/crypto_provider_test/sha512_test.rb +0 -14
- data/vendor/gems/authlogic-2.1.3/test/fixtures/companies.yml +0 -5
- data/vendor/gems/authlogic-2.1.3/test/fixtures/employees.yml +0 -17
- data/vendor/gems/authlogic-2.1.3/test/fixtures/projects.yml +0 -3
- data/vendor/gems/authlogic-2.1.3/test/fixtures/users.yml +0 -24
- data/vendor/gems/authlogic-2.1.3/test/i18n_test.rb +0 -33
- data/vendor/gems/authlogic-2.1.3/test/libs/affiliate.rb +0 -7
- data/vendor/gems/authlogic-2.1.3/test/libs/company.rb +0 -6
- data/vendor/gems/authlogic-2.1.3/test/libs/employee.rb +0 -7
- data/vendor/gems/authlogic-2.1.3/test/libs/employee_session.rb +0 -2
- data/vendor/gems/authlogic-2.1.3/test/libs/ldaper.rb +0 -3
- data/vendor/gems/authlogic-2.1.3/test/libs/ordered_hash.rb +0 -9
- data/vendor/gems/authlogic-2.1.3/test/libs/project.rb +0 -3
- data/vendor/gems/authlogic-2.1.3/test/libs/user.rb +0 -5
- data/vendor/gems/authlogic-2.1.3/test/libs/user_session.rb +0 -6
- data/vendor/gems/authlogic-2.1.3/test/random_test.rb +0 -49
- data/vendor/gems/authlogic-2.1.3/test/session_test/activation_test.rb +0 -43
- data/vendor/gems/authlogic-2.1.3/test/session_test/active_record_trickery_test.rb +0 -36
- data/vendor/gems/authlogic-2.1.3/test/session_test/brute_force_protection_test.rb +0 -101
- data/vendor/gems/authlogic-2.1.3/test/session_test/callbacks_test.rb +0 -6
- data/vendor/gems/authlogic-2.1.3/test/session_test/cookies_test.rb +0 -112
- data/vendor/gems/authlogic-2.1.3/test/session_test/credentials_test.rb +0 -0
- data/vendor/gems/authlogic-2.1.3/test/session_test/existence_test.rb +0 -64
- data/vendor/gems/authlogic-2.1.3/test/session_test/http_auth_test.rb +0 -28
- data/vendor/gems/authlogic-2.1.3/test/session_test/id_test.rb +0 -17
- data/vendor/gems/authlogic-2.1.3/test/session_test/klass_test.rb +0 -40
- data/vendor/gems/authlogic-2.1.3/test/session_test/magic_columns_test.rb +0 -62
- data/vendor/gems/authlogic-2.1.3/test/session_test/magic_states_test.rb +0 -60
- data/vendor/gems/authlogic-2.1.3/test/session_test/params_test.rb +0 -53
- data/vendor/gems/authlogic-2.1.3/test/session_test/password_test.rb +0 -106
- data/vendor/gems/authlogic-2.1.3/test/session_test/perishability_test.rb +0 -15
- data/vendor/gems/authlogic-2.1.3/test/session_test/persistence_test.rb +0 -21
- data/vendor/gems/authlogic-2.1.3/test/session_test/scopes_test.rb +0 -60
- data/vendor/gems/authlogic-2.1.3/test/session_test/session_test.rb +0 -59
- data/vendor/gems/authlogic-2.1.3/test/session_test/timeout_test.rb +0 -52
- data/vendor/gems/authlogic-2.1.3/test/session_test/unauthorized_record_test.rb +0 -13
- data/vendor/gems/authlogic-2.1.3/test/session_test/validation_test.rb +0 -23
- data/vendor/gems/authlogic-2.1.3/test/test_helper.rb +0 -182
- data/vendor/gems/factory_girl-1.2.3/.specification +0 -121
- data/vendor/gems/factory_girl-1.2.3/CONTRIBUTION_GUIDELINES.rdoc +0 -9
- data/vendor/gems/factory_girl-1.2.3/Changelog +0 -29
- data/vendor/gems/factory_girl-1.2.3/LICENSE +0 -19
- data/vendor/gems/factory_girl-1.2.3/README.rdoc +0 -228
- data/vendor/gems/factory_girl-1.2.3/Rakefile +0 -81
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/aliases.rb +0 -50
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/attribute/association.rb +0 -20
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/attribute/callback.rb +0 -16
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/attribute/dynamic.rb +0 -20
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/attribute/static.rb +0 -17
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/attribute.rb +0 -29
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/factory.rb +0 -395
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/proxy/attributes_for.rb +0 -21
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/proxy/build.rb +0 -30
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/proxy/create.rb +0 -12
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/proxy/stub.rb +0 -50
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/proxy.rb +0 -79
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/sequence.rb +0 -63
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/step_definitions.rb +0 -54
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/syntax/blueprint.rb +0 -42
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/syntax/generate.rb +0 -68
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/syntax/make.rb +0 -39
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/syntax/sham.rb +0 -42
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl/syntax.rb +0 -12
- data/vendor/gems/factory_girl-1.2.3/lib/factory_girl.rb +0 -35
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/aliases_spec.rb +0 -29
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/attribute/association_spec.rb +0 -29
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/attribute/callback_spec.rb +0 -23
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/attribute/dynamic_spec.rb +0 -49
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/attribute/static_spec.rb +0 -29
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/attribute_spec.rb +0 -30
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/factory_spec.rb +0 -571
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/proxy/attributes_for_spec.rb +0 -52
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/proxy/build_spec.rb +0 -81
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/proxy/create_spec.rb +0 -94
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/proxy/stub_spec.rb +0 -79
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/proxy_spec.rb +0 -84
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/sequence_spec.rb +0 -66
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/syntax/blueprint_spec.rb +0 -34
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/syntax/generate_spec.rb +0 -57
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/syntax/make_spec.rb +0 -35
- data/vendor/gems/factory_girl-1.2.3/spec/factory_girl/syntax/sham_spec.rb +0 -35
- data/vendor/gems/factory_girl-1.2.3/spec/integration_spec.rb +0 -304
- data/vendor/gems/factory_girl-1.2.3/spec/models.rb +0 -43
- data/vendor/gems/factory_girl-1.2.3/spec/spec_helper.rb +0 -18
- data/vendor/gems/paperclip-2.3.1.1/.specification +0 -161
- data/vendor/gems/paperclip-2.3.1.1/LICENSE +0 -26
- data/vendor/gems/paperclip-2.3.1.1/README.rdoc +0 -174
- data/vendor/gems/paperclip-2.3.1.1/Rakefile +0 -103
- data/vendor/gems/paperclip-2.3.1.1/generators/paperclip/USAGE +0 -5
- data/vendor/gems/paperclip-2.3.1.1/generators/paperclip/paperclip_generator.rb +0 -27
- data/vendor/gems/paperclip-2.3.1.1/generators/paperclip/templates/paperclip_migration.rb.erb +0 -19
- data/vendor/gems/paperclip-2.3.1.1/init.rb +0 -1
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/attachment.rb +0 -414
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/callback_compatability.rb +0 -33
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/geometry.rb +0 -115
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/interpolations.rb +0 -108
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/iostream.rb +0 -58
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/matchers/have_attached_file_matcher.rb +0 -49
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +0 -66
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +0 -48
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/matchers/validate_attachment_size_matcher.rb +0 -83
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/matchers.rb +0 -4
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/processor.rb +0 -49
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/storage.rb +0 -243
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/thumbnail.rb +0 -73
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip/upfile.rb +0 -49
- data/vendor/gems/paperclip-2.3.1.1/lib/paperclip.rb +0 -353
- data/vendor/gems/paperclip-2.3.1.1/shoulda_macros/paperclip.rb +0 -117
- data/vendor/gems/paperclip-2.3.1.1/tasks/paperclip_tasks.rake +0 -79
- data/vendor/gems/paperclip-2.3.1.1/test/attachment_test.rb +0 -780
- data/vendor/gems/paperclip-2.3.1.1/test/database.yml +0 -4
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/12k.png +0 -0
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/50x50.png +0 -0
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/5k.png +0 -0
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/bad.png +0 -1
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/s3.yml +0 -8
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/text.txt +0 -0
- data/vendor/gems/paperclip-2.3.1.1/test/fixtures/twopage.pdf +0 -0
- data/vendor/gems/paperclip-2.3.1.1/test/geometry_test.rb +0 -177
- data/vendor/gems/paperclip-2.3.1.1/test/helper.rb +0 -108
- data/vendor/gems/paperclip-2.3.1.1/test/integration_test.rb +0 -483
- data/vendor/gems/paperclip-2.3.1.1/test/interpolations_test.rb +0 -124
- data/vendor/gems/paperclip-2.3.1.1/test/iostream_test.rb +0 -71
- data/vendor/gems/paperclip-2.3.1.1/test/matchers/have_attached_file_matcher_test.rb +0 -21
- data/vendor/gems/paperclip-2.3.1.1/test/matchers/validate_attachment_content_type_matcher_test.rb +0 -30
- data/vendor/gems/paperclip-2.3.1.1/test/matchers/validate_attachment_presence_matcher_test.rb +0 -21
- data/vendor/gems/paperclip-2.3.1.1/test/matchers/validate_attachment_size_matcher_test.rb +0 -50
- data/vendor/gems/paperclip-2.3.1.1/test/paperclip_test.rb +0 -327
- data/vendor/gems/paperclip-2.3.1.1/test/processor_test.rb +0 -10
- data/vendor/gems/paperclip-2.3.1.1/test/storage_test.rb +0 -303
- data/vendor/gems/paperclip-2.3.1.1/test/thumbnail_test.rb +0 -227
- data/vendor/gems/paperclip-2.3.1.1/test/upfile_test.rb +0 -28
- data/vendor/gems/shoulda-2.10.2/.specification +0 -224
- data/vendor/gems/shoulda-2.10.2/CONTRIBUTION_GUIDELINES.rdoc +0 -10
- data/vendor/gems/shoulda-2.10.2/MIT-LICENSE +0 -22
- data/vendor/gems/shoulda-2.10.2/README.rdoc +0 -171
- data/vendor/gems/shoulda-2.10.2/Rakefile +0 -72
- data/vendor/gems/shoulda-2.10.2/bin/convert_to_should_syntax +0 -42
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/macros.rb +0 -240
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +0 -109
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +0 -57
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +0 -81
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +0 -74
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +0 -81
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/route_matcher.rb +0 -93
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/set_session_matcher.rb +0 -87
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +0 -85
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller/matchers.rb +0 -37
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_controller.rb +0 -26
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_mailer/assertions.rb +0 -38
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_mailer.rb +0 -10
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_view/macros.rb +0 -61
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/action_view.rb +0 -10
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/assertions.rb +0 -69
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/helpers.rb +0 -27
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/macros.rb +0 -512
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +0 -83
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/allow_value_matcher.rb +0 -102
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/association_matcher.rb +0 -226
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +0 -87
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +0 -141
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +0 -169
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +0 -112
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb +0 -128
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +0 -59
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +0 -41
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +0 -67
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +0 -39
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +0 -60
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +0 -148
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers/validation_matcher.rb +0 -57
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record/matchers.rb +0 -43
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/active_record.rb +0 -16
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/assertions.rb +0 -71
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/autoload_macros.rb +0 -46
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/context.rb +0 -402
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/helpers.rb +0 -8
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/macros.rb +0 -133
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/private_helpers.rb +0 -13
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/proc_extensions.rb +0 -14
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/rails.rb +0 -13
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/rspec.rb +0 -11
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/tasks/list_tests.rake +0 -29
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/tasks/yaml_to_shoulda.rake +0 -28
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/tasks.rb +0 -3
- data/vendor/gems/shoulda-2.10.2/lib/shoulda/test_unit.rb +0 -22
- data/vendor/gems/shoulda-2.10.2/lib/shoulda.rb +0 -9
- data/vendor/gems/shoulda-2.10.2/rails/init.rb +0 -7
- data/vendor/gems/shoulda-2.10.2/test/README +0 -36
- data/vendor/gems/shoulda-2.10.2/test/fail_macros.rb +0 -39
- data/vendor/gems/shoulda-2.10.2/test/fixtures/addresses.yml +0 -3
- data/vendor/gems/shoulda-2.10.2/test/fixtures/friendships.yml +0 -0
- data/vendor/gems/shoulda-2.10.2/test/fixtures/posts.yml +0 -5
- data/vendor/gems/shoulda-2.10.2/test/fixtures/products.yml +0 -0
- data/vendor/gems/shoulda-2.10.2/test/fixtures/taggings.yml +0 -0
- data/vendor/gems/shoulda-2.10.2/test/fixtures/tags.yml +0 -9
- data/vendor/gems/shoulda-2.10.2/test/fixtures/users.yml +0 -6
- data/vendor/gems/shoulda-2.10.2/test/functional/posts_controller_test.rb +0 -121
- data/vendor/gems/shoulda-2.10.2/test/functional/users_controller_test.rb +0 -19
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +0 -68
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/allow_value_matcher_test.rb +0 -64
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/association_matcher_test.rb +0 -263
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +0 -80
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/ensure_length_of_matcher_test.rb +0 -158
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/have_db_column_matcher_test.rb +0 -169
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/have_db_index_matcher_test.rb +0 -91
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/have_named_scope_matcher_test.rb +0 -65
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +0 -29
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +0 -44
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/validate_format_of_matcher_test.rb +0 -39
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/validate_numericality_of_matcher_test.rb +0 -52
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/validate_presence_of_matcher_test.rb +0 -86
- data/vendor/gems/shoulda-2.10.2/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +0 -147
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/assign_to_matcher_test.rb +0 -35
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/filter_param_matcher_test.rb +0 -32
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/render_with_layout_matcher_test.rb +0 -33
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/respond_with_content_type_matcher_test.rb +0 -32
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/respond_with_matcher_test.rb +0 -106
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/route_matcher_test.rb +0 -58
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/set_session_matcher_test.rb +0 -38
- data/vendor/gems/shoulda-2.10.2/test/matchers/controller/set_the_flash_matcher.rb +0 -41
- data/vendor/gems/shoulda-2.10.2/test/model_builder.rb +0 -106
- data/vendor/gems/shoulda-2.10.2/test/other/autoload_macro_test.rb +0 -18
- data/vendor/gems/shoulda-2.10.2/test/other/context_test.rb +0 -189
- data/vendor/gems/shoulda-2.10.2/test/other/convert_to_should_syntax_test.rb +0 -63
- data/vendor/gems/shoulda-2.10.2/test/other/helpers_test.rb +0 -340
- data/vendor/gems/shoulda-2.10.2/test/other/private_helpers_test.rb +0 -32
- data/vendor/gems/shoulda-2.10.2/test/other/should_test.rb +0 -271
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/controllers/application_controller.rb +0 -25
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/controllers/posts_controller.rb +0 -87
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/controllers/users_controller.rb +0 -84
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/helpers/application_helper.rb +0 -3
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/helpers/posts_helper.rb +0 -2
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/helpers/users_helper.rb +0 -2
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/address.rb +0 -7
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/flea.rb +0 -3
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/friendship.rb +0 -4
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/pets/cat.rb +0 -7
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/pets/dog.rb +0 -10
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/post.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/product.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/profile.rb +0 -2
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/registration.rb +0 -2
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/tag.rb +0 -8
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/tagging.rb +0 -4
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/treat.rb +0 -3
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/models/user.rb +0 -32
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/layouts/posts.rhtml +0 -19
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/layouts/users.rhtml +0 -17
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/layouts/wide.html.erb +0 -1
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/posts/edit.rhtml +0 -27
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/posts/index.rhtml +0 -25
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/posts/new.rhtml +0 -26
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/posts/show.rhtml +0 -18
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/users/edit.rhtml +0 -22
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/users/index.rhtml +0 -22
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/users/new.rhtml +0 -21
- data/vendor/gems/shoulda-2.10.2/test/rails_root/app/views/users/show.rhtml +0 -13
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/boot.rb +0 -110
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/database.yml +0 -4
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/environment.rb +0 -18
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/environments/test.rb +0 -0
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/initializers/new_rails_defaults.rb +0 -15
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/initializers/shoulda.rb +0 -8
- data/vendor/gems/shoulda-2.10.2/test/rails_root/config/routes.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/001_create_users.rb +0 -19
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/002_create_posts.rb +0 -13
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/003_create_taggings.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/004_create_tags.rb +0 -11
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/005_create_dogs.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/006_create_addresses.rb +0 -14
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/007_create_fleas.rb +0 -11
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/008_create_dogs_fleas.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/009_create_products.rb +0 -17
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/010_create_friendships.rb +0 -14
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/011_create_treats.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/20090506203502_create_profiles.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/20090506203536_create_registrations.rb +0 -14
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/migrate/20090513104502_create_cats.rb +0 -12
- data/vendor/gems/shoulda-2.10.2/test/rails_root/db/schema.rb +0 -0
- data/vendor/gems/shoulda-2.10.2/test/rails_root/public/404.html +0 -30
- data/vendor/gems/shoulda-2.10.2/test/rails_root/public/422.html +0 -30
- data/vendor/gems/shoulda-2.10.2/test/rails_root/public/500.html +0 -30
- data/vendor/gems/shoulda-2.10.2/test/rails_root/script/console +0 -3
- data/vendor/gems/shoulda-2.10.2/test/rails_root/script/generate +0 -3
- data/vendor/gems/shoulda-2.10.2/test/rails_root/test/shoulda_macros/custom_macro.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/rspec_test.rb +0 -207
- data/vendor/gems/shoulda-2.10.2/test/test_helper.rb +0 -28
- data/vendor/gems/shoulda-2.10.2/test/unit/address_test.rb +0 -10
- data/vendor/gems/shoulda-2.10.2/test/unit/cat_test.rb +0 -7
- data/vendor/gems/shoulda-2.10.2/test/unit/dog_test.rb +0 -9
- data/vendor/gems/shoulda-2.10.2/test/unit/flea_test.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/unit/friendship_test.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/unit/post_test.rb +0 -19
- data/vendor/gems/shoulda-2.10.2/test/unit/product_test.rb +0 -23
- data/vendor/gems/shoulda-2.10.2/test/unit/tag_test.rb +0 -15
- data/vendor/gems/shoulda-2.10.2/test/unit/tagging_test.rb +0 -6
- data/vendor/gems/shoulda-2.10.2/test/unit/user_test.rb +0 -80
- data/vendor/plugins/active_scaffold/.autotest +0 -27
- data/vendor/plugins/active_scaffold/CHANGELOG +0 -152
- data/vendor/plugins/active_scaffold/MIT-LICENSE +0 -20
- data/vendor/plugins/active_scaffold/README +0 -31
- data/vendor/plugins/active_scaffold/Rakefile +0 -24
- data/vendor/plugins/active_scaffold/environment.rb +0 -17
- data/vendor/plugins/active_scaffold/frontends/default/images/add.gif +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/arrow_down.gif +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/arrow_up.gif +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/close.gif +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/cross.png +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/indicator-small.gif +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/indicator.gif +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/images/magnifier.png +0 -0
- data/vendor/plugins/active_scaffold/frontends/default/javascripts/active_scaffold.js +0 -434
- data/vendor/plugins/active_scaffold/frontends/default/javascripts/dhtml_history.js +0 -867
- data/vendor/plugins/active_scaffold/frontends/default/javascripts/form_enhancements.js +0 -117
- data/vendor/plugins/active_scaffold/frontends/default/javascripts/rico_corner.js +0 -370
- data/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet-ie.css +0 -35
- data/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet.css +0 -822
- data/vendor/plugins/active_scaffold/frontends/default/views/_add_existing_form.html.erb +0 -40
- data/vendor/plugins/active_scaffold/frontends/default/views/_create_form.html.erb +0 -51
- data/vendor/plugins/active_scaffold/frontends/default/views/_create_form_on_list.html.erb +0 -38
- data/vendor/plugins/active_scaffold/frontends/default/views/_field_search.html.erb +0 -45
- data/vendor/plugins/active_scaffold/frontends/default/views/_form.html.erb +0 -18
- data/vendor/plugins/active_scaffold/frontends/default/views/_form_association.html.erb +0 -20
- data/vendor/plugins/active_scaffold/frontends/default/views/_form_association_footer.html.erb +0 -42
- data/vendor/plugins/active_scaffold/frontends/default/views/_form_attribute.html.erb +0 -12
- data/vendor/plugins/active_scaffold/frontends/default/views/_form_hidden_attribute.html.erb +0 -1
- data/vendor/plugins/active_scaffold/frontends/default/views/_form_messages.html.erb +0 -5
- data/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform.html.erb +0 -19
- data/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform_header.html.erb +0 -10
- data/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform_record.html.erb +0 -29
- data/vendor/plugins/active_scaffold/frontends/default/views/_list.html.erb +0 -37
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_actions.html.erb +0 -13
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_calculations.html.erb +0 -22
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_column_headings.html.erb +0 -32
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_header.html.erb +0 -14
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_inline_adapter.html.erb +0 -9
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_pagination_links.html.erb +0 -30
- data/vendor/plugins/active_scaffold/frontends/default/views/_list_record.html.erb +0 -36
- data/vendor/plugins/active_scaffold/frontends/default/views/_live_search.html.erb +0 -23
- data/vendor/plugins/active_scaffold/frontends/default/views/_messages.html.erb +0 -10
- data/vendor/plugins/active_scaffold/frontends/default/views/_nested.html.erb +0 -44
- data/vendor/plugins/active_scaffold/frontends/default/views/_search.html.erb +0 -20
- data/vendor/plugins/active_scaffold/frontends/default/views/_show.html.erb +0 -8
- data/vendor/plugins/active_scaffold/frontends/default/views/_show_columns.html.erb +0 -12
- data/vendor/plugins/active_scaffold/frontends/default/views/_update_actions.html.erb +0 -9
- data/vendor/plugins/active_scaffold/frontends/default/views/_update_form.html.erb +0 -55
- data/vendor/plugins/active_scaffold/frontends/default/views/_vertical_subform.html.erb +0 -12
- data/vendor/plugins/active_scaffold/frontends/default/views/_vertical_subform_record.html.erb +0 -31
- data/vendor/plugins/active_scaffold/frontends/default/views/add_existing.js.rjs +0 -16
- data/vendor/plugins/active_scaffold/frontends/default/views/add_existing_form.html.erb +0 -5
- data/vendor/plugins/active_scaffold/frontends/default/views/create.html.erb +0 -5
- data/vendor/plugins/active_scaffold/frontends/default/views/delete.html.erb +0 -13
- data/vendor/plugins/active_scaffold/frontends/default/views/destroy.js.rjs +0 -10
- data/vendor/plugins/active_scaffold/frontends/default/views/edit_associated.js.rjs +0 -14
- data/vendor/plugins/active_scaffold/frontends/default/views/field_search.html.erb +0 -5
- data/vendor/plugins/active_scaffold/frontends/default/views/form_messages.js.rjs +0 -1
- data/vendor/plugins/active_scaffold/frontends/default/views/form_messages_on_create.js.rjs +0 -2
- data/vendor/plugins/active_scaffold/frontends/default/views/form_messages_on_update.js.rjs +0 -2
- data/vendor/plugins/active_scaffold/frontends/default/views/list.html.erb +0 -48
- data/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs +0 -25
- data/vendor/plugins/active_scaffold/frontends/default/views/on_update.js.rjs +0 -11
- data/vendor/plugins/active_scaffold/frontends/default/views/render_field.js.rjs +0 -9
- data/vendor/plugins/active_scaffold/frontends/default/views/search.html.erb +0 -5
- data/vendor/plugins/active_scaffold/frontends/default/views/show.html.erb +0 -5
- data/vendor/plugins/active_scaffold/frontends/default/views/update.html.erb +0 -8
- data/vendor/plugins/active_scaffold/frontends/default/views/update_column.js.rjs +0 -12
- data/vendor/plugins/active_scaffold/init.rb +0 -18
- data/vendor/plugins/active_scaffold/install.rb +0 -39
- data/vendor/plugins/active_scaffold/install_assets.rb +0 -36
- data/vendor/plugins/active_scaffold/lib/active_record_permissions.rb +0 -128
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/core.rb +0 -136
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/create.rb +0 -158
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/delete.rb +0 -72
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/field_search.rb +0 -58
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/list.rb +0 -95
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/live_search.rb +0 -57
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb +0 -217
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/search.rb +0 -50
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/show.rb +0 -54
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/subform.rb +0 -17
- data/vendor/plugins/active_scaffold/lib/active_scaffold/actions/update.rb +0 -126
- data/vendor/plugins/active_scaffold/lib/active_scaffold/attribute_params.rb +0 -192
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb +0 -45
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/core.rb +0 -230
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb +0 -43
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/delete.rb +0 -25
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/field_search.rb +0 -53
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/form.rb +0 -49
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/list.rb +0 -134
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/live_search.rb +0 -52
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/nested.rb +0 -34
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/search.rb +0 -52
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/show.rb +0 -36
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/subform.rb +0 -36
- data/vendor/plugins/active_scaffold/lib/active_scaffold/config/update.rb +0 -32
- data/vendor/plugins/active_scaffold/lib/active_scaffold/configurable.rb +0 -29
- data/vendor/plugins/active_scaffold/lib/active_scaffold/constraints.rb +0 -181
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb +0 -97
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_link.rb +0 -140
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_links.rb +0 -47
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/actions.rb +0 -45
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/column.rb +0 -311
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb +0 -75
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/error_message.rb +0 -24
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/set.rb +0 -62
- data/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/sorting.rb +0 -159
- data/vendor/plugins/active_scaffold/lib/active_scaffold/finder.rb +0 -216
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/association_helpers.rb +0 -40
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/controller_helpers.rb +0 -41
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/country_helpers.rb +0 -347
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/form_column_helpers.rb +0 -301
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/id_helpers.rb +0 -129
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/list_column_helpers.rb +0 -234
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/pagination_helpers.rb +0 -39
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/search_column_helpers.rb +0 -172
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/show_column_helpers.rb +0 -46
- data/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/view_helpers.rb +0 -202
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/de.rb +0 -67
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/en.rb +0 -67
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/es.yml +0 -65
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/fr.rb +0 -65
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/hu.yml +0 -62
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/ja.yml +0 -63
- data/vendor/plugins/active_scaffold/lib/active_scaffold/locale/ru.yml +0 -61
- data/vendor/plugins/active_scaffold/lib/active_scaffold.rb +0 -213
- data/vendor/plugins/active_scaffold/lib/bridges/bridge.rb +0 -52
- data/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/bridge.rb +0 -11
- data/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb +0 -86
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/bridge.rb +0 -12
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/as_file_column_bridge.rb +0 -49
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/file_column_helpers.rb +0 -51
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui.rb +0 -32
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb +0 -26
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb +0 -43
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/test/mock_model.rb +0 -9
- data/vendor/plugins/active_scaffold/lib/bridges/file_column/test/test_helper.rb +0 -15
- data/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/bridge.rb +0 -5
- data/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb +0 -45
- data/vendor/plugins/active_scaffold/lib/dhtml_confirm.rb +0 -54
- data/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb +0 -20
- data/vendor/plugins/active_scaffold/lib/extensions/action_view_rendering.rb +0 -88
- data/vendor/plugins/active_scaffold/lib/extensions/array.rb +0 -7
- data/vendor/plugins/active_scaffold/lib/extensions/component_response_with_namespacing.rb +0 -17
- data/vendor/plugins/active_scaffold/lib/extensions/generic_view_paths.rb +0 -33
- data/vendor/plugins/active_scaffold/lib/extensions/localize.rb +0 -10
- data/vendor/plugins/active_scaffold/lib/extensions/name_option_for_datetime.rb +0 -12
- data/vendor/plugins/active_scaffold/lib/extensions/nil_id_in_url_params.rb +0 -7
- data/vendor/plugins/active_scaffold/lib/extensions/resources.rb +0 -27
- data/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb +0 -56
- data/vendor/plugins/active_scaffold/lib/extensions/to_label.rb +0 -8
- data/vendor/plugins/active_scaffold/lib/extensions/unsaved_associated.rb +0 -61
- data/vendor/plugins/active_scaffold/lib/extensions/unsaved_record.rb +0 -20
- data/vendor/plugins/active_scaffold/lib/extensions/usa_state.rb +0 -46
- data/vendor/plugins/active_scaffold/lib/paginator.rb +0 -136
- data/vendor/plugins/active_scaffold/lib/responds_to_parent.rb +0 -68
- data/vendor/plugins/active_scaffold/public/blank.html +0 -33
- data/vendor/plugins/active_scaffold/uninstall.rb +0 -13
- data/vendor/plugins/asset_packager/CHANGELOG +0 -122
- data/vendor/plugins/asset_packager/README +0 -178
- data/vendor/plugins/asset_packager/Rakefile +0 -22
- data/vendor/plugins/asset_packager/about.yml +0 -8
- data/vendor/plugins/asset_packager/init.rb +0 -3
- data/vendor/plugins/asset_packager/install.rb +0 -1
- data/vendor/plugins/asset_packager/lib/jsmin.rb +0 -211
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package.rb +0 -210
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package_helper.rb +0 -39
- data/vendor/plugins/asset_packager/lib/tasks/asset_packager_tasks.rake +0 -23
- data/vendor/plugins/asset_packager/test/asset_package_helper_development_test.rb +0 -102
- data/vendor/plugins/asset_packager/test/asset_package_helper_production_test.rb +0 -142
- data/vendor/plugins/asset_packager/test/asset_packager_test.rb +0 -91
- data/vendor/plugins/asset_packager/test/asset_packages.yml +0 -20
- data/vendor/plugins/asset_packager/test/assets/javascripts/application.js +0 -2
- data/vendor/plugins/asset_packager/test/assets/javascripts/bar.js +0 -4
- data/vendor/plugins/asset_packager/test/assets/javascripts/controls.js +0 -815
- data/vendor/plugins/asset_packager/test/assets/javascripts/dragdrop.js +0 -913
- data/vendor/plugins/asset_packager/test/assets/javascripts/effects.js +0 -958
- data/vendor/plugins/asset_packager/test/assets/javascripts/foo.js +0 -4
- data/vendor/plugins/asset_packager/test/assets/javascripts/prototype.js +0 -2006
- data/vendor/plugins/asset_packager/test/assets/stylesheets/bar.css +0 -16
- data/vendor/plugins/asset_packager/test/assets/stylesheets/foo.css +0 -16
- data/vendor/plugins/asset_packager/test/assets/stylesheets/header.css +0 -16
- data/vendor/plugins/asset_packager/test/assets/stylesheets/screen.css +0 -16
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/bar.css +0 -16
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/foo.css +0 -16
- data/vendor/plugins/exception_notification/README +0 -111
- data/vendor/plugins/exception_notification/init.rb +0 -1
- data/vendor/plugins/exception_notification/lib/exception_notifiable.rb +0 -99
- data/vendor/plugins/exception_notification/lib/exception_notifier.rb +0 -66
- data/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb +0 -78
- data/vendor/plugins/exception_notification/test/exception_notifier_helper_test.rb +0 -61
- data/vendor/plugins/exception_notification/test/test_helper.rb +0 -7
- data/vendor/plugins/exception_notification/views/exception_notifier/_backtrace.rhtml +0 -1
- data/vendor/plugins/exception_notification/views/exception_notifier/_environment.rhtml +0 -7
- data/vendor/plugins/exception_notification/views/exception_notifier/_inspect_model.rhtml +0 -16
- data/vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml +0 -4
- data/vendor/plugins/exception_notification/views/exception_notifier/_session.rhtml +0 -2
- data/vendor/plugins/exception_notification/views/exception_notifier/_title.rhtml +0 -3
- data/vendor/plugins/exception_notification/views/exception_notifier/exception_notification.rhtml +0 -6
- data/vendor/plugins/required_attributes/MIT-LICENSE +0 -20
- data/vendor/plugins/required_attributes/README +0 -13
- data/vendor/plugins/required_attributes/Rakefile +0 -22
- data/vendor/plugins/required_attributes/init.rb +0 -1
- data/vendor/plugins/required_attributes/install.rb +0 -1
- data/vendor/plugins/required_attributes/lib/required_attributes.rb +0 -68
- data/vendor/plugins/required_attributes/required_attributes/MIT-LICENSE +0 -20
- data/vendor/plugins/required_attributes/required_attributes/README +0 -13
- data/vendor/plugins/required_attributes/required_attributes/Rakefile +0 -22
- data/vendor/plugins/required_attributes/required_attributes/init.rb +0 -1
- data/vendor/plugins/required_attributes/required_attributes/install.rb +0 -1
- data/vendor/plugins/required_attributes/required_attributes/lib/required_attributes.rb +0 -68
- data/vendor/plugins/required_attributes/required_attributes/tasks/required_attributes_tasks.rake +0 -4
- data/vendor/plugins/required_attributes/required_attributes/uninstall.rb +0 -1
- data/vendor/plugins/required_attributes/tasks/required_attributes_tasks.rake +0 -4
- data/vendor/plugins/required_attributes/uninstall.rb +0 -1
@@ -1,49 +0,0 @@
|
|
1
|
-
module Paperclip
|
2
|
-
# The Upfile module is a convenience module for adding uploaded-file-type methods
|
3
|
-
# to the +File+ class. Useful for testing.
|
4
|
-
# user.avatar = File.new("test/test_avatar.jpg")
|
5
|
-
module Upfile
|
6
|
-
|
7
|
-
# Infer the MIME-type of the file from the extension.
|
8
|
-
def content_type
|
9
|
-
type = (self.path.match(/\.(\w+)$/)[1] rescue "octet-stream").downcase
|
10
|
-
case type
|
11
|
-
when %r"jp(e|g|eg)" then "image/jpeg"
|
12
|
-
when %r"tiff?" then "image/tiff"
|
13
|
-
when %r"png", "gif", "bmp" then "image/#{type}"
|
14
|
-
when "txt" then "text/plain"
|
15
|
-
when %r"html?" then "text/html"
|
16
|
-
when "js" then "application/js"
|
17
|
-
when "csv", "xml", "css" then "text/#{type}"
|
18
|
-
else "application/x-#{type}"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# Returns the file's normal name.
|
23
|
-
def original_filename
|
24
|
-
File.basename(self.path)
|
25
|
-
end
|
26
|
-
|
27
|
-
# Returns the size of the file.
|
28
|
-
def size
|
29
|
-
File.size(self)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
if defined? StringIO
|
35
|
-
class StringIO
|
36
|
-
attr_accessor :original_filename, :content_type
|
37
|
-
def original_filename
|
38
|
-
@original_filename ||= "stringio.txt"
|
39
|
-
end
|
40
|
-
def content_type
|
41
|
-
@content_type ||= "text/plain"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class File #:nodoc:
|
47
|
-
include Paperclip::Upfile
|
48
|
-
end
|
49
|
-
|
@@ -1,353 +0,0 @@
|
|
1
|
-
# Paperclip allows file attachments that are stored in the filesystem. All graphical
|
2
|
-
# transformations are done using the Graphics/ImageMagick command line utilities and
|
3
|
-
# are stored in Tempfiles until the record is saved. Paperclip does not require a
|
4
|
-
# separate model for storing the attachment's information, instead adding a few simple
|
5
|
-
# columns to your table.
|
6
|
-
#
|
7
|
-
# Author:: Jon Yurek
|
8
|
-
# Copyright:: Copyright (c) 2008-2009 thoughtbot, inc.
|
9
|
-
# License:: MIT License (http://www.opensource.org/licenses/mit-license.php)
|
10
|
-
#
|
11
|
-
# Paperclip defines an attachment as any file, though it makes special considerations
|
12
|
-
# for image files. You can declare that a model has an attached file with the
|
13
|
-
# +has_attached_file+ method:
|
14
|
-
#
|
15
|
-
# class User < ActiveRecord::Base
|
16
|
-
# has_attached_file :avatar, :styles => { :thumb => "100x100" }
|
17
|
-
# end
|
18
|
-
#
|
19
|
-
# user = User.new
|
20
|
-
# user.avatar = params[:user][:avatar]
|
21
|
-
# user.avatar.url
|
22
|
-
# # => "/users/avatars/4/original_me.jpg"
|
23
|
-
# user.avatar.url(:thumb)
|
24
|
-
# # => "/users/avatars/4/thumb_me.jpg"
|
25
|
-
#
|
26
|
-
# See the +has_attached_file+ documentation for more details.
|
27
|
-
|
28
|
-
require 'erb'
|
29
|
-
require 'tempfile'
|
30
|
-
require 'paperclip/upfile'
|
31
|
-
require 'paperclip/iostream'
|
32
|
-
require 'paperclip/geometry'
|
33
|
-
require 'paperclip/processor'
|
34
|
-
require 'paperclip/thumbnail'
|
35
|
-
require 'paperclip/storage'
|
36
|
-
require 'paperclip/interpolations'
|
37
|
-
require 'paperclip/attachment'
|
38
|
-
if defined? RAILS_ROOT
|
39
|
-
Dir.glob(File.join(File.expand_path(RAILS_ROOT), "lib", "paperclip_processors", "*.rb")).each do |processor|
|
40
|
-
require processor
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
# The base module that gets included in ActiveRecord::Base. See the
|
45
|
-
# documentation for Paperclip::ClassMethods for more useful information.
|
46
|
-
module Paperclip
|
47
|
-
|
48
|
-
VERSION = "2.3.1.1"
|
49
|
-
|
50
|
-
class << self
|
51
|
-
# Provides configurability to Paperclip. There are a number of options available, such as:
|
52
|
-
# * whiny: Will raise an error if Paperclip cannot process thumbnails of
|
53
|
-
# an uploaded image. Defaults to true.
|
54
|
-
# * log: Logs progress to the Rails log. Uses ActiveRecord's logger, so honors
|
55
|
-
# log levels, etc. Defaults to true.
|
56
|
-
# * command_path: Defines the path at which to find the command line
|
57
|
-
# programs if they are not visible to Rails the system's search path. Defaults to
|
58
|
-
# nil, which uses the first executable found in the user's search path.
|
59
|
-
# * image_magick_path: Deprecated alias of command_path.
|
60
|
-
def options
|
61
|
-
@options ||= {
|
62
|
-
:whiny => true,
|
63
|
-
:image_magick_path => nil,
|
64
|
-
:command_path => nil,
|
65
|
-
:log => true,
|
66
|
-
:log_command => false,
|
67
|
-
:swallow_stderr => true
|
68
|
-
}
|
69
|
-
end
|
70
|
-
|
71
|
-
def path_for_command command #:nodoc:
|
72
|
-
if options[:image_magick_path]
|
73
|
-
warn("[DEPRECATION] :image_magick_path is deprecated and will be removed. Use :command_path instead")
|
74
|
-
end
|
75
|
-
path = [options[:command_path] || options[:image_magick_path], command].compact
|
76
|
-
File.join(*path)
|
77
|
-
end
|
78
|
-
|
79
|
-
def interpolates key, &block
|
80
|
-
Paperclip::Interpolations[key] = block
|
81
|
-
end
|
82
|
-
|
83
|
-
# The run method takes a command to execute and a string of parameters
|
84
|
-
# that get passed to it. The command is prefixed with the :command_path
|
85
|
-
# option from Paperclip.options. If you have many commands to run and
|
86
|
-
# they are in different paths, the suggested course of action is to
|
87
|
-
# symlink them so they are all in the same directory.
|
88
|
-
#
|
89
|
-
# If the command returns with a result code that is not one of the
|
90
|
-
# expected_outcodes, a PaperclipCommandLineError will be raised. Generally
|
91
|
-
# a code of 0 is expected, but a list of codes may be passed if necessary.
|
92
|
-
#
|
93
|
-
# This method can log the command being run when
|
94
|
-
# Paperclip.options[:log_command] is set to true (defaults to false). This
|
95
|
-
# will only log if logging in general is set to true as well.
|
96
|
-
def run cmd, params = "", expected_outcodes = 0
|
97
|
-
command = %Q[#{path_for_command(cmd)} #{params}].gsub(/\s+/, " ")
|
98
|
-
command = "#{command} 2>#{bit_bucket}" if Paperclip.options[:swallow_stderr]
|
99
|
-
Paperclip.log(command) if Paperclip.options[:log_command]
|
100
|
-
output = `#{command}`
|
101
|
-
unless [expected_outcodes].flatten.include?($?.exitstatus)
|
102
|
-
raise PaperclipCommandLineError, "Error while running #{cmd}"
|
103
|
-
end
|
104
|
-
output
|
105
|
-
end
|
106
|
-
|
107
|
-
def bit_bucket #:nodoc:
|
108
|
-
File.exists?("/dev/null") ? "/dev/null" : "NUL"
|
109
|
-
end
|
110
|
-
|
111
|
-
def included base #:nodoc:
|
112
|
-
base.extend ClassMethods
|
113
|
-
unless base.respond_to?(:define_callbacks)
|
114
|
-
base.send(:include, Paperclip::CallbackCompatability)
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
def processor name #:nodoc:
|
119
|
-
name = name.to_s.camelize
|
120
|
-
processor = Paperclip.const_get(name)
|
121
|
-
unless processor.ancestors.include?(Paperclip::Processor)
|
122
|
-
raise PaperclipError.new("Processor #{name} was not found")
|
123
|
-
end
|
124
|
-
processor
|
125
|
-
end
|
126
|
-
|
127
|
-
# Log a paperclip-specific line. Uses ActiveRecord::Base.logger
|
128
|
-
# by default. Set Paperclip.options[:log] to false to turn off.
|
129
|
-
def log message
|
130
|
-
logger.info("[paperclip] #{message}") if logging?
|
131
|
-
end
|
132
|
-
|
133
|
-
def logger #:nodoc:
|
134
|
-
ActiveRecord::Base.logger
|
135
|
-
end
|
136
|
-
|
137
|
-
def logging? #:nodoc:
|
138
|
-
options[:log]
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
class PaperclipError < StandardError #:nodoc:
|
143
|
-
end
|
144
|
-
|
145
|
-
class PaperclipCommandLineError < StandardError #:nodoc:
|
146
|
-
end
|
147
|
-
|
148
|
-
class NotIdentifiedByImageMagickError < PaperclipError #:nodoc:
|
149
|
-
end
|
150
|
-
|
151
|
-
class InfiniteInterpolationError < PaperclipError #:nodoc:
|
152
|
-
end
|
153
|
-
|
154
|
-
module ClassMethods
|
155
|
-
# +has_attached_file+ gives the class it is called on an attribute that maps to a file. This
|
156
|
-
# is typically a file stored somewhere on the filesystem and has been uploaded by a user.
|
157
|
-
# The attribute returns a Paperclip::Attachment object which handles the management of
|
158
|
-
# that file. The intent is to make the attachment as much like a normal attribute. The
|
159
|
-
# thumbnails will be created when the new file is assigned, but they will *not* be saved
|
160
|
-
# until +save+ is called on the record. Likewise, if the attribute is set to +nil+ is
|
161
|
-
# called on it, the attachment will *not* be deleted until +save+ is called. See the
|
162
|
-
# Paperclip::Attachment documentation for more specifics. There are a number of options
|
163
|
-
# you can set to change the behavior of a Paperclip attachment:
|
164
|
-
# * +url+: The full URL of where the attachment is publically accessible. This can just
|
165
|
-
# as easily point to a directory served directly through Apache as it can to an action
|
166
|
-
# that can control permissions. You can specify the full domain and path, but usually
|
167
|
-
# just an absolute path is sufficient. The leading slash *must* be included manually for
|
168
|
-
# absolute paths. The default value is
|
169
|
-
# "/system/:attachment/:id/:style/:filename". See
|
170
|
-
# Paperclip::Attachment#interpolate for more information on variable interpolaton.
|
171
|
-
# :url => "/:class/:attachment/:id/:style_:filename"
|
172
|
-
# :url => "http://some.other.host/stuff/:class/:id_:extension"
|
173
|
-
# * +default_url+: The URL that will be returned if there is no attachment assigned.
|
174
|
-
# This field is interpolated just as the url is. The default value is
|
175
|
-
# "/:attachment/:style/missing.png"
|
176
|
-
# has_attached_file :avatar, :default_url => "/images/default_:style_avatar.png"
|
177
|
-
# User.new.avatar_url(:small) # => "/images/default_small_avatar.png"
|
178
|
-
# * +styles+: A hash of thumbnail styles and their geometries. You can find more about
|
179
|
-
# geometry strings at the ImageMagick website
|
180
|
-
# (http://www.imagemagick.org/script/command-line-options.php#resize). Paperclip
|
181
|
-
# also adds the "#" option (e.g. "50x50#"), which will resize the image to fit maximally
|
182
|
-
# inside the dimensions and then crop the rest off (weighted at the center). The
|
183
|
-
# default value is to generate no thumbnails.
|
184
|
-
# * +default_style+: The thumbnail style that will be used by default URLs.
|
185
|
-
# Defaults to +original+.
|
186
|
-
# has_attached_file :avatar, :styles => { :normal => "100x100#" },
|
187
|
-
# :default_style => :normal
|
188
|
-
# user.avatar.url # => "/avatars/23/normal_me.png"
|
189
|
-
# * +whiny+: Will raise an error if Paperclip cannot post_process an uploaded file due
|
190
|
-
# to a command line error. This will override the global setting for this attachment.
|
191
|
-
# Defaults to true. This option used to be called :whiny_thumbanils, but this is
|
192
|
-
# deprecated.
|
193
|
-
# * +convert_options+: When creating thumbnails, use this free-form options
|
194
|
-
# field to pass in various convert command options. Typical options are "-strip" to
|
195
|
-
# remove all Exif data from the image (save space for thumbnails and avatars) or
|
196
|
-
# "-depth 8" to specify the bit depth of the resulting conversion. See ImageMagick
|
197
|
-
# convert documentation for more options: (http://www.imagemagick.org/script/convert.php)
|
198
|
-
# Note that this option takes a hash of options, each of which correspond to the style
|
199
|
-
# of thumbnail being generated. You can also specify :all as a key, which will apply
|
200
|
-
# to all of the thumbnails being generated. If you specify options for the :original,
|
201
|
-
# it would be best if you did not specify destructive options, as the intent of keeping
|
202
|
-
# the original around is to regenerate all the thumbnails when requirements change.
|
203
|
-
# has_attached_file :avatar, :styles => { :large => "300x300", :negative => "100x100" }
|
204
|
-
# :convert_options => {
|
205
|
-
# :all => "-strip",
|
206
|
-
# :negative => "-negate"
|
207
|
-
# }
|
208
|
-
# NOTE: While not deprecated yet, it is not recommended to specify options this way.
|
209
|
-
# It is recommended that :convert_options option be included in the hash passed to each
|
210
|
-
# :styles for compatability with future versions.
|
211
|
-
# * +storage+: Chooses the storage backend where the files will be stored. The current
|
212
|
-
# choices are :filesystem and :s3. The default is :filesystem. Make sure you read the
|
213
|
-
# documentation for Paperclip::Storage::Filesystem and Paperclip::Storage::S3
|
214
|
-
# for backend-specific options.
|
215
|
-
def has_attached_file name, options = {}
|
216
|
-
include InstanceMethods
|
217
|
-
|
218
|
-
write_inheritable_attribute(:attachment_definitions, {}) if attachment_definitions.nil?
|
219
|
-
attachment_definitions[name] = {:validations => []}.merge(options)
|
220
|
-
|
221
|
-
after_save :save_attached_files
|
222
|
-
before_destroy :destroy_attached_files
|
223
|
-
|
224
|
-
define_callbacks :before_post_process, :after_post_process
|
225
|
-
define_callbacks :"before_#{name}_post_process", :"after_#{name}_post_process"
|
226
|
-
|
227
|
-
define_method name do |*args|
|
228
|
-
a = attachment_for(name)
|
229
|
-
(args.length > 0) ? a.to_s(args.first) : a
|
230
|
-
end
|
231
|
-
|
232
|
-
define_method "#{name}=" do |file|
|
233
|
-
attachment_for(name).assign(file)
|
234
|
-
end
|
235
|
-
|
236
|
-
define_method "#{name}?" do
|
237
|
-
attachment_for(name).file?
|
238
|
-
end
|
239
|
-
|
240
|
-
validates_each(name) do |record, attr, value|
|
241
|
-
attachment = record.attachment_for(name)
|
242
|
-
attachment.send(:flush_errors) unless attachment.valid?
|
243
|
-
end
|
244
|
-
end
|
245
|
-
|
246
|
-
# Places ActiveRecord-style validations on the size of the file assigned. The
|
247
|
-
# possible options are:
|
248
|
-
# * +in+: a Range of bytes (i.e. +1..1.megabyte+),
|
249
|
-
# * +less_than+: equivalent to :in => 0..options[:less_than]
|
250
|
-
# * +greater_than+: equivalent to :in => options[:greater_than]..Infinity
|
251
|
-
# * +message+: error message to display, use :min and :max as replacements
|
252
|
-
# * +if+: A lambda or name of a method on the instance. Validation will only
|
253
|
-
# be run is this lambda or method returns true.
|
254
|
-
# * +unless+: Same as +if+ but validates if lambda or method returns false.
|
255
|
-
def validates_attachment_size name, options = {}
|
256
|
-
min = options[:greater_than] || (options[:in] && options[:in].first) || 0
|
257
|
-
max = options[:less_than] || (options[:in] && options[:in].last) || (1.0/0)
|
258
|
-
range = (min..max)
|
259
|
-
message = options[:message] || "file size must be between :min and :max bytes."
|
260
|
-
|
261
|
-
attachment_definitions[name][:validations] << [:size, {:min => min,
|
262
|
-
:max => max,
|
263
|
-
:range => range,
|
264
|
-
:message => message,
|
265
|
-
:if => options[:if],
|
266
|
-
:unless => options[:unless]}]
|
267
|
-
end
|
268
|
-
|
269
|
-
# Adds errors if thumbnail creation fails. The same as specifying :whiny_thumbnails => true.
|
270
|
-
def validates_attachment_thumbnails name, options = {}
|
271
|
-
warn('[DEPRECATION] validates_attachment_thumbnail is deprecated. ' +
|
272
|
-
'This validation is on by default and will be removed from future versions. ' +
|
273
|
-
'If you wish to turn it off, supply :whiny => false in your definition.')
|
274
|
-
attachment_definitions[name][:whiny_thumbnails] = true
|
275
|
-
end
|
276
|
-
|
277
|
-
# Places ActiveRecord-style validations on the presence of a file.
|
278
|
-
# Options:
|
279
|
-
# * +if+: A lambda or name of a method on the instance. Validation will only
|
280
|
-
# be run is this lambda or method returns true.
|
281
|
-
# * +unless+: Same as +if+ but validates if lambda or method returns false.
|
282
|
-
def validates_attachment_presence name, options = {}
|
283
|
-
message = options[:message] || "must be set."
|
284
|
-
attachment_definitions[name][:validations] << [:presence, {:message => message,
|
285
|
-
:if => options[:if],
|
286
|
-
:unless => options[:unless]}]
|
287
|
-
end
|
288
|
-
|
289
|
-
# Places ActiveRecord-style validations on the content type of the file
|
290
|
-
# assigned. The possible options are:
|
291
|
-
# * +content_type+: Allowed content types. Can be a single content type
|
292
|
-
# or an array. Each type can be a String or a Regexp. It should be
|
293
|
-
# noted that Internet Explorer upload files with content_types that you
|
294
|
-
# may not expect. For example, JPEG images are given image/pjpeg and
|
295
|
-
# PNGs are image/x-png, so keep that in mind when determining how you
|
296
|
-
# match. Allows all by default.
|
297
|
-
# * +message+: The message to display when the uploaded file has an invalid
|
298
|
-
# content type.
|
299
|
-
# * +if+: A lambda or name of a method on the instance. Validation will only
|
300
|
-
# be run is this lambda or method returns true.
|
301
|
-
# * +unless+: Same as +if+ but validates if lambda or method returns false.
|
302
|
-
# NOTE: If you do not specify an [attachment]_content_type field on your
|
303
|
-
# model, content_type validation will work _ONLY upon assignment_ and
|
304
|
-
# re-validation after the instance has been reloaded will always succeed.
|
305
|
-
def validates_attachment_content_type name, options = {}
|
306
|
-
attachment_definitions[name][:validations] << [:content_type, {:content_type => options[:content_type],
|
307
|
-
:message => options[:message],
|
308
|
-
:if => options[:if],
|
309
|
-
:unless => options[:unless]}]
|
310
|
-
end
|
311
|
-
|
312
|
-
# Returns the attachment definitions defined by each call to
|
313
|
-
# has_attached_file.
|
314
|
-
def attachment_definitions
|
315
|
-
read_inheritable_attribute(:attachment_definitions)
|
316
|
-
end
|
317
|
-
end
|
318
|
-
|
319
|
-
module InstanceMethods #:nodoc:
|
320
|
-
def attachment_for name
|
321
|
-
@_paperclip_attachments ||= {}
|
322
|
-
@_paperclip_attachments[name] ||= Attachment.new(name, self, self.class.attachment_definitions[name])
|
323
|
-
end
|
324
|
-
|
325
|
-
def each_attachment
|
326
|
-
self.class.attachment_definitions.each do |name, definition|
|
327
|
-
yield(name, attachment_for(name))
|
328
|
-
end
|
329
|
-
end
|
330
|
-
|
331
|
-
def save_attached_files
|
332
|
-
logger.info("[paperclip] Saving attachments.")
|
333
|
-
each_attachment do |name, attachment|
|
334
|
-
attachment.send(:save)
|
335
|
-
end
|
336
|
-
end
|
337
|
-
|
338
|
-
def destroy_attached_files
|
339
|
-
logger.info("[paperclip] Deleting attachments.")
|
340
|
-
each_attachment do |name, attachment|
|
341
|
-
attachment.send(:queue_existing_for_delete)
|
342
|
-
attachment.send(:flush_deletes)
|
343
|
-
end
|
344
|
-
end
|
345
|
-
end
|
346
|
-
|
347
|
-
end
|
348
|
-
|
349
|
-
# Set it all up.
|
350
|
-
if Object.const_defined?("ActiveRecord")
|
351
|
-
ActiveRecord::Base.send(:include, Paperclip)
|
352
|
-
File.send(:include, Paperclip::Upfile)
|
353
|
-
end
|
@@ -1,117 +0,0 @@
|
|
1
|
-
require 'paperclip/matchers'
|
2
|
-
require 'action_controller'
|
3
|
-
|
4
|
-
module Paperclip
|
5
|
-
# =Paperclip Shoulda Macros
|
6
|
-
#
|
7
|
-
# These macros are intended for use with shoulda, and will be included into
|
8
|
-
# your tests automatically. All of the macros use the standard shoulda
|
9
|
-
# assumption that the name of the test is based on the name of the model
|
10
|
-
# you're testing (that is, UserTest is the test for the User model), and
|
11
|
-
# will load that class for testing purposes.
|
12
|
-
module Shoulda
|
13
|
-
include Matchers
|
14
|
-
# This will test whether you have defined your attachment correctly by
|
15
|
-
# checking for all the required fields exist after the definition of the
|
16
|
-
# attachment.
|
17
|
-
def should_have_attached_file name
|
18
|
-
klass = self.name.gsub(/Test$/, '').constantize
|
19
|
-
matcher = have_attached_file name
|
20
|
-
should matcher.description do
|
21
|
-
assert_accepts(matcher, klass)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
# Tests for validations on the presence of the attachment.
|
26
|
-
def should_validate_attachment_presence name
|
27
|
-
klass = self.name.gsub(/Test$/, '').constantize
|
28
|
-
matcher = validate_attachment_presence name
|
29
|
-
should matcher.description do
|
30
|
-
assert_accepts(matcher, klass)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# Tests that you have content_type validations specified. There are two
|
35
|
-
# options, :valid and :invalid. Both accept an array of strings. The
|
36
|
-
# strings should be a list of content types which will pass and fail
|
37
|
-
# validation, respectively.
|
38
|
-
def should_validate_attachment_content_type name, options = {}
|
39
|
-
klass = self.name.gsub(/Test$/, '').constantize
|
40
|
-
valid = [options[:valid]].flatten
|
41
|
-
invalid = [options[:invalid]].flatten
|
42
|
-
matcher = validate_attachment_content_type(name).allowing(valid).rejecting(invalid)
|
43
|
-
should matcher.description do
|
44
|
-
assert_accepts(matcher, klass)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# Tests to ensure that you have file size validations turned on. You
|
49
|
-
# can pass the same options to this that you can to
|
50
|
-
# validate_attachment_file_size - :less_than, :greater_than, and :in.
|
51
|
-
# :less_than checks that a file is less than a certain size, :greater_than
|
52
|
-
# checks that a file is more than a certain size, and :in takes a Range or
|
53
|
-
# Array which specifies the lower and upper limits of the file size.
|
54
|
-
def should_validate_attachment_size name, options = {}
|
55
|
-
klass = self.name.gsub(/Test$/, '').constantize
|
56
|
-
min = options[:greater_than] || (options[:in] && options[:in].first) || 0
|
57
|
-
max = options[:less_than] || (options[:in] && options[:in].last) || (1.0/0)
|
58
|
-
range = (min..max)
|
59
|
-
matcher = validate_attachment_size(name).in(range)
|
60
|
-
should matcher.description do
|
61
|
-
assert_accepts(matcher, klass)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Stubs the HTTP PUT for an attachment using S3 storage.
|
66
|
-
#
|
67
|
-
# @example
|
68
|
-
# stub_paperclip_s3('user', 'avatar', 'png')
|
69
|
-
def stub_paperclip_s3(model, attachment, extension)
|
70
|
-
definition = model.gsub(" ", "_").classify.constantize.
|
71
|
-
attachment_definitions[attachment.to_sym]
|
72
|
-
|
73
|
-
path = "http://s3.amazonaws.com/:id/#{definition[:path]}"
|
74
|
-
path.gsub!(/:([^\/\.]+)/) do |match|
|
75
|
-
"([^\/\.]+)"
|
76
|
-
end
|
77
|
-
|
78
|
-
begin
|
79
|
-
FakeWeb.register_uri(:put, Regexp.new(path), :body => "OK")
|
80
|
-
rescue NameError
|
81
|
-
raise NameError, "the stub_paperclip_s3 shoulda macro requires the fakeweb gem."
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
# Stub S3 and return a file for attachment. Best with Factory Girl.
|
86
|
-
# Uses a strict directory convention:
|
87
|
-
#
|
88
|
-
# features/support/paperclip
|
89
|
-
#
|
90
|
-
# This method is used by the Paperclip-provided Cucumber step:
|
91
|
-
#
|
92
|
-
# When I attach a "demo_tape" "mp3" file to a "band" on S3
|
93
|
-
#
|
94
|
-
# @example
|
95
|
-
# Factory.define :band_with_demo_tape, :parent => :band do |band|
|
96
|
-
# band.demo_tape { band.paperclip_fixture("band", "demo_tape", "png") }
|
97
|
-
# end
|
98
|
-
def paperclip_fixture(model, attachment, extension)
|
99
|
-
stub_paperclip_s3(model, attachment, extension)
|
100
|
-
base_path = File.join(File.dirname(__FILE__), "..", "..",
|
101
|
-
"features", "support", "paperclip")
|
102
|
-
File.new(File.join(base_path, model, "#{attachment}.#{extension}"))
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
class ActionController::Integration::Session #:nodoc:
|
108
|
-
include Paperclip::Shoulda
|
109
|
-
end
|
110
|
-
|
111
|
-
class Factory
|
112
|
-
include Paperclip::Shoulda #:nodoc:
|
113
|
-
end
|
114
|
-
|
115
|
-
class Test::Unit::TestCase #:nodoc:
|
116
|
-
extend Paperclip::Shoulda
|
117
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
def obtain_class
|
2
|
-
class_name = ENV['CLASS'] || ENV['class']
|
3
|
-
raise "Must specify CLASS" unless class_name
|
4
|
-
@klass = Object.const_get(class_name)
|
5
|
-
end
|
6
|
-
|
7
|
-
def obtain_attachments
|
8
|
-
name = ENV['ATTACHMENT'] || ENV['attachment']
|
9
|
-
raise "Class #{@klass.name} has no attachments specified" unless @klass.respond_to?(:attachment_definitions)
|
10
|
-
if !name.blank? && @klass.attachment_definitions.keys.include?(name)
|
11
|
-
[ name ]
|
12
|
-
else
|
13
|
-
@klass.attachment_definitions.keys
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def for_all_attachments
|
18
|
-
klass = obtain_class
|
19
|
-
names = obtain_attachments
|
20
|
-
ids = klass.connection.select_values(klass.send(:construct_finder_sql, :select => 'id'))
|
21
|
-
|
22
|
-
ids.each do |id|
|
23
|
-
instance = klass.find(id)
|
24
|
-
names.each do |name|
|
25
|
-
result = if instance.send("#{ name }?")
|
26
|
-
yield(instance, name)
|
27
|
-
else
|
28
|
-
true
|
29
|
-
end
|
30
|
-
print result ? "." : "x"; $stdout.flush
|
31
|
-
end
|
32
|
-
end
|
33
|
-
puts " Done."
|
34
|
-
end
|
35
|
-
|
36
|
-
namespace :paperclip do
|
37
|
-
desc "Refreshes both metadata and thumbnails."
|
38
|
-
task :refresh => ["paperclip:refresh:metadata", "paperclip:refresh:thumbnails"]
|
39
|
-
|
40
|
-
namespace :refresh do
|
41
|
-
desc "Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)."
|
42
|
-
task :thumbnails => :environment do
|
43
|
-
errors = []
|
44
|
-
for_all_attachments do |instance, name|
|
45
|
-
result = instance.send(name).reprocess!
|
46
|
-
errors << [instance.id, instance.errors] unless instance.errors.blank?
|
47
|
-
result
|
48
|
-
end
|
49
|
-
errors.each{|e| puts "#{e.first}: #{e.last.full_messages.inspect}" }
|
50
|
-
end
|
51
|
-
|
52
|
-
desc "Regenerates content_type/size metadata for a given CLASS (and optional ATTACHMENT)."
|
53
|
-
task :metadata => :environment do
|
54
|
-
for_all_attachments do |instance, name|
|
55
|
-
if file = instance.send(name).to_file
|
56
|
-
instance.send("#{name}_file_name=", instance.send("#{name}_file_name").strip)
|
57
|
-
instance.send("#{name}_content_type=", file.content_type.strip)
|
58
|
-
instance.send("#{name}_file_size=", file.size) if instance.respond_to?("#{name}_file_size")
|
59
|
-
instance.save(false)
|
60
|
-
else
|
61
|
-
true
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
desc "Cleans out invalid attachments. Useful after you've added new validations."
|
68
|
-
task :clean => :environment do
|
69
|
-
for_all_attachments do |instance, name|
|
70
|
-
instance.send(name).send(:validate)
|
71
|
-
if instance.send(name).valid?
|
72
|
-
true
|
73
|
-
else
|
74
|
-
instance.send("#{name}=", nil)
|
75
|
-
instance.save
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|