rails_config_loader 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +41 -0
- data/LICENSE.txt +20 -0
- data/README.md +58 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/lib/config_loader/base.rb +49 -0
- data/lib/config_loader/delegator.rb +12 -0
- data/lib/config_loader/json.rb +9 -0
- data/lib/config_loader/yaml.rb +9 -0
- data/lib/rails_config_loader.rb +24 -0
- data/rails_config_loader.gemspec +79 -0
- data/spec/config_loader/yaml_spec.rb +51 -0
- data/spec/fixtures/config/app.yml +2 -0
- data/spec/fixtures/config/facebook.yml +3 -0
- data/spec/fixtures/config/htc.yml +3 -0
- data/spec/fixtures/config/payment_gateway/quickpay.da.yml +21 -0
- data/spec/fixtures/db/config/seed.yml +14 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/support/main_app.rb +33 -0
- metadata +185 -0
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.1.3)
|
5
|
+
git (1.2.5)
|
6
|
+
hashie (1.2.0)
|
7
|
+
jeweler (1.8.3)
|
8
|
+
bundler (~> 1.0)
|
9
|
+
git (>= 1.2.5)
|
10
|
+
rake
|
11
|
+
rdoc
|
12
|
+
json (1.7.0)
|
13
|
+
json_pure (1.7.0)
|
14
|
+
multi_json (1.3.4)
|
15
|
+
rake (0.9.2.2)
|
16
|
+
rdoc (3.12)
|
17
|
+
json (~> 1.4)
|
18
|
+
rspec (2.8.0)
|
19
|
+
rspec-core (~> 2.8.0)
|
20
|
+
rspec-expectations (~> 2.8.0)
|
21
|
+
rspec-mocks (~> 2.8.0)
|
22
|
+
rspec-core (2.8.0)
|
23
|
+
rspec-expectations (2.8.0)
|
24
|
+
diff-lcs (~> 1.1.2)
|
25
|
+
rspec-mocks (2.8.0)
|
26
|
+
simplecov (0.6.2)
|
27
|
+
multi_json (~> 1.3)
|
28
|
+
simplecov-html (~> 0.5.3)
|
29
|
+
simplecov-html (0.5.3)
|
30
|
+
|
31
|
+
PLATFORMS
|
32
|
+
ruby
|
33
|
+
|
34
|
+
DEPENDENCIES
|
35
|
+
bundler (~> 1.1.0)
|
36
|
+
hashie
|
37
|
+
jeweler (~> 1.8.3)
|
38
|
+
json_pure
|
39
|
+
rdoc (~> 3.12)
|
40
|
+
rspec (~> 2.8.0)
|
41
|
+
simplecov
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012 Kristian Mandrup
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Config loader
|
2
|
+
|
3
|
+
Nice little utility to load config files from the Rails config dir or even in other locations. Supports YAML and JSON formats that are wrapped in a Hashie for nice method and hash access.
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
module MainApp
|
7
|
+
def self.config
|
8
|
+
Config.instance
|
9
|
+
end
|
10
|
+
|
11
|
+
class Config
|
12
|
+
include Singleton
|
13
|
+
include ConfigLoader::Delegator
|
14
|
+
|
15
|
+
# load seed file (see geo-autocomplete demo)
|
16
|
+
def seed
|
17
|
+
@seed ||= load_yaml('config/seed.yml', :dir => 'db')
|
18
|
+
end
|
19
|
+
|
20
|
+
# config for the app
|
21
|
+
# any missing method on this is delegated to the
|
22
|
+
# Hashie wrapping this loaded content
|
23
|
+
def config
|
24
|
+
@config ||= load_yaml('app.yml')
|
25
|
+
end
|
26
|
+
|
27
|
+
# auto detect load method based on filename extension
|
28
|
+
def app
|
29
|
+
@app ||= load('app.yml')
|
30
|
+
end
|
31
|
+
|
32
|
+
# load json
|
33
|
+
def addresses locale = :da
|
34
|
+
@config ||= load 'data/addresses.json', :locale => get_locale(locale)
|
35
|
+
end
|
36
|
+
|
37
|
+
def payment_provider
|
38
|
+
@payment_provider ||= load_yaml('payment_gateway/quickpay.yml')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
## Contributing to config_loader
|
45
|
+
|
46
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
47
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
48
|
+
* Fork the project.
|
49
|
+
* Start a feature/bugfix branch.
|
50
|
+
* Commit and push until you are happy with your contribution.
|
51
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
52
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
53
|
+
|
54
|
+
## Copyright
|
55
|
+
|
56
|
+
Copyright (c) 2012 Kristian Mandrup. See LICENSE.txt for
|
57
|
+
further details.
|
58
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "rails_config_loader"
|
18
|
+
gem.homepage = "http://github.com/kristianmandrup/config_loader"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Nice little utility to load config files for Rails}
|
21
|
+
gem.description = %Q{Load yaml and json config files and
|
22
|
+
make the structures easily available for use in the app.}
|
23
|
+
gem.email = "kmandrup@gmail.com"
|
24
|
+
gem.authors = ["Kristian Mandrup"]
|
25
|
+
# dependencies defined in Gemfile
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rspec/core'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
32
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
33
|
+
end
|
34
|
+
|
35
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
36
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
37
|
+
spec.rcov = true
|
38
|
+
end
|
39
|
+
|
40
|
+
task :default => :spec
|
41
|
+
|
42
|
+
require 'rdoc/task'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
|
+
|
46
|
+
rdoc.rdoc_dir = 'rdoc'
|
47
|
+
rdoc.title = "rails_config_loader #{version}"
|
48
|
+
rdoc.rdoc_files.include('README*')
|
49
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'hashie'
|
2
|
+
|
3
|
+
module ConfigLoader
|
4
|
+
class Base
|
5
|
+
attr_reader :locale, :path, :file_name, :ext, :file_path, :root
|
6
|
+
|
7
|
+
# will try root element if such exists
|
8
|
+
def initialize file_path, options = {}
|
9
|
+
@path = File.dirname file_path
|
10
|
+
@file_name = File.basename file_path
|
11
|
+
parts = file_name.split(/(ya?ml$)/)
|
12
|
+
name = parts.first
|
13
|
+
@ext = parts.last
|
14
|
+
@locale = options[:locale]
|
15
|
+
|
16
|
+
@file_path = @locale ? File.join(@path, "#{@name}.#{@locale}.#{@ext}") : file_path
|
17
|
+
|
18
|
+
@dir = options[:dir] if options[:dir]
|
19
|
+
@root = (options[:root] || file_name.split('.').first).to_s
|
20
|
+
@root = nil unless mashie.send(@root)
|
21
|
+
@mashie = mashie.send(@root) if @root
|
22
|
+
end
|
23
|
+
|
24
|
+
def as_hash
|
25
|
+
@as_hash ||= mashie
|
26
|
+
end
|
27
|
+
|
28
|
+
def load *args
|
29
|
+
end
|
30
|
+
|
31
|
+
protected
|
32
|
+
|
33
|
+
def file_content
|
34
|
+
File.open(config_file_path)
|
35
|
+
end
|
36
|
+
|
37
|
+
def dir
|
38
|
+
@dir ||= 'config'
|
39
|
+
end
|
40
|
+
|
41
|
+
def mashie
|
42
|
+
@mashie ||= ::Hashie::Mash.new content
|
43
|
+
end
|
44
|
+
|
45
|
+
def config_file_path
|
46
|
+
@config_file_path ||= File.join(Rails.root.to_s, dir, file_path)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ConfigLoader
|
2
|
+
module Delegator
|
3
|
+
def self.included(base)
|
4
|
+
base.send :include, ConfigLoader
|
5
|
+
end
|
6
|
+
|
7
|
+
def method_missing(m, *args, &block)
|
8
|
+
raise "A #config method must be defined in the container for ConfigLoader::Delegator, for it to delegate to #config: delegation attempted with #{m}" unless self.respond_to?(:config)
|
9
|
+
config.send(m)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'config_loader/yaml'
|
2
|
+
require 'config_loader/json'
|
3
|
+
require 'config_loader/delegator'
|
4
|
+
|
5
|
+
module ConfigLoader
|
6
|
+
def load file_path, options = {}
|
7
|
+
ext = File.basename(file_path).split(/(ya?ml|json)$/).last
|
8
|
+
loader = case ext.to_sym
|
9
|
+
when :json
|
10
|
+
ConfigLoader::Json
|
11
|
+
when :yml, :yaml
|
12
|
+
ConfigLoader::Yaml
|
13
|
+
end
|
14
|
+
loader.new file_path, options = {}
|
15
|
+
end
|
16
|
+
|
17
|
+
def load_yaml file_path, options = {}
|
18
|
+
ConfigLoader::Yaml.new file_path, options = {}
|
19
|
+
end
|
20
|
+
|
21
|
+
def load_json file_path, options = {}
|
22
|
+
ConfigLoader::Json.new file_path, options = {}
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "rails_config_loader"
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Kristian Mandrup"]
|
12
|
+
s.date = "2012-05-07"
|
13
|
+
s.description = "Load yaml and json config files and \n make the structures easily available for use in the app."
|
14
|
+
s.email = "kmandrup@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.md",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/config_loader/base.rb",
|
29
|
+
"lib/config_loader/delegator.rb",
|
30
|
+
"lib/config_loader/json.rb",
|
31
|
+
"lib/config_loader/yaml.rb",
|
32
|
+
"lib/rails_config_loader.rb",
|
33
|
+
"rails_config_loader.gemspec",
|
34
|
+
"spec/config_loader/yaml_spec.rb",
|
35
|
+
"spec/fixtures/config/app.yml",
|
36
|
+
"spec/fixtures/config/facebook.yml",
|
37
|
+
"spec/fixtures/config/htc.yml",
|
38
|
+
"spec/fixtures/config/payment_gateway/quickpay.da.yml",
|
39
|
+
"spec/fixtures/db/config/seed.yml",
|
40
|
+
"spec/spec_helper.rb",
|
41
|
+
"spec/support/main_app.rb"
|
42
|
+
]
|
43
|
+
s.homepage = "http://github.com/kristianmandrup/config_loader"
|
44
|
+
s.licenses = ["MIT"]
|
45
|
+
s.require_paths = ["lib"]
|
46
|
+
s.rubygems_version = "1.8.24"
|
47
|
+
s.summary = "Nice little utility to load config files for Rails"
|
48
|
+
|
49
|
+
if s.respond_to? :specification_version then
|
50
|
+
s.specification_version = 3
|
51
|
+
|
52
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_runtime_dependency(%q<hashie>, [">= 0"])
|
54
|
+
s.add_runtime_dependency(%q<json_pure>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
56
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
57
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
|
58
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
59
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<hashie>, [">= 0"])
|
62
|
+
s.add_dependency(%q<json_pure>, [">= 0"])
|
63
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
64
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
67
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
68
|
+
end
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<hashie>, [">= 0"])
|
71
|
+
s.add_dependency(%q<json_pure>, [">= 0"])
|
72
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
73
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
74
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
75
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
76
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Rails
|
4
|
+
def self.root
|
5
|
+
File.join SPEC_DIR, 'fixtures'
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
describe ConfigLoader::Yaml do
|
10
|
+
subject { config }
|
11
|
+
let(:config) { ConfigLoader::Yaml.new('facebook.yml') }
|
12
|
+
|
13
|
+
its(:file_name) { should == 'facebook.yml' }
|
14
|
+
its(:root) { should == 'facebook' }
|
15
|
+
its(:ext) { should == 'yml' }
|
16
|
+
|
17
|
+
its(:content) { should_not be_nil }
|
18
|
+
its(:as_hash) { should be_a Hash }
|
19
|
+
|
20
|
+
specify { subject.as_hash.domain == 'www.facebook.com' }
|
21
|
+
|
22
|
+
describe 'no root' do
|
23
|
+
subject { config }
|
24
|
+
let(:config) { ConfigLoader::Yaml.new('htc.yml') }
|
25
|
+
|
26
|
+
its(:root) { should == nil }
|
27
|
+
specify { subject.as_hash.domain == 'www.htc.com' }
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'specific root' do
|
31
|
+
subject { config }
|
32
|
+
let(:config) { ConfigLoader::Yaml.new('htc.yml', :root => 'root') }
|
33
|
+
|
34
|
+
its(:root) { should == 'root' }
|
35
|
+
specify { subject.as_hash.domain == 'www.htc.dk' }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe 'Delegator' do
|
40
|
+
subject { config }
|
41
|
+
let(:config) { MainApp.config }
|
42
|
+
|
43
|
+
specify { subject.as_hash.name.should == 'HTC' }
|
44
|
+
end
|
45
|
+
|
46
|
+
describe '.load' do
|
47
|
+
subject { app }
|
48
|
+
let(:app) { MainApp.config.app }
|
49
|
+
|
50
|
+
specify { subject.as_hash.name.should == 'HTC' }
|
51
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# https://github.com/Shopify/active_merchant/blob/master/test/fixtures.yml
|
2
|
+
development:
|
3
|
+
login: demo@quickpay.net
|
4
|
+
password: test234
|
5
|
+
api_key: MIl16LPa152HZB6wA4dN
|
6
|
+
version: 4
|
7
|
+
|
8
|
+
cards:
|
9
|
+
visa_no_cvv2: 4000300011112220
|
10
|
+
visa: 4000100011112224
|
11
|
+
dankort: 5019717010103742
|
12
|
+
|
13
|
+
|
14
|
+
test:
|
15
|
+
login: demo@quickpay.net
|
16
|
+
password: test234
|
17
|
+
api_key: MIl16LPa152HZB6wA4dN
|
18
|
+
version: 4
|
19
|
+
|
20
|
+
production:
|
21
|
+
api_key:
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'rails_config_loader'
|
3
|
+
|
4
|
+
SPEC_DIR = File.dirname(__FILE__)
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'json/pure'
|
2
|
+
require 'singleton'
|
3
|
+
|
4
|
+
module MainApp
|
5
|
+
def self.config
|
6
|
+
Config.instance
|
7
|
+
end
|
8
|
+
|
9
|
+
class Config
|
10
|
+
include Singleton
|
11
|
+
include ConfigLoader::Delegator
|
12
|
+
|
13
|
+
# load seed file (see geo-autocomplete demo)
|
14
|
+
def seed
|
15
|
+
@seed ||= load_yaml('config/seed.yml', :dir => 'db')
|
16
|
+
end
|
17
|
+
|
18
|
+
# config for the app
|
19
|
+
# any missing method on this is delegated to the Hashie wrapping this # loaded content
|
20
|
+
def config
|
21
|
+
@config ||= load_yaml('app.yml')
|
22
|
+
end
|
23
|
+
|
24
|
+
# auto detect load method based on filename
|
25
|
+
def app
|
26
|
+
@app ||= load('app.yml')
|
27
|
+
end
|
28
|
+
|
29
|
+
def payment_provider
|
30
|
+
@payment_provider ||= load_yaml('payment_gateway/quickpay.yml')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_config_loader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Kristian Mandrup
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: hashie
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: json_pure
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.8.0
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.8.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rdoc
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.12'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '3.12'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: bundler
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.1.0
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.1.0
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: jeweler
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.8.3
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.8.3
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: simplecov
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
description: ! "Load yaml and json config files and \n make the structures easily
|
127
|
+
available for use in the app."
|
128
|
+
email: kmandrup@gmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files:
|
132
|
+
- LICENSE.txt
|
133
|
+
- README.md
|
134
|
+
files:
|
135
|
+
- .document
|
136
|
+
- .rspec
|
137
|
+
- Gemfile
|
138
|
+
- Gemfile.lock
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.md
|
141
|
+
- Rakefile
|
142
|
+
- VERSION
|
143
|
+
- lib/config_loader/base.rb
|
144
|
+
- lib/config_loader/delegator.rb
|
145
|
+
- lib/config_loader/json.rb
|
146
|
+
- lib/config_loader/yaml.rb
|
147
|
+
- lib/rails_config_loader.rb
|
148
|
+
- rails_config_loader.gemspec
|
149
|
+
- spec/config_loader/yaml_spec.rb
|
150
|
+
- spec/fixtures/config/app.yml
|
151
|
+
- spec/fixtures/config/facebook.yml
|
152
|
+
- spec/fixtures/config/htc.yml
|
153
|
+
- spec/fixtures/config/payment_gateway/quickpay.da.yml
|
154
|
+
- spec/fixtures/db/config/seed.yml
|
155
|
+
- spec/spec_helper.rb
|
156
|
+
- spec/support/main_app.rb
|
157
|
+
homepage: http://github.com/kristianmandrup/config_loader
|
158
|
+
licenses:
|
159
|
+
- MIT
|
160
|
+
post_install_message:
|
161
|
+
rdoc_options: []
|
162
|
+
require_paths:
|
163
|
+
- lib
|
164
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
166
|
+
requirements:
|
167
|
+
- - ! '>='
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
segments:
|
171
|
+
- 0
|
172
|
+
hash: 1179121962009242759
|
173
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
|
+
none: false
|
175
|
+
requirements:
|
176
|
+
- - ! '>='
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
requirements: []
|
180
|
+
rubyforge_project:
|
181
|
+
rubygems_version: 1.8.24
|
182
|
+
signing_key:
|
183
|
+
specification_version: 3
|
184
|
+
summary: Nice little utility to load config files for Rails
|
185
|
+
test_files: []
|