rc 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
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.3.1
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-08'
69
+ date: '2013-01-22'
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --title "Runtime Configuration"
2
- --readme README.rdoc
2
+ --readme README.md
3
3
  --protected
4
4
  --private
5
5
  lib
data/HISTORY.md CHANGED
@@ -1,8 +1,23 @@
1
1
  # RELEASE HISTORY
2
2
 
3
- ## 0.3.1 / 2012-13-09
3
+ ## 0.4.0 / 2013-01-22
4
4
 
5
- This is bug fix release.
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
 
@@ -153,23 +153,19 @@ module RC
153
153
  end
154
154
 
155
155
  #
156
- # Remove a configuration setup.
157
- #
158
- # NOTE: This is probably a YAGNI.
156
+ # Configure current tool.
159
157
  #
160
- def unconfigure(tool)
161
- @setup[tool.to_s] = false
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 configure(tool, options={}, &block)
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
- if tool == current_tool
181
- configure_tool(tool) unless autoconfig?
182
- end
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 `#configure`.
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 setup(tool, options={}, &block)
192
- configure(tool, options, &block)
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
@@ -17,6 +17,7 @@ module RC
17
17
  def initialize(path=nil)
18
18
  @root = find_root(path || Dir.pwd)
19
19
  @index = load_index
20
+ @var = {}
20
21
  end
21
22
 
22
23
  #
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.3.1
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-09 00:00:00.000000000 Z
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.23
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.