mesa_test 0.2.14 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mesa_test.rb +10 -4
- 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: 258ab45be43e85b9d9bf5bb5ee31014f845ce52a760abc5d36d52efefec783fc
|
4
|
+
data.tar.gz: 179db21ba9f4da610bc0491e089eb8de5a8eb18d003682c7432579cdf80c4363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faeacd323506e78ec1788191664aa411b18d844e2ee2e7b1ed7ad6e392415d6e8aa2aa73a9e124ca5e18dde8ec8536eb07b15c49a0bfeda3c6750b202f9604cc
|
7
|
+
data.tar.gz: e6658640ae43198ed869d1b991f185b030190ba1d42609e9ebc721b22bfafdda6dd861c4956b20ab64e84341577d38f72927dd25e73a64bc47cb265e9495ad11
|
data/lib/mesa_test.rb
CHANGED
@@ -944,7 +944,7 @@ class MesaTestCase
|
|
944
944
|
:outcome
|
945
945
|
|
946
946
|
def self.modules
|
947
|
-
%i[star binary]
|
947
|
+
%i[star binary astero]
|
948
948
|
end
|
949
949
|
|
950
950
|
def initialize(test: nil, mesa: nil, success_string: '',
|
@@ -1403,12 +1403,18 @@ class MesaTestCase
|
|
1403
1403
|
# abort if there is not photo specified
|
1404
1404
|
return unless photo
|
1405
1405
|
|
1406
|
-
# get
|
1406
|
+
# get antepenultimate photo
|
1407
1407
|
if photo == "auto" then
|
1408
1408
|
# get all photos [single-star (x100) or binary (b_x100); exclude binary stars (1_x100, 2_x100)]
|
1409
1409
|
photo_files = Dir["photos/*"].select{|p| p =~ /^photos\/(b_)?x?\d+$/}
|
1410
|
-
#
|
1411
|
-
|
1410
|
+
# sort by filesystem modification time
|
1411
|
+
sorted_photo_files = photo_files.sort_by { |file_name| File.stat(file_name).mtime }
|
1412
|
+
# if you can, pull out 3rd most recent one; otherwise take the oldest
|
1413
|
+
if sorted_photo_files.length >= 3 then
|
1414
|
+
re_photo = File.basename(sorted_photo_files[-3])
|
1415
|
+
else
|
1416
|
+
re_photo = File.basename(sorted_photo_files[0])
|
1417
|
+
end
|
1412
1418
|
# if binary, trim off prefix
|
1413
1419
|
re_photo = re_photo.sub("b_", "")
|
1414
1420
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mesa_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Wolf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|