Refactoring digital shipping calculation and display

* removed the deface override that modified the checkout/_delivery partial
* created custom digital delivery calculator
* removed digital_shipping_method from Spree::Order. Moved logic to available_shipping_methods monkey patch

The main goal was to eliminate the shipping method detection logic from the _delivery partial.
This was a bit of a hack all along and didn't really present the correct information to the underlying
order logic (i.e. rate_hash.blank? would return true when there was no shipping options available).
This should be more future proof and make overriding another aspect of the delivery process easier.
This commit is contained in:
Michael Bianco
2012-06-23 19:28:51 -04:00
parent 71340444c1
commit 049770056d
9 changed files with 64 additions and 72 deletions

View File

@@ -1,9 +1,9 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_digital'
s.version = '1.0.0'
s.version = '1.1.0'
s.summary = ''
s.description = 'This gem is supposed to be used in connection with spree_core. It was tested with spree_core 0.66.99 but it might work with newer versions as well.'
s.description = 'Add digital download functionality to spree'
s.author = 'funkensturm.'
s.homepage = 'http://www.funkensturm.com'
s.files = `git ls-files`.split("\n")
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'
s.required_ruby_version = '>= 1.8.7'
s.add_dependency('spree_core', '>= 1.0.0')
s.add_dependency('spree_core', '>= 1.1.0')
# test suite
s.add_development_dependency 'shoulda-matchers'