unidom-shopping 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/app/models/unidom/shopping/concerns/as_shop.rb +14 -0
- data/lib/unidom/shopping/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f7597dd1cff04ef9d75f791bda37bf0d1f14ca4
|
4
|
+
data.tar.gz: cf390a74526ae4c4d4dcbb82719c5c14247c5f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e885c0f7475bb243e5ba945c8762ac9d070591fb535ca36577facd5035c1a8f902bc3d69c075ef223979a4c093aed13f17fa14ccecf1e9c89b0427c4f731e3b8
|
7
|
+
data.tar.gz: 2460cd85756481f9afef5b8b9ca048cc5b2f6dfdaf8a560dc50e1cce48e9c18add1919e959449236d9d6c727887ac96555293af35d84519cd90356e15abc19e6
|
data/README.md
CHANGED
@@ -48,6 +48,8 @@ shopping_cart.items.valid_at.alive # fish & ball
|
|
48
48
|
```ruby
|
49
49
|
include Unidom::Shopping::Concerns::AsCartShopper
|
50
50
|
include Unidom::Shopping::Concerns::AsItemShopper
|
51
|
+
include Unidom::Shopping::Concerns::AsShop
|
52
|
+
include Unidom::Shopping::Concerns::AsShopped
|
51
53
|
```
|
52
54
|
|
53
55
|
### As Cart Shopper
|
@@ -61,3 +63,11 @@ The As Item Shopper concern do the following tasks for the includer automaticall
|
|
61
63
|
1. Define the has_many :shopping_items macro as: ``has_many :shopping_items, class_name: 'Unidom::Shopping::ShoppingItem', as: :shopper``
|
62
64
|
2. Define the #add! method as: ``add!(it, into: nil, at: Time.now, unit_price: 0, quantity: 1)``
|
63
65
|
3. Define the #add? method as: ``add?(it, into: nil, at: Time.now)``
|
66
|
+
|
67
|
+
### As Shop
|
68
|
+
The As Shop concern do the following tasks for the includer automatically:
|
69
|
+
1. Define the has_many :shopping_carts macro as: ``has_many :shopping_carts, class_name: 'Unidom::Shopping::ShoppingCart', as: :shop``
|
70
|
+
|
71
|
+
### As Shopped
|
72
|
+
The As Shopped concern do the following tasks for the includer automatically:
|
73
|
+
1. Define the has_many :shopping_items macro as: ``has_many :shopping_items, class_name: 'Unidom::Shopping::ShoppingItem', as: :shopped``
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-shopping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- app/helpers/unidom/shopping/application_helper.rb
|
43
43
|
- app/models/unidom/shopping/concerns/as_cart_shopper.rb
|
44
44
|
- app/models/unidom/shopping/concerns/as_item_shopper.rb
|
45
|
+
- app/models/unidom/shopping/concerns/as_shop.rb
|
45
46
|
- app/models/unidom/shopping/concerns/as_shopped.rb
|
46
47
|
- app/models/unidom/shopping/shopping_cart.rb
|
47
48
|
- app/models/unidom/shopping/shopping_item.rb
|