confiture 0.1.2 → 0.1.3
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.
- data/.document +2 -2
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +7 -1
- data/README.md +1 -2
- data/lib/confiture/configuration.rb +3 -0
- data/lib/confiture/version.rb +1 -1
- data/spec/configuration_spec.rb +5 -0
- metadata +25 -10
- data/CHANGELOG.rdoc +0 -3
data/.document
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
lib/**/*.rb
|
2
|
-
README.
|
3
|
-
CHANGELOG.
|
2
|
+
README.md
|
3
|
+
CHANGELOG.md
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
## 0.1.3
|
2
|
+
|
3
|
+
- raising an error when using config before initialization
|
4
|
+
|
5
|
+
## 0.1.2
|
6
|
+
|
7
|
+
- fixing private blank? method
|
8
|
+
|
9
|
+
## 0.1.1
|
10
|
+
|
11
|
+
- allow validation of mandatory keys with *confiture_mandatory_keys*
|
12
|
+
|
13
|
+
## 0.1.0
|
14
|
+
|
15
|
+
- first public version
|
16
|
+
|
17
|
+
## 0.0.1
|
18
|
+
|
19
|
+
- initial version
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
confiture (0.
|
4
|
+
confiture (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
@@ -13,6 +13,11 @@ GEM
|
|
13
13
|
coderay (~> 1.0.5)
|
14
14
|
method_source (~> 0.7.1)
|
15
15
|
slop (>= 2.4.4, < 3)
|
16
|
+
pry (0.9.9.6-java)
|
17
|
+
coderay (~> 1.0.5)
|
18
|
+
method_source (~> 0.7.1)
|
19
|
+
slop (>= 2.4.4, < 3)
|
20
|
+
spoon (~> 0.0)
|
16
21
|
rake (0.9.2.2)
|
17
22
|
rspec (2.7.0)
|
18
23
|
rspec-core (~> 2.7.0)
|
@@ -23,6 +28,7 @@ GEM
|
|
23
28
|
diff-lcs (~> 1.1.2)
|
24
29
|
rspec-mocks (2.7.0)
|
25
30
|
slop (2.4.4)
|
31
|
+
spoon (0.0.1)
|
26
32
|
|
27
33
|
PLATFORMS
|
28
34
|
java
|
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
## Infos
|
2
2
|
|
3
|
-

|
4
3
|

|
5
4
|
|
6
5
|
## Installation
|
@@ -44,6 +43,6 @@ Inline style configuration:
|
|
44
43
|
## License
|
45
44
|
|
46
45
|
"THE BEER-WARE LICENSE" (Revision 42):
|
47
|
-
ps@nofail.de
|
46
|
+
[ps@nofail.de](mailto:ps@nofail.de) wrote this file. As long as you retain this notice you
|
48
47
|
can do whatever you want with this stuff. If we meet some day, and you think
|
49
48
|
this stuff is worth it, you can buy me a beer in return Peter Schröder
|
@@ -92,6 +92,9 @@ module Confiture
|
|
92
92
|
# Raises an ArgumentError if the configuration is not valid.
|
93
93
|
#
|
94
94
|
def validate!
|
95
|
+
if data.nil?
|
96
|
+
raise ArgumentError.new("you are working on an empty configuration. run configuration code first!")
|
97
|
+
end
|
95
98
|
unless valid?
|
96
99
|
raise ArgumentError.new("you are missing mandatory configuration options. please set #{@mandatory_keys}")
|
97
100
|
end
|
data/lib/confiture/version.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
@@ -35,6 +35,11 @@ module Confiture
|
|
35
35
|
it "should validate the configuration" do
|
36
36
|
expect { Valid.configure.validate! }.should raise_error(ArgumentError, "you are missing mandatory configuration options. please set [:key]")
|
37
37
|
end
|
38
|
+
|
39
|
+
it "should warn if a mandatory key is set and no configuration given" do
|
40
|
+
Valid.send :data=, nil
|
41
|
+
expect { Valid.validate! }.should raise_error(ArgumentError, "you are working on an empty configuration. run configuration code first!")
|
42
|
+
end
|
38
43
|
end
|
39
44
|
|
40
45
|
context "defaults" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confiture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: 0.9.2
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.9.2
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: rspec
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '2.7'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '2.7'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: pry
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
@@ -43,7 +53,12 @@ dependencies:
|
|
43
53
|
version: 0.9.9
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.9
|
47
62
|
description: Confiture helps with configuring your gem.
|
48
63
|
email:
|
49
64
|
- phoetmail@googlemail.com
|
@@ -55,7 +70,7 @@ files:
|
|
55
70
|
- .gitignore
|
56
71
|
- .rvmrc
|
57
72
|
- .travis.yml
|
58
|
-
- CHANGELOG.
|
73
|
+
- CHANGELOG.md
|
59
74
|
- Gemfile
|
60
75
|
- Gemfile.lock
|
61
76
|
- README.md
|
@@ -88,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
103
|
version: '0'
|
89
104
|
requirements: []
|
90
105
|
rubyforge_project: confiture
|
91
|
-
rubygems_version: 1.8.
|
106
|
+
rubygems_version: 1.8.24
|
92
107
|
signing_key:
|
93
108
|
specification_version: 3
|
94
109
|
summary: Confiture helps with configuring your gem.
|
data/CHANGELOG.rdoc
DELETED