vision_mate 0.1.1 → 0.1.2
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/lib/vision_mate/rack.rb +2 -2
- data/lib/vision_mate/version.rb +1 -1
- data/spec/assets/full_rack_results.txt +1 -0
- data/spec/vision_mate/rack_spec.rb +11 -2
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e2e9ed2987b07be1525567b32a3d7042e891c5e
|
4
|
+
data.tar.gz: 988fdb4f1a9763fb54c13bf89541780af9f84344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be57dbd5aa4c94ed4621c6d366bb7ee37ec902615ddf4e6537ee1e360076f17022dbc6f1fbea05b94fecd5ee98f146e9d2c688697c93a7f7d4f08094074d4b1b
|
7
|
+
data.tar.gz: a1e1e669cde65ffe6c7ec19a2656cda0b4080fd64017c2454d02fb75195683f6798eed7bf2d6f87079f8584cc0187c9fb960fc1e119525e44b935648bde444cb
|
data/lib/vision_mate/rack.rb
CHANGED
@@ -35,8 +35,8 @@ module VisionMate
|
|
35
35
|
|
36
36
|
def converted_position(position)
|
37
37
|
row_letters = ("A".."Z").take(number_of_rows)
|
38
|
-
row_letter = row_letters[position %
|
39
|
-
row_number = (position /
|
38
|
+
row_letter = row_letters[position % number_of_rows]
|
39
|
+
row_number = (position / number_of_rows) + 1
|
40
40
|
|
41
41
|
"#{row_letter}#{row_number}"
|
42
42
|
end
|
data/lib/vision_mate/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
iOK0093404458,0093404502,0093403474,0093404523,0093404475,0093404483,0093404469,0093404490,0093404459,0093404505,0093404524,0093404482,0093404473,0093404460,0093404464,0093404470,0093404465,0093404534,0093404511,0093404517,0093404457,0093404476,0093404527,0093404503,0093404521,0093404540,0093404518,0093404495,0093404526,0093404478,0093404461,0093403475,0093404531,0093404547,0093404497,0093404496,0093404504,0093404525,0093404541,0093404536,0093404545,0093404522,0093404500,0093404519,0093404528,0093404550,0093404537,0093404515,0093404532,0093404513,0093404506,0093404499,0093404509,0093404510,0093404546,0093404538,0093404535,0093404494,0093403467,0093404507,0093404516,0093404508,0093404492,0093404471,0093404533,0093404520,0093404462,0093404479,0093404512,0093404474,0093404493,0093404487,0093404530,0093404480,0093404455,0093404472,0093404484,0093404485,0093404467,0093404544,0093404549,0093404529,0093404477,0093404481,0093404514,0093404486,0093404466,0093404489,0093404543,0093404542,0093404501,0093404456,0093404491,0093404488,0093404463,0093404468,
|
@@ -13,8 +13,13 @@ describe VisionMate::Rack do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
it "assigns the correct positions to tubes" do
|
16
|
-
VisionMate::
|
17
|
-
|
16
|
+
rack = VisionMate::Rack.new(full_rack_string)
|
17
|
+
first_tube = rack.at_position("A1")
|
18
|
+
middle_tube = rack.at_position("D6")
|
19
|
+
last_tube = rack.at_position("H12")
|
20
|
+
expect(first_tube.barcode).to eq "0093404458"
|
21
|
+
expect(middle_tube.barcode).to eq "0093404519"
|
22
|
+
expect(last_tube.barcode).to eq "0093404468"
|
18
23
|
end
|
19
24
|
|
20
25
|
describe "#at_position" do
|
@@ -55,6 +60,10 @@ describe VisionMate::Rack do
|
|
55
60
|
read_tube_file "/assets/one_tube_results.txt"
|
56
61
|
end
|
57
62
|
|
63
|
+
def full_rack_string
|
64
|
+
read_tube_file "/assets/full_rack_results.txt"
|
65
|
+
end
|
66
|
+
|
58
67
|
def read_tube_file(path)
|
59
68
|
gem_path = File.expand_path('../..', __FILE__)
|
60
69
|
asset_path = gem_path + path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vision_mate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Jackson
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/vision_mate/tube.rb
|
108
108
|
- lib/vision_mate/version.rb
|
109
109
|
- spec/assets/empty_tube_results.txt
|
110
|
+
- spec/assets/full_rack_results.txt
|
110
111
|
- spec/assets/one_tube_results.txt
|
111
112
|
- spec/scanner_integeration_spec.rb
|
112
113
|
- spec/vision_mate/connection_spec.rb
|
@@ -141,6 +142,7 @@ specification_version: 4
|
|
141
142
|
summary: Ruby client for the Thermo Scientific VisionMate 2D Scanner.
|
142
143
|
test_files:
|
143
144
|
- spec/assets/empty_tube_results.txt
|
145
|
+
- spec/assets/full_rack_results.txt
|
144
146
|
- spec/assets/one_tube_results.txt
|
145
147
|
- spec/scanner_integeration_spec.rb
|
146
148
|
- spec/vision_mate/connection_spec.rb
|