omniorder 0.0.5 → 0.0.6

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: 837ddd9e90efb1c7157a6a34f3b80bb5236663c0
4
- data.tar.gz: 5148357797c7481c41fd34fabd50d7a1e058d279
3
+ metadata.gz: bfae2f7483a5c303444e3d0f59987776fcaa3d20
4
+ data.tar.gz: 26581a65ffaf0f5ea468b59ebaf508e5939122da
5
5
  SHA512:
6
- metadata.gz: 3ec7245e462717e5e089527d3903f2b26eae78c2325554c633ec5b0d6d4a4197bfe642588cfcd9187a74f2a3da4cfece44541bc613478b3c0d87c0b5d4d66e23
7
- data.tar.gz: bf179cb35db7ca0683bb8068b3a1d84ce80d03784041d65934680b06a0f5db11a168140300d54f8b20a265b7059a9d2b164321937c1c81c5a1a31cda1e7457bc
6
+ metadata.gz: 78fbb036cc9090c5c72b3b67d0437621dfe2579811799025bc2f41a4fc207ed271eebd79bd42a711c30be4aca517df9d70c0254906eb95659b7410c7e1735c90
7
+ data.tar.gz: ce6373ee0ae5ce0cbcf56052fb891b60d4b3dfe061156e0b2384a9312c2b10a9aaa3c9b0d97ad9ca60ee37d341ed5f364015b67ff50631597a937ee36237708b
data/.travis.yml CHANGED
@@ -4,3 +4,4 @@ rvm:
4
4
  - 2.0.0
5
5
  - 1.9.3
6
6
  - jruby-1.7.16
7
+ sudo: false
@@ -31,6 +31,10 @@ module Omniorder
31
31
  order_products.inject(0) { |sum, op| sum + op.quantity }
32
32
  end
33
33
 
34
+ def unique_product_count
35
+ order_products.count
36
+ end
37
+
34
38
  # Human-readable string representing order products
35
39
  def product_list
36
40
  order_products.sort.map(&:to_s).join('/')
@@ -1,3 +1,3 @@
1
1
  module Omniorder
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -44,6 +44,15 @@ describe Omniorder::Orderable do
44
44
  end
45
45
  end
46
46
 
47
+ describe '#unique_product_count' do
48
+ it 'is the number of order_product lines' do
49
+ order.add_product_by_code('CODE1', 10)
50
+ order.add_product_by_code('CODE2', 6)
51
+
52
+ expect(order.unique_product_count).to eq(2)
53
+ end
54
+ end
55
+
47
56
  describe '#product_list' do
48
57
  it 'is a human-readable string representing order products' do
49
58
  order.add_product_by_code('CODE1', 10)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniorder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Howard Wilson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-07 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: crack
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 2.2.2
153
+ rubygems_version: 2.4.6
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Import online orders from various channels for fulfillment.