sistero 0.5.0 → 0.5.1

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: 8e4048930bcc2a2f632980319e5a83eaf034b50c
4
- data.tar.gz: 83230f81639f17f0fb1cff7bc9cb4dc71d53fbdf
3
+ metadata.gz: 830149467db14928da4b414ded663c65a2d8aa69
4
+ data.tar.gz: 41379a38cc1fc18e3a9d97b2abef3e2d89844c64
5
5
  SHA512:
6
- metadata.gz: 837b46f87178b4e135db4d75b2264145915d39e34d1e758364ef65fc3017e70b5867e2321eaed8d809bcab039f797eee36ca5772575ab5e25c39f11aa9623da7
7
- data.tar.gz: 2eff0e18edd34cedbf42dbbcb4e561496d9fedb089b247a14bf0bf95e6c499261c61bf4fc2000ccb06f0ece362392a1d3e103fb5f815dd97daf202cd8c77a067
6
+ metadata.gz: 9272612e27c28eba9dbc4f2a8a65a7375c29bc6007ebca955b85e817a66082a1fe280bb2cc4669485e5c0d92832a7b57cf5c94408f6c166ae301a7a3cc0bc501
7
+ data.tar.gz: 0dce93f8d28a487dcf9ef16381590a8d61cad96bcfc6915a68226a8677e0e1c163bdac0328f7ea2df940ab865331e7fe752e0ba34776ce0abcd74c6d97fb9d97
@@ -35,16 +35,16 @@ module Sistero
35
35
 
36
36
  def initialize(opts = {})
37
37
  # read defaults from config file
38
- cfg_file_path = opts[:cfg_file_path]
39
- unless cfg_file_path
40
- cfg_file_path = 'sistero.yaml'
41
- cfg_file_path = "#{ENV['HOME']}/.config/#{APP_NAME}" unless File.exists? cfg_file_path
38
+ @cfg_file_path = opts[:cfg_file_path]
39
+ unless @cfg_file_path
40
+ @cfg_file_path = 'sistero.yaml'
41
+ @cfg_file_path = "#{ENV['HOME']}/.config/#{APP_NAME}" unless File.exists? @cfg_file_path
42
42
  end
43
43
 
44
44
  @defaults = Profile.new
45
45
  @profiles = []
46
46
 
47
- cfg = YAML.load_file cfg_file_path
47
+ cfg = YAML.load_file @cfg_file_path
48
48
  postprocess_cfg cfg
49
49
 
50
50
  cfg['defaults'].each do |key, value|
@@ -72,7 +72,7 @@ module Sistero
72
72
  config.map &method(:postprocess_cfg)
73
73
  elsif config.is_a? Hash
74
74
  if config.length == 1 and config.has_key? 'file'
75
- File.read(config['file']).strip
75
+ File.read(File.join File.dirname(@cfg_file_path), config['file']).strip
76
76
  else
77
77
  config.update(config) { |key, val| postprocess_cfg val }
78
78
  end
@@ -1,3 +1,3 @@
1
1
  module Sistero
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sistero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pike
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler