rsyc 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile.lock +40 -31
- data/rsyc.gemspec +3 -1
- data/spec/lib/rsyc_spec.rb +29 -29
- data/spec/spec_helper.rb +1 -0
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ee11671dc0e4e5f06f70a69efdffdfd0b963d1dc81bc1929c7ee52fceba09189
|
4
|
+
data.tar.gz: 3f3ee89324652b0ccf32f7001dc47dfc2565e606529843a06edc1d603298876e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d84cd7e7bbd26a853bf6bb9c4ff93ea45ea9a307d4a00abae471e3be34bdf925981f6e74daefc57dbca84233d49955c86202d246ede9cb8d6fe782759d5ce16
|
7
|
+
data.tar.gz: fb7e9c2fcc511ae2d7d7d94a1109128529976b2627b4e7f3ad351d14060524a0a146c4f3643a09bb868c9811af65c23f2c48c1f3b24a2a526222cc4d2549f6ff
|
data/Gemfile.lock
CHANGED
@@ -1,42 +1,47 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rsyc (0.
|
4
|
+
rsyc (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
coveralls (0.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
diff-lcs (1.
|
16
|
-
docile (1.1
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
rspec-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
9
|
+
coveralls (0.8.22)
|
10
|
+
json (>= 1.8, < 3)
|
11
|
+
simplecov (~> 0.16.1)
|
12
|
+
term-ansicolor (~> 1.3)
|
13
|
+
thor (~> 0.19.4)
|
14
|
+
tins (~> 1.6)
|
15
|
+
diff-lcs (1.3)
|
16
|
+
docile (1.3.1)
|
17
|
+
json (2.1.0)
|
18
|
+
rake (12.3.1)
|
19
|
+
rspec (3.7.0)
|
20
|
+
rspec-core (~> 3.7.0)
|
21
|
+
rspec-expectations (~> 3.7.0)
|
22
|
+
rspec-mocks (~> 3.7.0)
|
23
|
+
rspec-core (3.7.1)
|
24
|
+
rspec-support (~> 3.7.0)
|
25
|
+
rspec-expectations (3.7.0)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.7.0)
|
28
|
+
rspec-its (1.2.0)
|
29
|
+
rspec-core (>= 3.0.0)
|
30
|
+
rspec-expectations (>= 3.0.0)
|
31
|
+
rspec-mocks (3.7.0)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.7.0)
|
34
|
+
rspec-support (3.7.1)
|
35
|
+
simplecov (0.16.1)
|
36
|
+
docile (~> 1.1)
|
37
|
+
json (>= 1.8, < 3)
|
38
|
+
simplecov-html (~> 0.10.0)
|
39
|
+
simplecov-html (0.10.2)
|
40
|
+
term-ansicolor (1.6.0)
|
36
41
|
tins (~> 1.0)
|
37
|
-
thor (0.
|
38
|
-
tins (1.
|
39
|
-
yard (0.
|
42
|
+
thor (0.19.4)
|
43
|
+
tins (1.16.3)
|
44
|
+
yard (0.9.15)
|
40
45
|
|
41
46
|
PLATFORMS
|
42
47
|
ruby
|
@@ -46,5 +51,9 @@ DEPENDENCIES
|
|
46
51
|
coveralls
|
47
52
|
rake
|
48
53
|
rspec
|
54
|
+
rspec-its
|
49
55
|
rsyc!
|
50
56
|
yard
|
57
|
+
|
58
|
+
BUNDLED WITH
|
59
|
+
1.16.2
|
data/rsyc.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.name = File.basename(__FILE__, '.gemspec')
|
8
8
|
s.summary = "Rsyc"
|
9
9
|
s.description = "A simple YAML configuration builder and accessor"
|
10
|
-
s.version = "0.
|
10
|
+
s.version = "0.2.0"
|
11
11
|
|
12
12
|
s.authors = ["Black Square Media"]
|
13
13
|
s.email = "info@blacksquaremedia.com"
|
@@ -18,10 +18,12 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.files = `git ls-files`.split("\n")
|
20
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
+
s.metadata["yard.run"] = "yri"
|
21
22
|
|
22
23
|
s.add_development_dependency "rake"
|
23
24
|
s.add_development_dependency "bundler"
|
24
25
|
s.add_development_dependency "rspec"
|
26
|
+
s.add_development_dependency "rspec-its"
|
25
27
|
s.add_development_dependency "yard"
|
26
28
|
s.add_development_dependency "coveralls"
|
27
29
|
end
|
data/spec/lib/rsyc_spec.rb
CHANGED
@@ -5,48 +5,48 @@ describe Rsyc::Config do
|
|
5
5
|
subject { described_class.new FIXTURE_PATH.join("app.yml"), "test" }
|
6
6
|
|
7
7
|
it 'should load configuration' do
|
8
|
-
subject.
|
8
|
+
expect(subject).to be_a(Rsyc::Options)
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'should fail when file is missing' do
|
12
|
-
|
12
|
+
expect {
|
13
13
|
described_class.new FIXTURE_PATH.join("missing.yml"), "test"
|
14
|
-
}.
|
14
|
+
}.to raise_error(ArgumentError)
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'should fail when config is missing' do
|
18
|
-
|
18
|
+
expect {
|
19
19
|
described_class.new FIXTURE_PATH.join("blank.yml"), "test"
|
20
|
-
}.
|
20
|
+
}.to raise_error(ArgumentError)
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'should fail when env is missing' do
|
24
|
-
|
24
|
+
expect {
|
25
25
|
described_class.new FIXTURE_PATH.join("app.yml"), "missing"
|
26
|
-
}.
|
26
|
+
}.to raise_error(ArgumentError)
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should have accessors' do
|
30
|
-
subject.simple.
|
31
|
-
subject[:simple].
|
32
|
-
subject["simple"].
|
33
|
-
subject.respond_to?(:simple).
|
34
|
-
subject.respond_to?("simple").
|
35
|
-
|
36
|
-
|
37
|
-
subject[:missing].
|
38
|
-
subject["missing"].
|
39
|
-
|
40
|
-
subject.nested.
|
41
|
-
subject.nested.url.
|
42
|
-
subject.nested[:url].
|
43
|
-
subject.nested["url"].
|
44
|
-
|
45
|
-
|
46
|
-
subject.nested[:missing].
|
47
|
-
subject.nested["missing"].
|
48
|
-
subject.respond_to?(:missing).
|
49
|
-
subject.respond_to?("missing").
|
30
|
+
expect(subject.simple).to eq("value")
|
31
|
+
expect(subject[:simple]).to eq("value")
|
32
|
+
expect(subject["simple"]).to eq("value")
|
33
|
+
expect(subject.respond_to?(:simple)).to be_truthy
|
34
|
+
expect(subject.respond_to?("simple")).to be_truthy
|
35
|
+
|
36
|
+
expect { subject.missing }.to raise_error(NoMethodError)
|
37
|
+
expect(subject[:missing]).to be_nil
|
38
|
+
expect(subject["missing"]).to be_nil
|
39
|
+
|
40
|
+
expect(subject.nested).to eq({"scope"=>"name", "url"=>"http://test.host.com/path?a=1"})
|
41
|
+
expect(subject.nested.url).to eq("http://test.host.com/path?a=1")
|
42
|
+
expect(subject.nested[:url]).to eq("http://test.host.com/path?a=1")
|
43
|
+
expect(subject.nested["url"]).to eq("http://test.host.com/path?a=1")
|
44
|
+
|
45
|
+
expect { subject.nested.missing }.to raise_error(NoMethodError)
|
46
|
+
expect(subject.nested[:missing]).to be_nil
|
47
|
+
expect(subject.nested["missing"]).to be_nil
|
48
|
+
expect(subject.respond_to?(:missing)).to be_falsey
|
49
|
+
expect(subject.respond_to?("missing")).to be_falsey
|
50
50
|
end
|
51
51
|
|
52
52
|
end
|
@@ -55,8 +55,8 @@ describe Rsyc::Options do
|
|
55
55
|
|
56
56
|
subject { described_class.new some: "value", nested: { "status" => :ok } }
|
57
57
|
|
58
|
-
it {
|
59
|
-
it {
|
58
|
+
it { is_expected.to be_a(Hash) }
|
59
|
+
it { is_expected.to eq({"some"=>"value", "nested"=>{"status"=>:ok}}) }
|
60
60
|
|
61
61
|
its(:some) { should == "value" }
|
62
62
|
its(["some"]) { should == "value" }
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsyc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Black Square Media
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-its
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: yard
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,7 +116,8 @@ files:
|
|
102
116
|
homepage: https://github.com/bsm/rsyc
|
103
117
|
licenses:
|
104
118
|
- MIT
|
105
|
-
metadata:
|
119
|
+
metadata:
|
120
|
+
yard.run: yri
|
106
121
|
post_install_message:
|
107
122
|
rdoc_options: []
|
108
123
|
require_paths:
|
@@ -119,9 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
134
|
version: 1.8.0
|
120
135
|
requirements: []
|
121
136
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.7.7
|
123
138
|
signing_key:
|
124
139
|
specification_version: 4
|
125
140
|
summary: Rsyc
|
126
141
|
test_files: []
|
127
|
-
has_rdoc:
|