mesa_test 0.2.14 → 0.2.15

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mesa_test.rb +10 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc1b9c24edbaf3b60ef4810d6ac67dfeeffea731ce7fd2fac594fad6e58912da
4
- data.tar.gz: 05427526f0ff36f357c0d93fdf98d65bf25b38d7f4c238555ca3f86b5127a899
3
+ metadata.gz: 258ab45be43e85b9d9bf5bb5ee31014f845ce52a760abc5d36d52efefec783fc
4
+ data.tar.gz: 179db21ba9f4da610bc0491e089eb8de5a8eb18d003682c7432579cdf80c4363
5
5
  SHA512:
6
- metadata.gz: 68989aaa1d18b36568fac9dd3cb275055b926e98792a1a0456b0e5318baab902eb2a483d52b5954deb14cbb9123a20482dc4f78ec57b196382be79c9f24ba4fb
7
- data.tar.gz: ff9985cd7edc8bd201626e701eb01344abea2516f29802ed7740049ec142f0b51e3912725b820236dd074388a6c893be23104d9b46e2e16ae92a4dcf36e7e32c
6
+ metadata.gz: faeacd323506e78ec1788191664aa411b18d844e2ee2e7b1ed7ad6e392415d6e8aa2aa73a9e124ca5e18dde8ec8536eb07b15c49a0bfeda3c6750b202f9604cc
7
+ data.tar.gz: e6658640ae43198ed869d1b991f185b030190ba1d42609e9ebc721b22bfafdda6dd861c4956b20ab64e84341577d38f72927dd25e73a64bc47cb265e9495ad11
@@ -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 penultimate photo
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
- # pull out 2nd most recent one
1411
- re_photo = File.basename(photo_files.sort_by { |file_name| File.stat(file_name).mtime } [-2])
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.14
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-08 00:00:00.000000000 Z
11
+ date: 2020-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json