panomosity 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/panomosity/runner.rb +11 -1
- data/lib/panomosity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a182f799a0789e1a9a3ce30b1bf8936264397aa125b169331039a31436935fad
|
4
|
+
data.tar.gz: c6409d39cfd42beb780f6c40059316290ff08cf6350b94139134e4857537d53e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56dd5d550d87a277a8bc2778aa9a73dbd373e543cb53718c9ac5015de25ca307283414ffe4bbb28a66e440b9682c7109cb177f7202778f645851ef0fdf46612f
|
7
|
+
data.tar.gz: cae10bb2101d9e69bccf7ca461fbe7821dce48bc3315c30d84465ddcfd1a8a224a16c242ce8392795601f31eb3d30d8ff984d5ce5a8bc8047b89b39cfa28106f
|
data/Gemfile.lock
CHANGED
data/lib/panomosity/runner.rb
CHANGED
@@ -416,10 +416,20 @@ module Panomosity
|
|
416
416
|
optimizer = Optimizer.new(panorama)
|
417
417
|
optimizer.run
|
418
418
|
|
419
|
+
# sort images
|
420
|
+
logger.info 'sorting images in case they get out of order'
|
421
|
+
lexically_sorted_images = optimizer.images
|
422
|
+
numerically_sorted_images = optimizer.images.sort_by { |image| [image.column, image.row] }
|
423
|
+
image_map = {}
|
424
|
+
lexically_sorted_images.each_with_index do |image_l, i|
|
425
|
+
image_map[image_l.name] = numerically_sorted_images[i]
|
426
|
+
end
|
427
|
+
|
419
428
|
@lines = @input_file.each_line.map do |line|
|
420
429
|
image = optimizer.images.find { |i| i.raw == line }
|
421
430
|
if image
|
422
|
-
image.
|
431
|
+
sorted_image = image_map[image.name]
|
432
|
+
sorted_image.to_s
|
423
433
|
else
|
424
434
|
next line
|
425
435
|
end
|
data/lib/panomosity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panomosity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|