ish_models 0.0.33.64 → 0.0.33.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f1d96797ec6ad7709537223d88645bdc4518d17
4
- data.tar.gz: 64798fa03ed516e21802138b44cd1fcc8d855ed9
3
+ metadata.gz: c79ba33d615f3cc126f366789db8dd673273ae91
4
+ data.tar.gz: 5d1b1e9384fe9f3e4ed6a3fb880e122887a36f2f
5
5
  SHA512:
6
- metadata.gz: 95f0c33727628d17dfec77fab6270f0fd69e72769aad7f7500c3654b798a5b2146cb07893e75665113e1e099ec7f2e71fcb16c9e2ddde76ba3ffffbdcd364c4b
7
- data.tar.gz: bfdc57e6bf7961883634d964c160d8be05e75b53aef2ee668e7502322d6c8c07b79178f8efc3e81f807a5c0d4d3adf705f9779bea9d0ce39aab87381711f280b
6
+ metadata.gz: abcbf138a54895ecf7a011fd9b029a2918041c0c830ca8676e2456b09b70e5786f4a72e1e593ddca4b52fcc4ed1532cfd4b46b2bc41d6b7e144686fa5bf9b723
7
+ data.tar.gz: 0ee1fa75869070d048dda70d8900380aad91de02f6acb63733b82370379e73b03fac34e5cf09a76e2d69c77aa4286fc98a4a223a40d9ca139e53c55764c194f5
@@ -0,0 +1,16 @@
1
+
2
+ class CoTailors::Product
3
+ include Mongoid::Document
4
+ include Mongoid::Timestamps
5
+
6
+ field :cost, :type => Integer
7
+ field :title, :type => String
8
+ field :description, :type => String
9
+
10
+ KINDS = %w( shirt pants suit )
11
+ field :kind, :type => String
12
+ index({ :kind => -1 })
13
+ validates_uniqueness_of :kind
14
+
15
+ end
16
+
data/lib/ish_models.rb CHANGED
@@ -20,9 +20,7 @@ module IshModels
20
20
  end
21
21
 
22
22
  require 'co_tailors'
23
- require 'co_tailors/pant.rb'
24
- require 'co_tailors/shirt.rb'
25
- require 'co_tailors/suit.rb'
23
+ require 'co_tailors/product.rb'
26
24
  require 'co_tailors/profile_measurement.rb'
27
25
  require 'co_tailors/order.rb'
28
26
  # require 'co_tailors/order_item.rb' # this is required from within order.rb
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.64
4
+ version: 0.0.33.65
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -116,10 +116,8 @@ files:
116
116
  - lib/co_tailors/address.rb
117
117
  - lib/co_tailors/order.rb
118
118
  - lib/co_tailors/order_item.rb
119
- - lib/co_tailors/pant.rb
119
+ - lib/co_tailors/product.rb
120
120
  - lib/co_tailors/profile_measurement.rb
121
- - lib/co_tailors/shirt.rb
122
- - lib/co_tailors/suit.rb
123
121
  - lib/country.rb
124
122
  - lib/event.rb
125
123
  - lib/feature.rb
@@ -1,11 +0,0 @@
1
-
2
- class CoTailors::Merchandise
3
- include Mongoid::Document
4
- include Mongoid::Timestamps
5
-
6
- def self.cost
7
- return 7500
8
- end
9
-
10
- end
11
-
@@ -1,11 +0,0 @@
1
-
2
- class CoTailors::Shirt
3
- include Mongoid::Document
4
- include Mongoid::Timestamps
5
-
6
- def self.cost
7
- return 3000
8
- end
9
-
10
- end
11
-
@@ -1,11 +0,0 @@
1
-
2
- class CoTailors::Suit
3
- include Mongoid::Document
4
- include Mongoid::Timestamps
5
-
6
- def self.cost
7
- return 30000
8
- end
9
-
10
- end
11
-