configvars_rails 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +18 -1
- data/VERSION +1 -1
- data/configvars_rails.gemspec +1 -1
- data/lib/configvars_rails/descriptor.rb +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -10,7 +10,7 @@ However, it also means that the source code has to be modified to make any
|
|
10
10
|
configuration change. This makes it unlikely that the same code can be used in
|
11
11
|
different deployments.
|
12
12
|
|
13
|
-
==
|
13
|
+
== Installation
|
14
14
|
|
15
15
|
Scaffold the model, controller, and views.
|
16
16
|
rails g configvars_rails:all
|
@@ -19,6 +19,23 @@ Note: the code inside the models and controllers is tucked away in the plug-in.
|
|
19
19
|
The scaffold model and controller is there as an point. You will be
|
20
20
|
able to update the plug-in without regenerating the scaffolds.
|
21
21
|
|
22
|
+
Edit app/controllers/config_vars_controller.rb to plug in your access control
|
23
|
+
mechanism.
|
24
|
+
|
25
|
+
== Usage
|
26
|
+
|
27
|
+
Configuration variables are defined as follows:
|
28
|
+
ConfigVars.string :variable_name, 'default value'
|
29
|
+
ConfigVars.string(:variable_name) { 'block producing default value' }
|
30
|
+
|
31
|
+
It is safe to define configuration variables at any time. Variables can be
|
32
|
+
redefined. Other plugins can define their own variables, as long as they include
|
33
|
+
configvars_rails as a gem dependency, to ensure proper load order.
|
34
|
+
|
35
|
+
When the application is running, a rudimentary UI for editing configuration
|
36
|
+
variables is available at
|
37
|
+
http://your-app-server/config_vars
|
38
|
+
|
22
39
|
== Note on Patches/Pull Requests
|
23
40
|
|
24
41
|
* Fork the project.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/configvars_rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configvars_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Victor Costan
|