dynamic_configuration 0.3.15 → 0.3.16
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.
- checksums.yaml +4 -4
- data/README +7 -6
- data/VERSION +1 -1
- data/dynamic_configuration.gemspec +4 -4
- data/lib/dynamic_configuration.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7820a662e116b051dba8c4f7a1de412a23469632
|
4
|
+
data.tar.gz: 4bd8bf975d3d23967397141908172022aa81a319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 973f4d4d8bdb9f99160ad5f2d8db765125757781c7305c118aa6398820490be11ad3258094a7b98f2b4573a3b75a590a79e7cf67c19b5f4a952a7445d91fd73e
|
7
|
+
data.tar.gz: 9f94af535e2457aa7c0c50ca4a091d4976dc676b745e09100457ebe90f9e785e571b985ce8a7f86dc35f04c41406d00ef1fb2004bd84c5aa733ea18ce9c2c2db
|
data/README
CHANGED
@@ -36,6 +36,11 @@ config/opts/opts.rb file with the following contents:
|
|
36
36
|
Once you require this file somewhere in your application, the constant
|
37
37
|
Opts will hold all the settings.
|
38
38
|
|
39
|
+
Side-note: many more obvious constant names like Options, or Config,
|
40
|
+
are names of classes defined by Ruby, Rails or popular gems, and will
|
41
|
+
cause name clashes in certain contexts. Hence the less neat but
|
42
|
+
more reliable proposed Opts name.
|
43
|
+
|
39
44
|
## Usage
|
40
45
|
|
41
46
|
### Basics
|
@@ -122,12 +127,8 @@ otherwise.
|
|
122
127
|
|
123
128
|
## Tips ##
|
124
129
|
|
125
|
-
|
126
|
-
|
127
|
-
contexts. Hence the examples use less neat but reliable Opts name.
|
128
|
-
|
129
|
-
2. You can make the options available much earlier in the Rails
|
130
|
-
loading process by explicitly requiring them in config/application.rb:
|
130
|
+
You can make the options available very early in the Rails loading
|
131
|
+
process by explicitly requiring them in config/application.rb:
|
131
132
|
|
132
133
|
module SomeApplication
|
133
134
|
class Application < Rails::Application
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.16
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: dynamic_configuration 0.3.
|
5
|
+
# stub: dynamic_configuration 0.3.16 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "dynamic_configuration"
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.16"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Jaros\u{142}aw Rzesz\u{f3}tko"]
|
14
|
-
s.date = "2014-
|
14
|
+
s.date = "2014-03-25"
|
15
15
|
s.description = "Flexible configuration library for Ruby and Rails applications."
|
16
16
|
s.email = "jrzeszotko@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
"spec_helper.rb"
|
37
37
|
]
|
38
38
|
s.homepage = "http://github.com/jaroslawr/dynamic_configuration"
|
39
|
-
s.rubygems_version = "2.2.
|
39
|
+
s.rubygems_version = "2.2.2"
|
40
40
|
s.summary = "Flexible configuration library for Ruby and Rails applications."
|
41
41
|
end
|
42
42
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'blankslate'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
module DynamicConfiguration
|
4
5
|
class << self
|
@@ -60,7 +61,7 @@ module DynamicConfiguration
|
|
60
61
|
@config_directory.entries.each do |directory|
|
61
62
|
next if ["..", "."].include?(directory.basename.to_s)
|
62
63
|
directory = @config_directory + directory
|
63
|
-
next unless directory.directory? && Rails.env == directory.basename.to_s
|
64
|
+
next unless directory.directory? && @rails_loaded && Rails.env == directory.basename.to_s
|
64
65
|
|
65
66
|
directory.entries.each do |mod_file|
|
66
67
|
mod_file = directory + mod_file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_configuration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarosław Rzeszótko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Flexible configuration library for Ruby and Rails applications.
|
14
14
|
email: jrzeszotko@gmail.com
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
54
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.2.
|
55
|
+
rubygems_version: 2.2.2
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Flexible configuration library for Ruby and Rails applications.
|