server_backups 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0acb87133c33b34ff515fff6e6186f91ac5717a8
4
- data.tar.gz: 1d4086a756cdf6310058763f9ca159698321dfa0
3
+ metadata.gz: 0dd5295a312f74139e1d12e317a846aebfe703ff
4
+ data.tar.gz: 5c5112fe79432c6b24ee179d0e5d38ddeb6b71f7
5
5
  SHA512:
6
- metadata.gz: d4e18e316446d6b8e9ee132f1b723130993e9d05cc9f862b5fa86c16f7c621ba15d985f47632c1d3cb955054cd91896140a7091ed60c3a0dde169b5b42416dfa
7
- data.tar.gz: aff7a18c7cb285f6d55fc9d1a50e9dea83524667943ea301c8cbd645b23a546de3fced372cdff33f6b7732ff5c7ab0771235b8507f6417b9b4c2433547ad1c78
6
+ metadata.gz: 72ac7711f85f64d56d1110896a23c81941ee900c723c081a5e455c29d5744d65337fc0299d771c7d4e98f3740bf854715a4dceda9da66cf14aa1cbcc08f6745a
7
+ data.tar.gz: ed1d16a199fc4e2dbfc43165cdba4f35a06bb648441856ad0c4a0360cc1ea5545a7b83332cd5df9aae521880bfc1215339ee2a57cb996b1d153665fb6bdb2d97
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- server_backups (0.1.8)
4
+ server_backups (0.1.9)
5
5
  activesupport (~> 5.1)
6
6
  aws-sdk-s3 (~> 1.8)
7
7
  main (~> 6.2)
@@ -13,8 +13,14 @@ module ServerBackups
13
13
  DEFAULT_LOGFILE_COUNT = 7
14
14
 
15
15
  def initialize(config_file = nil)
16
- @config_file = config_file || default_config_file
17
- @config = YAML.load_file File.expand_path(config_file)
16
+ if ARGF.filename != "-" or (not STDIN.tty? and not STDIN.closed?)
17
+ @config_file = '-'
18
+ @config = YAML::safe_load ARGF.read()
19
+ else
20
+ @config_file = config_file || default_config_file
21
+ @config = YAML.load_file File.expand_path(config_file)
22
+ end
23
+
18
24
  @logging = @config['logging']
19
25
  @logger = Logger.new(log_device, logfile_count, logfile_size)
20
26
  rescue Errno::ENOENT
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ServerBackups
4
- VERSION = '0.1.8'
4
+ VERSION = '0.1.9'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server_backups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Gannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-26 00:00:00.000000000 Z
11
+ date: 2018-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport