config_hound 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/lib/config_hound/interpolation.rb +1 -0
- data/lib/config_hound/resource.rb +4 -4
- data/lib/config_hound/version.rb +1 -1
- data/spec/config_hound/resource_spec.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 221d83abd19025a9a2dda8abbeb87b5ac679a120
|
4
|
+
data.tar.gz: 87ccb306f52f230d2b14a606169a15ebc43b024a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce10dc81bba78fd68ae07037e23082090019f472fc78c275da7acd21692b7b8341b6d0f05973c68a799f1d689570265d97658c5001f2d1437343c6e53f33f7d4
|
7
|
+
data.tar.gz: aa4391c66ade9fc59f1c776b3750114212e61155a53d855cf08a5c2803784dfd1539704f33c0ad4c3d5c6574a130c94753737a2fbcf8a65edc4160f37ea88ebe
|
data/.travis.yml
CHANGED
@@ -29,14 +29,16 @@ module ConfigHound
|
|
29
29
|
when %r{^\w+:/}
|
30
30
|
URI(arg)
|
31
31
|
when %r{^/}
|
32
|
-
URI("file
|
32
|
+
URI("file://#{arg}")
|
33
33
|
else
|
34
|
-
URI("file
|
34
|
+
URI("file://#{File.expand_path(arg)}")
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
39
39
|
|
40
|
+
attr_reader :uri
|
41
|
+
|
40
42
|
def to_s
|
41
43
|
uri.to_s
|
42
44
|
end
|
@@ -67,8 +69,6 @@ module ConfigHound
|
|
67
69
|
@uri = uri
|
68
70
|
end
|
69
71
|
|
70
|
-
attr_reader :uri
|
71
|
-
|
72
72
|
end
|
73
73
|
|
74
74
|
end
|
data/lib/config_hound/version.rb
CHANGED
@@ -13,7 +13,7 @@ describe ConfigHound::Resource do
|
|
13
13
|
let(:path) { uri }
|
14
14
|
|
15
15
|
it "retains the URI" do
|
16
|
-
expect(resource.
|
16
|
+
expect(resource.uri).to eq uri
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
@@ -23,7 +23,7 @@ describe ConfigHound::Resource do
|
|
23
23
|
let(:path) { "/path/to/file" }
|
24
24
|
|
25
25
|
it "assumes it's a file" do
|
26
|
-
expect(resource.
|
26
|
+
expect(resource.uri).to eq URI("file:///path/to/file")
|
27
27
|
end
|
28
28
|
|
29
29
|
describe "#resolve" do
|
@@ -32,21 +32,21 @@ describe ConfigHound::Resource do
|
|
32
32
|
it "resolves relatively" do
|
33
33
|
other_resource = resource.resolve("other_file")
|
34
34
|
expect(other_resource).to be_a(ConfigHound::Resource)
|
35
|
-
expect(other_resource.
|
35
|
+
expect(other_resource.uri).to eq URI("file:///path/to/other_file")
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
context "with an absolute file path" do
|
40
40
|
it "resolves relatively" do
|
41
41
|
other_resource = resource.resolve("/different/path")
|
42
|
-
expect(other_resource.
|
42
|
+
expect(other_resource.uri).to eq URI("file:///different/path")
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
46
|
context "with a fully-qualified URI" do
|
47
47
|
it "uses the URI provided" do
|
48
48
|
other_resource = resource.resolve("http://foo/bar")
|
49
|
-
expect(other_resource.
|
49
|
+
expect(other_resource.uri).to eq URI("http://foo/bar")
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -59,7 +59,7 @@ describe ConfigHound::Resource do
|
|
59
59
|
let(:path) { "config.yml" }
|
60
60
|
|
61
61
|
it "assumes it's a file relative to $CWD" do
|
62
|
-
expect(resource.
|
62
|
+
expect(resource.uri).to eq URI("file://#{Dir.pwd}/config.yml")
|
63
63
|
end
|
64
64
|
|
65
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_hound
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dig_rb
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.6.
|
106
|
+
rubygems_version: 2.6.14.1
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Sniffs out config, wherever it may be.
|