local_config 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2011 Viximo, Inc.
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
5
+ associated documentation files (the "Software"), to deal in the Software without restriction,
6
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
7
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial
11
+ portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
16
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
17
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,14 @@
1
+ Local Config
2
+ ============
3
+
4
+ Allows a local, gitignored configuration file to override Rails configuration settings from the
5
+ environment.
6
+
7
+ Currently supports Rails 3.0 (and probably 3.1)
8
+
9
+ Installation
10
+ ------------
11
+
12
+ 1. Add local_config to your Gemfile.
13
+ 2. Drop a file called local.rb in config/. It runs in the context of Rails initializer and has
14
+ access to the configuration via the config method.
@@ -0,0 +1 @@
1
+ require 'local_config/railtie'
@@ -0,0 +1,10 @@
1
+ require 'rails'
2
+
3
+ module LocalConfig
4
+ class Railtie < Rails::Railtie
5
+ initializer "local_config.boot" do
6
+ local_file = File.join(Rails.root, 'config/local.rb')
7
+ eval(File.read(local_file), binding) if File.exists?(local_file)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ module LocalConfig
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 1
5
+ PATCH = 0
6
+ STRING = [MAJOR, MINOR, PATCH].join('.')
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: local_config
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Matt Griffin
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-09-27 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: " Allows a local configuration file to modify Rails environment.\n"
23
+ email: matt@griffinonline.org
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - README.md
32
+ - LICENSE
33
+ - lib/local_config/railtie.rb
34
+ - lib/local_config/version.rb
35
+ - lib/local_config.rb
36
+ has_rdoc: true
37
+ homepage: http://github.com/Viximo/local_config
38
+ licenses: []
39
+
40
+ post_install_message:
41
+ rdoc_options: []
42
+
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ hash: 3
51
+ segments:
52
+ - 0
53
+ version: "0"
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ requirements: []
64
+
65
+ rubyforge_project:
66
+ rubygems_version: 1.5.3
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: Allows a local configuration file to modify Rails environment.
70
+ test_files: []
71
+