kuehne-nagel-despatch-interface 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,59 +1 @@
1
- require 'kuehne-nagel-despatch-interface/kn_actions'
2
-
3
- module KuehneNagelDespatchInterface
4
-
5
- class Engine < Rails::Engine
6
-
7
- #config.autoload_paths += %W(#{config.root}/lib/kuehne-nagel-despatch-interface)
8
-
9
- =begin
10
- config.to_prepare do
11
- # Load application's model / class decorators
12
- Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
13
- Rails.configuration.cache_classes ? require(c) : load(c)
14
- end
15
-
16
- # Load application's view overrides
17
- Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
18
- Rails.configuration.cache_classes ? require(c) : load(c)
19
- end
20
- end
21
- =end
22
-
23
- def self.activate
24
-
25
- =begin
26
- # Add helper to retrieve the users country
27
- ApplicationHelper.send(:include, Spree::ZonePricing::GetCountry)
28
- # Add helper to retrieve the users country, used by a number of controllers
29
- Spree::BaseController.send(:include, Spree::ZonePricing::GetCountry)
30
-
31
- # Add additional associations to allow m:m relationship
32
- # between zones<->variants
33
- Spree::Zone.send(:include, Spree::ZonePricing::Zone)
34
- Spree::Variant.send(:include, Spree::ZonePricing::Variant)
35
-
36
- # Override add_variant method so that we can use zone pricing
37
- Spree::Order.send(:include, Spree::ZonePricing::Order)
38
-
39
- # Override price
40
- Spree::ProductsHelper.send(:include, Spree::ZonePricing::ProductsHelper)
41
-
42
- # Add action to countries controller to handle country selection
43
- CountriesController.send(:include, Spree::ZonePricing::CountriesController)
44
- # Add code to set the currently country in the order
45
- OrdersController.send(:include, Spree::ZonePricing::OrdersController)
46
- # Add code to save zone prices
47
- Admin::VariantsController.send(:include, Spree::ZonePricing::Admin::VariantsController)
48
- # Add code to check zone prices after address is saved during checkout, if ship
49
- # country not the same change prices in order
50
- CheckoutsController.send(:include, Spree::ZonePricing::CheckoutsController)
51
- =end
52
-
53
- end
54
-
55
- config.to_prepare &method(:activate).to_proc
56
-
57
- end
58
-
59
- end
1
+ require 'kuehne-nagel-despatch-interface/kn_actions'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuehne-nagel-despatch-interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-01-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &2153557560 !ruby/object:Gem::Requirement
16
+ requirement: &2161660420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153557560
24
+ version_requirements: *2161660420
25
25
  description: Library to integrate K+N logistic API to Ruby on Rails Applications.
26
26
  email: henrique@madebymade.co.uk
27
27
  executables: []