conker 0.13.1 → 0.14.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.
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/conker.gemspec +1 -2
- data/lib/conker.rb +15 -0
- metadata +3 -3
- data/Gemfile.lock +0 -32
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.lock
|
data/Gemfile
CHANGED
data/conker.gemspec
CHANGED
@@ -2,12 +2,11 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'conker'
|
3
3
|
s.authors = ['Sam Stokes', 'Conrad Irwin', 'Lee Mallabone', 'Martin Kleppmann']
|
4
4
|
s.email = 'supportive@rapportive.com'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '0.14.1'
|
6
6
|
s.summary = %q{Conker will conquer your config.}
|
7
7
|
s.description = "Configuration library."
|
8
8
|
s.homepage = "https://github.com/rapportive/conker"
|
9
9
|
s.license = 'MIT'
|
10
|
-
s.date = Date.today.to_s
|
11
10
|
s.files = `git ls-files`.split("\n")
|
12
11
|
s.require_paths = %w(lib)
|
13
12
|
s.add_dependency 'activesupport'
|
data/lib/conker.rb
CHANGED
@@ -36,6 +36,7 @@ module Conker
|
|
36
36
|
class MissingDefault < Error
|
37
37
|
def initialize; super("missing default value"); end
|
38
38
|
end
|
39
|
+
class IncompatibleType < Error; end
|
39
40
|
|
40
41
|
|
41
42
|
class << self
|
@@ -118,6 +119,15 @@ module Conker
|
|
118
119
|
}.merge(opts))
|
119
120
|
end
|
120
121
|
|
122
|
+
# A couchbase_url is required_in_production with development defaulting to
|
123
|
+
# localhost/default and test defaulting to localhost/test.
|
124
|
+
def couchbase_url(opts = {})
|
125
|
+
required_in_production({
|
126
|
+
:development => 'http://localhost:8091/pools/default/buckets/default',
|
127
|
+
:test => 'http://localhost:8091/pools/default/buckets/test',
|
128
|
+
}.merge(opts))
|
129
|
+
end
|
130
|
+
|
121
131
|
# Declare an environment variable, defaulting to other values if not defined.
|
122
132
|
#
|
123
133
|
# You must either specify a :default, or specify defaults for each of
|
@@ -262,6 +272,11 @@ module Conker
|
|
262
272
|
when :string, nil
|
263
273
|
value.to_s
|
264
274
|
# defaults to '' if omitted
|
275
|
+
when :hash
|
276
|
+
unless value.is_a? Hash
|
277
|
+
raise IncompatibleType, "wanted a Hash, got #{value.class}"
|
278
|
+
end
|
279
|
+
value
|
265
280
|
else
|
266
281
|
raise UnknownType, type.to_s
|
267
282
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-
|
15
|
+
date: 2013-09-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -68,8 +68,8 @@ executables: []
|
|
68
68
|
extensions: []
|
69
69
|
extra_rdoc_files: []
|
70
70
|
files:
|
71
|
+
- .gitignore
|
71
72
|
- Gemfile
|
72
|
-
- Gemfile.lock
|
73
73
|
- LICENSE.MIT
|
74
74
|
- TODO.txt
|
75
75
|
- conker.gemspec
|
data/Gemfile.lock
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
conker (0.12.0)
|
5
|
-
activesupport
|
6
|
-
addressable
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
activesupport (3.2.9)
|
12
|
-
i18n (~> 0.6)
|
13
|
-
multi_json (~> 1.0)
|
14
|
-
addressable (2.3.2)
|
15
|
-
diff-lcs (1.1.3)
|
16
|
-
i18n (0.6.1)
|
17
|
-
multi_json (1.5.0)
|
18
|
-
rspec (2.12.0)
|
19
|
-
rspec-core (~> 2.12.0)
|
20
|
-
rspec-expectations (~> 2.12.0)
|
21
|
-
rspec-mocks (~> 2.12.0)
|
22
|
-
rspec-core (2.12.2)
|
23
|
-
rspec-expectations (2.12.1)
|
24
|
-
diff-lcs (~> 1.1.3)
|
25
|
-
rspec-mocks (2.12.0)
|
26
|
-
|
27
|
-
PLATFORMS
|
28
|
-
ruby
|
29
|
-
|
30
|
-
DEPENDENCIES
|
31
|
-
conker!
|
32
|
-
rspec
|