unidom-inventory 1.0 → 1.0.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: 85e68916ba502e3361af1019e4d072ad0239b5b5
4
- data.tar.gz: ac1b5d1043e892277d1e1091168fb89612f8fe94
3
+ metadata.gz: 6bdac4a21869a3ffda95c4ab54a216342b29134d
4
+ data.tar.gz: c5e234b4d38366f9bc335161f89bb1284af18d11
5
5
  SHA512:
6
- metadata.gz: 2d19e0e8f698d7cc98b9b02880709df196e880484dd2b2c37061dc158a48e8e120bf6fbc83b029a1088f61dad520d95bbf7aff94e6336a314c744a0bb8d516e7
7
- data.tar.gz: fe55a88b7043bd8b304231485af3df3662fdfd5376a4561b4f8a9d5176866359f9ea5ca4da9606bc05ad43eefb9bbe37bd4e8fa6010eac555209aaaa7ffd0f26
6
+ metadata.gz: c956e76be390a4575e9a9981b50ce4039c92b0fc48e34499a22a537370a5035076ac875838ecf678bdebfc270c9c4a77ea8daf7a3a075a4e44a4dfee00f1ac66
7
+ data.tar.gz: 0c4928c27816f8c7fe22a17072ddbd45c920c5b50063eb428a24edc761b839d53c01c7bb17a1d31057f1e4f3e2c15bb5ca68a4f05e634bd6af551567a9f4331a
@@ -8,7 +8,7 @@ class Unidom::Inventory::GroupedInventoryItem < Unidom::Inventory::ApplicationRe
8
8
  include Unidom::Common::Concerns::ModelExtension
9
9
  include Unidom::Inventory::Concerns::AsInventoryItem
10
10
 
11
- validates :quantity, presence: true, numericality: true
12
- #validates :quantity, presence: true, numericality: { greater_than_or_equal_to: 0.0, less_than: 1_000_000_000.00 }
11
+ #validates :quantity, presence: true, numericality: true
12
+ validates :quantity, presence: true, numericality: { greater_than_or_equal_to: 0.0, less_than: 1_000_000_000.00 }
13
13
 
14
14
  end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::GroupedInventoryItem'
@@ -10,8 +10,8 @@ class Unidom::Inventory::InventoryItemVariance < Unidom::Inventory::ApplicationR
10
10
 
11
11
  include Unidom::Common::Concerns::ModelExtension
12
12
 
13
- validates :quantity, presence: true, numericality: true
14
- #validates :quantity, presence: true, numericality: { greater_than: -1_000_000_000.00, less_than: 1_000_000_000.00 }
13
+ #validates :quantity, presence: true, numericality: true
14
+ validates :quantity, presence: true, numericality: { greater_than: -1_000_000_000.00, less_than: 1_000_000_000.00 }
15
15
 
16
16
  belongs_to :inventory_item, polymorphic: true
17
17
  belongs_to :reason, polymorphic: true
@@ -19,7 +19,6 @@ describe Unidom::Inventory::GroupedInventoryItem, type: :model do
19
19
 
20
20
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
21
21
 
22
- =begin
23
22
  it_behaves_like 'validates', model_attributes, :quantity,
24
23
  { } => 0,
25
24
  { quantity: nil } => 2,
@@ -41,7 +40,6 @@ describe Unidom::Inventory::GroupedInventoryItem, type: :model do
41
40
  { quantity: 1_000_000_000 } => 1,
42
41
  { quantity: '1_000_000_000.01' } => 1,
43
42
  { quantity: 1_000_000_000.01 } => 1
44
- =end
45
43
 
46
44
  end
47
45
 
@@ -18,7 +18,6 @@ describe Unidom::Inventory::InventoryItemVariance, type: :model do
18
18
 
19
19
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
20
20
 
21
- =begin
22
21
  it_behaves_like 'validates', model_attributes, :quantity,
23
22
  { } => 0,
24
23
  { quantity: nil } => 2,
@@ -40,7 +39,6 @@ describe Unidom::Inventory::InventoryItemVariance, type: :model do
40
39
  { quantity: 1_000_000_000 } => 1,
41
40
  { quantity: '1_000_000_000.01' } => 1,
42
41
  { quantity: 1_000_000_000.01 } => 1
43
- =end
44
42
 
45
43
  end
46
44
 
@@ -17,11 +17,10 @@ describe Unidom::Inventory::SerializedInventoryItem, type: :model do
17
17
  serial_number: '123456789012'
18
18
  }
19
19
 
20
- #serial_number_max_length = described_class.columns_hash['serial_number'].limit
20
+ serial_number_max_length = described_class.columns_hash['serial_number'].limit
21
21
 
22
22
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
23
23
 
24
- =begin
25
24
  it_behaves_like 'validates', model_attributes, :serial_number,
26
25
  { } => 0,
27
26
  { serial_number: nil } => 2,
@@ -38,7 +37,6 @@ describe Unidom::Inventory::SerializedInventoryItem, type: :model do
38
37
  { serial_number: 'A'*(serial_number_max_length-1) } => 0,
39
38
  { serial_number: 'A'*serial_number_max_length } => 0,
40
39
  { serial_number: 'A'*(serial_number_max_length+1) } => 1
41
- =end
42
40
 
43
41
  end
44
42
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Inventory
3
- VERSION = '1.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-04 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common