sqed 0.5.3 → 0.5.4

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
  SHA256:
3
- metadata.gz: d75475f9639bdc59b80c0c72611298dd371b705a8e7b365a6bf5f5af6fde9538
4
- data.tar.gz: fa08271a4df08f8802f4734acbfa7220967d64a6e46bca5c592a27fb59df7410
3
+ metadata.gz: b4b2306d2da99232ffc2b16553b619206cefa36b157cff572d5bb469449afda7
4
+ data.tar.gz: bffdd8858a677041af94ceeff427dfe91849a999a16dcaedb73b3eac76920ab4
5
5
  SHA512:
6
- metadata.gz: 846f111a96fef1eda4a2950c01a38cfab0454c0cb7bea7e1fdf79e451815c016c38d0b4d460cbf311465849c1ebc6128bc18d07114d78915911f547188af4275
7
- data.tar.gz: 23a4a6b8e46eb7e5b184c651d92262e442f6e68c799012bfa9565ac361f0e194a6eab3d0f37161f024452d091574ad67432a671af2c3e69ab82e6228567aeea0
6
+ metadata.gz: d029d213d7e75b2766c82eea755bdd5fbcbed0cfdef61119d1f9223ba3328b915fdd4e96b79c10f67c18f26562896a52351cdc5847e68d06e01710f7a4efcb13
7
+ data.tar.gz: a6e794060ee11846fb90f56dde835200bb16133d31fc625548e9ed545879e90f158942bdbfeb2e9f0ce2e97fb1fe668739b9be38d9fb696dc43363d17ba951dd
@@ -1,3 +1,3 @@
1
1
  class Sqed
2
- VERSION = '0.5.3'.freeze
2
+ VERSION = '0.5.4'.freeze
3
3
  end
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'handling 7 slot stages' do
4
+
5
+ let(:image) { ImageHelpers.horizontal_offset_cross_red }
6
+ let(:sqed) do
7
+ Sqed.new(
8
+ image: image,
9
+ pattern: :horizontal_offset_cross,
10
+ boundary_color: :red,
11
+ has_border: false )
12
+ end
13
+
14
+ let(:m) do
15
+ { 0 => 'curator_metadata',
16
+ 1 => 'identifier',
17
+ 2 => 'image_registration',
18
+ 3 => 'annotated_specimen'
19
+ }
20
+ end
21
+
22
+ context 'parses' do
23
+ specify 'new() without errors' do
24
+ expect(sqed).to be_truthy
25
+ end
26
+
27
+ specify 'get result without errors' do
28
+ expect(sqed.result).to be_truthy
29
+ end
30
+ end
31
+
32
+ context 'simple boundaries - without thumbnail' do
33
+ let(:s) { Sqed.new(image: image, metadata_map: m, use_thumbnail: false, layout: :horizontal_offset_cross, boundary_color: :red, has_border: false ) }
34
+
35
+ specify 'boundaries are reasonable' do
36
+ s.result
37
+ c = s.boundaries.coordinates
38
+ c.each do |section, values|
39
+ c[section].each_with_index do |v, i|
40
+ msg = "section #{section}, index #{i} has a bad value '#{v}'"
41
+ expect(v > -1).to be_truthy, msg
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ context 'boundaries - with_thumbnail' do
48
+ let(:s) { Sqed.new(image: ImageHelpers.horizontal_offset_cross_red, use_thumbnail: true, pattern: :horizontal_offset_cross, boundary_color: :red, has_border: false ) }
49
+
50
+ specify 'boundaries are reasonable' do
51
+ s.result
52
+ c = s.boundaries.coordinates
53
+ c.each do |section, values|
54
+ c[section].each_with_index do |v, i|
55
+ msg = "section #{section}, index #{i} has a bad value '#{v}'"
56
+ expect(v > -1).to be_truthy, msg
57
+ end
58
+ end
59
+ end
60
+ end
61
+
62
+
63
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Yoder
@@ -153,6 +153,7 @@ files:
153
153
  - spec/lib/sqed_config_spec.rb
154
154
  - spec/lib/sqed_spec.rb
155
155
  - spec/lib/sqed_utils_spec.rb
156
+ - spec/lib/stage_handling/horizontal_offset_cross_spec.rb
156
157
  - spec/lib/stage_handling/lep_stage_spec.rb
157
158
  - spec/lib/stage_handling/seven_slot_spec.rb
158
159
  - spec/spec_helper.rb
@@ -177,6 +178,7 @@ files:
177
178
  - spec/support/files/stage_images/frost_stage_medium.jpg
178
179
  - spec/support/files/stage_images/frost_stage_thumb.jpg
179
180
  - spec/support/files/stage_images/greenlineimage.jpg
181
+ - spec/support/files/stage_images/horizontal_offset_cross.png
180
182
  - spec/support/files/stage_images/inhs_7_slot.jpg
181
183
  - spec/support/files/stage_images/inhs_7_slot2.jpg
182
184
  - spec/support/files/stage_images/inhs_four_thirds.jpg
@@ -228,6 +230,7 @@ test_files:
228
230
  - spec/lib/sqed_config_spec.rb
229
231
  - spec/lib/sqed_spec.rb
230
232
  - spec/lib/sqed_utils_spec.rb
233
+ - spec/lib/stage_handling/horizontal_offset_cross_spec.rb
231
234
  - spec/lib/stage_handling/lep_stage_spec.rb
232
235
  - spec/lib/stage_handling/seven_slot_spec.rb
233
236
  - spec/spec_helper.rb
@@ -252,6 +255,7 @@ test_files:
252
255
  - spec/support/files/stage_images/frost_stage_medium.jpg
253
256
  - spec/support/files/stage_images/frost_stage_thumb.jpg
254
257
  - spec/support/files/stage_images/greenlineimage.jpg
258
+ - spec/support/files/stage_images/horizontal_offset_cross.png
255
259
  - spec/support/files/stage_images/inhs_7_slot.jpg
256
260
  - spec/support/files/stage_images/inhs_7_slot2.jpg
257
261
  - spec/support/files/stage_images/inhs_four_thirds.jpg