runcom 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/runcom/configuration.rb +7 -2
- data/lib/runcom/identity.rb +1 -1
- data/lib/runcom/xdg/configuration.rb +0 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de9fc61f22105a7512873b2de04986b170178197
|
4
|
+
data.tar.gz: 6eabbc78f1aca0ec3a88dc9a2b32e8f6e2597f98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c5131885949c6d63fa45c0a398d184a0186298ded436f7b1017d31a9810f8794bdb931bdb5a613a11eb2497bc3044a97f059f4cf807f7f15821352daf580be8
|
7
|
+
data.tar.gz: 0fc80005cea97256ee64951875169a048434034498f6d92019d98f992b85734171ddc7b28e154f66afcbcdbaf7067968d9d569ef9d8e3fcb9446ad16a9ffea11
|
data/lib/runcom/configuration.rb
CHANGED
@@ -12,7 +12,7 @@ module Runcom
|
|
12
12
|
attr_reader :path
|
13
13
|
|
14
14
|
def initialize project_name:, file_name: "configuration.yml", defaults: {}
|
15
|
-
@path =
|
15
|
+
@path = load_path project_name, file_name
|
16
16
|
@defaults = defaults
|
17
17
|
@settings = defaults.deep_merge load_settings
|
18
18
|
end
|
@@ -27,7 +27,12 @@ module Runcom
|
|
27
27
|
|
28
28
|
private
|
29
29
|
|
30
|
-
attr_reader :
|
30
|
+
attr_reader :paths, :defaults, :settings
|
31
|
+
|
32
|
+
def load_path project, file
|
33
|
+
paths = XDG::Configuration.computed_dirs.map { |root| Pathname "#{root}/#{project}/#{file}" }
|
34
|
+
paths.find(&:exist?)
|
35
|
+
end
|
31
36
|
|
32
37
|
def load_settings
|
33
38
|
yaml = YAML.load_file path
|
data/lib/runcom/identity.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: refinements
|