rc 0.3.0 → 0.3.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/.index +5 -3
- data/.rubyrc +2 -1
- data/HISTORY.md +12 -1
- data/README.md +16 -10
- data/lib/rc/interface.rb +2 -2
- data/lib/rc/tweaks/rake.rb +4 -3
- metadata +7 -4
data/.index
CHANGED
@@ -58,9 +58,11 @@ copyrights:
|
|
58
58
|
created: '2011-11-06'
|
59
59
|
summary: The best way to manage your application's configuration.
|
60
60
|
title: RC
|
61
|
-
version: 0.3.
|
61
|
+
version: 0.3.1
|
62
62
|
name: rc
|
63
|
-
description: ! 'R.C. is a multi-tenant configuration system for Ruby projects.
|
63
|
+
description: ! 'R.C. is a multi-tenant runtime configuration system for Ruby projects.
|
64
64
|
|
65
|
-
|
65
|
+
It can be used to configure almost any Ruby tool or library regardless
|
66
|
+
|
67
|
+
of whether that tool or library has dedicated support for RC or not.'
|
66
68
|
date: '2013-01-08'
|
data/.rubyrc
CHANGED
data/HISTORY.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# RELEASE HISTORY
|
2
2
|
|
3
|
+
## 0.3.1 / 2012-13-09
|
4
|
+
|
5
|
+
This is bug fix release.
|
6
|
+
|
7
|
+
Changes:
|
8
|
+
|
9
|
+
* Fix rake tweak. Use `RC.configure` instead of `court`.
|
10
|
+
* Fix #autoconfig? method's instance variable.
|
11
|
+
* Fix #bootstrap_require to override correct hook.
|
12
|
+
|
13
|
+
|
3
14
|
## 0.3.0 / 2012-13-08
|
4
15
|
|
5
16
|
This release is of the project finally begins to settle down the API.
|
@@ -30,7 +41,7 @@ Changes:
|
|
30
41
|
* Overhaul and drastically simplify design.
|
31
42
|
|
32
43
|
|
33
|
-
## 0.1.1
|
44
|
+
## 0.1.1 / 2012-04-09
|
34
45
|
|
35
46
|
Initial release of RC.
|
36
47
|
|
data/README.md
CHANGED
@@ -35,22 +35,21 @@ Then add `-rc` to your system's `RUBYOPT` environment variable.
|
|
35
35
|
$ export RUBYOPT='-rc'
|
36
36
|
|
37
37
|
You will want to add that to your `.bashrc`, `.profile` or equivalent configuration
|
38
|
-
script, so it always available.
|
38
|
+
script, so it is always available.
|
39
39
|
|
40
40
|
|
41
41
|
## Instruction
|
42
42
|
|
43
|
-
To use RC in a project create a configuration file called either `.
|
44
|
-
|
45
|
-
|
46
|
-
matches exist. In this file add configuration blocks by name of the commandline tool.
|
43
|
+
To use RC in a project create a configuration file called either `.ruby` or `.rubyrc`.
|
44
|
+
The longer name has precedence if both are present. In this file add configuration blocks
|
45
|
+
by name of the commandline tool.
|
47
46
|
|
48
47
|
For example, let's demonstrate how we could use this to configure Rake tasks.
|
49
|
-
(Yes, Rake is not the most obvious choice, since
|
50
|
-
to keep using a Rakefile. But
|
51
|
-
and also it makes a good tie-in with next example.)
|
48
|
+
(Yes, Rake is not the most obvious choice, since developers are just as happy
|
49
|
+
to keep using a Rakefile. But using Rake as an example serves to show that it
|
50
|
+
*can* be done, and also it makes a good tie-in with next example.)
|
52
51
|
|
53
|
-
$ cat
|
52
|
+
$ cat .rubyrc
|
54
53
|
config :rake do
|
55
54
|
desc 'generate yard docs'
|
56
55
|
task :yard do
|
@@ -63,7 +62,7 @@ Now when `rake` is run the tasks defined in this configuration will be available
|
|
63
62
|
You might wonder why anyone would do this. That's where the *multi-tenancy*
|
64
63
|
comes into play. Let's add another configuration.
|
65
64
|
|
66
|
-
$ cat
|
65
|
+
$ cat .rubyrc
|
67
66
|
title = "MyApp"
|
68
67
|
|
69
68
|
config :rake do
|
@@ -120,6 +119,13 @@ line option for specifying the profile.
|
|
120
119
|
Beyond mere namespacing, some tools might utilize profiles for a more specific
|
121
120
|
purpose fitting the tool. Consult the tool's documentation for details.
|
122
121
|
|
122
|
+
Configurations can also be pulled in from other gems using the `from` option.
|
123
|
+
|
124
|
+
config :qed, :profile=>'simplecov', :from=>'qed'
|
125
|
+
|
126
|
+
As long as a project includes its `.rubyrc` file (and any imported files)
|
127
|
+
in it's gem package, it's possible to share configurations in this manner.
|
128
|
+
|
123
129
|
|
124
130
|
## Customization
|
125
131
|
|
data/lib/rc/interface.rb
CHANGED
@@ -243,7 +243,7 @@ module RC
|
|
243
243
|
#
|
244
244
|
#
|
245
245
|
def autoconfig?
|
246
|
-
@
|
246
|
+
@autoconfig
|
247
247
|
end
|
248
248
|
|
249
249
|
protected
|
@@ -293,7 +293,7 @@ module RC
|
|
293
293
|
# triggered on #require, not #load.
|
294
294
|
#
|
295
295
|
def bootstrap_require
|
296
|
-
def
|
296
|
+
def RC.required(feature)
|
297
297
|
config = RC.configuration[feature]
|
298
298
|
if config
|
299
299
|
config.each do |config|
|
data/lib/rc/tweaks/rake.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rake'
|
2
2
|
|
3
|
-
|
3
|
+
RC.configure 'rake' do |config|
|
4
4
|
Module.new do
|
5
5
|
extend Rake::DSL
|
6
6
|
module_eval(&config)
|
@@ -8,7 +8,7 @@ court 'rake' do |config|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module Rake
|
11
|
-
RC_FILES = '.
|
11
|
+
RC_FILES = '.rubyrc', '.ruby'
|
12
12
|
|
13
13
|
class Application
|
14
14
|
remove_const(:DEFAULT_RAKEFILES)
|
@@ -28,4 +28,5 @@ module Rake
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# Must manually configure tweaked libraries.
|
31
|
-
RC.
|
31
|
+
#RC.send(:configure_tool, 'rake')
|
32
|
+
|
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.
|
4
|
+
version: 0.3.1
|
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-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: finder
|
@@ -91,9 +91,11 @@ dependencies:
|
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
|
-
description: ! 'R.C. is a multi-tenant configuration system for Ruby projects.
|
94
|
+
description: ! 'R.C. is a multi-tenant runtime configuration system for Ruby projects.
|
95
95
|
|
96
|
-
|
96
|
+
It can be used to configure almost any Ruby tool or library regardless
|
97
|
+
|
98
|
+
of whether that tool or library has dedicated support for RC or not.'
|
97
99
|
email:
|
98
100
|
- transfire@gmail.com
|
99
101
|
executables: []
|
@@ -164,3 +166,4 @@ signing_key:
|
|
164
166
|
specification_version: 3
|
165
167
|
summary: The best way to manage your application's configuration.
|
166
168
|
test_files: []
|
169
|
+
has_rdoc:
|