From 914c66e4062d3f7460195a6ffafa4d1c0fd1537e Mon Sep 17 00:00:00 2001 From: Thomas Statter Date: Thu, 13 Feb 2020 16:56:01 +0100 Subject: [PATCH 1/6] convert gem to rails engine --- .gitignore | 62 +-- .idea/datashift_spree.iml | 53 +++ .idea/misc.xml | 7 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 131 ++++++ .idea/workspace.xml___jb_tmp___ | 249 +++++++++++ Gemfile | 15 + Gemfile.lock | 360 +++++++++++++++ MIT-LICENSE | 20 + README.markdown | 2 +- README.md | 134 ++++++ Rakefile | 32 ++ VERSION | 1 - app/assets/config/datashift_spree_manifest.js | 1 + app/assets/images/datashift_spree/.keep | 0 .../datashift_spree/application.css | 15 + .../datashift_spree/application_controller.rb | 5 + .../datashift_spree/application_helper.rb | 4 + app/jobs/datashift_spree/application_job.rb | 4 + .../datashift_spree/application_mailer.rb | 6 + .../datashift_spree/application_record.rb | 5 + .../datashift_spree/application.html.erb | 15 + bin/rails | 14 + config/routes.rb | 2 + datashift_spree.gemspec | 46 +- lib/datashift_spree.rb | 28 +- lib/datashift_spree/engine.rb | 5 + lib/datashift_spree/exceptions.rb | 2 +- lib/datashift_spree/version.rb | 6 +- lib/loaders/spree/image_loader.rb | 2 +- lib/loaders/spree/product_loader.rb | 4 +- lib/loaders/spree/product_populator.rb | 19 +- lib/loaders/spree/promotions_rules_actions.rb | 2 +- lib/loaders/spree/shopify_order_migrator.rb | 2 +- .../spree/shopify_promotions_migrator.rb | 2 +- lib/tasks/datashift_spree_tasks.rake | 4 + lib/thor/spree/products_images.thor | 10 +- lib/thor/spree/shopify.thor | 4 +- lib/thor/spree/templates.thor | 37 ++ spec/Gemfile | 43 +- spec/Gemfile.lock | 419 ++++++++++++++++++ spec/datashift_spree.thor | 4 +- spec/datashift_spree/spree_exporter_spec.rb | 1 - spec/datashift_spree/spree_generator_spec.rb | 2 +- .../spree_images_loader_spec.rb | 26 +- spec/datashift_spree/spree_loader_spec.rb | 12 +- .../spree_taxons_loader_spec.rb | 4 +- spec/datashift_spree/spree_thor_spec.rb | 4 +- .../spree_variants_loader_spec.rb | 4 +- spec/spec_helper.rb | 37 +- spec/support/product_loading.rb | 2 +- spec/support/sandbox_helper.rb | 12 +- test/datashift_spree_test.rb | 7 + test/dummy/.ruby-version | 1 + test/dummy/Rakefile | 6 + test/dummy/app/assets/config/manifest.js | 3 + test/dummy/app/assets/images/.keep | 0 .../app/assets/stylesheets/application.css | 15 + .../app/channels/application_cable/channel.rb | 4 + .../channels/application_cable/connection.rb | 4 + .../app/controllers/application_controller.rb | 2 + test/dummy/app/controllers/concerns/.keep | 0 test/dummy/app/helpers/application_helper.rb | 2 + .../dummy/app/javascript/packs/application.js | 15 + test/dummy/app/jobs/application_job.rb | 7 + test/dummy/app/mailers/application_mailer.rb | 4 + test/dummy/app/models/application_record.rb | 3 + test/dummy/app/models/concerns/.keep | 0 .../app/views/layouts/application.html.erb | 14 + test/dummy/app/views/layouts/mailer.html.erb | 13 + test/dummy/app/views/layouts/mailer.text.erb | 1 + test/dummy/bin/rails | 4 + test/dummy/bin/rake | 4 + test/dummy/bin/setup | 33 ++ test/dummy/config.ru | 5 + test/dummy/config/application.rb | 19 + test/dummy/config/boot.rb | 5 + test/dummy/config/cable.yml | 10 + test/dummy/config/database.yml | 25 ++ test/dummy/config/environment.rb | 5 + test/dummy/config/environments/development.rb | 62 +++ test/dummy/config/environments/production.rb | 112 +++++ test/dummy/config/environments/test.rb | 48 ++ .../application_controller_renderer.rb | 8 + test/dummy/config/initializers/assets.rb | 12 + .../initializers/backtrace_silencers.rb | 7 + .../initializers/content_security_policy.rb | 28 ++ .../config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 + test/dummy/config/initializers/inflections.rb | 16 + test/dummy/config/initializers/mime_types.rb | 4 + .../config/initializers/wrap_parameters.rb | 14 + test/dummy/config/locales/en.yml | 33 ++ test/dummy/config/puma.rb | 38 ++ test/dummy/config/routes.rb | 3 + test/dummy/config/spring.rb | 6 + test/dummy/config/storage.yml | 34 ++ test/dummy/lib/assets/.keep | 0 test/dummy/log/.keep | 0 test/dummy/public/404.html | 67 +++ test/dummy/public/422.html | 67 +++ test/dummy/public/500.html | 66 +++ .../public/apple-touch-icon-precomposed.png | 0 test/dummy/public/apple-touch-icon.png | 0 test/dummy/public/favicon.ico | 0 test/integration/navigation_test.rb | 7 + test/test_helper.rb | 19 + 108 files changed, 2543 insertions(+), 222 deletions(-) create mode 100644 .idea/datashift_spree.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 .idea/workspace.xml___jb_tmp___ create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 MIT-LICENSE create mode 100644 README.md create mode 100644 Rakefile delete mode 100644 VERSION create mode 100644 app/assets/config/datashift_spree_manifest.js create mode 100644 app/assets/images/datashift_spree/.keep create mode 100644 app/assets/stylesheets/datashift_spree/application.css create mode 100644 app/controllers/datashift_spree/application_controller.rb create mode 100644 app/helpers/datashift_spree/application_helper.rb create mode 100644 app/jobs/datashift_spree/application_job.rb create mode 100644 app/mailers/datashift_spree/application_mailer.rb create mode 100644 app/models/datashift_spree/application_record.rb create mode 100644 app/views/layouts/datashift_spree/application.html.erb create mode 100755 bin/rails create mode 100644 config/routes.rb create mode 100644 lib/datashift_spree/engine.rb create mode 100644 lib/tasks/datashift_spree_tasks.rake create mode 100644 lib/thor/spree/templates.thor create mode 100644 spec/Gemfile.lock create mode 100644 test/datashift_spree_test.rb create mode 100644 test/dummy/.ruby-version create mode 100644 test/dummy/Rakefile create mode 100644 test/dummy/app/assets/config/manifest.js create mode 100644 test/dummy/app/assets/images/.keep create mode 100644 test/dummy/app/assets/stylesheets/application.css create mode 100644 test/dummy/app/channels/application_cable/channel.rb create mode 100644 test/dummy/app/channels/application_cable/connection.rb create mode 100644 test/dummy/app/controllers/application_controller.rb create mode 100644 test/dummy/app/controllers/concerns/.keep create mode 100644 test/dummy/app/helpers/application_helper.rb create mode 100644 test/dummy/app/javascript/packs/application.js create mode 100644 test/dummy/app/jobs/application_job.rb create mode 100644 test/dummy/app/mailers/application_mailer.rb create mode 100644 test/dummy/app/models/application_record.rb create mode 100644 test/dummy/app/models/concerns/.keep create mode 100644 test/dummy/app/views/layouts/application.html.erb create mode 100644 test/dummy/app/views/layouts/mailer.html.erb create mode 100644 test/dummy/app/views/layouts/mailer.text.erb create mode 100755 test/dummy/bin/rails create mode 100755 test/dummy/bin/rake create mode 100755 test/dummy/bin/setup create mode 100644 test/dummy/config.ru create mode 100644 test/dummy/config/application.rb create mode 100644 test/dummy/config/boot.rb create mode 100644 test/dummy/config/cable.yml create mode 100644 test/dummy/config/database.yml create mode 100644 test/dummy/config/environment.rb create mode 100644 test/dummy/config/environments/development.rb create mode 100644 test/dummy/config/environments/production.rb create mode 100644 test/dummy/config/environments/test.rb create mode 100644 test/dummy/config/initializers/application_controller_renderer.rb create mode 100644 test/dummy/config/initializers/assets.rb create mode 100644 test/dummy/config/initializers/backtrace_silencers.rb create mode 100644 test/dummy/config/initializers/content_security_policy.rb create mode 100644 test/dummy/config/initializers/cookies_serializer.rb create mode 100644 test/dummy/config/initializers/filter_parameter_logging.rb create mode 100644 test/dummy/config/initializers/inflections.rb create mode 100644 test/dummy/config/initializers/mime_types.rb create mode 100644 test/dummy/config/initializers/wrap_parameters.rb create mode 100644 test/dummy/config/locales/en.yml create mode 100644 test/dummy/config/puma.rb create mode 100644 test/dummy/config/routes.rb create mode 100644 test/dummy/config/spring.rb create mode 100644 test/dummy/config/storage.yml create mode 100644 test/dummy/lib/assets/.keep create mode 100644 test/dummy/log/.keep create mode 100644 test/dummy/public/404.html create mode 100644 test/dummy/public/422.html create mode 100644 test/dummy/public/500.html create mode 100644 test/dummy/public/apple-touch-icon-precomposed.png create mode 100644 test/dummy/public/apple-touch-icon.png create mode 100644 test/dummy/public/favicon.ico create mode 100644 test/integration/navigation_test.rb create mode 100644 test/test_helper.rb diff --git a/.gitignore b/.gitignore index 8527661..9ebd6cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,53 +1,9 @@ -# DATASHIFT - -dummy -spec/.bundle -spec/dummy -spec/dummy/** -spec/logs -spec/fixtures/results -/spec/MissingAttachmentRecords -/spec/tmp/* -/spec/rspec_spree_sandbox -/spec/rspec_spree_sandbox/* - -sandbox -sandbox/** - -# developing a gem so don't commit lock file -Gemfile.lock - -*.gem -.~lock.* -*~ -*.cache -*.log -*.pid -*.tmproj -*.sw? -.idea -logs -logs/** -public -public/** - -MissingAttachmentRecords - -nbproject -Thumbs.db - -*.rbc -*.sassc -.sass-cache -capybara-*.html -.rspec -/.bundle -/vendor/bundle -/log/* -/tmp/* -/db/*.sqlite3 -/public/system/* -/coverage/ -**.orig -rerun.txt -pickle-email-*.html +.bundle/ +log/*.log +pkg/ +test/dummy/db/*.sqlite3 +test/dummy/db/*.sqlite3-journal +test/dummy/db/*.sqlite3-* +test/dummy/log/*.log +test/dummy/storage/ +test/dummy/tmp/ diff --git a/.idea/datashift_spree.iml b/.idea/datashift_spree.iml new file mode 100644 index 0000000..ddcf659 --- /dev/null +++ b/.idea/datashift_spree.iml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..18d9fdb --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..865422c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..2762a44 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1581507095973 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml___jb_tmp___ b/.idea/workspace.xml___jb_tmp___ new file mode 100644 index 0000000..56e6c9f --- /dev/null +++ b/.idea/workspace.xml___jb_tmp___ @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +