rc 0.3.1 → 0.4.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.
- data/.index +7 -6
- data/.yardopts +1 -1
- data/HISTORY.md +17 -2
- data/lib/rc/interface.rb +20 -14
- data/lib/rc/properties.rb +1 -0
- metadata +3 -3
data/.index
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
|
-
type: ruby
|
3
2
|
revision: 2013
|
3
|
+
type: ruby
|
4
4
|
sources:
|
5
5
|
- var
|
6
6
|
authors:
|
@@ -48,21 +48,22 @@ repositories:
|
|
48
48
|
scm: git
|
49
49
|
uri: git://github.com/rubyworks/rc.git
|
50
50
|
categories: []
|
51
|
-
paths:
|
52
|
-
load:
|
53
|
-
- lib
|
54
51
|
copyrights:
|
55
52
|
- holder: Rubyworks
|
56
53
|
year: '2011'
|
57
54
|
license: BSD-2-Clause
|
55
|
+
customs: []
|
56
|
+
paths:
|
57
|
+
lib:
|
58
|
+
- lib
|
58
59
|
created: '2011-11-06'
|
59
60
|
summary: The best way to manage your application's configuration.
|
60
61
|
title: RC
|
61
|
-
version: 0.
|
62
|
+
version: 0.4.0
|
62
63
|
name: rc
|
63
64
|
description: ! 'R.C. is a multi-tenant runtime configuration system for Ruby projects.
|
64
65
|
|
65
66
|
It can be used to configure almost any Ruby tool or library regardless
|
66
67
|
|
67
68
|
of whether that tool or library has dedicated support for RC or not.'
|
68
|
-
date: '2013-01-
|
69
|
+
date: '2013-01-22'
|
data/.yardopts
CHANGED
data/HISTORY.md
CHANGED
@@ -1,8 +1,23 @@
|
|
1
1
|
# RELEASE HISTORY
|
2
2
|
|
3
|
-
## 0.
|
3
|
+
## 0.4.0 / 2013-01-22
|
4
4
|
|
5
|
-
|
5
|
+
Tools that have built-in support for RC will have to call `RC.configure` to
|
6
|
+
configure the tool. The old `configure` method has been renamed to `define_config`
|
7
|
+
and is used *only* to define how calling `configure` is applied. This was done
|
8
|
+
so that tools could set `ENV['profile']` internally, say via a command line option.
|
9
|
+
This is a major change and all tools that it effects need to update to reflect the
|
10
|
+
change in order to work.
|
11
|
+
|
12
|
+
Changes:
|
13
|
+
|
14
|
+
* Rename `configure` to `define_config` (old `setup` alias is still there).
|
15
|
+
* Fix missing instance variable in Properties. [bug]
|
16
|
+
|
17
|
+
|
18
|
+
## 0.3.1 / 2012-12-09
|
19
|
+
|
20
|
+
This is bug fix release that addresses a couple of stupid oversights.
|
6
21
|
|
7
22
|
Changes:
|
8
23
|
|
data/lib/rc/interface.rb
CHANGED
@@ -153,23 +153,19 @@ module RC
|
|
153
153
|
end
|
154
154
|
|
155
155
|
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
# NOTE: This is probably a YAGNI.
|
156
|
+
# Configure current tool.
|
159
157
|
#
|
160
|
-
def
|
161
|
-
|
158
|
+
def configure(tool=nil)
|
159
|
+
configure_tool(tool || RC.current_tool)
|
162
160
|
end
|
163
161
|
|
164
|
-
alias :unset :unconfigure
|
165
|
-
|
166
162
|
#
|
167
163
|
# Define a custom configuration handler.
|
168
164
|
#
|
169
165
|
# If the current tool matches the given tool, and autoconfiguration is not being used,
|
170
166
|
# then configuration is applied immediately.
|
171
167
|
#
|
172
|
-
def
|
168
|
+
def define_config(tool, options={}, &block)
|
173
169
|
tool = tool.to_s
|
174
170
|
|
175
171
|
@setup ||= {}
|
@@ -177,21 +173,31 @@ module RC
|
|
177
173
|
if block
|
178
174
|
@setup[tool] = Setup.new(tool, options, &block)
|
179
175
|
|
180
|
-
|
181
|
-
|
182
|
-
|
176
|
+
# REMOVED: Doing this automatically made it impossible for tools to set the profile.
|
177
|
+
#if tool == current_tool
|
178
|
+
# configure_tool(tool) unless autoconfig?
|
179
|
+
#end
|
183
180
|
end
|
184
181
|
|
185
182
|
@setup[tool]
|
186
183
|
end
|
187
184
|
|
188
185
|
#
|
189
|
-
# Original name of `#
|
186
|
+
# Original name of `#define_config`.
|
187
|
+
#
|
188
|
+
alias :setup :define_config
|
189
|
+
|
190
|
+
#
|
191
|
+
# Remove a configuration setup.
|
192
|
+
#
|
193
|
+
# NOTE: This is probably a YAGNI.
|
190
194
|
#
|
191
|
-
def
|
192
|
-
|
195
|
+
def undefine_config(tool)
|
196
|
+
@setup[tool.to_s] = false
|
193
197
|
end
|
194
198
|
|
199
|
+
alias :unset :undefine_config
|
200
|
+
|
195
201
|
#
|
196
202
|
# Set current profile via ARGV switch. This is done immediately,
|
197
203
|
# setting `ENV['profile']` to the switch value if this setup is
|
data/lib/rc/properties.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: finder
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 1.8.
|
164
|
+
rubygems_version: 1.8.24
|
165
165
|
signing_key:
|
166
166
|
specification_version: 3
|
167
167
|
summary: The best way to manage your application's configuration.
|