-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from sul-dlss/logs
Scripts don't hardcode log names
- Loading branch information
Showing
10 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# houses shared functionality for the *_reporters | ||
class Reporter | ||
def self.default_log_files | ||
Dir.glob("#{Dir.pwd}/log/sdr_preservationIngestWF*.log").sort | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INFO [2018-08-03 01:58:11] (31220) :: Testing default_log_files method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'reporter' | ||
describe Reporter do | ||
let(:base_path) { "#{Dir.pwd}/spec/fixtures" } | ||
|
||
describe '.default_log_files' do | ||
it 'returns a filtered array of log files' do | ||
allow(Dir).to receive(:pwd).and_return(base_path) | ||
expect(described_class.default_log_files).to eq ["#{base_path}/log/sdr_preservationIngestWF_transfer-object.log", | ||
"#{base_path}/log/sdr_preservationIngestWF_validate-bag.log"] | ||
expect(described_class.default_log_files).not_to include "#{base_path}/log/sdr_preservationIngestWF_validate-bag.log.1" | ||
end | ||
end | ||
end |