iqeo-conf 1.1.0.pre.0 → 1.1.1
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 +7 -0
- data/.gitignore +18 -4
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +36 -21
- data/README.md +3 -0
- data/iqeo-conf.gemspec +10 -18
- data/lib/iqeo/configuration.rb +7 -6
- data/spec/configuration_spec.rb +84 -96
- data/spec/spec_helper.rb +7 -9
- metadata +22 -106
- data/lib/iqeo/configuration/version.rb +0 -3
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 060e0a2e9dc2deb6a741f7d914a3b551ba80c9b4bbdf5436704e50b270406a5f
|
4
|
+
data.tar.gz: c8ad2d06e8b258f211c273635a65222d39cf2e2110306b178722899429b6783d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 30bd99bf790acbf6008b8d36037ef76f350ca9792b067c82f46e742f9280bcd9c0a51925b17ff2d094e01c1108a09f761ee29949c65223e1dae396acefeb4418
|
7
|
+
data.tar.gz: ed1dce1772edc9d2dab9016f4b628b060ef923d1dc8fda19da6caf46f35a1338295f41f2551a5f23c94e62d6658d5049385a1ca5165e76f47817c2d89012e9d9
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
iqeo-conf
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-3.4.4
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,34 +1,49 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
iqeo-conf (1.1.
|
4
|
+
iqeo-conf (1.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
rspec
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
date (3.4.1)
|
10
|
+
diff-lcs (1.6.2)
|
11
|
+
erb (5.0.2)
|
12
|
+
psych (5.2.6)
|
13
|
+
date
|
14
|
+
stringio
|
15
|
+
rake (13.3.0)
|
16
|
+
rdoc (6.14.2)
|
17
|
+
erb
|
18
|
+
psych (>= 4.0.0)
|
19
|
+
redcarpet (3.6.1)
|
20
|
+
rspec (3.13.1)
|
21
|
+
rspec-core (~> 3.13.0)
|
22
|
+
rspec-expectations (~> 3.13.0)
|
23
|
+
rspec-mocks (~> 3.13.0)
|
24
|
+
rspec-core (3.13.5)
|
25
|
+
rspec-support (~> 3.13.0)
|
26
|
+
rspec-expectations (3.13.5)
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
+
rspec-support (~> 3.13.0)
|
29
|
+
rspec-mocks (3.13.5)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.13.0)
|
32
|
+
rspec-support (3.13.4)
|
33
|
+
stringio (3.1.7)
|
34
|
+
yard (0.9.37)
|
24
35
|
|
25
36
|
PLATFORMS
|
26
37
|
ruby
|
38
|
+
x86_64-linux
|
27
39
|
|
28
40
|
DEPENDENCIES
|
29
41
|
iqeo-conf!
|
30
|
-
rake (~>
|
31
|
-
rdoc (~>
|
32
|
-
redcarpet (~>
|
33
|
-
rspec (~>
|
34
|
-
yard (~> 0.
|
42
|
+
rake (~> 13.3)
|
43
|
+
rdoc (~> 6.14)
|
44
|
+
redcarpet (~> 3.6)
|
45
|
+
rspec (~> 3.13)
|
46
|
+
yard (~> 0.9.37)
|
47
|
+
|
48
|
+
BUNDLED WITH
|
49
|
+
2.6.7
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Iqeo::Configuration
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/iqeo-conf)
|
4
|
+
[](https://travis-ci.org/iqeo/iqeo-conf)
|
5
|
+
|
3
6
|
A DSL representing configuration files.
|
4
7
|
|
5
8
|
## Installation
|
data/iqeo-conf.gemspec
CHANGED
@@ -1,23 +1,15 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path('../lib/iqeo/configuration
|
2
|
+
require File.expand_path('../lib/iqeo/configuration', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.authors = ["Gerard Fowley"]
|
6
|
-
gem.email = ["gerard.fowley@iqeo.net"]
|
7
|
-
gem.description = %q{A configuration DSL}
|
8
|
-
gem.summary = %q{A DSL for writing configuration files}
|
9
|
-
gem.homepage = "http://iqeo.github.com/iqeo-conf"
|
10
|
-
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
11
|
-
gem.files = `git ls-files`.split("\n")
|
12
|
-
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
13
5
|
gem.name = "iqeo-conf"
|
14
|
-
gem.
|
15
|
-
gem.
|
16
|
-
|
17
|
-
gem.
|
18
|
-
gem.
|
19
|
-
gem.
|
20
|
-
gem.
|
21
|
-
gem.
|
22
|
-
|
6
|
+
gem.author = "Gerard Fowley"
|
7
|
+
gem.email = "gerard.fowley@iqeo.net"
|
8
|
+
gem.description = "A configuration DSL"
|
9
|
+
gem.summary = "A DSL for writing configuration files"
|
10
|
+
gem.homepage = "http://github.com/iqeo/iqeo-conf"
|
11
|
+
gem.license = "GPL-3.0"
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.metadata = { "rubygems_mfa_required" => "true" }
|
14
|
+
gem.version = Iqeo::Configuration::VERSION
|
23
15
|
end
|
data/lib/iqeo/configuration.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
require_relative "configuration/version"
|
2
|
+
# require_relative "configuration/version"
|
3
3
|
require_relative "configuration/hash_with_indifferent_access"
|
4
4
|
|
5
5
|
# Iqeo namespace
|
@@ -24,7 +24,7 @@ module Iqeo
|
|
24
24
|
|
25
25
|
instance_methods_to_undef = %w(
|
26
26
|
! != !~ <=>
|
27
|
-
== ===
|
27
|
+
== === class
|
28
28
|
clone define_singleton_method display enum_for
|
29
29
|
eql? extend freeze frozen?
|
30
30
|
hash initialize_clone initialize_dup inspect
|
@@ -32,9 +32,8 @@ module Iqeo
|
|
32
32
|
instance_variable_set instance_variables method methods
|
33
33
|
nil? private_methods protected_methods public_method
|
34
34
|
public_methods public_send respond_to? respond_to_missing?
|
35
|
-
send singleton_class singleton_methods
|
36
|
-
|
37
|
-
trust untaint untrust untrusted?
|
35
|
+
send singleton_class singleton_methods
|
36
|
+
tap to_enum to_s
|
38
37
|
)
|
39
38
|
|
40
39
|
instance_methods_to_undef.each do |meth|
|
@@ -51,8 +50,10 @@ module Iqeo
|
|
51
50
|
|
52
51
|
# Returns Configuration version number.
|
53
52
|
|
53
|
+
VERSION = '1.1.1'
|
54
|
+
|
54
55
|
def self.version
|
55
|
-
|
56
|
+
VERSION
|
56
57
|
end
|
57
58
|
|
58
59
|
# Creates a new Configuration instance from string.
|
data/spec/configuration_spec.rb
CHANGED
@@ -24,25 +24,25 @@ describe Configuration do
|
|
24
24
|
|
25
25
|
def simple_configuration_example conf
|
26
26
|
conf.should_not be_nil
|
27
|
-
conf.alpha.should == 1 and conf.alpha.should be_a
|
27
|
+
conf.alpha.should == 1 and conf.alpha.should be_a Integer
|
28
28
|
conf.bravo.should == "two" and conf.bravo.should be_a String
|
29
29
|
conf.charlie.should == 3.0 and conf.charlie.should be_a Float
|
30
30
|
conf.delta.should == :four and conf.delta.should be_a Symbol
|
31
31
|
end
|
32
32
|
|
33
33
|
def nested_configuration_example conf
|
34
|
-
conf.alpha.should
|
35
|
-
conf.foxtrot.should
|
34
|
+
conf.alpha.should be true
|
35
|
+
conf.foxtrot.should be true
|
36
36
|
simple_configuration_example conf.bravo
|
37
|
-
conf.bravo.foxtrot.should
|
37
|
+
conf.bravo.foxtrot.should be true
|
38
38
|
simple_configuration_example conf.echo
|
39
|
-
conf.echo.foxtrot.should
|
39
|
+
conf.echo.foxtrot.should be true
|
40
40
|
end
|
41
41
|
|
42
42
|
context 'v1.0' do
|
43
43
|
|
44
44
|
it 'reports the correct version' do
|
45
|
-
Configuration.version.should ==
|
45
|
+
Configuration.version.should == '1.1.1'
|
46
46
|
end
|
47
47
|
|
48
48
|
context 'at creation' do
|
@@ -89,10 +89,10 @@ describe Configuration do
|
|
89
89
|
|
90
90
|
it 'overrides defaults from another configuration' do
|
91
91
|
conf_default = Configuration.new( simple_explicit_configuration ) { echo true }
|
92
|
-
conf_default.echo.should
|
92
|
+
conf_default.echo.should be true
|
93
93
|
conf = Configuration.new( conf_default ) { echo false }
|
94
94
|
simple_configuration_example conf
|
95
|
-
conf.echo.should
|
95
|
+
conf.echo.should be false
|
96
96
|
end
|
97
97
|
|
98
98
|
context 'can load' do
|
@@ -105,18 +105,6 @@ describe Configuration do
|
|
105
105
|
simple_configuration_example Configuration.load StringIO.new simple_eval_string
|
106
106
|
end
|
107
107
|
|
108
|
-
it 'simple eval DSL from file (mock & expected methods)' do
|
109
|
-
file = mock
|
110
|
-
file.should_receive( :respond_to? ).with( :read ).and_return true
|
111
|
-
file.should_receive( :read ).and_return simple_eval_string
|
112
|
-
simple_configuration_example Configuration.load file
|
113
|
-
end
|
114
|
-
|
115
|
-
it 'simple eval DSL from filename (expected methods)' do
|
116
|
-
File.should_receive( :read ).with( "filename" ).and_return simple_eval_string
|
117
|
-
simple_configuration_example Configuration.load "filename"
|
118
|
-
end
|
119
|
-
|
120
108
|
it 'complex eval DSL from string' do
|
121
109
|
string = "alpha true
|
122
110
|
bravo do
|
@@ -127,14 +115,14 @@ describe Configuration do
|
|
127
115
|
end"
|
128
116
|
conf = Configuration.read string
|
129
117
|
conf.should_not be_nil
|
130
|
-
conf.alpha.should
|
118
|
+
conf.alpha.should be true
|
131
119
|
conf.bravo.should be_a Configuration
|
132
|
-
conf.bravo.alpha
|
133
|
-
conf.bravo.charlie
|
120
|
+
conf.bravo.alpha.should be true
|
121
|
+
conf.bravo.charlie.should be true
|
134
122
|
conf.bravo.delta.should be_a Configuration
|
135
|
-
conf.bravo.delta.alpha.should
|
136
|
-
conf.bravo.delta.charlie.should
|
137
|
-
conf.bravo.delta.echo.should
|
123
|
+
conf.bravo.delta.alpha.should be true
|
124
|
+
conf.bravo.delta.charlie.should be true
|
125
|
+
conf.bravo.delta.echo.should be true
|
138
126
|
end
|
139
127
|
|
140
128
|
end # loads
|
@@ -250,7 +238,7 @@ describe Configuration do
|
|
250
238
|
conf.should_not be_nil
|
251
239
|
conf.alpha.should be_a Configuration
|
252
240
|
conf.alpha.bravo.should be_a Configuration
|
253
|
-
conf.alpha.bravo.charlie.should
|
241
|
+
conf.alpha.bravo.charlie.should be true
|
254
242
|
end
|
255
243
|
|
256
244
|
it 'knows its parent when referenced directly' do
|
@@ -278,12 +266,12 @@ describe Configuration do
|
|
278
266
|
conf.alpha.bravo.bottom = true
|
279
267
|
end.to_not raise_error
|
280
268
|
conf.should_not be_nil
|
281
|
-
conf.top.should
|
282
|
-
conf.alpha.top.should
|
283
|
-
conf.alpha.middle.should
|
284
|
-
conf.alpha.bravo.top.should
|
285
|
-
conf.alpha.bravo.middle.should
|
286
|
-
conf.alpha.bravo.bottom.should
|
269
|
+
conf.top.should be true
|
270
|
+
conf.alpha.top.should be true
|
271
|
+
conf.alpha.middle.should be true
|
272
|
+
conf.alpha.bravo.top.should be true
|
273
|
+
conf.alpha.bravo.middle.should be true
|
274
|
+
conf.alpha.bravo.bottom.should be true
|
287
275
|
end
|
288
276
|
|
289
277
|
it 'can override inherited settings' do
|
@@ -364,14 +352,14 @@ describe Configuration do
|
|
364
352
|
conf.bravo.delta.echo true
|
365
353
|
end.to_not raise_error
|
366
354
|
conf.should_not be_nil
|
367
|
-
conf.alpha.should
|
355
|
+
conf.alpha.should be true
|
368
356
|
conf.bravo.should be_a Configuration
|
369
|
-
conf.bravo.alpha
|
370
|
-
conf.bravo.charlie
|
357
|
+
conf.bravo.alpha.should be true
|
358
|
+
conf.bravo.charlie.should be true
|
371
359
|
conf.bravo.delta.should be_a Configuration
|
372
|
-
conf.bravo.delta.alpha.should
|
373
|
-
conf.bravo.delta.charlie.should
|
374
|
-
conf.bravo.delta.echo.should
|
360
|
+
conf.bravo.delta.alpha.should be true
|
361
|
+
conf.bravo.delta.charlie.should be true
|
362
|
+
conf.bravo.delta.echo.should be true
|
375
363
|
end
|
376
364
|
|
377
365
|
end # explicit
|
@@ -443,14 +431,14 @@ describe Configuration do
|
|
443
431
|
end
|
444
432
|
end.to_not raise_error
|
445
433
|
conf.should_not be_nil
|
446
|
-
conf.alpha.should
|
434
|
+
conf.alpha.should be true
|
447
435
|
conf.bravo.should be_a Configuration
|
448
|
-
conf.bravo.alpha
|
449
|
-
conf.bravo.charlie
|
436
|
+
conf.bravo.alpha.should be true
|
437
|
+
conf.bravo.charlie.should be true
|
450
438
|
conf.bravo.delta.should be_a Configuration
|
451
|
-
conf.bravo.delta.alpha.should
|
452
|
-
conf.bravo.delta.charlie.should
|
453
|
-
conf.bravo.delta.echo.should
|
439
|
+
conf.bravo.delta.alpha.should be true
|
440
|
+
conf.bravo.delta.charlie.should be true
|
441
|
+
conf.bravo.delta.echo.should be true
|
454
442
|
end
|
455
443
|
|
456
444
|
it 'supported via {..}' do
|
@@ -459,14 +447,14 @@ describe Configuration do
|
|
459
447
|
conf = Configuration.new { |c1| c1.alpha true ; c1.bravo { |c2| c2.charlie true ; c2.delta { |c3| c3.echo true } } }
|
460
448
|
end.to_not raise_error
|
461
449
|
conf.should_not be_nil
|
462
|
-
conf.alpha.should
|
450
|
+
conf.alpha.should be true
|
463
451
|
conf.bravo.should be_a Configuration
|
464
|
-
conf.bravo.alpha
|
465
|
-
conf.bravo.charlie
|
452
|
+
conf.bravo.alpha.should be true
|
453
|
+
conf.bravo.charlie.should be true
|
466
454
|
conf.bravo.delta.should be_a Configuration
|
467
|
-
conf.bravo.delta.alpha.should
|
468
|
-
conf.bravo.delta.charlie.should
|
469
|
-
conf.bravo.delta.echo.should
|
455
|
+
conf.bravo.delta.alpha.should be true
|
456
|
+
conf.bravo.delta.charlie.should be true
|
457
|
+
conf.bravo.delta.echo.should be true
|
470
458
|
end
|
471
459
|
|
472
460
|
it 'can refer to an inherited setting' do
|
@@ -486,17 +474,17 @@ describe Configuration do
|
|
486
474
|
end
|
487
475
|
end.to_not raise_error
|
488
476
|
conf.should_not be_nil
|
489
|
-
conf.alpha.should
|
477
|
+
conf.alpha.should be true
|
490
478
|
conf.bravo.should be_a Configuration
|
491
|
-
conf.bravo.alpha
|
492
|
-
conf.bravo.charlie
|
479
|
+
conf.bravo.alpha.should be true
|
480
|
+
conf.bravo.charlie.should be true
|
493
481
|
conf.bravo.delta.should be_a Configuration
|
494
|
-
conf.bravo.delta.alpha.should
|
495
|
-
conf.bravo.delta.charlie.should
|
496
|
-
conf.bravo.delta.echo.should
|
497
|
-
conf.bravo.delta.golf.should
|
498
|
-
conf.bravo.foxtrot.should
|
499
|
-
conf.hotel.should
|
482
|
+
conf.bravo.delta.alpha.should be true
|
483
|
+
conf.bravo.delta.charlie.should be true
|
484
|
+
conf.bravo.delta.echo.should be true
|
485
|
+
conf.bravo.delta.golf.should be true
|
486
|
+
conf.bravo.foxtrot.should be true
|
487
|
+
conf.hotel.should be true
|
500
488
|
end
|
501
489
|
|
502
490
|
end # nested configuration
|
@@ -510,7 +498,7 @@ describe Configuration do
|
|
510
498
|
c.echo true
|
511
499
|
end
|
512
500
|
simple_configuration_example conf
|
513
|
-
conf.echo.should
|
501
|
+
conf.echo.should be true
|
514
502
|
end
|
515
503
|
|
516
504
|
it 'settings into the current configuration from a file (StringIO)' do
|
@@ -520,7 +508,7 @@ describe Configuration do
|
|
520
508
|
c.echo true
|
521
509
|
end
|
522
510
|
simple_configuration_example conf
|
523
|
-
conf.echo.should
|
511
|
+
conf.echo.should be true
|
524
512
|
end
|
525
513
|
|
526
514
|
it 'settings into a nested configuration from a string' do
|
@@ -622,14 +610,14 @@ describe Configuration do
|
|
622
610
|
end
|
623
611
|
end.to_not raise_error
|
624
612
|
conf.should_not be_nil
|
625
|
-
conf.alpha.should
|
613
|
+
conf.alpha.should be true
|
626
614
|
conf.bravo.should be_a Configuration
|
627
|
-
conf.bravo.alpha
|
628
|
-
conf.bravo.charlie
|
615
|
+
conf.bravo.alpha.should be true
|
616
|
+
conf.bravo.charlie.should be true
|
629
617
|
conf.bravo.delta.should be_a Configuration
|
630
|
-
conf.bravo.delta.alpha.should
|
631
|
-
conf.bravo.delta.charlie.should
|
632
|
-
conf.bravo.delta.echo.should
|
618
|
+
conf.bravo.delta.alpha.should be true
|
619
|
+
conf.bravo.delta.charlie.should be true
|
620
|
+
conf.bravo.delta.echo.should be true
|
633
621
|
end
|
634
622
|
|
635
623
|
it 'supported via {..}' do
|
@@ -638,14 +626,14 @@ describe Configuration do
|
|
638
626
|
conf = Configuration.new { |c1| c1.alpha true ; c1.bravo { |c2| c2.charlie true ; c2.delta { |c3| c3.echo true } } }
|
639
627
|
end.to_not raise_error
|
640
628
|
conf.should_not be_nil
|
641
|
-
conf.alpha.should
|
629
|
+
conf.alpha.should be true
|
642
630
|
conf.bravo.should be_a Configuration
|
643
|
-
conf.bravo.alpha
|
644
|
-
conf.bravo.charlie
|
631
|
+
conf.bravo.alpha.should be true
|
632
|
+
conf.bravo.charlie.should be true
|
645
633
|
conf.bravo.delta.should be_a Configuration
|
646
|
-
conf.bravo.delta.alpha.should
|
647
|
-
conf.bravo.delta.charlie.should
|
648
|
-
conf.bravo.delta.echo.should
|
634
|
+
conf.bravo.delta.alpha.should be true
|
635
|
+
conf.bravo.delta.charlie.should be true
|
636
|
+
conf.bravo.delta.echo.should be true
|
649
637
|
end
|
650
638
|
|
651
639
|
it 'can refer to an inherited setting' do
|
@@ -665,17 +653,17 @@ describe Configuration do
|
|
665
653
|
end
|
666
654
|
end.to_not raise_error
|
667
655
|
conf.should_not be_nil
|
668
|
-
conf.alpha.should
|
656
|
+
conf.alpha.should be true
|
669
657
|
conf.bravo.should be_a Configuration
|
670
|
-
conf.bravo.alpha
|
671
|
-
conf.bravo.charlie
|
658
|
+
conf.bravo.alpha.should be true
|
659
|
+
conf.bravo.charlie.should be true
|
672
660
|
conf.bravo.delta.should be_a Configuration
|
673
|
-
conf.bravo.delta.alpha.should
|
674
|
-
conf.bravo.delta.charlie.should
|
675
|
-
conf.bravo.delta.echo.should
|
676
|
-
conf.bravo.delta.golf.should
|
677
|
-
conf.bravo.foxtrot.should
|
678
|
-
conf.hotel.should
|
661
|
+
conf.bravo.delta.alpha.should be true
|
662
|
+
conf.bravo.delta.charlie.should be true
|
663
|
+
conf.bravo.delta.echo.should be true
|
664
|
+
conf.bravo.delta.golf.should be true
|
665
|
+
conf.bravo.foxtrot.should be true
|
666
|
+
conf.hotel.should be true
|
679
667
|
end
|
680
668
|
|
681
669
|
end # nested configuration
|
@@ -694,9 +682,9 @@ describe Configuration do
|
|
694
682
|
end
|
695
683
|
end.to_not raise_error
|
696
684
|
conf.should_not be_nil
|
697
|
-
conf.alpha.should
|
698
|
-
conf.bravo.should
|
699
|
-
conf.charlie.should
|
685
|
+
conf.alpha.should be true
|
686
|
+
conf.bravo.should be true
|
687
|
+
conf.charlie.should be true
|
700
688
|
end
|
701
689
|
|
702
690
|
it 'name can be a setting' do
|
@@ -711,9 +699,9 @@ describe Configuration do
|
|
711
699
|
end
|
712
700
|
end.to_not raise_error
|
713
701
|
conf.should_not be_nil
|
714
|
-
conf.alpha.should
|
715
|
-
conf.bravo.should
|
716
|
-
conf.charlie.should
|
702
|
+
conf.alpha.should be true
|
703
|
+
conf.bravo.should be true
|
704
|
+
conf.charlie.should be true
|
717
705
|
conf.setting1.should == 'bravo'
|
718
706
|
conf.setting2.should == 'charlie'
|
719
707
|
end
|
@@ -730,10 +718,10 @@ describe Configuration do
|
|
730
718
|
end
|
731
719
|
end.to_not raise_error
|
732
720
|
conf.should_not be_nil
|
733
|
-
conf.alpha.should
|
721
|
+
conf.alpha.should be true
|
734
722
|
conf.bravo.should be_a Configuration
|
735
|
-
conf.bravo.alpha
|
736
|
-
conf.bravo.charlie
|
723
|
+
conf.bravo.alpha.should be true
|
724
|
+
conf.bravo.charlie.should be true
|
737
725
|
end
|
738
726
|
|
739
727
|
end # dynamic setting
|
@@ -962,7 +950,7 @@ describe Configuration do
|
|
962
950
|
|
963
951
|
def simple_config_1_example conf
|
964
952
|
conf.should_not be_nil
|
965
|
-
conf.alpha.should == 1 and conf.alpha.should be_a
|
953
|
+
conf.alpha.should == 1 and conf.alpha.should be_a Integer
|
966
954
|
conf.bravo.should == "one" and conf.bravo.should be_a String
|
967
955
|
conf.charlie.should == 1.0 and conf.charlie.should be_a Float
|
968
956
|
conf.delta.should == :one and conf.delta.should be_a Symbol
|
@@ -979,12 +967,12 @@ describe Configuration do
|
|
979
967
|
|
980
968
|
def simple_config_2_example conf
|
981
969
|
conf.should_not be_nil
|
982
|
-
conf.echo.should == 2 and conf.echo.should be_a
|
970
|
+
conf.echo.should == 2 and conf.echo.should be_a Integer
|
983
971
|
conf.foxtrot.should == "two" and conf.foxtrot.should be_a String
|
984
972
|
conf.hotel.should == 2.0 and conf.hotel.should be_a Float
|
985
973
|
conf.india.should == :two and conf.india.should be_a Symbol
|
986
974
|
conf['echo']
|
987
|
-
#and conf[:echo].should be_a
|
975
|
+
#and conf[:echo].should be_a Integer
|
988
976
|
|
989
977
|
end
|
990
978
|
|
@@ -999,7 +987,7 @@ describe Configuration do
|
|
999
987
|
|
1000
988
|
def simple_config_3_example conf
|
1001
989
|
conf.should_not be_nil
|
1002
|
-
conf.juliet.should == 3 and conf.juliet.should be_a
|
990
|
+
conf.juliet.should == 3 and conf.juliet.should be_a Integer
|
1003
991
|
conf.kilo.should == "three" and conf.kilo.should be_a String
|
1004
992
|
conf.lima.should == 3.0 and conf.lima.should be_a Float
|
1005
993
|
conf.mike.should == :three and conf.mike.should be_a Symbol
|
data/spec/spec_helper.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
-
# Require this file using `require "spec_helper.rb"` to ensure that it is only
|
4
|
-
# loaded once.
|
5
|
-
#
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
1
|
RSpec.configure do |config|
|
8
|
-
config.
|
9
|
-
|
10
|
-
|
2
|
+
config.expect_with :rspec do |expectations|
|
3
|
+
expectations.syntax = [ :should, :expect ]
|
4
|
+
end
|
5
|
+
config.mock_with :rspec do |mocks|
|
6
|
+
mocks.syntax = [ :should, :expect ]
|
7
|
+
end
|
11
8
|
end
|
9
|
+
|
metadata
CHANGED
@@ -1,108 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iqeo-conf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease: 6
|
4
|
+
version: 1.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Gerard Fowley
|
9
|
-
autorequire:
|
10
8
|
bindir: bin
|
11
9
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rake
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 0.9.2
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.9.2
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: 2.10.0
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 2.10.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: yard
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.8.1
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.8.1
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: rdoc
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 3.12.0
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 3.12.0
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: redcarpet
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ~>
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 2.1.1
|
86
|
-
type: :development
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: 2.1.1
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
|
+
dependencies: []
|
94
12
|
description: A configuration DSL
|
95
|
-
email:
|
96
|
-
- gerard.fowley@iqeo.net
|
13
|
+
email: gerard.fowley@iqeo.net
|
97
14
|
executables: []
|
98
15
|
extensions: []
|
99
16
|
extra_rdoc_files: []
|
100
17
|
files:
|
101
|
-
- .gitignore
|
102
|
-
- .
|
103
|
-
- .
|
104
|
-
- .
|
105
|
-
- .yardoc/
|
18
|
+
- ".gitignore"
|
19
|
+
- ".rspec"
|
20
|
+
- ".ruby-gemset"
|
21
|
+
- ".ruby-version"
|
22
|
+
- ".yardoc/checksums"
|
23
|
+
- ".yardoc/object_types"
|
24
|
+
- ".yardoc/objects/root.dat"
|
25
|
+
- ".yardoc/proxy_types"
|
106
26
|
- Gemfile
|
107
27
|
- Gemfile.lock
|
108
28
|
- LICENSE
|
@@ -128,32 +48,28 @@ files:
|
|
128
48
|
- iqeo-conf.gemspec
|
129
49
|
- lib/iqeo/configuration.rb
|
130
50
|
- lib/iqeo/configuration/hash_with_indifferent_access.rb
|
131
|
-
- lib/iqeo/configuration/version.rb
|
132
51
|
- spec/configuration_spec.rb
|
133
52
|
- spec/spec_helper.rb
|
134
|
-
homepage: http://
|
135
|
-
licenses:
|
136
|
-
|
53
|
+
homepage: http://github.com/iqeo/iqeo-conf
|
54
|
+
licenses:
|
55
|
+
- GPL-3.0
|
56
|
+
metadata:
|
57
|
+
rubygems_mfa_required: 'true'
|
137
58
|
rdoc_options: []
|
138
59
|
require_paths:
|
139
60
|
- lib
|
140
61
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
-
none: false
|
142
62
|
requirements:
|
143
|
-
- -
|
63
|
+
- - ">="
|
144
64
|
- !ruby/object:Gem::Version
|
145
65
|
version: '0'
|
146
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
67
|
requirements:
|
149
|
-
- -
|
68
|
+
- - ">="
|
150
69
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
70
|
+
version: '0'
|
152
71
|
requirements: []
|
153
|
-
|
154
|
-
|
155
|
-
signing_key:
|
156
|
-
specification_version: 3
|
72
|
+
rubygems_version: 3.6.7
|
73
|
+
specification_version: 4
|
157
74
|
summary: A DSL for writing configuration files
|
158
75
|
test_files: []
|
159
|
-
has_rdoc:
|