market_town-checkout 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: ccf737f8e5d5e1b99350ca5c2e7c69595813de52
4
- data.tar.gz: b61d9955fd58a7de3ec72fe50720e49c6c8a659a
3
+ metadata.gz: 248333e5411064b778918baad5c255f009ebd07f
4
+ data.tar.gz: 708d710d4e7ec962a017c72cc9099cd3922461f7
5
5
  SHA512:
6
- metadata.gz: 5e3c575fbca0a8c72411e092cda3edd013249b7700e083171f52ee64c724c7cad18d775c0eef7cd598ee96b156c3584982af1618de128417412520471d1fc7b1
7
- data.tar.gz: f0b50505161df4ee7d1333d36a178698283601b9b16e1749baec106049ee9f31606eead57107ec44591855c0e49e8d63a9ba976555f9b766423dd608303d58aa
6
+ metadata.gz: 1b6dcd7003da193d40b838a74ccbb170d40157a89c820736797f37520c39be678135619a9ebed271063723766060c3689d0680e361fad7b933f63ed03aad03ca
7
+ data.tar.gz: 14665062ba3b4d705110fe6b44823645ad97030856d0343fffb36c6b105aaef83b157f2d6ade5ff6d71c161d3c45fd5100a72fdd503613df53e92ab6adc10651
@@ -30,6 +30,12 @@ module MarketTown
30
30
  #
31
31
  # To find out more about `AppContainer` please see {Dependencies}.
32
32
  #
33
+ # ## Available steps
34
+ #
35
+ # - {AddressStep} – Handles the taking of billing and delivery addresses
36
+ # - {DeliveryStep} – Handles the choosing of delivery method
37
+ # - {CompleteStep} – Handles completion of order
38
+ #
33
39
  module Checkout
34
40
  extend self
35
41
 
@@ -1,6 +1,8 @@
1
1
  module MarketTown
2
2
  module Checkout
3
3
  class CartStep < Step
4
+ class NoLineItemsError < Error; end
5
+
4
6
  steps :ensure_line_items,
5
7
  :load_default_addresses,
6
8
  :finish_cart_step
@@ -8,6 +10,9 @@ module MarketTown
8
10
  protected
9
11
 
10
12
  def ensure_line_items(state)
13
+ unless deps.order.has_line_items?(state)
14
+ raise NoLineItemsError.new(state)
15
+ end
11
16
  end
12
17
 
13
18
  def load_default_addresses(state)
@@ -1,5 +1,5 @@
1
1
  module MarketTown
2
2
  module Checkout
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: market_town-checkout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Morton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-21 00:00:00.000000000 Z
11
+ date: 2016-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel