Skip to content
This repository
Browse code

Update README and Rakefile.

  • Loading branch information...
commit 864a2c39453860403bf67c60ad49c7331fed7322 1 parent 6abce9c
Jeff Dutil authored November 15, 2012

Showing 2 changed files with 10 additions and 26 deletions. Show diff stats Hide diff stats

  1. 11  README.md
  2. 25  Rakefile
11  README.md
Source Rendered
@@ -9,7 +9,7 @@ Each VolumePrice contains the following values:
9 9
 
10 10
 1. **Variant:** Each VolumePrice is associated with a _Variant_, which is used to link products to particular prices.
11 11
 1. **Name:** The human readable reprentation of the quantity range (Ex. 10-100).  (Optional)
12  
-1. **Discount Type** The type of discount to apply.  Price: sets price to the amount specified. Dollar: subtracts specified amount from the Variant price.  Percent: subtracts the specific amounts percentage from the Variant price.
  12
+1. **Discount Type** The type of discount to apply.  **Price:** sets price to the amount specified. **Dollar:** subtracts specified amount from the Variant price.  **Percent:** subtracts the specified amounts percentage from the Variant price.
13 13
 1. **Range:** The quantity range for which the price is valid (See Below for Examples of Valid Ranges.)
14 14
 1. **Amount:** The price of the product if the line item quantity falls within the specified range.
15 15
 1. **Position:** Integer value for `acts_as_list` (Helps keep the volume prices in a defined order.)
@@ -25,11 +25,10 @@ Easily add volume pricing display to your product page:
25 25
 
26 26
       <%= render :partial => 'spree/products/volume_pricing', :locals => { :product => @product } %>
27 27
 
28  
-
29 28
 Ranges
30 29
 ======
31 30
 
32  
-Ranges are expressed as Strings and are similar to the format of a Range object in Ruby.  The lower numeber of the range is always inclusive.  If the range is defined with '..' then it also includes the upper end of the range.  If the range is defined with '...' then the upper end of the range is not inclusive.
  31
+Ranges are expressed as Strings and are similar to the format of a Range object in Ruby.  The lower number of the range is always inclusive.  If the range is defined with '..' then it also includes the upper end of the range.  If the range is defined with '...' then the upper end of the range is not inclusive.
33 32
 
34 33
 Ranges can also be defined as "open ended."  Open ended ranges are defined with an integer followed by a '+' character.  These ranges are inclusive of the integer and any value higher then the integer.
35 34
 
@@ -91,13 +90,11 @@ Additional Notes
91 90
 
92 91
 * The volume price is applied based on the total quantity ordered for a particular variant.  It does not apply different prices for the portion of the quantity that falls within a particular range.  Only the one price is used (although this would be an interesting configurable option if someone wanted to write a patch.)
93 92
 
94  
-
95 93
 Development
96 94
 ===========
97 95
 
98 96
 This extension uses the testing support from spree core. Once you have installed the bundle you will be able to create the test app and run the rake tests. The factories from spree/core are available within the tests.
99 97
 
100 98
       bundle install
101  
-      rake test_app
102  
-      rake
103  
-
  99
+      bundle exec rake test_app
  100
+      bundle exec rspec spec
25  Rakefile
... ...
@@ -1,28 +1,15 @@
1  
-# encoding: utf-8
2  
-require 'rake'
3  
-require 'rake/testtask'
4  
-require 'rake/packagetask'
5  
-require 'rubygems/package_task'
  1
+require 'bundler'
  2
+Bundler::GemHelper.install_tasks
  3
+
6 4
 require 'rspec/core/rake_task'
7 5
 require 'spree/core/testing_support/common_rake'
8 6
 
9 7
 RSpec::Core::RakeTask.new
10 8
 
11  
-task :default => :spec
12  
-
13  
-spec = eval(File.read('spree_volume_pricing.gemspec'))
14  
-
15  
-Gem::PackageTask.new(spec) do |p|
16  
-  p.gem_spec = spec
17  
-end
18  
-
19  
-task :release => :package do
20  
-  require 'rake/gemcutter'
21  
-  Rake::Gemcutter::Tasks.new(spec).define
22  
-  Rake::Task['gem:push'].invoke
23  
-end
  9
+task :default => [:spec]
24 10
 
  11
+desc 'Generates a dummy app for testing'
25 12
 task :test_app do
26 13
   ENV['LIB_NAME'] = 'spree_volume_pricing'
27 14
   Rake::Task['common:test_app'].invoke
28  
-end
  15
+end

0 notes on commit 864a2c3

Please sign in to comment.
Something went wrong with that request. Please try again.