spree_active_sale 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +26 -0
- data/README.md +100 -0
- data/app/assets/javascripts/admin/spree_active_sale.js +1 -0
- data/app/assets/javascripts/store/spree_active_sale.js +1 -0
- data/app/assets/stylesheets/admin/spree_active_sale.css +3 -0
- data/app/assets/stylesheets/store/spree_active_sale.css +3 -0
- data/app/controllers/products_controller_decorator.rb +25 -0
- data/app/controllers/taxons_controller_decorator.rb +18 -0
- data/app/models/spree/active_sale/event.rb +57 -0
- data/app/models/spree/active_sale.rb +16 -0
- data/app/models/spree/product_decorator.rb +11 -0
- data/app/models/spree/taxon_decorator.rb +7 -0
- data/app/models/spree/variant_decorator.rb +7 -0
- data/app/models/spree.rb +5 -0
- data/config/locales/en.yml +12 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20130119154826_create_active_sales.rb +9 -0
- data/db/migrate/20130119182020_create_events.rb +19 -0
- data/lib/generators/spree_active_sale/install/install_generator.rb +29 -0
- data/lib/spree_active_sale/engine.rb +22 -0
- data/lib/spree_active_sale.rb +2 -0
- data/lib/tasks/spree_active_sale.rake +9 -0
- metadata +217 -0
data/LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Copyright (c) 2013 Surya Tripathi
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification,
|
5
|
+
are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice,
|
8
|
+
this list of conditions and the following disclaimer.
|
9
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
* Neither the name Spree nor the names of its contributors may be used to
|
13
|
+
endorse or promote products derived from this software without specific
|
14
|
+
prior written permission.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
20
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
21
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
22
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
23
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
26
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
Welcome to Spree Active Sale
|
2
|
+
============================
|
3
|
+
|
4
|
+
Spree Active Sale makes it easy to handle flash sale/ daily deals behavior with in a spree application. By this, you can have a variant, product, or group number of products in a taxon, attach that variant, product, or taxon to a sale event with a start and end date for scheduling. So that, your sale event will only be available between the dates given and when the sale is gone(i.e. not live), it will not be accessible at any point till you create a new one or re-schedule the same.
|
5
|
+
|
6
|
+
|
7
|
+
FEATURES
|
8
|
+
========
|
9
|
+
|
10
|
+
* Provides a quick implementation of flash sales/ daily deals behavior by a easy scheduler a.k.a *ActiveSale*.
|
11
|
+
* Supplies methods for class <tt>Spree::ActiveSale::Event</tt> like: <tt>live</tt>, <tt>active</tt>, <tt>live_active</tt>, <tt>hidden</tt>, <tt>live_active_and_hidden</tt>, <tt>upcoming_events</tt>, <tt>starting_today</tt>, <tt>ending_today</tt>.
|
12
|
+
* <tt>Spree::ActiveSale::Event.live</tt> lists all sale events which are currently and suppose to be running.
|
13
|
+
* <tt>Spree::ActiveSale::Event.active</tt> lists all sale events which are active, they may or may not be live. You can do <tt>Spree::ActiveSale::Event.active(false)</tt> to list all inactive sale events.
|
14
|
+
* <tt>Spree::ActiveSale::Event.live_active</tt> lists all sale events which are live and active, which includes hidden sales, too. Doing <tt>Spree::ActiveSale::Event.live_active(false)</tt> will list all sale events which live and not active.
|
15
|
+
* <tt>Spree::ActiveSale::Event.hidden</tt> lists all sale events which are hidden, they may or may not be live. You can do <tt>Spree::ActiveSale::Event.hidden(false)</tt> to list sale events which are not hidden.
|
16
|
+
* <tt>Spree::ActiveSale::Event.live_active_and_hidden</tt> lists all sale events which are live, active, and hidden. <tt>Spree::ActiveSale::Event.live_active_and_hidden(:active => false, :hidden => false)</tt> will list inactive and not hidden sale events, you can change values accordingly.
|
17
|
+
* <tt>Spree::ActiveSale::Event.upcoming_events</tt> lists all scheduled sale events which are going to be live in future.
|
18
|
+
* <tt>Spree::ActiveSale::Event.starting_today</tt> lists all sale events which are going to or have start today.
|
19
|
+
* <tt>Spree::ActiveSale::Event.ending_today</tt> lists all sale events which are going to expire today.
|
20
|
+
* <tt>Spree::ActiveSale::Event.is_live?(instance)</tt> here instance can be an object of "Spree::ActiveSale::Event", "Spree::Variant", "Spree::Product", or "Spree::Taxon" class, which simply says if sale event for that instance is accessible for users or not.
|
21
|
+
|
22
|
+
|
23
|
+
[![Dependency Status](https://gemnasium.com/suryart/spree_active_sale.png)](https://gemnasium.com/suryart/spree_active_sale)
|
24
|
+
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/suryart/spree_active_sale)
|
25
|
+
[![Build Status](https://travis-ci.org/suryart/spree_active_sale.png?branch=1-0-5)](https://travis-ci.org/suryart/spree_active_sale)
|
26
|
+
|
27
|
+
INSTALLATION
|
28
|
+
============
|
29
|
+
|
30
|
+
In a rails application with Spree installed include the following line in your Gemfile:
|
31
|
+
* To use the master branch from github:
|
32
|
+
|
33
|
+
`gem 'spree_active_sale' , :git => 'git://github.com/suryart/spree_active_sale.git'`
|
34
|
+
|
35
|
+
|
36
|
+
* Or get it from rubygems.org:
|
37
|
+
|
38
|
+
|
39
|
+
`gem 'spree_active_sale'`
|
40
|
+
|
41
|
+
Then run the following commands:
|
42
|
+
|
43
|
+
$ bundle install
|
44
|
+
$ rake spree_active_sale:install
|
45
|
+
$ rake db:migrate
|
46
|
+
$ rails s
|
47
|
+
|
48
|
+
|
49
|
+
Example
|
50
|
+
=======
|
51
|
+
|
52
|
+
* Get a taxon in rails console:
|
53
|
+
|
54
|
+
`taxon = Taxon.last`
|
55
|
+
|
56
|
+
* Create and *ActiveSale*:
|
57
|
+
|
58
|
+
`active_sale = Spree::ActiveSale.create name: "January 2013 sales"`
|
59
|
+
output:
|
60
|
+
|
61
|
+
`#<Spree::ActiveSale id: 1, name: "January 2013 sales", created_at: "2013-01-20 20:33:57", updated_at: "2013-01-20 20:33:57">`
|
62
|
+
|
63
|
+
* Then create an *Event* under this sale by:
|
64
|
+
|
65
|
+
`event = taxon.active_sale_event.create name: "January 2013 sales", active_sale_id: active_sale.id, start_date: Time.now, end_date: Time.now+1.day, permalink: taxon.permalink `
|
66
|
+
|
67
|
+
* Now try to access this taxon in browser, there should be no other taxon/ product link accessible except the one we've created just now.
|
68
|
+
|
69
|
+
|
70
|
+
TODOs
|
71
|
+
=====
|
72
|
+
|
73
|
+
* Improve testing and write more test cases.
|
74
|
+
* Provide an admin interface for creating/ scheduling, managing, or re-scheduling sales.
|
75
|
+
|
76
|
+
Testing
|
77
|
+
-------
|
78
|
+
|
79
|
+
Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
|
80
|
+
|
81
|
+
$ bundle
|
82
|
+
$ bundle exec rake test_app
|
83
|
+
$ bundle exec rspec spec
|
84
|
+
|
85
|
+
Contributing
|
86
|
+
============
|
87
|
+
|
88
|
+
1. [Fork](https://help.github.com/articles/fork-a-repo) the project
|
89
|
+
2. Make one or more well commented and clean commits to the repository. You can make a new branch here if you are modifying more than one part or feature.
|
90
|
+
3. Perform a [pull request](https://help.github.com/articles/using-pull-requests) in github's web interface.
|
91
|
+
|
92
|
+
NOTE
|
93
|
+
====
|
94
|
+
|
95
|
+
The current version supports Spree 1.3.0 or above. Older versions of Spree are unlikely to work, so attempt at your own risk.
|
96
|
+
|
97
|
+
|
98
|
+
License
|
99
|
+
---------
|
100
|
+
Copyright (c) 2013 Surya Tripathi, released under the New BSD License
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require admin/spree_core
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require store/spree_core
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Spree
|
2
|
+
ProductsController.class_eval do
|
3
|
+
HTTP_REFERER_REGEXP = /^https?:\/\/[^\/]+\/t\/([a-z0-9\-\/]+)$/ unless defined? HTTP_REFERER_REGEXP
|
4
|
+
|
5
|
+
def show
|
6
|
+
@product = Spree::Product.active.find_by_permalink!(params[:id])
|
7
|
+
return unless @product
|
8
|
+
|
9
|
+
if Spree::ActiveSale::Event.is_live? @product
|
10
|
+
@variants = Spree::Variant.active.includes([:option_values, :images]).where(:product_id => @product.id)
|
11
|
+
@product_properties = Spree::ProductProperty.includes(:property).where(:product_id => @product.id)
|
12
|
+
|
13
|
+
referer = request.env['HTTP_REFERER']
|
14
|
+
|
15
|
+
if referer && referer.match(HTTP_REFERER_REGEXP)
|
16
|
+
@taxon = Spree::Taxon.find_by_permalink($1)
|
17
|
+
end
|
18
|
+
|
19
|
+
respond_with(@product)
|
20
|
+
else
|
21
|
+
redirect_to root_url, :error => t('spree.active_sale.event.flash.error')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Spree
|
2
|
+
TaxonsController.class_eval do
|
3
|
+
|
4
|
+
def show
|
5
|
+
@taxon = Spree::Taxon.find_by_permalink!(params[:id])
|
6
|
+
return unless @taxon
|
7
|
+
|
8
|
+
if Spree::ActiveSale::Event.is_live? @taxon
|
9
|
+
@searcher = Spree::Config.searcher_class.new(params.merge(:taxon => @taxon.id))
|
10
|
+
@products = @searcher.retrieve_products
|
11
|
+
|
12
|
+
respond_with(@taxon)
|
13
|
+
else
|
14
|
+
redirect_to root_url, :error => t('spree.active_sale.event.flash.error')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# EVENTS
|
2
|
+
# Events represent an entity for active sale in a flash sale/ daily deal.
|
3
|
+
# There can be many events for one sale.
|
4
|
+
#
|
5
|
+
module Spree
|
6
|
+
class ActiveSale::Event < ActiveRecord::Base
|
7
|
+
belongs_to :eventable, :polymorphic => true
|
8
|
+
belongs_to :active_sale
|
9
|
+
|
10
|
+
attr_accessible :description, :end_date, :eventable_id, :eventable_type, :is_active, :is_hidden, :name, :permalink, :active_sale_id, :start_date
|
11
|
+
|
12
|
+
validates :name, :presence => true
|
13
|
+
validates :permalink, :presence => true
|
14
|
+
validates :start_date, :presence => true
|
15
|
+
validates :end_date, :presence => true
|
16
|
+
validates :active_sale_id, :presence => true
|
17
|
+
validate :validate_start_and_end_date
|
18
|
+
|
19
|
+
scope :live, lambda { where("(start_date <= :start_date AND end_date >= :end_date) OR is_permanent = :is_permanent", { :start_date => Time.now, :end_date => Time.now, :is_permanent => true }) }
|
20
|
+
scope :active, lambda { |*args| where(:is_active => valid_argument(args)) }
|
21
|
+
scope :hidden, lambda { |*args| where(:is_hidden => valid_argument(args)) }
|
22
|
+
scope :live_active, lambda { |*args| self.live.active(valid_argument(args)) }
|
23
|
+
scope :live_active_and_hidden, lambda { |*args|
|
24
|
+
args = [{}] if [nil, true, false].include? args.first
|
25
|
+
self.live.active(valid_argument([args.first[:active]])).hidden(valid_argument([args.first[:hidden]]))
|
26
|
+
}
|
27
|
+
scope :upcoming_events, lambda { where("start_date > :start_date", { :start_date => Time.now }) }
|
28
|
+
scope :starting_today, lambda { where(:start_date => Time.now.at_beginning_of_day..Time.now.end_of_day) }
|
29
|
+
scope :ending_today, lambda { where(:end_date => Time.now.at_beginning_of_day..Time.now.end_of_day) }
|
30
|
+
|
31
|
+
def validate_start_and_end_date
|
32
|
+
errors.add(:start_date, I18n.t('spree.active_sale.event.validation.errors.invalid_dates')) if (self.start_date and self.end_date) and (self.start_date > self.end_date)
|
33
|
+
end
|
34
|
+
|
35
|
+
def live?
|
36
|
+
current_time = Time.now
|
37
|
+
(self.start_date <= current_time and self.end_date >= current_time) or self.is_permanent?
|
38
|
+
end
|
39
|
+
|
40
|
+
def live_and_active?
|
41
|
+
self.live? and self.is_active?
|
42
|
+
end
|
43
|
+
|
44
|
+
# Spree::ActiveSale::Event.is_live? method
|
45
|
+
# should only/ always represents live and active events and not just live events.
|
46
|
+
def self.is_live? object
|
47
|
+
object_class_name = object.class.name
|
48
|
+
return (object.live_and_active?) if object_class_name == self.name
|
49
|
+
%w(Spree::Product Spree::Variant Spree::Taxon).include?(object_class_name) ? object.live? : false
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
def self.valid_argument args
|
54
|
+
(args.first == nil || args.first == true)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# ActiveSales
|
2
|
+
# Active sales represent an entity for one sale at a time.
|
3
|
+
# For example: 'January 2013' sale, which can have many sale events in it.
|
4
|
+
#
|
5
|
+
module Spree
|
6
|
+
class ActiveSale < ActiveRecord::Base
|
7
|
+
has_many :events, :class_name => "Spree::ActiveSale::Event"
|
8
|
+
belongs_to :taxon, :class_name => "Spree::Taxon"
|
9
|
+
|
10
|
+
attr_accessible :name
|
11
|
+
|
12
|
+
validates :name, :presence => true
|
13
|
+
|
14
|
+
accepts_nested_attributes_for :events, :allow_destroy => true, :reject_if => lambda { |attrs| attrs.all? { |k, v| v.blank? } }
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Spree::Product.class_eval do
|
2
|
+
has_many :active_sale_events, :as => :eventable, :class_name => "Spree::ActiveSale::Event"
|
3
|
+
|
4
|
+
def find_live_taxons
|
5
|
+
Spree::ActiveSale::Event.live_active.where(:eventable_type => "Spree::Taxon", :eventable_id => self.taxons.map(&:id))
|
6
|
+
end
|
7
|
+
|
8
|
+
def live?
|
9
|
+
!self.active_sale_events.detect{ |event| (event.live_and_active?) }.nil? || !self.find_live_taxons.blank?
|
10
|
+
end
|
11
|
+
end
|
data/app/models/spree.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
|
+
|
4
|
+
en:
|
5
|
+
spree:
|
6
|
+
active_sale:
|
7
|
+
event:
|
8
|
+
validation:
|
9
|
+
errors:
|
10
|
+
invalid_dates: "Event's start date can not be greater than end date."
|
11
|
+
flash:
|
12
|
+
error: "The page you are looking for is no longer available."
|
data/config/routes.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateEvents < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :spree_active_sale_events do |t|
|
4
|
+
t.string :name
|
5
|
+
t.text :description
|
6
|
+
t.string :permalink
|
7
|
+
t.datetime :start_date
|
8
|
+
t.datetime :end_date
|
9
|
+
t.boolean :is_active, default: true
|
10
|
+
t.boolean :is_hidden, default: false
|
11
|
+
t.boolean :is_permanent, default: false
|
12
|
+
t.integer :eventable_id
|
13
|
+
t.string :eventable_type
|
14
|
+
t.integer :active_sale_id
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module SpreeActiveSale
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
|
5
|
+
def add_javascripts
|
6
|
+
append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_active_sale\n"
|
7
|
+
append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_active_sale\n"
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_stylesheets
|
11
|
+
inject_into_file 'app/assets/stylesheets/store/all.css', " *= require store/spree_active_sale\n", :before => /\*\//, :verbose => true
|
12
|
+
inject_into_file 'app/assets/stylesheets/admin/all.css', " *= require admin/spree_active_sale\n", :before => /\*\//, :verbose => true
|
13
|
+
end
|
14
|
+
|
15
|
+
def add_migrations
|
16
|
+
run 'bundle exec rake railties:install:migrations FROM=spree_active_sale'
|
17
|
+
end
|
18
|
+
|
19
|
+
def run_migrations
|
20
|
+
res = ask 'Would you like to run the migrations now? [Y/n]'
|
21
|
+
if res == '' || res.downcase == 'y'
|
22
|
+
run 'bundle exec rake db:migrate'
|
23
|
+
else
|
24
|
+
puts 'Skipping rake db:migrate, don\'t forget to run it!'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module SpreeActiveSale
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
require 'spree/core'
|
4
|
+
isolate_namespace Spree
|
5
|
+
engine_name 'spree_active_sale'
|
6
|
+
|
7
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
8
|
+
|
9
|
+
# use rspec for tests
|
10
|
+
config.generators do |g|
|
11
|
+
g.test_framework :rspec
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.activate
|
15
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
|
16
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
config.to_prepare &method(:activate).to_proc
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,217 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spree_active_sale
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.6
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Surya Tripathi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-01-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: spree_core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.3.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.3.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: capybara
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.0.2
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.2
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: coffee-rails
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: factory_girl
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 4.2.0
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 4.2.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: ffaker
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rspec-rails
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '2.9'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '2.9'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: guard-rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '2.3'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: sass-rails
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: sqlite3
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
description: Spree Active Sale makes it easy to handle flash sale/ daily deals behavior
|
159
|
+
with in a spree application. By this, you can have a variant, product, or group
|
160
|
+
number of products in a taxon, attach that variant, product, or taxon to a sale
|
161
|
+
event with a start and end date for scheduling. So that, your sale event will only
|
162
|
+
be available between the dates given and when the sale is gone(i.e. not live), it
|
163
|
+
will not be accessible at any point till you create a new one or re-schedule the
|
164
|
+
same.
|
165
|
+
email: raj.surya19@gmail.com
|
166
|
+
executables: []
|
167
|
+
extensions: []
|
168
|
+
extra_rdoc_files: []
|
169
|
+
files:
|
170
|
+
- LICENSE
|
171
|
+
- README.md
|
172
|
+
- app/models/spree.rb
|
173
|
+
- app/models/spree/product_decorator.rb
|
174
|
+
- app/models/spree/active_sale/event.rb
|
175
|
+
- app/models/spree/taxon_decorator.rb
|
176
|
+
- app/models/spree/variant_decorator.rb
|
177
|
+
- app/models/spree/active_sale.rb
|
178
|
+
- app/assets/stylesheets/admin/spree_active_sale.css
|
179
|
+
- app/assets/stylesheets/store/spree_active_sale.css
|
180
|
+
- app/assets/javascripts/admin/spree_active_sale.js
|
181
|
+
- app/assets/javascripts/store/spree_active_sale.js
|
182
|
+
- app/controllers/products_controller_decorator.rb
|
183
|
+
- app/controllers/taxons_controller_decorator.rb
|
184
|
+
- config/routes.rb
|
185
|
+
- config/locales/en.yml
|
186
|
+
- lib/tasks/spree_active_sale.rake
|
187
|
+
- lib/generators/spree_active_sale/install/install_generator.rb
|
188
|
+
- lib/spree_active_sale/engine.rb
|
189
|
+
- lib/spree_active_sale.rb
|
190
|
+
- db/migrate/20130119154826_create_active_sales.rb
|
191
|
+
- db/migrate/20130119182020_create_events.rb
|
192
|
+
homepage: https://github.com/suryart/spree_active_sale
|
193
|
+
licenses: []
|
194
|
+
post_install_message:
|
195
|
+
rdoc_options: []
|
196
|
+
require_paths:
|
197
|
+
- lib
|
198
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
+
none: false
|
200
|
+
requirements:
|
201
|
+
- - ! '>='
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: 1.9.2
|
204
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
|
+
none: false
|
206
|
+
requirements:
|
207
|
+
- - ! '>='
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
requirements:
|
211
|
+
- none
|
212
|
+
rubyforge_project:
|
213
|
+
rubygems_version: 1.8.24
|
214
|
+
signing_key:
|
215
|
+
specification_version: 3
|
216
|
+
summary: Spree Active Sale to handle flash sales/ daily deals behavior for spree.
|
217
|
+
test_files: []
|