easy-box-packer 0.0.7 → 0.0.8
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 +4 -4
- data/easy-box-packer.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02877398af9d21de13049744ac0a9fda0d16f03b
|
|
4
|
+
data.tar.gz: 0837f4d6fb18417deabef86f434d0f7313fef95c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd1c6fa640e579e4c34f9eef324f276e9aff2c84b59050b1d9dd603f8aa69b2df0e336a69697e01247810550b934f33606a6e47c24af2d6bf9877a50d464a98f
|
|
7
|
+
data.tar.gz: aa0cb21b5fed9624bb37027ad76b768c3b3f6a2e4cdcee44dd43947894b9db01fc54658b260f08b3305edfadecda98f48b0f84dc70f81cdf7940b907256a0790
|
data/easy-box-packer.rb
CHANGED
|
@@ -38,7 +38,6 @@ module EasyBoxPacker
|
|
|
38
38
|
break if item_has_been_packed
|
|
39
39
|
end
|
|
40
40
|
next if item_has_been_packed
|
|
41
|
-
|
|
42
41
|
# Can't fit in any of the spaces for the current packings
|
|
43
42
|
# so lets try a new space the size of the container
|
|
44
43
|
space = {
|
|
@@ -96,7 +95,7 @@ module EasyBoxPacker
|
|
|
96
95
|
packing = pack(
|
|
97
96
|
container: { dimensions: c },
|
|
98
97
|
items: items)
|
|
99
|
-
break c if packing[:packings].size == 1
|
|
98
|
+
break c if packing[:packings].size == 1 && packing[:errors].size == 0
|
|
100
99
|
end
|
|
101
100
|
check_container_is_bigger_than_greedy_box({dimensions: select_container}, items) ? item_greedy_box(items) : select_container
|
|
102
101
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy-box-packer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aloha Chen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|