easy-box-packer 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/easy-box-packer.rb +1 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d62d68c7bf71b3125bac31ee0c01faa0b7d1adbb
4
- data.tar.gz: 2c231b4132f149c6b3b5eabf222b2bfa222a254b
3
+ metadata.gz: 02877398af9d21de13049744ac0a9fda0d16f03b
4
+ data.tar.gz: 0837f4d6fb18417deabef86f434d0f7313fef95c
5
5
  SHA512:
6
- metadata.gz: 3fcd648f100ea6c72eac790cf9a9dfb9e1a4cd059c245f32313dfe262227ee86d9a1599fae1bfabb2f5db7b8308534af85bd695a984d61a4d418c0ee3e10b2d2
7
- data.tar.gz: 174e2d04868c83e2b855c70e2b5ea10ad102dd8027290e297ffb13c1e027c877d4420e61e288bf3e6c95476732272481dee5fc46416ac3a001b98eb3d6037cb3
6
+ metadata.gz: dd1c6fa640e579e4c34f9eef324f276e9aff2c84b59050b1d9dd603f8aa69b2df0e336a69697e01247810550b934f33606a6e47c24af2d6bf9877a50d464a98f
7
+ data.tar.gz: aa0cb21b5fed9624bb37027ad76b768c3b3f6a2e4cdcee44dd43947894b9db01fc54658b260f08b3305edfadecda98f48b0f84dc70f81cdf7940b907256a0790
@@ -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.7
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: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2018-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec