valken-shipping 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21a15ea0992134b70026f5e873cce4752bb2d208b45c33f89f6fd105bfb09a01
4
- data.tar.gz: a975398b63c62662d7dc1d5de4238298e12377b9d10867dd56cadc0e5fc7149f
3
+ metadata.gz: 1f96335c5b53614036b3991c54ec307ace739a6991fbb3c1e4dd98a957a3afb6
4
+ data.tar.gz: 5d7a5f6347d2edcd2d46e4053e78843c47055b64d076f448da69593dc097b3df
5
5
  SHA512:
6
- metadata.gz: 600c74fd671573e899bd8a8a527a04ba19057fd0f9049828336ca9261898501a1d876ff87257ea4b54cdfde99e949524f4a8e21fdbc17047e1457b5a896df84c
7
- data.tar.gz: 875c6a24365e57ebd4374ac33cf4ce9f6af884414afd083bed38c9a737adc0a83989cd96a658ca828df0dab6a0b70417e795b4829bf5e631bc5a178fee7222b8
6
+ metadata.gz: a449dc97ab566e2c2f7b30b40613b042497560ef503d7a9d4471029ead334b41001918436537942321c16f00d438502996d13fb3ac2859e0fbcab9b03807799e
7
+ data.tar.gz: db9b1c8f6766e75284cb9023e606ae034867f14fd239316c7484ea7d514d255fb132dae2d1c978613226b38d50072942446554eb3be366fa3fc97fd093b25ba6
@@ -12,12 +12,13 @@ module Workarea
12
12
  end
13
13
 
14
14
  def shipping_option
15
- carrier_data = collect_carrier_data(selected_carrier)
15
+ carrier_data = []
16
16
  if Workarea.config.gateways.ups_carrier.class != ActiveShipping::Workarea
17
- carrier_data.push(get_ltl_shipping)
18
17
  carrier_data.push(get_free_shipping) if Workarea.config.show_free_shipping
18
+ carrier_data.push(get_ltl_shipping)
19
19
  end
20
- carrier_data
20
+ carrier_data.push(collect_carrier_data(selected_carrier))
21
+ carrier_data.flatten
21
22
  end
22
23
 
23
24
  # Selecting the shipping carrier based on order items
@@ -160,7 +161,8 @@ module Workarea
160
161
 
161
162
  # find and sort all delivery dates and pick 1st three
162
163
  all_delivery_dates = rates.map { |rate| rate.delivery_date }
163
- uniq_delivery_dates = all_delivery_dates.compact.sort.uniq[0..2]
164
+ # sorting the uniq delivery dates and reversing those delivery dates.
165
+ uniq_delivery_dates = all_delivery_dates.compact.sort.uniq[0..2].reverse
164
166
 
165
167
  # For each delivery dates, find cheapest rates and create shipping option and push
166
168
  uniq_delivery_dates.each_with_index do |date, index|
@@ -4,9 +4,9 @@ Workarea.configure do |config|
4
4
  config.weight_table = {"2": 5, "15": 15, "200": 1, "2500": 200}
5
5
 
6
6
  config.shipping_rates = [
7
- {"Valken Overnight" => "Overnight"},
7
+ {"Valken Express 3-Day" => "3 Business Days"},
8
8
  {"Valken Express 2-Day" => "2 Business Days"},
9
- {"Valken Express 3-Day" => "3 Business Days"}
9
+ {"Valken Overnight" => "Overnight"}
10
10
  ]
11
11
  config.ups_options = {"12"=> "Valken Express 3-Day", "01"=> "Valken Overnight", "02"=> "Valken Express 2-Day"}
12
12
  config.fedex_options = {"STANDARD_OVERNIGHT"=> "Valken Overnight", "FEDEX_2_DAY"=> "Valken Express 2-Day", "GROUND_HOME_DELIVERY"=> "Valken Express 3-Day"}
@@ -1,5 +1,5 @@
1
1
  module Valken
2
2
  module Shipping
3
- VERSION = '1.1.7'
3
+ VERSION = '1.1.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valken-shipping
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - sushmitha02
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-11 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails