Skip to content

Commit

Permalink
Merge pull request #42 from vinsol-spree-contrib/product_subscription…
Browse files Browse the repository at this point in the history
…s_update

Change items_subscriptions to product_subscriptions
  • Loading branch information
jatin-baweja authored Nov 30, 2016
2 parents 7192fca + cc32ce9 commit 518bb31
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module SpreeItemsSubscriptions
module SpreeProductSubscriptions
module Generators
class SeedGenerator < Rails::Generators::Base
source_root File.expand_path("../../templates", __FILE__)
Expand Down
2 changes: 0 additions & 2 deletions lib/spree_items_subscriptions.rb

This file was deleted.

2 changes: 2 additions & 0 deletions lib/spree_product_subscriptions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'spree_core'
require 'spree_product_subscriptions/engine'
Original file line number Diff line number Diff line change
@@ -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|
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 518bb31

Please sign in to comment.