oklas / spree_flash_sales

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpreeFlashSales

Code Climate Dependency Status Coverage Status Build Status

Adds "flash sale" functionality to Spree engine. Tested with Spree 4+.

Check the specs for how it works.

Installation

Add spree_flash_sales to your Gemfile:

gem 'spree_flash_sales'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_flash_sales:install

If you don't run the generators make sure you append the following to your js and css files.

Javascript stuff:

  append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_flash_sales"
  append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_flash_sales"
  inject_into_file 'app/assets/stylesheets/store/all.css', " *= require store/spree_flash_sales"
  inject_into_file 'app/assets/stylesheets/admin/all.css', " *= require admin/spree_flash_sales"

Testing

Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.

bundle
bundle exec rake test_app
bundle exec rspec spec

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_flash_sales/factories'

Special Thanks

https://github.com/suryart/spree_active_sale for inspiration and example code.

Copyright (c) 2013 [ecl1pse], released under the New BSD License

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Ruby 75.2%Language:HTML 20.1%Language:JavaScript 2.3%Language:CoffeeScript 1.6%Language:CSS 0.9%