From cc32ce95720d735146b1e3ce26b66a6a7cc8b640 Mon Sep 17 00:00:00 2001 From: Jatin Baweja Date: Wed, 30 Nov 2016 17:18:36 +0530 Subject: [PATCH] Change items_subscriptions to product_subscriptions --- Gemfile.lock | 6 +++--- README.md | 16 ++++++++-------- Rakefile | 2 +- ...iptions.js => spree_product_subscriptions.js} | 0 ...iptions.js => spree_product_subscriptions.js} | 0 ...tions.css => spree_product_subscriptions.css} | 0 ...ons.scss => spree_product_subscriptions.scss} | 0 bin/rails | 2 +- .../install/install_generator.rb | 12 ++++++------ .../seed_generator.rb | 2 +- lib/spree_items_subscriptions.rb | 2 -- lib/spree_product_subscriptions.rb | 2 ++ .../engine.rb | 4 ++-- .../factories.rb | 0 spec/spec_helper.rb | 2 +- ...emspec => spree_product_subscriptions.gemspec | 2 +- 16 files changed, 26 insertions(+), 26 deletions(-) rename app/assets/javascripts/spree/backend/{spree_items_subscriptions.js => spree_product_subscriptions.js} (100%) rename app/assets/javascripts/spree/frontend/{spree_items_subscriptions.js => spree_product_subscriptions.js} (100%) rename app/assets/stylesheets/spree/backend/{spree_items_subscriptions.css => spree_product_subscriptions.css} (100%) rename app/assets/stylesheets/spree/frontend/{spree_items_subscriptions.scss => spree_product_subscriptions.scss} (100%) rename lib/generators/{spree_items_subscriptions => spree_product_subscriptions}/install/install_generator.rb (72%) rename lib/generators/{spree_items_subscriptions => spree_product_subscriptions}/seed_generator.rb (91%) delete mode 100644 lib/spree_items_subscriptions.rb create mode 100644 lib/spree_product_subscriptions.rb rename lib/{spree_items_subscriptions => spree_product_subscriptions}/engine.rb (84%) rename lib/{spree_items_subscriptions => spree_product_subscriptions}/factories.rb (100%) rename spree_items_subscriptions.gemspec => spree_product_subscriptions.gemspec (96%) diff --git a/Gemfile.lock b/Gemfile.lock index 516fd83d..b9ade4bf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,7 +69,7 @@ GIT PATH remote: . specs: - spree_items_subscriptions (3.1.0) + spree_product_subscriptions (3.1.0) spree_core (~> 3.1.0) GEM @@ -386,8 +386,8 @@ DEPENDENCIES simplecov (~> 0.11.2) spree! spree_auth_devise! - spree_items_subscriptions! + spree_product_subscriptions! sqlite3 (~> 1.3.11) BUNDLED WITH - 1.13.1 + 1.13.6 diff --git a/README.md b/README.md index 72e59bcd..48763b8f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -SpreeItemsSubscriptions -============= +Spree Product Subscriptions +=========================== -SpreeItemsSubscriptions is an extension to let users have time interval based subscription of products in a spree application. +Spree Product Subscriptions is an extension to let users have time interval based subscription of products in a spree application. * This extension allows the admin to create a subscribable product on the Admin end. @@ -12,22 +12,22 @@ SpreeItemsSubscriptions is an extension to let users have time interval based su Installation ------------ -Add spree_items_subscriptions to your Gemfile: +Add spree_product_subscriptions to your Gemfile: ```ruby -gem 'spree_items_subscriptions', github: 'vinsol/spree_items_subscriptions' +gem 'spree_product_subscriptions', github: 'vinsol-spree-contrib/spree_product_subscriptions' ``` Bundle your dependencies and run the installation generator: ```shell bundle -bundle exec rails g spree_items_subscriptions:install +bundle exec rails g spree_product_subscriptions:install ``` You can also seed the default data with: ```shell -bundle exec rails g spree_items_subscriptions:seed +bundle exec rails g spree_product_subscriptions:seed ``` Working @@ -70,7 +70,7 @@ When testing your applications integration with this extension you may use it's Simply add this require statement to your spec_helper: ```ruby -require 'spree_items_subscriptions/factories' +require 'spree_product_subscriptions/factories' ``` Credits diff --git a/Rakefile b/Rakefile index cb6f7851..bc356167 100644 --- a/Rakefile +++ b/Rakefile @@ -16,6 +16,6 @@ end desc 'Generates a dummy app for testing' task :test_app do - ENV['LIB_NAME'] = 'spree_items_subscriptions' + ENV['LIB_NAME'] = 'spree_product_subscriptions' Rake::Task['extension:test_app'].invoke end diff --git a/app/assets/javascripts/spree/backend/spree_items_subscriptions.js b/app/assets/javascripts/spree/backend/spree_product_subscriptions.js similarity index 100% rename from app/assets/javascripts/spree/backend/spree_items_subscriptions.js rename to app/assets/javascripts/spree/backend/spree_product_subscriptions.js diff --git a/app/assets/javascripts/spree/frontend/spree_items_subscriptions.js b/app/assets/javascripts/spree/frontend/spree_product_subscriptions.js similarity index 100% rename from app/assets/javascripts/spree/frontend/spree_items_subscriptions.js rename to app/assets/javascripts/spree/frontend/spree_product_subscriptions.js diff --git a/app/assets/stylesheets/spree/backend/spree_items_subscriptions.css b/app/assets/stylesheets/spree/backend/spree_product_subscriptions.css similarity index 100% rename from app/assets/stylesheets/spree/backend/spree_items_subscriptions.css rename to app/assets/stylesheets/spree/backend/spree_product_subscriptions.css diff --git a/app/assets/stylesheets/spree/frontend/spree_items_subscriptions.scss b/app/assets/stylesheets/spree/frontend/spree_product_subscriptions.scss similarity index 100% rename from app/assets/stylesheets/spree/frontend/spree_items_subscriptions.scss rename to app/assets/stylesheets/spree/frontend/spree_product_subscriptions.scss diff --git a/bin/rails b/bin/rails index 6240cc6e..7fa9eb36 100644 --- a/bin/rails +++ b/bin/rails @@ -1,7 +1,7 @@ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/spree_items_subscriptions/engine', __FILE__) +ENGINE_PATH = File.expand_path('../../lib/spree_product_subscriptions/engine', __FILE__) require 'rails/all' require 'rails/engine/commands' diff --git a/lib/generators/spree_items_subscriptions/install/install_generator.rb b/lib/generators/spree_product_subscriptions/install/install_generator.rb similarity index 72% rename from lib/generators/spree_items_subscriptions/install/install_generator.rb rename to lib/generators/spree_product_subscriptions/install/install_generator.rb index 962a2518..4d61dbbe 100644 --- a/lib/generators/spree_items_subscriptions/install/install_generator.rb +++ b/lib/generators/spree_product_subscriptions/install/install_generator.rb @@ -1,21 +1,21 @@ -module SpreeItemsSubscriptions +module SpreeProductSubscriptions module Generators class InstallGenerator < Rails::Generators::Base class_option :auto_run_migrations, :type => :boolean, :default => false def add_javascripts - append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/spree_items_subscriptions\n" - append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_items_subscriptions\n" + append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/spree_product_subscriptions\n" + append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_product_subscriptions\n" end def add_stylesheets - inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/spree_items_subscriptions\n", :before => /\*\//, :verbose => true - inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/spree_items_subscriptions\n", :before => /\*\//, :verbose => true + inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/spree_product_subscriptions\n", :before => /\*\//, :verbose => true + inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/spree_product_subscriptions\n", :before => /\*\//, :verbose => true end def add_migrations - run 'bundle exec rake railties:install:migrations FROM=spree_items_subscriptions' + run 'bundle exec rake railties:install:migrations FROM=spree_product_subscriptions' end def run_migrations diff --git a/lib/generators/spree_items_subscriptions/seed_generator.rb b/lib/generators/spree_product_subscriptions/seed_generator.rb similarity index 91% rename from lib/generators/spree_items_subscriptions/seed_generator.rb rename to lib/generators/spree_product_subscriptions/seed_generator.rb index 4c428d2d..c6fc80ef 100644 --- a/lib/generators/spree_items_subscriptions/seed_generator.rb +++ b/lib/generators/spree_product_subscriptions/seed_generator.rb @@ -1,4 +1,4 @@ -module SpreeItemsSubscriptions +module SpreeProductSubscriptions module Generators class SeedGenerator < Rails::Generators::Base source_root File.expand_path("../../templates", __FILE__) diff --git a/lib/spree_items_subscriptions.rb b/lib/spree_items_subscriptions.rb deleted file mode 100644 index 85ed6594..00000000 --- a/lib/spree_items_subscriptions.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'spree_core' -require 'spree_items_subscriptions/engine' diff --git a/lib/spree_product_subscriptions.rb b/lib/spree_product_subscriptions.rb new file mode 100644 index 00000000..8aed71f4 --- /dev/null +++ b/lib/spree_product_subscriptions.rb @@ -0,0 +1,2 @@ +require 'spree_core' +require 'spree_product_subscriptions/engine' diff --git a/lib/spree_items_subscriptions/engine.rb b/lib/spree_product_subscriptions/engine.rb similarity index 84% rename from lib/spree_items_subscriptions/engine.rb rename to lib/spree_product_subscriptions/engine.rb index 6152114c..26447190 100644 --- a/lib/spree_items_subscriptions/engine.rb +++ b/lib/spree_product_subscriptions/engine.rb @@ -1,8 +1,8 @@ -module SpreeItemsSubscriptions +module SpreeProductSubscriptions class Engine < Rails::Engine require 'spree/core' isolate_namespace Spree - engine_name 'spree_items_subscriptions' + engine_name 'spree_product_subscriptions' # use rspec for tests config.generators do |g| diff --git a/lib/spree_items_subscriptions/factories.rb b/lib/spree_product_subscriptions/factories.rb similarity index 100% rename from lib/spree_items_subscriptions/factories.rb rename to lib/spree_product_subscriptions/factories.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6d6b6aad..23c328ed 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,7 +30,7 @@ require 'spree/testing_support/preferences' require 'spree/testing_support/shoulda_matcher_configuration' require 'rspec/active_model/mocks' -require 'spree_items_subscriptions/factories' +require 'spree_product_subscriptions/factories' RSpec.configure do |config| config.mock_with :rspec diff --git a/spree_items_subscriptions.gemspec b/spree_product_subscriptions.gemspec similarity index 96% rename from spree_items_subscriptions.gemspec rename to spree_product_subscriptions.gemspec index 75babb78..f8f4eb23 100644 --- a/spree_items_subscriptions.gemspec +++ b/spree_product_subscriptions.gemspec @@ -1,7 +1,7 @@ # encoding: UTF-8 Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY - s.name = 'spree_items_subscriptions' + s.name = 'spree_product_subscriptions' s.version = '3.1.0' s.summary = 'Add gem summary here' s.description = 'Add (optional) gem description here'