From 01e125c164f5067c34961c1756f5c038a0c52497 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Tue, 3 Nov 2015 16:02:36 +0000 Subject: [PATCH] Rearrange git repo so bundler can install from git Problem: Because `administrate.gemspec` was not at the root of the repository, users could not install the gem by pointing their Gemfile at Github. Solution: Move the gem to the root directory and moves the example app to a directory within the `/spec` directory. This makes it possible to refer to the gem directly from git or Github. The example app is stored as a [git subtree], which means it can be deployed separately to Heroku or other hosting services. [git subtree]: https://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ Change notes: - The `translate` method defined in the controller was causing i18n-tasks to get confused about the missing keys in the locale file. Renamed it to `translate_with_resource`. - Fix Capybara Webkit deprecation warning - Load schema before running specs - Update the example apps Gemfile to point at Github, so the example app can be deployed to Heroku. For local development, the local copy of `administrate` takes precedence over the example app's Gemfile, and tests still run as expected. - Add rake task to deploy example app. This uses more-complex-than-normal git subtree commands, so it's good to have a shortcut. --- .gitignore | 6 +- CHANGELOG.md | 2 + Gemfile | 18 +- Gemfile.lock | 143 ++++--- Rakefile | 33 +- ...ministrate.gemspec => administrate.gemspec | 0 administrate/.gitignore | 0 administrate/Gemfile | 14 - administrate/Gemfile.lock | 106 ------ administrate/LICENSE | 20 - administrate/Rakefile | 37 -- administrate/bin/rails | 12 - administrate/config/routes.rb | 2 - .../assets/images/administrate/.keep | 0 .../assets/images/administrate/dropdown.svg | 0 .../assets/images/administrate/search.svg | 0 .../assets/images/administrate/sort_arrow.svg | 0 .../javascripts/administrate/application.js | 0 .../administrate/components/_search.js | 0 .../components/date_time_picker.js | 0 .../administrate/components/has_many_form.js | 0 .../administrate/components/table.js | 0 .../stylesheets/administrate/_sidebar.scss | 0 .../stylesheets/administrate/application.scss | 0 .../stylesheets/administrate/base/_base.scss | 0 .../administrate/base/_buttons.scss | 0 .../stylesheets/administrate/base/_forms.scss | 0 .../administrate/base/_grid-settings.scss | 0 .../stylesheets/administrate/base/_lists.scss | 0 .../administrate/base/_tables.scss | 0 .../administrate/base/_typography.scss | 0 .../administrate/base/_variables.scss | 0 .../administrate/base/extends/_button.scss | 0 .../administrate/base/extends/_clearfix.scss | 0 .../administrate/base/extends/_errors.scss | 0 .../administrate/base/extends/_flashes.scss | 0 .../administrate/base/extends/_hide-text.scss | 0 .../administrate/components/_attributes.scss | 0 .../administrate/components/_cells.scss | 0 .../administrate/components/_components.scss | 0 .../components/_date_time_picker.scss | 0 .../administrate/components/_form.scss | 0 .../administrate/components/_header.scss | 0 .../administrate/components/_pagination.scss | 0 .../administrate/components/_search.scss | 0 .../administrate/components/_table.scss | 0 .../stylesheets/administrate/layout.scss | 0 .../administrate/mixins/_data_label.scss | 0 .../administrate/mixins/_mixins.scss | 0 .../administrate/mixins/_shadow.scss | 0 .../administrate/application_controller.rb | 8 +- .../administrate/application_helper.rb | 0 .../application/_collection.html.erb | 0 .../application/_flashes.html.erb | 0 .../administrate/application/_form.html.erb | 0 .../application/_javascript.html.erb | 0 .../application/_sidebar.html.erb | 0 .../administrate/application/edit.html.erb | 0 .../administrate/application/index.html.erb | 0 .../administrate/application/new.html.erb | 0 .../administrate/application/show.html.erb | 0 .../views/fields/belongs_to/_form.html.erb | 0 .../views/fields/belongs_to/_index.html.erb | 0 .../views/fields/belongs_to/_show.html.erb | 0 .../views/fields/boolean/_form.html.erb | 0 .../views/fields/boolean/_index.html.erb | 0 .../views/fields/boolean/_show.html.erb | 0 .../views/fields/date_time/_form.html.erb | 0 .../views/fields/date_time/_index.html.erb | 0 .../views/fields/date_time/_show.html.erb | 0 .../views/fields/email/_form.html.erb | 0 .../views/fields/email/_index.html.erb | 0 .../views/fields/email/_show.html.erb | 0 .../views/fields/has_many/_form.html.erb | 0 .../views/fields/has_many/_index.html.erb | 0 .../views/fields/has_many/_show.html.erb | 0 .../views/fields/has_one/_form.html.erb | 0 .../views/fields/has_one/_index.html.erb | 0 .../views/fields/has_one/_show.html.erb | 0 .../views/fields/image/_form.html.erb | 0 .../views/fields/image/_index.html.erb | 0 .../views/fields/image/_show.html.erb | 0 .../views/fields/number/_form.html.erb | 0 .../views/fields/number/_index.html.erb | 0 .../views/fields/number/_show.html.erb | 0 .../views/fields/polymorphic/_form.html.erb | 0 .../views/fields/polymorphic/_index.html.erb | 0 .../views/fields/polymorphic/_show.html.erb | 0 .../views/fields/string/_form.html.erb | 0 .../views/fields/string/_index.html.erb | 0 .../views/fields/string/_show.html.erb | 0 .../views/fields/text/_form.html.erb | 0 .../views/fields/text/_index.html.erb | 0 .../views/fields/text/_show.html.erb | 0 .../layouts/administrate/application.html.erb | 0 circle.yml | 1 + .../locales/administrate.en.yml | 0 config/routes.rb | 9 +- gemfiles/sass_3_4.gemfile | 7 +- {administrate/lib => lib}/administrate.rb | 0 .../administrate/base_dashboard.rb | 0 .../lib => lib}/administrate/engine.rb | 0 .../lib => lib}/administrate/fields/base.rb | 0 .../administrate/fields/belongs_to.rb | 0 .../administrate/fields/boolean.rb | 0 .../administrate/fields/date_time.rb | 0 .../administrate/fields/deferred.rb | 0 .../lib => lib}/administrate/fields/email.rb | 0 .../administrate/fields/has_many.rb | 0 .../administrate/fields/has_one.rb | 0 .../lib => lib}/administrate/fields/image.rb | 0 .../lib => lib}/administrate/fields/number.rb | 0 .../administrate/fields/polymorphic.rb | 0 .../lib => lib}/administrate/fields/string.rb | 0 .../lib => lib}/administrate/fields/text.rb | 0 .../lib => lib}/administrate/namespace.rb | 0 .../lib => lib}/administrate/order.rb | 0 .../lib => lib}/administrate/page.rb | 0 .../lib => lib}/administrate/page/base.rb | 0 .../administrate/page/collection.rb | 0 .../lib => lib}/administrate/page/form.rb | 0 .../lib => lib}/administrate/page/show.rb | 0 .../administrate/resource_resolver.rb | 0 .../lib => lib}/administrate/search.rb | 0 .../lib => lib}/administrate/version.rb | 0 .../administrate/view_generator.rb | 0 .../generators/administrate/dashboard/USAGE | 0 .../dashboard/dashboard_generator.rb | 0 .../dashboard/templates/controller.rb.erb | 0 .../dashboard/templates/dashboard.rb.erb | 0 .../administrate/field/field_generator.rb | 0 .../field/templates/_form.html.erb | 0 .../field/templates/_index.html.erb | 0 .../field/templates/_show.html.erb | 0 .../field/templates/field_object.rb.erb | 0 .../administrate/install/install_generator.rb | 0 .../templates/application_controller.rb | 0 .../templates/dashboard_manifest.rb.erb | 0 .../administrate/install/templates/routes.rb | 0 .../administrate/views/edit_generator.rb | 0 .../administrate/views/field_generator.rb | 0 .../administrate/views/form_generator.rb | 0 .../administrate/views/index_generator.rb | 0 .../administrate/views/new_generator.rb | 0 .../administrate/views/show_generator.rb | 0 .../administrate/views/views_generator.rb | 0 .../lib => lib}/tasks/administrate_tasks.rake | 0 spec/example_app/.rspec | 3 + spec/example_app/Gemfile | 59 +++ spec/example_app/Gemfile.lock | 356 ++++++++++++++++++ Procfile => spec/example_app/Procfile | 0 spec/example_app/Rakefile | 9 + .../example_app/app}/assets/images/.keep | 0 .../example_app/app}/assets/images/logo.svg | 0 .../app}/assets/javascripts/application.js | 0 .../app}/assets/stylesheets/application.css | 0 .../admin/application_controller.rb | 0 .../controllers/admin/customers_controller.rb | 0 .../admin/line_items_controller.rb | 0 .../controllers/admin/orders_controller.rb | 0 .../controllers/admin/products_controller.rb | 0 .../controllers/application_controller.rb | 0 .../app}/controllers/concerns/.keep | 0 .../app}/dashboards/customer_dashboard.rb | 0 .../app}/dashboards/dashboard_manifest.rb | 0 .../app}/dashboards/line_item_dashboard.rb | 0 .../app}/dashboards/order_dashboard.rb | 0 .../app}/dashboards/product_dashboard.rb | 0 {app => spec/example_app/app}/mailers/.keep | 0 {app => spec/example_app/app}/models/.keep | 0 .../example_app/app}/models/concerns/.keep | 0 .../example_app/app}/models/customer.rb | 0 .../example_app/app}/models/line_item.rb | 0 {app => spec/example_app/app}/models/order.rb | 0 .../example_app/app}/models/product.rb | 0 .../views/application/_analytics.html.erb | 0 .../app}/views/application/_flashes.html.erb | 0 .../views/application/_javascript.html.erb | 0 .../app}/views/layouts/application.html.erb | 0 .../example_app/app}/views/pages/.keep | 0 browserslist => spec/example_app/browserslist | 0 config.ru => spec/example_app/config.ru | 0 .../example_app/config}/application.rb | 0 {config => spec/example_app/config}/boot.rb | 0 .../example_app/config}/database.yml | 0 .../example_app/config}/environment.rb | 0 .../config}/environments/development.rb | 0 .../config}/environments/production.rb | 0 .../config}/environments/staging.rb | 0 .../example_app/config}/environments/test.rb | 0 .../config}/initializers/assets.rb | 0 .../initializers/backtrace_silencers.rb | 0 .../initializers/cookies_serializer.rb | 0 .../initializers/disable_xml_params.rb | 0 .../config}/initializers/errors.rb | 0 .../initializers/filter_parameter_logging.rb | 0 .../config}/initializers/inflections.rb | 0 .../config}/initializers/json_encoding.rb | 0 .../config}/initializers/mime_types.rb | 0 .../config}/initializers/session_store.rb | 0 .../config}/initializers/simple_form.rb | 0 .../config}/initializers/wrap_parameters.rb | 0 .../example_app/config}/locales/en.yml | 0 .../config}/locales/simple_form.en.yml | 0 .../example_app/config}/newrelic.yml | 0 spec/example_app/config/routes.rb | 9 + .../example_app/config}/secrets.yml | 2 +- .../example_app/config}/unicorn.rb | 0 .../20150220191107_create_delayed_jobs.rb | 0 .../20150220194224_create_customers.rb | 0 .../migrate/20150403065618_create_products.rb | 0 .../migrate/20150411204433_create_orders.rb | 0 .../20150417044505_create_line_items.rb | 0 ...20150903215027_add_shipped_at_to_orders.rb | 0 .../20150914175022_add_slug_to_products.rb | 0 ...11117_add_email_subscriber_to_customers.rb | 0 {db => spec/example_app/db}/schema.rb | 0 {db => spec/example_app/db}/seeds.rb | 0 .../example_app/db}/seeds/products.yml | 0 {lib => spec/example_app/lib}/assets/.keep | 0 {lib => spec/example_app/lib}/tasks/.keep | 0 .../example_app/lib}/tasks/bundler_audit.rake | 0 .../lib}/tasks/development_seeds.rake | 0 .../templates/erb/scaffold/_form.html.erb | 0 {public => spec/example_app/public}/404.html | 0 {public => spec/example_app/public}/422.html | 0 {public => spec/example_app/public}/500.html | 0 .../example_app/public}/favicon.ico | 0 .../example_app/public}/robots.txt | 0 .../vendor}/assets/javascripts/.keep | 0 .../vendor}/assets/stylesheets/.keep | 0 spec/generators/views/field_generator_spec.rb | 2 +- spec/rails_helper.rb | 12 +- spec/support/generator_spec_helpers.rb | 2 +- 234 files changed, 569 insertions(+), 303 deletions(-) rename administrate/administrate.gemspec => administrate.gemspec (100%) delete mode 100644 administrate/.gitignore delete mode 100644 administrate/Gemfile delete mode 100644 administrate/Gemfile.lock delete mode 100644 administrate/LICENSE delete mode 100644 administrate/Rakefile delete mode 100755 administrate/bin/rails delete mode 100644 administrate/config/routes.rb rename {administrate/app => app}/assets/images/administrate/.keep (100%) rename {administrate/app => app}/assets/images/administrate/dropdown.svg (100%) rename {administrate/app => app}/assets/images/administrate/search.svg (100%) rename {administrate/app => app}/assets/images/administrate/sort_arrow.svg (100%) rename {administrate/app => app}/assets/javascripts/administrate/application.js (100%) rename {administrate/app => app}/assets/javascripts/administrate/components/_search.js (100%) rename {administrate/app => app}/assets/javascripts/administrate/components/date_time_picker.js (100%) rename {administrate/app => app}/assets/javascripts/administrate/components/has_many_form.js (100%) rename {administrate/app => app}/assets/javascripts/administrate/components/table.js (100%) rename {administrate/app => app}/assets/stylesheets/administrate/_sidebar.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/application.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_base.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_buttons.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_forms.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_grid-settings.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_lists.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_tables.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_typography.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/_variables.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/extends/_button.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/extends/_clearfix.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/extends/_errors.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/extends/_flashes.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/base/extends/_hide-text.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_attributes.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_cells.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_components.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_date_time_picker.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_form.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_header.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_pagination.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_search.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/components/_table.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/layout.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/mixins/_data_label.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/mixins/_mixins.scss (100%) rename {administrate/app => app}/assets/stylesheets/administrate/mixins/_shadow.scss (100%) rename {administrate/app => app}/controllers/administrate/application_controller.rb (92%) rename {administrate/app => app}/helpers/administrate/application_helper.rb (100%) rename {administrate/app => app}/views/administrate/application/_collection.html.erb (100%) rename {administrate/app => app}/views/administrate/application/_flashes.html.erb (100%) rename {administrate/app => app}/views/administrate/application/_form.html.erb (100%) rename {administrate/app => app}/views/administrate/application/_javascript.html.erb (100%) rename {administrate/app => app}/views/administrate/application/_sidebar.html.erb (100%) rename {administrate/app => app}/views/administrate/application/edit.html.erb (100%) rename {administrate/app => app}/views/administrate/application/index.html.erb (100%) rename {administrate/app => app}/views/administrate/application/new.html.erb (100%) rename {administrate/app => app}/views/administrate/application/show.html.erb (100%) rename {administrate/app => app}/views/fields/belongs_to/_form.html.erb (100%) rename {administrate/app => app}/views/fields/belongs_to/_index.html.erb (100%) rename {administrate/app => app}/views/fields/belongs_to/_show.html.erb (100%) rename {administrate/app => app}/views/fields/boolean/_form.html.erb (100%) rename {administrate/app => app}/views/fields/boolean/_index.html.erb (100%) rename {administrate/app => app}/views/fields/boolean/_show.html.erb (100%) rename {administrate/app => app}/views/fields/date_time/_form.html.erb (100%) rename {administrate/app => app}/views/fields/date_time/_index.html.erb (100%) rename {administrate/app => app}/views/fields/date_time/_show.html.erb (100%) rename {administrate/app => app}/views/fields/email/_form.html.erb (100%) rename {administrate/app => app}/views/fields/email/_index.html.erb (100%) rename {administrate/app => app}/views/fields/email/_show.html.erb (100%) rename {administrate/app => app}/views/fields/has_many/_form.html.erb (100%) rename {administrate/app => app}/views/fields/has_many/_index.html.erb (100%) rename {administrate/app => app}/views/fields/has_many/_show.html.erb (100%) rename {administrate/app => app}/views/fields/has_one/_form.html.erb (100%) rename {administrate/app => app}/views/fields/has_one/_index.html.erb (100%) rename {administrate/app => app}/views/fields/has_one/_show.html.erb (100%) rename {administrate/app => app}/views/fields/image/_form.html.erb (100%) rename {administrate/app => app}/views/fields/image/_index.html.erb (100%) rename {administrate/app => app}/views/fields/image/_show.html.erb (100%) rename {administrate/app => app}/views/fields/number/_form.html.erb (100%) rename {administrate/app => app}/views/fields/number/_index.html.erb (100%) rename {administrate/app => app}/views/fields/number/_show.html.erb (100%) rename {administrate/app => app}/views/fields/polymorphic/_form.html.erb (100%) rename {administrate/app => app}/views/fields/polymorphic/_index.html.erb (100%) rename {administrate/app => app}/views/fields/polymorphic/_show.html.erb (100%) rename {administrate/app => app}/views/fields/string/_form.html.erb (100%) rename {administrate/app => app}/views/fields/string/_index.html.erb (100%) rename {administrate/app => app}/views/fields/string/_show.html.erb (100%) rename {administrate/app => app}/views/fields/text/_form.html.erb (100%) rename {administrate/app => app}/views/fields/text/_index.html.erb (100%) rename {administrate/app => app}/views/fields/text/_show.html.erb (100%) rename {administrate/app => app}/views/layouts/administrate/application.html.erb (100%) rename {administrate/config => config}/locales/administrate.en.yml (100%) rename {administrate/lib => lib}/administrate.rb (100%) rename {administrate/lib => lib}/administrate/base_dashboard.rb (100%) rename {administrate/lib => lib}/administrate/engine.rb (100%) rename {administrate/lib => lib}/administrate/fields/base.rb (100%) rename {administrate/lib => lib}/administrate/fields/belongs_to.rb (100%) rename {administrate/lib => lib}/administrate/fields/boolean.rb (100%) rename {administrate/lib => lib}/administrate/fields/date_time.rb (100%) rename {administrate/lib => lib}/administrate/fields/deferred.rb (100%) rename {administrate/lib => lib}/administrate/fields/email.rb (100%) rename {administrate/lib => lib}/administrate/fields/has_many.rb (100%) rename {administrate/lib => lib}/administrate/fields/has_one.rb (100%) rename {administrate/lib => lib}/administrate/fields/image.rb (100%) rename {administrate/lib => lib}/administrate/fields/number.rb (100%) rename {administrate/lib => lib}/administrate/fields/polymorphic.rb (100%) rename {administrate/lib => lib}/administrate/fields/string.rb (100%) rename {administrate/lib => lib}/administrate/fields/text.rb (100%) rename {administrate/lib => lib}/administrate/namespace.rb (100%) rename {administrate/lib => lib}/administrate/order.rb (100%) rename {administrate/lib => lib}/administrate/page.rb (100%) rename {administrate/lib => lib}/administrate/page/base.rb (100%) rename {administrate/lib => lib}/administrate/page/collection.rb (100%) rename {administrate/lib => lib}/administrate/page/form.rb (100%) rename {administrate/lib => lib}/administrate/page/show.rb (100%) rename {administrate/lib => lib}/administrate/resource_resolver.rb (100%) rename {administrate/lib => lib}/administrate/search.rb (100%) rename {administrate/lib => lib}/administrate/version.rb (100%) rename {administrate/lib => lib}/administrate/view_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/dashboard/USAGE (100%) rename {administrate/lib => lib}/generators/administrate/dashboard/dashboard_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/dashboard/templates/controller.rb.erb (100%) rename {administrate/lib => lib}/generators/administrate/dashboard/templates/dashboard.rb.erb (100%) rename {administrate/lib => lib}/generators/administrate/field/field_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/field/templates/_form.html.erb (100%) rename {administrate/lib => lib}/generators/administrate/field/templates/_index.html.erb (100%) rename {administrate/lib => lib}/generators/administrate/field/templates/_show.html.erb (100%) rename {administrate/lib => lib}/generators/administrate/field/templates/field_object.rb.erb (100%) rename {administrate/lib => lib}/generators/administrate/install/install_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/install/templates/application_controller.rb (100%) rename {administrate/lib => lib}/generators/administrate/install/templates/dashboard_manifest.rb.erb (100%) rename {administrate/lib => lib}/generators/administrate/install/templates/routes.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/edit_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/field_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/form_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/index_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/new_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/show_generator.rb (100%) rename {administrate/lib => lib}/generators/administrate/views/views_generator.rb (100%) rename {administrate/lib => lib}/tasks/administrate_tasks.rake (100%) create mode 100644 spec/example_app/.rspec create mode 100644 spec/example_app/Gemfile create mode 100644 spec/example_app/Gemfile.lock rename Procfile => spec/example_app/Procfile (100%) create mode 100644 spec/example_app/Rakefile rename {app => spec/example_app/app}/assets/images/.keep (100%) rename {app => spec/example_app/app}/assets/images/logo.svg (100%) rename {app => spec/example_app/app}/assets/javascripts/application.js (100%) rename {app => spec/example_app/app}/assets/stylesheets/application.css (100%) rename {app => spec/example_app/app}/controllers/admin/application_controller.rb (100%) rename {app => spec/example_app/app}/controllers/admin/customers_controller.rb (100%) rename {app => spec/example_app/app}/controllers/admin/line_items_controller.rb (100%) rename {app => spec/example_app/app}/controllers/admin/orders_controller.rb (100%) rename {app => spec/example_app/app}/controllers/admin/products_controller.rb (100%) rename {app => spec/example_app/app}/controllers/application_controller.rb (100%) rename {app => spec/example_app/app}/controllers/concerns/.keep (100%) rename {app => spec/example_app/app}/dashboards/customer_dashboard.rb (100%) rename {app => spec/example_app/app}/dashboards/dashboard_manifest.rb (100%) rename {app => spec/example_app/app}/dashboards/line_item_dashboard.rb (100%) rename {app => spec/example_app/app}/dashboards/order_dashboard.rb (100%) rename {app => spec/example_app/app}/dashboards/product_dashboard.rb (100%) rename {app => spec/example_app/app}/mailers/.keep (100%) rename {app => spec/example_app/app}/models/.keep (100%) rename {app => spec/example_app/app}/models/concerns/.keep (100%) rename {app => spec/example_app/app}/models/customer.rb (100%) rename {app => spec/example_app/app}/models/line_item.rb (100%) rename {app => spec/example_app/app}/models/order.rb (100%) rename {app => spec/example_app/app}/models/product.rb (100%) rename {app => spec/example_app/app}/views/application/_analytics.html.erb (100%) rename {app => spec/example_app/app}/views/application/_flashes.html.erb (100%) rename {app => spec/example_app/app}/views/application/_javascript.html.erb (100%) rename {app => spec/example_app/app}/views/layouts/application.html.erb (100%) rename {app => spec/example_app/app}/views/pages/.keep (100%) rename browserslist => spec/example_app/browserslist (100%) rename config.ru => spec/example_app/config.ru (100%) rename {config => spec/example_app/config}/application.rb (100%) rename {config => spec/example_app/config}/boot.rb (100%) rename {config => spec/example_app/config}/database.yml (100%) rename {config => spec/example_app/config}/environment.rb (100%) rename {config => spec/example_app/config}/environments/development.rb (100%) rename {config => spec/example_app/config}/environments/production.rb (100%) rename {config => spec/example_app/config}/environments/staging.rb (100%) rename {config => spec/example_app/config}/environments/test.rb (100%) rename {config => spec/example_app/config}/initializers/assets.rb (100%) rename {config => spec/example_app/config}/initializers/backtrace_silencers.rb (100%) rename {config => spec/example_app/config}/initializers/cookies_serializer.rb (100%) rename {config => spec/example_app/config}/initializers/disable_xml_params.rb (100%) rename {config => spec/example_app/config}/initializers/errors.rb (100%) rename {config => spec/example_app/config}/initializers/filter_parameter_logging.rb (100%) rename {config => spec/example_app/config}/initializers/inflections.rb (100%) rename {config => spec/example_app/config}/initializers/json_encoding.rb (100%) rename {config => spec/example_app/config}/initializers/mime_types.rb (100%) rename {config => spec/example_app/config}/initializers/session_store.rb (100%) rename {config => spec/example_app/config}/initializers/simple_form.rb (100%) rename {config => spec/example_app/config}/initializers/wrap_parameters.rb (100%) rename {config => spec/example_app/config}/locales/en.yml (100%) rename {config => spec/example_app/config}/locales/simple_form.en.yml (100%) rename {config => spec/example_app/config}/newrelic.yml (100%) create mode 100644 spec/example_app/config/routes.rb rename {config => spec/example_app/config}/secrets.yml (83%) rename {config => spec/example_app/config}/unicorn.rb (100%) rename {db => spec/example_app/db}/migrate/20150220191107_create_delayed_jobs.rb (100%) rename {db => spec/example_app/db}/migrate/20150220194224_create_customers.rb (100%) rename {db => spec/example_app/db}/migrate/20150403065618_create_products.rb (100%) rename {db => spec/example_app/db}/migrate/20150411204433_create_orders.rb (100%) rename {db => spec/example_app/db}/migrate/20150417044505_create_line_items.rb (100%) rename {db => spec/example_app/db}/migrate/20150903215027_add_shipped_at_to_orders.rb (100%) rename {db => spec/example_app/db}/migrate/20150914175022_add_slug_to_products.rb (100%) rename {db => spec/example_app/db}/migrate/20150916011117_add_email_subscriber_to_customers.rb (100%) rename {db => spec/example_app/db}/schema.rb (100%) rename {db => spec/example_app/db}/seeds.rb (100%) rename {db => spec/example_app/db}/seeds/products.yml (100%) rename {lib => spec/example_app/lib}/assets/.keep (100%) rename {lib => spec/example_app/lib}/tasks/.keep (100%) rename {lib => spec/example_app/lib}/tasks/bundler_audit.rake (100%) rename {lib => spec/example_app/lib}/tasks/development_seeds.rake (100%) rename {lib => spec/example_app/lib}/templates/erb/scaffold/_form.html.erb (100%) rename {public => spec/example_app/public}/404.html (100%) rename {public => spec/example_app/public}/422.html (100%) rename {public => spec/example_app/public}/500.html (100%) rename {public => spec/example_app/public}/favicon.ico (100%) rename {public => spec/example_app/public}/robots.txt (100%) rename {vendor => spec/example_app/vendor}/assets/javascripts/.keep (100%) rename {vendor => spec/example_app/vendor}/assets/stylesheets/.keep (100%) diff --git a/.gitignore b/.gitignore index 1a572b5ca0..21dde5c9bf 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,9 @@ /coverage/* /db/*.sqlite3 /log/* -/public/system -/public/assets +/spec/example_app/log/* +/spec/example_app/public/system +/spec/example_app/public/assets /tags /tmp/* +/spec/example_app/tmp/* diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a8d117d7..e91db1bab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ ### Upcoming Release +* [COMPAT] Update repository structure so Bundler can pull the gem from github. + (e.g. `gem "administrate", github: "thoughtbot/administrate"`) * [DOC] Add Rubygems version badge to README * [DOC] Add CircleCI badge to README * [DOC] Add CodeClimate badge to README diff --git a/Gemfile b/Gemfile index d492ac27d8..69d6d3d065 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,17 @@ -source "https://rubygems.org" +source 'https://rubygems.org' -ruby "2.2.0" +# Declare your gem's dependencies in administrate.gemspec. +# Bundler will treat runtime dependencies like base dependencies, and +# development dependencies will be added by default to the :development group. +gemspec -gem 'administrate', path: "administrate" +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. +# To use a debugger +# gem 'byebug', group: [:development, :test] gem "airbrake" gem "coffee-rails", "~> 4.1.0" gem "delayed_job_active_record" @@ -25,8 +33,8 @@ gem "uglifier", ">= 2.7.2" gem "unicorn" group :development do - gem "spring" - gem "spring-commands-rspec" + # gem "spring" + # gem "spring-commands-rspec" gem "web-console", ">= 2.1.3" end diff --git a/Gemfile.lock b/Gemfile.lock index 4224d382cc..5eb3b3377d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,5 @@ PATH - remote: administrate + remote: . specs: administrate (0.1.0) autoprefixer-rails (~> 6.0) @@ -51,20 +51,19 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.3.7) - airbrake (4.1.0) + addressable (2.3.8) + airbrake (4.3.3) builder multi_json - ammeter (1.1.2) + ammeter (1.1.3) activesupport (>= 3.0) railties (>= 3.0) rspec-rails (>= 2.2) - appraisal (2.0.1) - activesupport (>= 3.2.21) + appraisal (2.1.0) bundler rake thor (>= 0.14.0) - arel (6.0.0) + arel (6.0.3) autoprefixer-rails (6.0.3) execjs json @@ -75,89 +74,85 @@ GEM sass (~> 3.4) thor (~> 0.19) builder (3.2.2) - bundler-audit (0.3.1) + bundler-audit (0.4.0) bundler (~> 1.2) thor (~> 0.18) - byebug (3.5.1) - columnize (~> 0.8) - debugger-linecache (~> 1.2) - slop (~> 3.6) - capybara (2.4.4) + byebug (6.0.2) + capybara (2.5.0) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-webkit (1.4.1) - capybara (>= 2.3.0, < 2.5.0) + capybara-webkit (1.7.1) + capybara (>= 2.3.0, < 2.6.0) json coderay (1.1.0) coffee-rails (4.1.0) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) - coffee-script (2.3.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.9.1) - columnize (0.9.0) + coffee-script-source (1.9.1.1) crack (0.4.2) safe_yaml (~> 1.0.0) - database_cleaner (1.4.0) + database_cleaner (1.5.1) datetime_picker_rails (0.0.5) momentjs-rails (>= 2.8.1) debug_inspector (0.0.2) - debugger-linecache (1.2.0) - delayed_job (4.0.6) + delayed_job (4.1.1) activesupport (>= 3.0, < 5.0) - delayed_job_active_record (4.0.3) - activerecord (>= 3.0, < 5.0) - delayed_job (>= 3.0, < 4.1) + delayed_job_active_record (4.1.0) + activerecord (>= 3.0, < 5) + delayed_job (>= 3.0, < 5) diff-lcs (1.2.5) - dotenv (1.0.2) - dotenv-rails (1.0.2) - dotenv (= 1.0.2) + dotenv (2.0.2) + dotenv-rails (2.0.2) + dotenv (= 2.0.2) + railties (~> 4.0) easy_translate (0.5.0) json thread thread_safe - email_validator (1.5.0) + email_validator (1.6.0) activemodel erubis (2.7.0) - execjs (2.3.0) + execjs (2.6.0) factory_girl (4.5.0) activesupport (>= 3.0.0) factory_girl_rails (4.5.0) factory_girl (~> 4.5.0) railties (>= 3.0.0) - faker (1.4.3) + faker (1.5.0) i18n (~> 0.5) flutie (2.0.0) - formulaic (0.2.0) + formulaic (0.3.0) activesupport capybara i18n fuubar (2.0.0) rspec (~> 3.0) ruby-progressbar (~> 1.4) - globalid (0.3.5) + globalid (0.3.6) activesupport (>= 4.1.0) - high_voltage (2.2.1) - highline (1.7.1) + hashdiff (0.2.2) + high_voltage (2.4.0) + highline (1.7.8) i18n (0.7.0) - i18n-tasks (0.7.12) - activesupport + i18n-tasks (0.8.7) + activesupport (>= 2.3.18) easy_translate (>= 0.5.0) erubis - highline + highline (>= 1.7.3) i18n - slop (~> 3.5) - term-ansicolor - terminal-table + term-ansicolor (>= 1.3.2) + terminal-table (>= 1.5.1) inline_svg (0.6.1) activesupport (>= 4.0.4) loofah (>= 2.0) nokogiri (~> 1.6) - jquery-rails (4.0.4) + jquery-rails (4.0.5) rails-dom-testing (~> 1.0) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -165,38 +160,38 @@ GEM kaminari (0.16.3) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - kgio (2.9.3) + kgio (2.10.0) launchy (2.4.3) addressable (~> 2.3) - loofah (2.0.2) + loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.3) mime-types (>= 1.16, < 3) method_source (0.8.2) - mime-types (2.6.1) + mime-types (2.6.2) mini_portile (0.6.2) - minitest (5.7.0) + minitest (5.8.1) momentjs-rails (2.10.6) railties (>= 3.1) - multi_json (1.11.1) + multi_json (1.11.2) neat (1.7.2) bourbon (>= 4.0) sass (>= 3.3) - newrelic_rpm (3.10.0.279) + newrelic_rpm (3.14.0.305) nokogiri (1.6.6.2) mini_portile (~> 0.6.0) normalize-rails (3.0.3) - pg (0.18.1) - pry (0.10.1) + pg (0.18.3) + pry (0.10.3) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-rails (0.3.3) + pry-rails (0.3.4) pry (>= 0.9.10) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) - rack-timeout (0.2.0) + rack-timeout (0.3.2) rails (4.2.2) actionmailer (= 4.2.2) actionpack (= 4.2.2) @@ -210,19 +205,19 @@ GEM sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.6) + rails-dom-testing (1.0.7) activesupport (>= 4.2.0.beta, < 5.0) nokogiri (~> 1.6.0) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.2) loofah (~> 2.0) - rails_stdout_logging (0.0.3) + rails_stdout_logging (0.0.4) railties (4.2.2) actionpack (= 4.2.2) activesupport (= 4.2.2) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - raindrops (0.13.0) + raindrops (0.15.0) rake (10.4.2) recipient_interceptor (0.1.2) mail @@ -247,40 +242,37 @@ GEM rspec-mocks (~> 3.1.0) rspec-support (~> 3.1.0) rspec-support (3.1.2) - ruby-progressbar (1.7.1) + ruby-progressbar (1.7.5) safe_yaml (1.0.4) - sass (3.4.12) - sass-rails (5.0.1) + sass (3.4.19) + sass-rails (5.0.4) railties (>= 4.0.0, < 5.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) - tilt (~> 1.1) + tilt (>= 1.1, < 3) selectize-rails (0.12.1) shoulda-matchers (2.8.0) activesupport (>= 3.0.0) - simple_form (3.1.0) + simple_form (3.2.0) actionpack (~> 4.0) activemodel (~> 4.0) slop (3.6.0) - spring (1.3.6) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - sprockets (3.2.0) - rack (~> 1.0) - sprockets-rails (2.3.2) + sprockets (3.4.0) + rack (> 1, < 3) + sprockets-rails (2.3.3) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - term-ansicolor (1.3.0) + term-ansicolor (1.3.2) tins (~> 1.0) - terminal-table (1.4.5) + terminal-table (1.5.2) thor (0.19.1) - thread (0.1.5) + thread (0.2.2) thread_safe (0.3.5) - tilt (1.4.1) - timecop (0.7.3) - tins (1.3.4) + tilt (2.0.1) + timecop (0.8.0) + tins (1.6.0) title (0.0.5) i18n rails (>= 3.1) @@ -289,18 +281,19 @@ GEM uglifier (2.7.2) execjs (>= 0.3.0) json (>= 1.8.0) - unicorn (4.8.3) + unicorn (4.9.0) kgio (~> 2.6) rack raindrops (~> 0.7) - web-console (2.1.3) + web-console (2.2.1) activemodel (>= 4.0) binding_of_caller (>= 0.7.2) railties (>= 4.0) sprockets-rails (>= 2.0, < 4.0) - webmock (1.20.4) + webmock (1.22.1) addressable (>= 2.3.6) crack (>= 0.3.2) + hashdiff xpath (2.0.0) nokogiri (~> 1.3) @@ -342,8 +335,6 @@ DEPENDENCIES sass-rails (~> 5.0) shoulda-matchers (~> 2.8.0) simple_form - spring - spring-commands-rspec timecop title uglifier (>= 2.7.2) diff --git a/Rakefile b/Rakefile index 4a77cd03ae..4cc134180a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,22 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end + +require 'rdoc/task' + +require File.expand_path('../spec/example_app/config/application', __FILE__) + +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'Administrate' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end -require File.expand_path('../config/application', __FILE__) +Bundler::GemHelper.install_tasks Rails.application.load_tasks task(:default).clear @@ -14,4 +29,16 @@ if defined? RSpec end end +namespace :deploy do + desc "Deploy the example app to Heroku staging" + task :staging do + exec %(git push staging `git subtree split --prefix spec/example_app`:master --force) + end + + desc "Deploy the example app to Heroku production" + task :production do + exec %(git push production `git subtree split --prefix spec/example_app`:master --force) + end +end + task default: "bundler:audit" diff --git a/administrate/administrate.gemspec b/administrate.gemspec similarity index 100% rename from administrate/administrate.gemspec rename to administrate.gemspec diff --git a/administrate/.gitignore b/administrate/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/administrate/Gemfile b/administrate/Gemfile deleted file mode 100644 index 6ec93d1ab2..0000000000 --- a/administrate/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source 'https://rubygems.org' - -# Declare your gem's dependencies in administrate.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use a debugger -# gem 'byebug', group: [:development, :test] diff --git a/administrate/Gemfile.lock b/administrate/Gemfile.lock deleted file mode 100644 index f1f9e04fe7..0000000000 --- a/administrate/Gemfile.lock +++ /dev/null @@ -1,106 +0,0 @@ -PATH - remote: . - specs: - administrate (0.0.1) - rails (~> 4.2.0) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.2.1) - actionpack (= 4.2.1) - actionview (= 4.2.1) - activejob (= 4.2.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.1) - actionview (= 4.2.1) - activesupport (= 4.2.1) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionview (4.2.1) - activesupport (= 4.2.1) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.1) - activesupport (= 4.2.1) - globalid (>= 0.3.0) - activemodel (4.2.1) - activesupport (= 4.2.1) - builder (~> 3.1) - activerecord (4.2.1) - activemodel (= 4.2.1) - activesupport (= 4.2.1) - arel (~> 6.0) - activesupport (4.2.1) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - arel (6.0.0) - builder (3.2.2) - erubis (2.7.0) - globalid (0.3.5) - activesupport (>= 4.1.0) - i18n (0.7.0) - json (1.8.3) - loofah (2.0.2) - nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.6.1) - mini_portile (0.6.2) - minitest (5.7.0) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - rack (1.6.1) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.1) - actionmailer (= 4.2.1) - actionpack (= 4.2.1) - actionview (= 4.2.1) - activejob (= 4.2.1) - activemodel (= 4.2.1) - activerecord (= 4.2.1) - activesupport (= 4.2.1) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.1) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.6) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.2) - loofah (~> 2.0) - railties (4.2.1) - actionpack (= 4.2.1) - activesupport (= 4.2.1) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.4.2) - sprockets (3.2.0) - rack (~> 1.0) - sprockets-rails (2.3.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.10) - thor (0.19.1) - thread_safe (0.3.5) - tzinfo (1.2.2) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - administrate! - sqlite3 diff --git a/administrate/LICENSE b/administrate/LICENSE deleted file mode 100644 index 5128c6027f..0000000000 --- a/administrate/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2015 Grayson Wright - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/administrate/Rakefile b/administrate/Rakefile deleted file mode 100644 index 5a306e8266..0000000000 --- a/administrate/Rakefile +++ /dev/null @@ -1,37 +0,0 @@ -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end - -require 'rdoc/task' - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Administrate' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -load 'rails/tasks/statistics.rake' - - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task default: :test diff --git a/administrate/bin/rails b/administrate/bin/rails deleted file mode 100755 index 98c954bef4..0000000000 --- a/administrate/bin/rails +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. - -ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/administrate/engine', __FILE__) - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) - -require 'rails/all' -require 'rails/engine/commands' diff --git a/administrate/config/routes.rb b/administrate/config/routes.rb deleted file mode 100644 index 4e823e53a1..0000000000 --- a/administrate/config/routes.rb +++ /dev/null @@ -1,2 +0,0 @@ -Administrate::Engine.routes.draw do -end diff --git a/administrate/app/assets/images/administrate/.keep b/app/assets/images/administrate/.keep similarity index 100% rename from administrate/app/assets/images/administrate/.keep rename to app/assets/images/administrate/.keep diff --git a/administrate/app/assets/images/administrate/dropdown.svg b/app/assets/images/administrate/dropdown.svg similarity index 100% rename from administrate/app/assets/images/administrate/dropdown.svg rename to app/assets/images/administrate/dropdown.svg diff --git a/administrate/app/assets/images/administrate/search.svg b/app/assets/images/administrate/search.svg similarity index 100% rename from administrate/app/assets/images/administrate/search.svg rename to app/assets/images/administrate/search.svg diff --git a/administrate/app/assets/images/administrate/sort_arrow.svg b/app/assets/images/administrate/sort_arrow.svg similarity index 100% rename from administrate/app/assets/images/administrate/sort_arrow.svg rename to app/assets/images/administrate/sort_arrow.svg diff --git a/administrate/app/assets/javascripts/administrate/application.js b/app/assets/javascripts/administrate/application.js similarity index 100% rename from administrate/app/assets/javascripts/administrate/application.js rename to app/assets/javascripts/administrate/application.js diff --git a/administrate/app/assets/javascripts/administrate/components/_search.js b/app/assets/javascripts/administrate/components/_search.js similarity index 100% rename from administrate/app/assets/javascripts/administrate/components/_search.js rename to app/assets/javascripts/administrate/components/_search.js diff --git a/administrate/app/assets/javascripts/administrate/components/date_time_picker.js b/app/assets/javascripts/administrate/components/date_time_picker.js similarity index 100% rename from administrate/app/assets/javascripts/administrate/components/date_time_picker.js rename to app/assets/javascripts/administrate/components/date_time_picker.js diff --git a/administrate/app/assets/javascripts/administrate/components/has_many_form.js b/app/assets/javascripts/administrate/components/has_many_form.js similarity index 100% rename from administrate/app/assets/javascripts/administrate/components/has_many_form.js rename to app/assets/javascripts/administrate/components/has_many_form.js diff --git a/administrate/app/assets/javascripts/administrate/components/table.js b/app/assets/javascripts/administrate/components/table.js similarity index 100% rename from administrate/app/assets/javascripts/administrate/components/table.js rename to app/assets/javascripts/administrate/components/table.js diff --git a/administrate/app/assets/stylesheets/administrate/_sidebar.scss b/app/assets/stylesheets/administrate/_sidebar.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/_sidebar.scss rename to app/assets/stylesheets/administrate/_sidebar.scss diff --git a/administrate/app/assets/stylesheets/administrate/application.scss b/app/assets/stylesheets/administrate/application.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/application.scss rename to app/assets/stylesheets/administrate/application.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_base.scss b/app/assets/stylesheets/administrate/base/_base.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_base.scss rename to app/assets/stylesheets/administrate/base/_base.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_buttons.scss b/app/assets/stylesheets/administrate/base/_buttons.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_buttons.scss rename to app/assets/stylesheets/administrate/base/_buttons.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_forms.scss b/app/assets/stylesheets/administrate/base/_forms.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_forms.scss rename to app/assets/stylesheets/administrate/base/_forms.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_grid-settings.scss b/app/assets/stylesheets/administrate/base/_grid-settings.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_grid-settings.scss rename to app/assets/stylesheets/administrate/base/_grid-settings.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_lists.scss b/app/assets/stylesheets/administrate/base/_lists.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_lists.scss rename to app/assets/stylesheets/administrate/base/_lists.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_tables.scss b/app/assets/stylesheets/administrate/base/_tables.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_tables.scss rename to app/assets/stylesheets/administrate/base/_tables.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_typography.scss b/app/assets/stylesheets/administrate/base/_typography.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_typography.scss rename to app/assets/stylesheets/administrate/base/_typography.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/_variables.scss b/app/assets/stylesheets/administrate/base/_variables.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/_variables.scss rename to app/assets/stylesheets/administrate/base/_variables.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/extends/_button.scss b/app/assets/stylesheets/administrate/base/extends/_button.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/extends/_button.scss rename to app/assets/stylesheets/administrate/base/extends/_button.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/extends/_clearfix.scss b/app/assets/stylesheets/administrate/base/extends/_clearfix.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/extends/_clearfix.scss rename to app/assets/stylesheets/administrate/base/extends/_clearfix.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/extends/_errors.scss b/app/assets/stylesheets/administrate/base/extends/_errors.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/extends/_errors.scss rename to app/assets/stylesheets/administrate/base/extends/_errors.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/extends/_flashes.scss b/app/assets/stylesheets/administrate/base/extends/_flashes.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/extends/_flashes.scss rename to app/assets/stylesheets/administrate/base/extends/_flashes.scss diff --git a/administrate/app/assets/stylesheets/administrate/base/extends/_hide-text.scss b/app/assets/stylesheets/administrate/base/extends/_hide-text.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/base/extends/_hide-text.scss rename to app/assets/stylesheets/administrate/base/extends/_hide-text.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_attributes.scss b/app/assets/stylesheets/administrate/components/_attributes.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_attributes.scss rename to app/assets/stylesheets/administrate/components/_attributes.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_cells.scss b/app/assets/stylesheets/administrate/components/_cells.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_cells.scss rename to app/assets/stylesheets/administrate/components/_cells.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_components.scss b/app/assets/stylesheets/administrate/components/_components.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_components.scss rename to app/assets/stylesheets/administrate/components/_components.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_date_time_picker.scss b/app/assets/stylesheets/administrate/components/_date_time_picker.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_date_time_picker.scss rename to app/assets/stylesheets/administrate/components/_date_time_picker.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_form.scss b/app/assets/stylesheets/administrate/components/_form.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_form.scss rename to app/assets/stylesheets/administrate/components/_form.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_header.scss b/app/assets/stylesheets/administrate/components/_header.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_header.scss rename to app/assets/stylesheets/administrate/components/_header.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_pagination.scss b/app/assets/stylesheets/administrate/components/_pagination.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_pagination.scss rename to app/assets/stylesheets/administrate/components/_pagination.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_search.scss b/app/assets/stylesheets/administrate/components/_search.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_search.scss rename to app/assets/stylesheets/administrate/components/_search.scss diff --git a/administrate/app/assets/stylesheets/administrate/components/_table.scss b/app/assets/stylesheets/administrate/components/_table.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/components/_table.scss rename to app/assets/stylesheets/administrate/components/_table.scss diff --git a/administrate/app/assets/stylesheets/administrate/layout.scss b/app/assets/stylesheets/administrate/layout.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/layout.scss rename to app/assets/stylesheets/administrate/layout.scss diff --git a/administrate/app/assets/stylesheets/administrate/mixins/_data_label.scss b/app/assets/stylesheets/administrate/mixins/_data_label.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/mixins/_data_label.scss rename to app/assets/stylesheets/administrate/mixins/_data_label.scss diff --git a/administrate/app/assets/stylesheets/administrate/mixins/_mixins.scss b/app/assets/stylesheets/administrate/mixins/_mixins.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/mixins/_mixins.scss rename to app/assets/stylesheets/administrate/mixins/_mixins.scss diff --git a/administrate/app/assets/stylesheets/administrate/mixins/_shadow.scss b/app/assets/stylesheets/administrate/mixins/_shadow.scss similarity index 100% rename from administrate/app/assets/stylesheets/administrate/mixins/_shadow.scss rename to app/assets/stylesheets/administrate/mixins/_shadow.scss diff --git a/administrate/app/controllers/administrate/application_controller.rb b/app/controllers/administrate/application_controller.rb similarity index 92% rename from administrate/app/controllers/administrate/application_controller.rb rename to app/controllers/administrate/application_controller.rb index d8c405914f..0c8fc1bc83 100644 --- a/administrate/app/controllers/administrate/application_controller.rb +++ b/app/controllers/administrate/application_controller.rb @@ -38,7 +38,7 @@ def create if resource.save redirect_to( [Administrate::NAMESPACE, resource], - notice: translate("create.success"), + notice: translate_with_resource("create.success"), ) else render :new, locals: { @@ -51,7 +51,7 @@ def update if requested_resource.update(resource_params) redirect_to( [Administrate::NAMESPACE, requested_resource], - notice: translate("update.success"), + notice: translate_with_resource("update.success"), ) else render :edit, locals: { @@ -62,7 +62,7 @@ def update def destroy requested_resource.destroy - flash[:notice] = translate("destroy.success") + flash[:notice] = translate_with_resource("destroy.success") redirect_to action: :index end @@ -112,7 +112,7 @@ def resource_resolver Administrate::ResourceResolver.new(controller_path) end - def translate(key) + def translate_with_resource(key) t( "administrate.controller.#{key}", resource: resource_resolver.resource_title, diff --git a/administrate/app/helpers/administrate/application_helper.rb b/app/helpers/administrate/application_helper.rb similarity index 100% rename from administrate/app/helpers/administrate/application_helper.rb rename to app/helpers/administrate/application_helper.rb diff --git a/administrate/app/views/administrate/application/_collection.html.erb b/app/views/administrate/application/_collection.html.erb similarity index 100% rename from administrate/app/views/administrate/application/_collection.html.erb rename to app/views/administrate/application/_collection.html.erb diff --git a/administrate/app/views/administrate/application/_flashes.html.erb b/app/views/administrate/application/_flashes.html.erb similarity index 100% rename from administrate/app/views/administrate/application/_flashes.html.erb rename to app/views/administrate/application/_flashes.html.erb diff --git a/administrate/app/views/administrate/application/_form.html.erb b/app/views/administrate/application/_form.html.erb similarity index 100% rename from administrate/app/views/administrate/application/_form.html.erb rename to app/views/administrate/application/_form.html.erb diff --git a/administrate/app/views/administrate/application/_javascript.html.erb b/app/views/administrate/application/_javascript.html.erb similarity index 100% rename from administrate/app/views/administrate/application/_javascript.html.erb rename to app/views/administrate/application/_javascript.html.erb diff --git a/administrate/app/views/administrate/application/_sidebar.html.erb b/app/views/administrate/application/_sidebar.html.erb similarity index 100% rename from administrate/app/views/administrate/application/_sidebar.html.erb rename to app/views/administrate/application/_sidebar.html.erb diff --git a/administrate/app/views/administrate/application/edit.html.erb b/app/views/administrate/application/edit.html.erb similarity index 100% rename from administrate/app/views/administrate/application/edit.html.erb rename to app/views/administrate/application/edit.html.erb diff --git a/administrate/app/views/administrate/application/index.html.erb b/app/views/administrate/application/index.html.erb similarity index 100% rename from administrate/app/views/administrate/application/index.html.erb rename to app/views/administrate/application/index.html.erb diff --git a/administrate/app/views/administrate/application/new.html.erb b/app/views/administrate/application/new.html.erb similarity index 100% rename from administrate/app/views/administrate/application/new.html.erb rename to app/views/administrate/application/new.html.erb diff --git a/administrate/app/views/administrate/application/show.html.erb b/app/views/administrate/application/show.html.erb similarity index 100% rename from administrate/app/views/administrate/application/show.html.erb rename to app/views/administrate/application/show.html.erb diff --git a/administrate/app/views/fields/belongs_to/_form.html.erb b/app/views/fields/belongs_to/_form.html.erb similarity index 100% rename from administrate/app/views/fields/belongs_to/_form.html.erb rename to app/views/fields/belongs_to/_form.html.erb diff --git a/administrate/app/views/fields/belongs_to/_index.html.erb b/app/views/fields/belongs_to/_index.html.erb similarity index 100% rename from administrate/app/views/fields/belongs_to/_index.html.erb rename to app/views/fields/belongs_to/_index.html.erb diff --git a/administrate/app/views/fields/belongs_to/_show.html.erb b/app/views/fields/belongs_to/_show.html.erb similarity index 100% rename from administrate/app/views/fields/belongs_to/_show.html.erb rename to app/views/fields/belongs_to/_show.html.erb diff --git a/administrate/app/views/fields/boolean/_form.html.erb b/app/views/fields/boolean/_form.html.erb similarity index 100% rename from administrate/app/views/fields/boolean/_form.html.erb rename to app/views/fields/boolean/_form.html.erb diff --git a/administrate/app/views/fields/boolean/_index.html.erb b/app/views/fields/boolean/_index.html.erb similarity index 100% rename from administrate/app/views/fields/boolean/_index.html.erb rename to app/views/fields/boolean/_index.html.erb diff --git a/administrate/app/views/fields/boolean/_show.html.erb b/app/views/fields/boolean/_show.html.erb similarity index 100% rename from administrate/app/views/fields/boolean/_show.html.erb rename to app/views/fields/boolean/_show.html.erb diff --git a/administrate/app/views/fields/date_time/_form.html.erb b/app/views/fields/date_time/_form.html.erb similarity index 100% rename from administrate/app/views/fields/date_time/_form.html.erb rename to app/views/fields/date_time/_form.html.erb diff --git a/administrate/app/views/fields/date_time/_index.html.erb b/app/views/fields/date_time/_index.html.erb similarity index 100% rename from administrate/app/views/fields/date_time/_index.html.erb rename to app/views/fields/date_time/_index.html.erb diff --git a/administrate/app/views/fields/date_time/_show.html.erb b/app/views/fields/date_time/_show.html.erb similarity index 100% rename from administrate/app/views/fields/date_time/_show.html.erb rename to app/views/fields/date_time/_show.html.erb diff --git a/administrate/app/views/fields/email/_form.html.erb b/app/views/fields/email/_form.html.erb similarity index 100% rename from administrate/app/views/fields/email/_form.html.erb rename to app/views/fields/email/_form.html.erb diff --git a/administrate/app/views/fields/email/_index.html.erb b/app/views/fields/email/_index.html.erb similarity index 100% rename from administrate/app/views/fields/email/_index.html.erb rename to app/views/fields/email/_index.html.erb diff --git a/administrate/app/views/fields/email/_show.html.erb b/app/views/fields/email/_show.html.erb similarity index 100% rename from administrate/app/views/fields/email/_show.html.erb rename to app/views/fields/email/_show.html.erb diff --git a/administrate/app/views/fields/has_many/_form.html.erb b/app/views/fields/has_many/_form.html.erb similarity index 100% rename from administrate/app/views/fields/has_many/_form.html.erb rename to app/views/fields/has_many/_form.html.erb diff --git a/administrate/app/views/fields/has_many/_index.html.erb b/app/views/fields/has_many/_index.html.erb similarity index 100% rename from administrate/app/views/fields/has_many/_index.html.erb rename to app/views/fields/has_many/_index.html.erb diff --git a/administrate/app/views/fields/has_many/_show.html.erb b/app/views/fields/has_many/_show.html.erb similarity index 100% rename from administrate/app/views/fields/has_many/_show.html.erb rename to app/views/fields/has_many/_show.html.erb diff --git a/administrate/app/views/fields/has_one/_form.html.erb b/app/views/fields/has_one/_form.html.erb similarity index 100% rename from administrate/app/views/fields/has_one/_form.html.erb rename to app/views/fields/has_one/_form.html.erb diff --git a/administrate/app/views/fields/has_one/_index.html.erb b/app/views/fields/has_one/_index.html.erb similarity index 100% rename from administrate/app/views/fields/has_one/_index.html.erb rename to app/views/fields/has_one/_index.html.erb diff --git a/administrate/app/views/fields/has_one/_show.html.erb b/app/views/fields/has_one/_show.html.erb similarity index 100% rename from administrate/app/views/fields/has_one/_show.html.erb rename to app/views/fields/has_one/_show.html.erb diff --git a/administrate/app/views/fields/image/_form.html.erb b/app/views/fields/image/_form.html.erb similarity index 100% rename from administrate/app/views/fields/image/_form.html.erb rename to app/views/fields/image/_form.html.erb diff --git a/administrate/app/views/fields/image/_index.html.erb b/app/views/fields/image/_index.html.erb similarity index 100% rename from administrate/app/views/fields/image/_index.html.erb rename to app/views/fields/image/_index.html.erb diff --git a/administrate/app/views/fields/image/_show.html.erb b/app/views/fields/image/_show.html.erb similarity index 100% rename from administrate/app/views/fields/image/_show.html.erb rename to app/views/fields/image/_show.html.erb diff --git a/administrate/app/views/fields/number/_form.html.erb b/app/views/fields/number/_form.html.erb similarity index 100% rename from administrate/app/views/fields/number/_form.html.erb rename to app/views/fields/number/_form.html.erb diff --git a/administrate/app/views/fields/number/_index.html.erb b/app/views/fields/number/_index.html.erb similarity index 100% rename from administrate/app/views/fields/number/_index.html.erb rename to app/views/fields/number/_index.html.erb diff --git a/administrate/app/views/fields/number/_show.html.erb b/app/views/fields/number/_show.html.erb similarity index 100% rename from administrate/app/views/fields/number/_show.html.erb rename to app/views/fields/number/_show.html.erb diff --git a/administrate/app/views/fields/polymorphic/_form.html.erb b/app/views/fields/polymorphic/_form.html.erb similarity index 100% rename from administrate/app/views/fields/polymorphic/_form.html.erb rename to app/views/fields/polymorphic/_form.html.erb diff --git a/administrate/app/views/fields/polymorphic/_index.html.erb b/app/views/fields/polymorphic/_index.html.erb similarity index 100% rename from administrate/app/views/fields/polymorphic/_index.html.erb rename to app/views/fields/polymorphic/_index.html.erb diff --git a/administrate/app/views/fields/polymorphic/_show.html.erb b/app/views/fields/polymorphic/_show.html.erb similarity index 100% rename from administrate/app/views/fields/polymorphic/_show.html.erb rename to app/views/fields/polymorphic/_show.html.erb diff --git a/administrate/app/views/fields/string/_form.html.erb b/app/views/fields/string/_form.html.erb similarity index 100% rename from administrate/app/views/fields/string/_form.html.erb rename to app/views/fields/string/_form.html.erb diff --git a/administrate/app/views/fields/string/_index.html.erb b/app/views/fields/string/_index.html.erb similarity index 100% rename from administrate/app/views/fields/string/_index.html.erb rename to app/views/fields/string/_index.html.erb diff --git a/administrate/app/views/fields/string/_show.html.erb b/app/views/fields/string/_show.html.erb similarity index 100% rename from administrate/app/views/fields/string/_show.html.erb rename to app/views/fields/string/_show.html.erb diff --git a/administrate/app/views/fields/text/_form.html.erb b/app/views/fields/text/_form.html.erb similarity index 100% rename from administrate/app/views/fields/text/_form.html.erb rename to app/views/fields/text/_form.html.erb diff --git a/administrate/app/views/fields/text/_index.html.erb b/app/views/fields/text/_index.html.erb similarity index 100% rename from administrate/app/views/fields/text/_index.html.erb rename to app/views/fields/text/_index.html.erb diff --git a/administrate/app/views/fields/text/_show.html.erb b/app/views/fields/text/_show.html.erb similarity index 100% rename from administrate/app/views/fields/text/_show.html.erb rename to app/views/fields/text/_show.html.erb diff --git a/administrate/app/views/layouts/administrate/application.html.erb b/app/views/layouts/administrate/application.html.erb similarity index 100% rename from administrate/app/views/layouts/administrate/application.html.erb rename to app/views/layouts/administrate/application.html.erb diff --git a/circle.yml b/circle.yml index a6c0528348..e4b23691ec 100644 --- a/circle.yml +++ b/circle.yml @@ -4,6 +4,7 @@ dependencies: test: pre: - cp .sample.env .env + - bundle exec rake db:schema:load override: - bundle exec rake - bundle exec appraisal rake diff --git a/administrate/config/locales/administrate.en.yml b/config/locales/administrate.en.yml similarity index 100% rename from administrate/config/locales/administrate.en.yml rename to config/locales/administrate.en.yml diff --git a/config/routes.rb b/config/routes.rb index 70dfbb06bf..4e823e53a1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,2 @@ -Rails.application.routes.draw do - namespace :admin do - DashboardManifest::DASHBOARDS.each do |dashboard_resource| - resources dashboard_resource - end - - root controller: DashboardManifest::ROOT_DASHBOARD, action: :index - end +Administrate::Engine.routes.draw do end diff --git a/gemfiles/sass_3_4.gemfile b/gemfiles/sass_3_4.gemfile index 0d9d4860ce..42b06086d0 100644 --- a/gemfiles/sass_3_4.gemfile +++ b/gemfiles/sass_3_4.gemfile @@ -2,9 +2,6 @@ source "https://rubygems.org" -ruby "2.2.0" - -gem "administrate", :path => "../administrate" gem "airbrake" gem "coffee-rails", "~> 4.1.0" gem "delayed_job_active_record" @@ -27,8 +24,6 @@ gem "unicorn" gem "sass", "3.4.0" group :development do - gem "spring" - gem "spring-commands-rspec" gem "web-console", ">= 2.1.3" end @@ -59,3 +54,5 @@ group :staging, :production do gem "rack-timeout" gem "rails_stdout_logging" end + +gemspec :path => "../" diff --git a/administrate/lib/administrate.rb b/lib/administrate.rb similarity index 100% rename from administrate/lib/administrate.rb rename to lib/administrate.rb diff --git a/administrate/lib/administrate/base_dashboard.rb b/lib/administrate/base_dashboard.rb similarity index 100% rename from administrate/lib/administrate/base_dashboard.rb rename to lib/administrate/base_dashboard.rb diff --git a/administrate/lib/administrate/engine.rb b/lib/administrate/engine.rb similarity index 100% rename from administrate/lib/administrate/engine.rb rename to lib/administrate/engine.rb diff --git a/administrate/lib/administrate/fields/base.rb b/lib/administrate/fields/base.rb similarity index 100% rename from administrate/lib/administrate/fields/base.rb rename to lib/administrate/fields/base.rb diff --git a/administrate/lib/administrate/fields/belongs_to.rb b/lib/administrate/fields/belongs_to.rb similarity index 100% rename from administrate/lib/administrate/fields/belongs_to.rb rename to lib/administrate/fields/belongs_to.rb diff --git a/administrate/lib/administrate/fields/boolean.rb b/lib/administrate/fields/boolean.rb similarity index 100% rename from administrate/lib/administrate/fields/boolean.rb rename to lib/administrate/fields/boolean.rb diff --git a/administrate/lib/administrate/fields/date_time.rb b/lib/administrate/fields/date_time.rb similarity index 100% rename from administrate/lib/administrate/fields/date_time.rb rename to lib/administrate/fields/date_time.rb diff --git a/administrate/lib/administrate/fields/deferred.rb b/lib/administrate/fields/deferred.rb similarity index 100% rename from administrate/lib/administrate/fields/deferred.rb rename to lib/administrate/fields/deferred.rb diff --git a/administrate/lib/administrate/fields/email.rb b/lib/administrate/fields/email.rb similarity index 100% rename from administrate/lib/administrate/fields/email.rb rename to lib/administrate/fields/email.rb diff --git a/administrate/lib/administrate/fields/has_many.rb b/lib/administrate/fields/has_many.rb similarity index 100% rename from administrate/lib/administrate/fields/has_many.rb rename to lib/administrate/fields/has_many.rb diff --git a/administrate/lib/administrate/fields/has_one.rb b/lib/administrate/fields/has_one.rb similarity index 100% rename from administrate/lib/administrate/fields/has_one.rb rename to lib/administrate/fields/has_one.rb diff --git a/administrate/lib/administrate/fields/image.rb b/lib/administrate/fields/image.rb similarity index 100% rename from administrate/lib/administrate/fields/image.rb rename to lib/administrate/fields/image.rb diff --git a/administrate/lib/administrate/fields/number.rb b/lib/administrate/fields/number.rb similarity index 100% rename from administrate/lib/administrate/fields/number.rb rename to lib/administrate/fields/number.rb diff --git a/administrate/lib/administrate/fields/polymorphic.rb b/lib/administrate/fields/polymorphic.rb similarity index 100% rename from administrate/lib/administrate/fields/polymorphic.rb rename to lib/administrate/fields/polymorphic.rb diff --git a/administrate/lib/administrate/fields/string.rb b/lib/administrate/fields/string.rb similarity index 100% rename from administrate/lib/administrate/fields/string.rb rename to lib/administrate/fields/string.rb diff --git a/administrate/lib/administrate/fields/text.rb b/lib/administrate/fields/text.rb similarity index 100% rename from administrate/lib/administrate/fields/text.rb rename to lib/administrate/fields/text.rb diff --git a/administrate/lib/administrate/namespace.rb b/lib/administrate/namespace.rb similarity index 100% rename from administrate/lib/administrate/namespace.rb rename to lib/administrate/namespace.rb diff --git a/administrate/lib/administrate/order.rb b/lib/administrate/order.rb similarity index 100% rename from administrate/lib/administrate/order.rb rename to lib/administrate/order.rb diff --git a/administrate/lib/administrate/page.rb b/lib/administrate/page.rb similarity index 100% rename from administrate/lib/administrate/page.rb rename to lib/administrate/page.rb diff --git a/administrate/lib/administrate/page/base.rb b/lib/administrate/page/base.rb similarity index 100% rename from administrate/lib/administrate/page/base.rb rename to lib/administrate/page/base.rb diff --git a/administrate/lib/administrate/page/collection.rb b/lib/administrate/page/collection.rb similarity index 100% rename from administrate/lib/administrate/page/collection.rb rename to lib/administrate/page/collection.rb diff --git a/administrate/lib/administrate/page/form.rb b/lib/administrate/page/form.rb similarity index 100% rename from administrate/lib/administrate/page/form.rb rename to lib/administrate/page/form.rb diff --git a/administrate/lib/administrate/page/show.rb b/lib/administrate/page/show.rb similarity index 100% rename from administrate/lib/administrate/page/show.rb rename to lib/administrate/page/show.rb diff --git a/administrate/lib/administrate/resource_resolver.rb b/lib/administrate/resource_resolver.rb similarity index 100% rename from administrate/lib/administrate/resource_resolver.rb rename to lib/administrate/resource_resolver.rb diff --git a/administrate/lib/administrate/search.rb b/lib/administrate/search.rb similarity index 100% rename from administrate/lib/administrate/search.rb rename to lib/administrate/search.rb diff --git a/administrate/lib/administrate/version.rb b/lib/administrate/version.rb similarity index 100% rename from administrate/lib/administrate/version.rb rename to lib/administrate/version.rb diff --git a/administrate/lib/administrate/view_generator.rb b/lib/administrate/view_generator.rb similarity index 100% rename from administrate/lib/administrate/view_generator.rb rename to lib/administrate/view_generator.rb diff --git a/administrate/lib/generators/administrate/dashboard/USAGE b/lib/generators/administrate/dashboard/USAGE similarity index 100% rename from administrate/lib/generators/administrate/dashboard/USAGE rename to lib/generators/administrate/dashboard/USAGE diff --git a/administrate/lib/generators/administrate/dashboard/dashboard_generator.rb b/lib/generators/administrate/dashboard/dashboard_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/dashboard/dashboard_generator.rb rename to lib/generators/administrate/dashboard/dashboard_generator.rb diff --git a/administrate/lib/generators/administrate/dashboard/templates/controller.rb.erb b/lib/generators/administrate/dashboard/templates/controller.rb.erb similarity index 100% rename from administrate/lib/generators/administrate/dashboard/templates/controller.rb.erb rename to lib/generators/administrate/dashboard/templates/controller.rb.erb diff --git a/administrate/lib/generators/administrate/dashboard/templates/dashboard.rb.erb b/lib/generators/administrate/dashboard/templates/dashboard.rb.erb similarity index 100% rename from administrate/lib/generators/administrate/dashboard/templates/dashboard.rb.erb rename to lib/generators/administrate/dashboard/templates/dashboard.rb.erb diff --git a/administrate/lib/generators/administrate/field/field_generator.rb b/lib/generators/administrate/field/field_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/field/field_generator.rb rename to lib/generators/administrate/field/field_generator.rb diff --git a/administrate/lib/generators/administrate/field/templates/_form.html.erb b/lib/generators/administrate/field/templates/_form.html.erb similarity index 100% rename from administrate/lib/generators/administrate/field/templates/_form.html.erb rename to lib/generators/administrate/field/templates/_form.html.erb diff --git a/administrate/lib/generators/administrate/field/templates/_index.html.erb b/lib/generators/administrate/field/templates/_index.html.erb similarity index 100% rename from administrate/lib/generators/administrate/field/templates/_index.html.erb rename to lib/generators/administrate/field/templates/_index.html.erb diff --git a/administrate/lib/generators/administrate/field/templates/_show.html.erb b/lib/generators/administrate/field/templates/_show.html.erb similarity index 100% rename from administrate/lib/generators/administrate/field/templates/_show.html.erb rename to lib/generators/administrate/field/templates/_show.html.erb diff --git a/administrate/lib/generators/administrate/field/templates/field_object.rb.erb b/lib/generators/administrate/field/templates/field_object.rb.erb similarity index 100% rename from administrate/lib/generators/administrate/field/templates/field_object.rb.erb rename to lib/generators/administrate/field/templates/field_object.rb.erb diff --git a/administrate/lib/generators/administrate/install/install_generator.rb b/lib/generators/administrate/install/install_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/install/install_generator.rb rename to lib/generators/administrate/install/install_generator.rb diff --git a/administrate/lib/generators/administrate/install/templates/application_controller.rb b/lib/generators/administrate/install/templates/application_controller.rb similarity index 100% rename from administrate/lib/generators/administrate/install/templates/application_controller.rb rename to lib/generators/administrate/install/templates/application_controller.rb diff --git a/administrate/lib/generators/administrate/install/templates/dashboard_manifest.rb.erb b/lib/generators/administrate/install/templates/dashboard_manifest.rb.erb similarity index 100% rename from administrate/lib/generators/administrate/install/templates/dashboard_manifest.rb.erb rename to lib/generators/administrate/install/templates/dashboard_manifest.rb.erb diff --git a/administrate/lib/generators/administrate/install/templates/routes.rb b/lib/generators/administrate/install/templates/routes.rb similarity index 100% rename from administrate/lib/generators/administrate/install/templates/routes.rb rename to lib/generators/administrate/install/templates/routes.rb diff --git a/administrate/lib/generators/administrate/views/edit_generator.rb b/lib/generators/administrate/views/edit_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/edit_generator.rb rename to lib/generators/administrate/views/edit_generator.rb diff --git a/administrate/lib/generators/administrate/views/field_generator.rb b/lib/generators/administrate/views/field_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/field_generator.rb rename to lib/generators/administrate/views/field_generator.rb diff --git a/administrate/lib/generators/administrate/views/form_generator.rb b/lib/generators/administrate/views/form_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/form_generator.rb rename to lib/generators/administrate/views/form_generator.rb diff --git a/administrate/lib/generators/administrate/views/index_generator.rb b/lib/generators/administrate/views/index_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/index_generator.rb rename to lib/generators/administrate/views/index_generator.rb diff --git a/administrate/lib/generators/administrate/views/new_generator.rb b/lib/generators/administrate/views/new_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/new_generator.rb rename to lib/generators/administrate/views/new_generator.rb diff --git a/administrate/lib/generators/administrate/views/show_generator.rb b/lib/generators/administrate/views/show_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/show_generator.rb rename to lib/generators/administrate/views/show_generator.rb diff --git a/administrate/lib/generators/administrate/views/views_generator.rb b/lib/generators/administrate/views/views_generator.rb similarity index 100% rename from administrate/lib/generators/administrate/views/views_generator.rb rename to lib/generators/administrate/views/views_generator.rb diff --git a/administrate/lib/tasks/administrate_tasks.rake b/lib/tasks/administrate_tasks.rake similarity index 100% rename from administrate/lib/tasks/administrate_tasks.rake rename to lib/tasks/administrate_tasks.rake diff --git a/spec/example_app/.rspec b/spec/example_app/.rspec new file mode 100644 index 0000000000..9a8e706d09 --- /dev/null +++ b/spec/example_app/.rspec @@ -0,0 +1,3 @@ +--color +--require spec_helper +--format Fuubar diff --git a/spec/example_app/Gemfile b/spec/example_app/Gemfile new file mode 100644 index 0000000000..55e66081ad --- /dev/null +++ b/spec/example_app/Gemfile @@ -0,0 +1,59 @@ +source "https://rubygems.org" + +ruby "2.2.0" + +gem "administrate", github: "thoughtbot/administrate" + +gem "airbrake" +gem "coffee-rails", "~> 4.1.0" +gem "delayed_job_active_record" +gem "email_validator" +gem "faker" +gem "flutie" +gem "high_voltage" +gem "i18n-tasks" +gem "jquery-rails", ">= 4.0.4" +gem "newrelic_rpm" +gem "pg" +gem "rails", "4.2.2" +gem "recipient_interceptor" +gem "refills" +gem "sass-rails", "~> 5.0" +gem "simple_form" +gem "title" +gem "uglifier", ">= 2.7.2" +gem "unicorn" + +group :development do + gem "spring" + gem "spring-commands-rspec" + gem "web-console", ">= 2.1.3" +end + +group :development, :test do + gem "appraisal" + gem "awesome_print" + gem "bundler-audit", require: false + gem "byebug" + gem "dotenv-rails" + gem "factory_girl_rails" + gem "pry-rails" + gem "rspec-rails", "~> 3.1.0" +end + +group :test do + gem "ammeter" + gem "capybara-webkit", ">= 1.2.0" + gem "database_cleaner" + gem "formulaic" + gem "fuubar" + gem "launchy" + gem "shoulda-matchers", "~> 2.8.0", require: false + gem "timecop" + gem "webmock" +end + +group :staging, :production do + gem "rack-timeout" + gem "rails_stdout_logging" +end diff --git a/spec/example_app/Gemfile.lock b/spec/example_app/Gemfile.lock new file mode 100644 index 0000000000..6535c344db --- /dev/null +++ b/spec/example_app/Gemfile.lock @@ -0,0 +1,356 @@ +GIT + remote: git://github.com/thoughtbot/administrate.git + revision: bceb50c92de23a1697ac608502f22d303f1a2d8f + specs: + administrate (0.1.0) + autoprefixer-rails (~> 6.0) + datetime_picker_rails (~> 0.0.5) + inline_svg (~> 0.6) + kaminari (~> 0.16) + momentjs-rails (~> 2.8) + neat (~> 1.1) + normalize-rails (~> 3.0) + rails (~> 4.2) + sass (~> 3.4) + selectize-rails (~> 0.6) + +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.2.2) + actionpack (= 4.2.2) + actionview (= 4.2.2) + activejob (= 4.2.2) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.2) + actionview (= 4.2.2) + activesupport (= 4.2.2) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + actionview (4.2.2) + activesupport (= 4.2.2) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + activejob (4.2.2) + activesupport (= 4.2.2) + globalid (>= 0.3.0) + activemodel (4.2.2) + activesupport (= 4.2.2) + builder (~> 3.1) + activerecord (4.2.2) + activemodel (= 4.2.2) + activesupport (= 4.2.2) + arel (~> 6.0) + activesupport (4.2.2) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.3.7) + airbrake (4.1.0) + builder + multi_json + ammeter (1.1.2) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-rails (>= 2.2) + appraisal (2.0.1) + activesupport (>= 3.2.21) + bundler + rake + thor (>= 0.14.0) + arel (6.0.0) + autoprefixer-rails (6.0.3) + execjs + json + awesome_print (1.6.1) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bourbon (4.2.6) + sass (~> 3.4) + thor (~> 0.19) + builder (3.2.2) + bundler-audit (0.3.1) + bundler (~> 1.2) + thor (~> 0.18) + byebug (3.5.1) + columnize (~> 0.8) + debugger-linecache (~> 1.2) + slop (~> 3.6) + capybara (2.4.4) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-webkit (1.4.1) + capybara (>= 2.3.0, < 2.5.0) + json + coderay (1.1.0) + coffee-rails (4.1.0) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.3.0) + coffee-script-source + execjs + coffee-script-source (1.9.1) + columnize (0.9.0) + crack (0.4.2) + safe_yaml (~> 1.0.0) + database_cleaner (1.4.0) + datetime_picker_rails (0.0.5) + momentjs-rails (>= 2.8.1) + debug_inspector (0.0.2) + debugger-linecache (1.2.0) + delayed_job (4.0.6) + activesupport (>= 3.0, < 5.0) + delayed_job_active_record (4.0.3) + activerecord (>= 3.0, < 5.0) + delayed_job (>= 3.0, < 4.1) + diff-lcs (1.2.5) + dotenv (1.0.2) + dotenv-rails (1.0.2) + dotenv (= 1.0.2) + easy_translate (0.5.0) + json + thread + thread_safe + email_validator (1.5.0) + activemodel + erubis (2.7.0) + execjs (2.3.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.5.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faker (1.4.3) + i18n (~> 0.5) + flutie (2.0.0) + formulaic (0.2.0) + activesupport + capybara + i18n + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + globalid (0.3.5) + activesupport (>= 4.1.0) + high_voltage (2.2.1) + highline (1.7.1) + i18n (0.7.0) + i18n-tasks (0.7.12) + activesupport + easy_translate (>= 0.5.0) + erubis + highline + i18n + slop (~> 3.5) + term-ansicolor + terminal-table + inline_svg (0.6.1) + activesupport (>= 4.0.4) + loofah (>= 2.0) + nokogiri (~> 1.6) + jquery-rails (4.0.4) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + json (1.8.3) + kaminari (0.16.3) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.9.3) + launchy (2.4.3) + addressable (~> 2.3) + loofah (2.0.2) + nokogiri (>= 1.5.9) + mail (2.6.3) + mime-types (>= 1.16, < 3) + method_source (0.8.2) + mime-types (2.6.1) + mini_portile (0.6.2) + minitest (5.7.0) + momentjs-rails (2.10.6) + railties (>= 3.1) + multi_json (1.11.1) + neat (1.7.2) + bourbon (>= 4.0) + sass (>= 3.3) + newrelic_rpm (3.10.0.279) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + normalize-rails (3.0.3) + pg (0.18.1) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.3) + pry (>= 0.9.10) + rack (1.6.4) + rack-test (0.6.3) + rack (>= 1.0) + rack-timeout (0.2.0) + rails (4.2.2) + actionmailer (= 4.2.2) + actionpack (= 4.2.2) + actionview (= 4.2.2) + activejob (= 4.2.2) + activemodel (= 4.2.2) + activerecord (= 4.2.2) + activesupport (= 4.2.2) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.2) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.6) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.2) + loofah (~> 2.0) + rails_stdout_logging (0.0.3) + railties (4.2.2) + actionpack (= 4.2.2) + activesupport (= 4.2.2) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + raindrops (0.13.0) + rake (10.4.2) + recipient_interceptor (0.1.2) + mail + refills (0.1.0) + rspec (3.1.0) + rspec-core (~> 3.1.0) + rspec-expectations (~> 3.1.0) + rspec-mocks (~> 3.1.0) + rspec-core (3.1.7) + rspec-support (~> 3.1.0) + rspec-expectations (3.1.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.1.0) + rspec-mocks (3.1.3) + rspec-support (~> 3.1.0) + rspec-rails (3.1.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.1.0) + rspec-expectations (~> 3.1.0) + rspec-mocks (~> 3.1.0) + rspec-support (~> 3.1.0) + rspec-support (3.1.2) + ruby-progressbar (1.7.1) + safe_yaml (1.0.4) + sass (3.4.12) + sass-rails (5.0.1) + railties (>= 4.0.0, < 5.0) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (~> 1.1) + selectize-rails (0.12.1) + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + simple_form (3.1.0) + actionpack (~> 4.0) + activemodel (~> 4.0) + slop (3.6.0) + spring (1.4.0) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + sprockets (3.2.0) + rack (~> 1.0) + sprockets-rails (2.3.2) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (>= 2.8, < 4.0) + term-ansicolor (1.3.0) + tins (~> 1.0) + terminal-table (1.4.5) + thor (0.19.1) + thread (0.1.5) + thread_safe (0.3.5) + tilt (1.4.1) + timecop (0.7.3) + tins (1.3.4) + title (0.0.5) + i18n + rails (>= 3.1) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + unicorn (4.8.3) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + web-console (2.1.3) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.20.4) + addressable (>= 2.3.6) + crack (>= 0.3.2) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + administrate! + airbrake + ammeter + appraisal + awesome_print + bundler-audit + byebug + capybara-webkit (>= 1.2.0) + coffee-rails (~> 4.1.0) + database_cleaner + delayed_job_active_record + dotenv-rails + email_validator + factory_girl_rails + faker + flutie + formulaic + fuubar + high_voltage + i18n-tasks + jquery-rails (>= 4.0.4) + launchy + newrelic_rpm + pg + pry-rails + rack-timeout + rails (= 4.2.2) + rails_stdout_logging + recipient_interceptor + refills + rspec-rails (~> 3.1.0) + sass-rails (~> 5.0) + shoulda-matchers (~> 2.8.0) + simple_form + spring + spring-commands-rspec + timecop + title + uglifier (>= 2.7.2) + unicorn + web-console (>= 2.1.3) + webmock + +BUNDLED WITH + 1.10.6 diff --git a/Procfile b/spec/example_app/Procfile similarity index 100% rename from Procfile rename to spec/example_app/Procfile diff --git a/spec/example_app/Rakefile b/spec/example_app/Rakefile new file mode 100644 index 0000000000..3105f8543c --- /dev/null +++ b/spec/example_app/Rakefile @@ -0,0 +1,9 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require File.expand_path('../config/application', __FILE__) + +Rails.application.load_tasks +task(:default).clear + +task default: "bundler:audit" diff --git a/app/assets/images/.keep b/spec/example_app/app/assets/images/.keep similarity index 100% rename from app/assets/images/.keep rename to spec/example_app/app/assets/images/.keep diff --git a/app/assets/images/logo.svg b/spec/example_app/app/assets/images/logo.svg similarity index 100% rename from app/assets/images/logo.svg rename to spec/example_app/app/assets/images/logo.svg diff --git a/app/assets/javascripts/application.js b/spec/example_app/app/assets/javascripts/application.js similarity index 100% rename from app/assets/javascripts/application.js rename to spec/example_app/app/assets/javascripts/application.js diff --git a/app/assets/stylesheets/application.css b/spec/example_app/app/assets/stylesheets/application.css similarity index 100% rename from app/assets/stylesheets/application.css rename to spec/example_app/app/assets/stylesheets/application.css diff --git a/app/controllers/admin/application_controller.rb b/spec/example_app/app/controllers/admin/application_controller.rb similarity index 100% rename from app/controllers/admin/application_controller.rb rename to spec/example_app/app/controllers/admin/application_controller.rb diff --git a/app/controllers/admin/customers_controller.rb b/spec/example_app/app/controllers/admin/customers_controller.rb similarity index 100% rename from app/controllers/admin/customers_controller.rb rename to spec/example_app/app/controllers/admin/customers_controller.rb diff --git a/app/controllers/admin/line_items_controller.rb b/spec/example_app/app/controllers/admin/line_items_controller.rb similarity index 100% rename from app/controllers/admin/line_items_controller.rb rename to spec/example_app/app/controllers/admin/line_items_controller.rb diff --git a/app/controllers/admin/orders_controller.rb b/spec/example_app/app/controllers/admin/orders_controller.rb similarity index 100% rename from app/controllers/admin/orders_controller.rb rename to spec/example_app/app/controllers/admin/orders_controller.rb diff --git a/app/controllers/admin/products_controller.rb b/spec/example_app/app/controllers/admin/products_controller.rb similarity index 100% rename from app/controllers/admin/products_controller.rb rename to spec/example_app/app/controllers/admin/products_controller.rb diff --git a/app/controllers/application_controller.rb b/spec/example_app/app/controllers/application_controller.rb similarity index 100% rename from app/controllers/application_controller.rb rename to spec/example_app/app/controllers/application_controller.rb diff --git a/app/controllers/concerns/.keep b/spec/example_app/app/controllers/concerns/.keep similarity index 100% rename from app/controllers/concerns/.keep rename to spec/example_app/app/controllers/concerns/.keep diff --git a/app/dashboards/customer_dashboard.rb b/spec/example_app/app/dashboards/customer_dashboard.rb similarity index 100% rename from app/dashboards/customer_dashboard.rb rename to spec/example_app/app/dashboards/customer_dashboard.rb diff --git a/app/dashboards/dashboard_manifest.rb b/spec/example_app/app/dashboards/dashboard_manifest.rb similarity index 100% rename from app/dashboards/dashboard_manifest.rb rename to spec/example_app/app/dashboards/dashboard_manifest.rb diff --git a/app/dashboards/line_item_dashboard.rb b/spec/example_app/app/dashboards/line_item_dashboard.rb similarity index 100% rename from app/dashboards/line_item_dashboard.rb rename to spec/example_app/app/dashboards/line_item_dashboard.rb diff --git a/app/dashboards/order_dashboard.rb b/spec/example_app/app/dashboards/order_dashboard.rb similarity index 100% rename from app/dashboards/order_dashboard.rb rename to spec/example_app/app/dashboards/order_dashboard.rb diff --git a/app/dashboards/product_dashboard.rb b/spec/example_app/app/dashboards/product_dashboard.rb similarity index 100% rename from app/dashboards/product_dashboard.rb rename to spec/example_app/app/dashboards/product_dashboard.rb diff --git a/app/mailers/.keep b/spec/example_app/app/mailers/.keep similarity index 100% rename from app/mailers/.keep rename to spec/example_app/app/mailers/.keep diff --git a/app/models/.keep b/spec/example_app/app/models/.keep similarity index 100% rename from app/models/.keep rename to spec/example_app/app/models/.keep diff --git a/app/models/concerns/.keep b/spec/example_app/app/models/concerns/.keep similarity index 100% rename from app/models/concerns/.keep rename to spec/example_app/app/models/concerns/.keep diff --git a/app/models/customer.rb b/spec/example_app/app/models/customer.rb similarity index 100% rename from app/models/customer.rb rename to spec/example_app/app/models/customer.rb diff --git a/app/models/line_item.rb b/spec/example_app/app/models/line_item.rb similarity index 100% rename from app/models/line_item.rb rename to spec/example_app/app/models/line_item.rb diff --git a/app/models/order.rb b/spec/example_app/app/models/order.rb similarity index 100% rename from app/models/order.rb rename to spec/example_app/app/models/order.rb diff --git a/app/models/product.rb b/spec/example_app/app/models/product.rb similarity index 100% rename from app/models/product.rb rename to spec/example_app/app/models/product.rb diff --git a/app/views/application/_analytics.html.erb b/spec/example_app/app/views/application/_analytics.html.erb similarity index 100% rename from app/views/application/_analytics.html.erb rename to spec/example_app/app/views/application/_analytics.html.erb diff --git a/app/views/application/_flashes.html.erb b/spec/example_app/app/views/application/_flashes.html.erb similarity index 100% rename from app/views/application/_flashes.html.erb rename to spec/example_app/app/views/application/_flashes.html.erb diff --git a/app/views/application/_javascript.html.erb b/spec/example_app/app/views/application/_javascript.html.erb similarity index 100% rename from app/views/application/_javascript.html.erb rename to spec/example_app/app/views/application/_javascript.html.erb diff --git a/app/views/layouts/application.html.erb b/spec/example_app/app/views/layouts/application.html.erb similarity index 100% rename from app/views/layouts/application.html.erb rename to spec/example_app/app/views/layouts/application.html.erb diff --git a/app/views/pages/.keep b/spec/example_app/app/views/pages/.keep similarity index 100% rename from app/views/pages/.keep rename to spec/example_app/app/views/pages/.keep diff --git a/browserslist b/spec/example_app/browserslist similarity index 100% rename from browserslist rename to spec/example_app/browserslist diff --git a/config.ru b/spec/example_app/config.ru similarity index 100% rename from config.ru rename to spec/example_app/config.ru diff --git a/config/application.rb b/spec/example_app/config/application.rb similarity index 100% rename from config/application.rb rename to spec/example_app/config/application.rb diff --git a/config/boot.rb b/spec/example_app/config/boot.rb similarity index 100% rename from config/boot.rb rename to spec/example_app/config/boot.rb diff --git a/config/database.yml b/spec/example_app/config/database.yml similarity index 100% rename from config/database.yml rename to spec/example_app/config/database.yml diff --git a/config/environment.rb b/spec/example_app/config/environment.rb similarity index 100% rename from config/environment.rb rename to spec/example_app/config/environment.rb diff --git a/config/environments/development.rb b/spec/example_app/config/environments/development.rb similarity index 100% rename from config/environments/development.rb rename to spec/example_app/config/environments/development.rb diff --git a/config/environments/production.rb b/spec/example_app/config/environments/production.rb similarity index 100% rename from config/environments/production.rb rename to spec/example_app/config/environments/production.rb diff --git a/config/environments/staging.rb b/spec/example_app/config/environments/staging.rb similarity index 100% rename from config/environments/staging.rb rename to spec/example_app/config/environments/staging.rb diff --git a/config/environments/test.rb b/spec/example_app/config/environments/test.rb similarity index 100% rename from config/environments/test.rb rename to spec/example_app/config/environments/test.rb diff --git a/config/initializers/assets.rb b/spec/example_app/config/initializers/assets.rb similarity index 100% rename from config/initializers/assets.rb rename to spec/example_app/config/initializers/assets.rb diff --git a/config/initializers/backtrace_silencers.rb b/spec/example_app/config/initializers/backtrace_silencers.rb similarity index 100% rename from config/initializers/backtrace_silencers.rb rename to spec/example_app/config/initializers/backtrace_silencers.rb diff --git a/config/initializers/cookies_serializer.rb b/spec/example_app/config/initializers/cookies_serializer.rb similarity index 100% rename from config/initializers/cookies_serializer.rb rename to spec/example_app/config/initializers/cookies_serializer.rb diff --git a/config/initializers/disable_xml_params.rb b/spec/example_app/config/initializers/disable_xml_params.rb similarity index 100% rename from config/initializers/disable_xml_params.rb rename to spec/example_app/config/initializers/disable_xml_params.rb diff --git a/config/initializers/errors.rb b/spec/example_app/config/initializers/errors.rb similarity index 100% rename from config/initializers/errors.rb rename to spec/example_app/config/initializers/errors.rb diff --git a/config/initializers/filter_parameter_logging.rb b/spec/example_app/config/initializers/filter_parameter_logging.rb similarity index 100% rename from config/initializers/filter_parameter_logging.rb rename to spec/example_app/config/initializers/filter_parameter_logging.rb diff --git a/config/initializers/inflections.rb b/spec/example_app/config/initializers/inflections.rb similarity index 100% rename from config/initializers/inflections.rb rename to spec/example_app/config/initializers/inflections.rb diff --git a/config/initializers/json_encoding.rb b/spec/example_app/config/initializers/json_encoding.rb similarity index 100% rename from config/initializers/json_encoding.rb rename to spec/example_app/config/initializers/json_encoding.rb diff --git a/config/initializers/mime_types.rb b/spec/example_app/config/initializers/mime_types.rb similarity index 100% rename from config/initializers/mime_types.rb rename to spec/example_app/config/initializers/mime_types.rb diff --git a/config/initializers/session_store.rb b/spec/example_app/config/initializers/session_store.rb similarity index 100% rename from config/initializers/session_store.rb rename to spec/example_app/config/initializers/session_store.rb diff --git a/config/initializers/simple_form.rb b/spec/example_app/config/initializers/simple_form.rb similarity index 100% rename from config/initializers/simple_form.rb rename to spec/example_app/config/initializers/simple_form.rb diff --git a/config/initializers/wrap_parameters.rb b/spec/example_app/config/initializers/wrap_parameters.rb similarity index 100% rename from config/initializers/wrap_parameters.rb rename to spec/example_app/config/initializers/wrap_parameters.rb diff --git a/config/locales/en.yml b/spec/example_app/config/locales/en.yml similarity index 100% rename from config/locales/en.yml rename to spec/example_app/config/locales/en.yml diff --git a/config/locales/simple_form.en.yml b/spec/example_app/config/locales/simple_form.en.yml similarity index 100% rename from config/locales/simple_form.en.yml rename to spec/example_app/config/locales/simple_form.en.yml diff --git a/config/newrelic.yml b/spec/example_app/config/newrelic.yml similarity index 100% rename from config/newrelic.yml rename to spec/example_app/config/newrelic.yml diff --git a/spec/example_app/config/routes.rb b/spec/example_app/config/routes.rb new file mode 100644 index 0000000000..70dfbb06bf --- /dev/null +++ b/spec/example_app/config/routes.rb @@ -0,0 +1,9 @@ +Rails.application.routes.draw do + namespace :admin do + DashboardManifest::DASHBOARDS.each do |dashboard_resource| + resources dashboard_resource + end + + root controller: DashboardManifest::ROOT_DASHBOARD, action: :index + end +end diff --git a/config/secrets.yml b/spec/example_app/config/secrets.yml similarity index 83% rename from config/secrets.yml rename to spec/example_app/config/secrets.yml index 0bfb22ddf8..95479d36e5 100644 --- a/config/secrets.yml +++ b/spec/example_app/config/secrets.yml @@ -5,7 +5,7 @@ development: <<: *default test: - <<: *default + secret_key_base: test_secret staging: <<: *default diff --git a/config/unicorn.rb b/spec/example_app/config/unicorn.rb similarity index 100% rename from config/unicorn.rb rename to spec/example_app/config/unicorn.rb diff --git a/db/migrate/20150220191107_create_delayed_jobs.rb b/spec/example_app/db/migrate/20150220191107_create_delayed_jobs.rb similarity index 100% rename from db/migrate/20150220191107_create_delayed_jobs.rb rename to spec/example_app/db/migrate/20150220191107_create_delayed_jobs.rb diff --git a/db/migrate/20150220194224_create_customers.rb b/spec/example_app/db/migrate/20150220194224_create_customers.rb similarity index 100% rename from db/migrate/20150220194224_create_customers.rb rename to spec/example_app/db/migrate/20150220194224_create_customers.rb diff --git a/db/migrate/20150403065618_create_products.rb b/spec/example_app/db/migrate/20150403065618_create_products.rb similarity index 100% rename from db/migrate/20150403065618_create_products.rb rename to spec/example_app/db/migrate/20150403065618_create_products.rb diff --git a/db/migrate/20150411204433_create_orders.rb b/spec/example_app/db/migrate/20150411204433_create_orders.rb similarity index 100% rename from db/migrate/20150411204433_create_orders.rb rename to spec/example_app/db/migrate/20150411204433_create_orders.rb diff --git a/db/migrate/20150417044505_create_line_items.rb b/spec/example_app/db/migrate/20150417044505_create_line_items.rb similarity index 100% rename from db/migrate/20150417044505_create_line_items.rb rename to spec/example_app/db/migrate/20150417044505_create_line_items.rb diff --git a/db/migrate/20150903215027_add_shipped_at_to_orders.rb b/spec/example_app/db/migrate/20150903215027_add_shipped_at_to_orders.rb similarity index 100% rename from db/migrate/20150903215027_add_shipped_at_to_orders.rb rename to spec/example_app/db/migrate/20150903215027_add_shipped_at_to_orders.rb diff --git a/db/migrate/20150914175022_add_slug_to_products.rb b/spec/example_app/db/migrate/20150914175022_add_slug_to_products.rb similarity index 100% rename from db/migrate/20150914175022_add_slug_to_products.rb rename to spec/example_app/db/migrate/20150914175022_add_slug_to_products.rb diff --git a/db/migrate/20150916011117_add_email_subscriber_to_customers.rb b/spec/example_app/db/migrate/20150916011117_add_email_subscriber_to_customers.rb similarity index 100% rename from db/migrate/20150916011117_add_email_subscriber_to_customers.rb rename to spec/example_app/db/migrate/20150916011117_add_email_subscriber_to_customers.rb diff --git a/db/schema.rb b/spec/example_app/db/schema.rb similarity index 100% rename from db/schema.rb rename to spec/example_app/db/schema.rb diff --git a/db/seeds.rb b/spec/example_app/db/seeds.rb similarity index 100% rename from db/seeds.rb rename to spec/example_app/db/seeds.rb diff --git a/db/seeds/products.yml b/spec/example_app/db/seeds/products.yml similarity index 100% rename from db/seeds/products.yml rename to spec/example_app/db/seeds/products.yml diff --git a/lib/assets/.keep b/spec/example_app/lib/assets/.keep similarity index 100% rename from lib/assets/.keep rename to spec/example_app/lib/assets/.keep diff --git a/lib/tasks/.keep b/spec/example_app/lib/tasks/.keep similarity index 100% rename from lib/tasks/.keep rename to spec/example_app/lib/tasks/.keep diff --git a/lib/tasks/bundler_audit.rake b/spec/example_app/lib/tasks/bundler_audit.rake similarity index 100% rename from lib/tasks/bundler_audit.rake rename to spec/example_app/lib/tasks/bundler_audit.rake diff --git a/lib/tasks/development_seeds.rake b/spec/example_app/lib/tasks/development_seeds.rake similarity index 100% rename from lib/tasks/development_seeds.rake rename to spec/example_app/lib/tasks/development_seeds.rake diff --git a/lib/templates/erb/scaffold/_form.html.erb b/spec/example_app/lib/templates/erb/scaffold/_form.html.erb similarity index 100% rename from lib/templates/erb/scaffold/_form.html.erb rename to spec/example_app/lib/templates/erb/scaffold/_form.html.erb diff --git a/public/404.html b/spec/example_app/public/404.html similarity index 100% rename from public/404.html rename to spec/example_app/public/404.html diff --git a/public/422.html b/spec/example_app/public/422.html similarity index 100% rename from public/422.html rename to spec/example_app/public/422.html diff --git a/public/500.html b/spec/example_app/public/500.html similarity index 100% rename from public/500.html rename to spec/example_app/public/500.html diff --git a/public/favicon.ico b/spec/example_app/public/favicon.ico similarity index 100% rename from public/favicon.ico rename to spec/example_app/public/favicon.ico diff --git a/public/robots.txt b/spec/example_app/public/robots.txt similarity index 100% rename from public/robots.txt rename to spec/example_app/public/robots.txt diff --git a/vendor/assets/javascripts/.keep b/spec/example_app/vendor/assets/javascripts/.keep similarity index 100% rename from vendor/assets/javascripts/.keep rename to spec/example_app/vendor/assets/javascripts/.keep diff --git a/vendor/assets/stylesheets/.keep b/spec/example_app/vendor/assets/stylesheets/.keep similarity index 100% rename from vendor/assets/stylesheets/.keep rename to spec/example_app/vendor/assets/stylesheets/.keep diff --git a/spec/generators/views/field_generator_spec.rb b/spec/generators/views/field_generator_spec.rb index 0fcbac4681..54c4467430 100644 --- a/spec/generators/views/field_generator_spec.rb +++ b/spec/generators/views/field_generator_spec.rb @@ -36,7 +36,7 @@ def contents_for_field_template(field_name, partial_name) File.read( - "administrate/app/views/fields/#{field_name}/_#{partial_name}.html.erb", + "app/views/fields/#{field_name}/_#{partial_name}.html.erb", ) end end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 70cea05683..f7d5cd023d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,11 +1,13 @@ ENV["RAILS_ENV"] = "test" -require File.expand_path("../../config/environment", __FILE__) +require File.expand_path("../../spec/example_app/config/environment", __FILE__) require "rspec/rails" require "shoulda/matchers" -Dir[Rails.root.join("spec/support/**/*.rb")].each { |file| require file } +Dir[Rails.root.join("../../spec/support/**/*.rb")].each { |file| require file } + +require "factories" module Features # Extend this module in spec/support/features/*.rb @@ -17,11 +19,9 @@ module Features config.infer_base_class_for_anonymous_controllers = false config.infer_spec_type_from_file_location! config.use_transactional_fixtures = false - - config.before(js: true) do - page.driver.block_unknown_urls - end end +Capybara::Webkit.configure(&:block_unknown_urls) + ActiveRecord::Migration.maintain_test_schema! Capybara.javascript_driver = :webkit diff --git a/spec/support/generator_spec_helpers.rb b/spec/support/generator_spec_helpers.rb index 1ee82f83c2..28fd5bc2ed 100644 --- a/spec/support/generator_spec_helpers.rb +++ b/spec/support/generator_spec_helpers.rb @@ -11,7 +11,7 @@ def provide_existing_routes_file def contents_for_application_template(view_name) File.read( - "administrate/app/views/administrate/application/#{view_name}.html.erb", + "app/views/administrate/application/#{view_name}.html.erb", ) end