cupcakinator 0.0.2
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/.gitignore +22 -0
- data/.rspec +5 -0
- data/.ruby-version +1 -0
- data/Gemfile +6 -0
- data/Guardfile +16 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/cupcakinator.gemspec +35 -0
- data/lib/cupcakinator.rb +29 -0
- data/lib/cupcakinator/base.rb +110 -0
- data/lib/cupcakinator/config.rb +25 -0
- data/lib/cupcakinator/errors.rb +6 -0
- data/lib/cupcakinator/options.rb +17 -0
- data/lib/cupcakinator/version.rb +3 -0
- data/spec/cupcakinator/base_spec.rb +115 -0
- data/spec/cupcakinator_spec.rb +43 -0
- data/spec/el_config.yml +2 -0
- data/spec/spec_helper.rb +18 -0
- metadata +246 -0
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
.idea
|
2
|
+
*.gem
|
3
|
+
*.rbc
|
4
|
+
.bundle
|
5
|
+
.config
|
6
|
+
.yardoc
|
7
|
+
Gemfile.lock
|
8
|
+
InstalledFiles
|
9
|
+
_yardoc
|
10
|
+
coverage
|
11
|
+
doc/
|
12
|
+
bin/
|
13
|
+
foo.rb
|
14
|
+
lib/bundler/man
|
15
|
+
pkg
|
16
|
+
rdoc
|
17
|
+
spec/reports
|
18
|
+
test/tmp
|
19
|
+
test/version_tmp
|
20
|
+
tmp
|
21
|
+
config.yml
|
22
|
+
bar_config.yml
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p392
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'rspec', :all_after_pass => true, :focus_on_failed => true, :all_on_start => true, :cli => "--drb --debug" do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}){ |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb'){ "spec" }
|
8
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
9
|
+
end
|
10
|
+
|
11
|
+
guard 'spork', :test_unit => false do
|
12
|
+
watch('Gemfile')
|
13
|
+
watch('Gemfile.lock')
|
14
|
+
watch('spec/spec_helper.rb') { :rspec }
|
15
|
+
end
|
16
|
+
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Bryan Taylor
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Cupcakinator
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'cupcakinator'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install cupcakinator
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/cupcakinator/version', __FILE__)
|
3
|
+
require 'base64'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.authors = ["Bryan Taylor"]
|
7
|
+
gem.email = ['YmNwdGF5bG9yQGdtYWlsLmNvbQ==\n'].collect{ |foo| Base64.decode64(foo) }
|
8
|
+
gem.description = %q{ Add config from YAML to any class }
|
9
|
+
gem.summary = %q{ Easy to add config from YAML to any class }
|
10
|
+
gem.homepage = "http://github.com/rubyisbeautiful/cupcakinator"
|
11
|
+
|
12
|
+
gem.files = `git ls-files`.split($\)
|
13
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
|
+
gem.name = "cupcakinator"
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
gem.version = Cupcakinator::VERSION
|
18
|
+
|
19
|
+
gem.add_runtime_dependency 'hashie'
|
20
|
+
|
21
|
+
gem.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
gem.add_development_dependency "debugger"
|
23
|
+
gem.add_development_dependency "guard"
|
24
|
+
gem.add_development_dependency "guard-rspec"
|
25
|
+
gem.add_development_dependency "guard-spork"
|
26
|
+
gem.add_development_dependency 'rake'
|
27
|
+
gem.add_development_dependency 'rb-readline'
|
28
|
+
gem.add_development_dependency 'rspec'
|
29
|
+
gem.add_development_dependency "yard"
|
30
|
+
gem.add_development_dependency "redcarpet"
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
end
|
data/lib/cupcakinator.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'cupcakinator/version'
|
2
|
+
require 'cupcakinator/base'
|
3
|
+
require 'cupcakinator/config'
|
4
|
+
require 'cupcakinator/options'
|
5
|
+
require 'cupcakinator/errors'
|
6
|
+
|
7
|
+
# the purpose of cupcakinator is to provide an simple, flexible dynamic method to retrrieve configuration
|
8
|
+
# data for a class
|
9
|
+
# it provides this dynamic method as 'config' by default for both the class and any instances
|
10
|
+
# @example class Foo uses cupcakinator, see Cupcakinator::Base::cupcakinate
|
11
|
+
# given config.yml:
|
12
|
+
# bacon:
|
13
|
+
# flavor: pork
|
14
|
+
# meatball:
|
15
|
+
# flavor:
|
16
|
+
# - pork
|
17
|
+
# - chicken
|
18
|
+
# >> Foo.config
|
19
|
+
# {"meatball"=>{"flavor"=>["chicken", "pork"]}}
|
20
|
+
# >> Foo.config.meatball
|
21
|
+
# {"flavor"=>["chicken", "pork"]}
|
22
|
+
module Cupcakinator
|
23
|
+
|
24
|
+
def self.included(other)
|
25
|
+
other.extend Cupcakinator::Base
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module Cupcakinator
|
4
|
+
|
5
|
+
module Base
|
6
|
+
|
7
|
+
|
8
|
+
def self.included(other)
|
9
|
+
raise "deprecated: don't include Cupcakinator::Base directly"
|
10
|
+
#puts "included (via Base) in #{other}"
|
11
|
+
#other.extend ClassMethods
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def self.extend_object(other)
|
16
|
+
class_eval <<-ENDOFCLASSDEF
|
17
|
+
class << self
|
18
|
+
@cupcakinator_options = nil;
|
19
|
+
@cupcakinator_config = nil;
|
20
|
+
end
|
21
|
+
ENDOFCLASSDEF
|
22
|
+
super
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
# this is the main access point to using and setting up cupcakinator
|
27
|
+
# it accepts any arguments, the following are currently recognized:
|
28
|
+
# @param [Array<Hash>] options
|
29
|
+
# @option options.last [Hash] :dir The directory where the file can be found
|
30
|
+
# @option options.last [Hash] :file The configuration filename
|
31
|
+
# @option options.last [Hash] :method The method used to access the configuration options
|
32
|
+
# @example Default usage - Foo will load ./config/config.yml into a method named 'config'
|
33
|
+
# class Foo
|
34
|
+
# include cupcakinator
|
35
|
+
# cupcakinate
|
36
|
+
# end
|
37
|
+
# >> puts Foo.config
|
38
|
+
# { :foo => 'bar' }
|
39
|
+
#
|
40
|
+
# @example method name change - Foo will load ./config/config.yml into a method named 'le_config'
|
41
|
+
# class Foo
|
42
|
+
# include cupcakinator
|
43
|
+
# cupcakinate method: 'le_config'
|
44
|
+
# end
|
45
|
+
# >> puts Foo.le_config
|
46
|
+
# { :foo => 'bar' }
|
47
|
+
# >> puts Foo.new.le_config
|
48
|
+
# { :foo => 'bar' }
|
49
|
+
#
|
50
|
+
# @example with Rails - Foo will load config/foo_config.yml relative to Rails root into a method named 'config'
|
51
|
+
# class Foo
|
52
|
+
# include cupcakinator
|
53
|
+
# cupcakinate dir: Rails.root.join('config'), file: 'foo_config.yml'
|
54
|
+
# end
|
55
|
+
# >> puts Foo.config
|
56
|
+
# { :foo => 'bar' }
|
57
|
+
# >> puts Foo.new.config
|
58
|
+
# { :foo => 'bar' }
|
59
|
+
#
|
60
|
+
def cupcakinate(*options)
|
61
|
+
if !options.empty?
|
62
|
+
default_options = _cupcakinator_options
|
63
|
+
@cupcakinator_options = default_options.merge(options.last)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
def _cupcakinator_options
|
69
|
+
if @cupcakinator_options.nil?
|
70
|
+
@cupcakinator_options = Cupcakinator::Options.new
|
71
|
+
end
|
72
|
+
@cupcakinator_options
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
def _cupcakinator_config
|
77
|
+
if @cupcakinator_config.nil?
|
78
|
+
filename = File.join(_cupcakinator_options[:dir], _cupcakinator_options[:file])
|
79
|
+
yaml_config = YAML.load_file(filename)
|
80
|
+
@cupcakinator_config = Cupcakinator::Config.new(yaml_config)
|
81
|
+
end
|
82
|
+
@cupcakinator_config
|
83
|
+
rescue Errno::ENOENT
|
84
|
+
raise Cupcakinator::ConfigFileNotFoundError.new("Can't find Cupcakinator configured config file #{filename}\nCupcakinator options:\n#{_cupcakinator_options}")
|
85
|
+
rescue Psych::SyntaxError => e
|
86
|
+
raise Cupcakinator::ConfigFileInvalidError.new("Cupcakinator configure config file #{filename} invalid\nOriginal error: #{e.message}")
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def method_missing(original_method, *args)
|
91
|
+
if original_method.to_s == _cupcakinator_options[:method].to_s
|
92
|
+
_cupcakinator_config(*args)
|
93
|
+
else
|
94
|
+
super
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
def method_missing(original_method, *args)
|
103
|
+
if original_method.to_s == self.class._cupcakinator_options[:method].to_s
|
104
|
+
self.class._cupcakinator_config(*args)
|
105
|
+
else
|
106
|
+
super
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'hashie/extensions/method_access'
|
2
|
+
require 'hashie/extensions/coercion'
|
3
|
+
|
4
|
+
module Cupcakinator
|
5
|
+
|
6
|
+
# known configuration variables
|
7
|
+
# method
|
8
|
+
# dir
|
9
|
+
# file
|
10
|
+
class Config < Hash
|
11
|
+
include Hashie::Extensions::MethodAccess
|
12
|
+
include Hashie::Extensions::Coercion
|
13
|
+
|
14
|
+
coerce_value Hash, Config
|
15
|
+
|
16
|
+
def initialize(h={})
|
17
|
+
super
|
18
|
+
h.each_pair do |k,v|
|
19
|
+
self[k] = v
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Cupcakinator
|
2
|
+
|
3
|
+
# known configuration variables
|
4
|
+
# method
|
5
|
+
# dir
|
6
|
+
# file
|
7
|
+
class Options < Cupcakinator::Config
|
8
|
+
|
9
|
+
DEFAULT_OPTIONS = Cupcakinator::Config.new(method: :config, dir: '.', file: 'config.yml')
|
10
|
+
|
11
|
+
def initialize(opts=DEFAULT_OPTIONS)
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Cupcakinator::Base do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
class CupcakinatorBaseSpecFoo
|
7
|
+
include Cupcakinator
|
8
|
+
|
9
|
+
cupcakinate dir: File.expand_path(File.join(File.dirname(__FILE__), '..')), method: 'el_config', file: 'el_config.yml'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
describe 'cupcakinate' do
|
16
|
+
|
17
|
+
# a better way to do this? It's got the sleep to guarantee a new class name but of course slows it all down
|
18
|
+
# a new class name was necessary to ensure clean slate... I tried deregistering the object name, but it seemed
|
19
|
+
# like it was not going to bear fruit
|
20
|
+
before :each do
|
21
|
+
sleep(1)
|
22
|
+
@klass = nil
|
23
|
+
t = Time.now.strftime("Foo%Y%m%d%H%M%s")
|
24
|
+
eval <<-ENDOFKLASS
|
25
|
+
class #{t}
|
26
|
+
include Cupcakinator
|
27
|
+
end
|
28
|
+
ENDOFKLASS
|
29
|
+
@klass = Object.module_eval(t)
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
it "should call _cupcakinator_options" do
|
34
|
+
@klass.should_receive(:_cupcakinator_options).at_least(1).and_return({})
|
35
|
+
|
36
|
+
@klass.cupcakinate method: 'config'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should set the default config with no options' do
|
40
|
+
@klass.cupcakinate
|
41
|
+
|
42
|
+
@klass._cupcakinator_options.should eq Cupcakinator::Options.new
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should merge options into default' do
|
46
|
+
@klass.cupcakinate file: 'conf.yml'
|
47
|
+
|
48
|
+
@klass._cupcakinator_options[:file].should == 'conf.yml'
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
describe '_cupcakinator_config' do
|
55
|
+
|
56
|
+
it 'should return a Cupcakinator::Config' do
|
57
|
+
CupcakinatorBaseSpecFoo._cupcakinator_config.class.should eq(Cupcakinator::Config)
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'should return a Cupcakinator::Config for an embedded Hash (in yaml)' do
|
61
|
+
CupcakinatorBaseSpecFoo._cupcakinator_config.bacon.class.should eq(Cupcakinator::Config)
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
describe 'method missing' do
|
68
|
+
|
69
|
+
let(:subject){ CupcakinatorBaseSpecFoo }
|
70
|
+
|
71
|
+
it 'should use default method missing if not the configured cupcakinator method' do
|
72
|
+
expect { subject.doodle }.to raise_error(NoMethodError)
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'should not raise if NoMethodError when using the configured cupcakinator method' do
|
76
|
+
expect { subject.el_config }.to_not raise_error(NoMethodError)
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'should delegeate to _cupcakinator_config when using the configured cupcakinator method' do
|
80
|
+
CupcakinatorBaseSpecFoo.should_receive(:_cupcakinator_config).with('john')
|
81
|
+
|
82
|
+
subject.el_config('john')
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
context 'instance methods' do
|
90
|
+
|
91
|
+
|
92
|
+
describe 'method missing' do
|
93
|
+
|
94
|
+
let(:subject){ CupcakinatorBaseSpecFoo.new }
|
95
|
+
|
96
|
+
it 'should use default method missing if not the configured cupcakinator method' do
|
97
|
+
expect { subject.doodle }.to raise_error(NoMethodError)
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'should not raise if NoMethodError when using the configured cupcakinator method' do
|
101
|
+
expect { subject.el_config }.to_not raise_error(NoMethodError)
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'should delegeate to _cupcakinator_config when using the configured cupcakinator method' do
|
105
|
+
CupcakinatorBaseSpecFoo.should_receive(:_cupcakinator_config).with('john')
|
106
|
+
|
107
|
+
subject.el_config('john')
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class CupcakinatorSpecFoo
|
4
|
+
include Cupcakinator
|
5
|
+
|
6
|
+
cupcakinate method: 'config', file: 'config.yml'
|
7
|
+
end
|
8
|
+
|
9
|
+
class CupcakinatorSpecBar < CupcakinatorSpecFoo
|
10
|
+
cupcakinate method: 'bar_config'
|
11
|
+
end
|
12
|
+
|
13
|
+
class CupcakinatorSpecBaz
|
14
|
+
include Cupcakinator
|
15
|
+
|
16
|
+
cupcakinate method: 'baz_config'
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
describe Cupcakinator do
|
21
|
+
|
22
|
+
context 'inheritence' do
|
23
|
+
|
24
|
+
it "parent should not have child's options" do
|
25
|
+
CupcakinatorSpecFoo._cupcakinator_options[:method].should == 'config'
|
26
|
+
end
|
27
|
+
|
28
|
+
it "child should not have parent's options" do
|
29
|
+
CupcakinatorSpecBar._cupcakinator_options[:method].should == 'bar_config'
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
context 'multiple uses' do
|
36
|
+
|
37
|
+
it "should exist separately per invocation" do
|
38
|
+
CupcakinatorSpecBaz._cupcakinator_options[:method].should_not eq CupcakinatorSpecFoo._cupcakinator_options[:method]
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
data/spec/el_config.yml
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'spork'
|
3
|
+
|
4
|
+
Spork.prefork do
|
5
|
+
require 'simplecov'
|
6
|
+
SimpleCov.start do
|
7
|
+
add_filter "/spec/"
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'rspec'
|
11
|
+
|
12
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
13
|
+
require 'cupcakinator'
|
14
|
+
end
|
15
|
+
|
16
|
+
Spork.each_run do
|
17
|
+
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,246 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cupcakinator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Bryan Taylor
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-07-22 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: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.3'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: debugger
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '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: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: guard
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
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: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: guard-rspec
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '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: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: guard-spork
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
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: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rake
|
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
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rb-readline
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: rspec
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: yard
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: redcarpet
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ! '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
description: ! ' Add config from YAML to any class '
|
191
|
+
email:
|
192
|
+
- !binary |-
|
193
|
+
YmNwdGF5bG9yQGdtYWlsLmNvbQ==
|
194
|
+
executables: []
|
195
|
+
extensions: []
|
196
|
+
extra_rdoc_files: []
|
197
|
+
files:
|
198
|
+
- .gitignore
|
199
|
+
- .rspec
|
200
|
+
- .ruby-version
|
201
|
+
- Gemfile
|
202
|
+
- Guardfile
|
203
|
+
- LICENSE
|
204
|
+
- README.md
|
205
|
+
- Rakefile
|
206
|
+
- cupcakinator.gemspec
|
207
|
+
- lib/cupcakinator.rb
|
208
|
+
- lib/cupcakinator/base.rb
|
209
|
+
- lib/cupcakinator/config.rb
|
210
|
+
- lib/cupcakinator/errors.rb
|
211
|
+
- lib/cupcakinator/options.rb
|
212
|
+
- lib/cupcakinator/version.rb
|
213
|
+
- spec/cupcakinator/base_spec.rb
|
214
|
+
- spec/cupcakinator_spec.rb
|
215
|
+
- spec/el_config.yml
|
216
|
+
- spec/spec_helper.rb
|
217
|
+
homepage: http://github.com/rubyisbeautiful/cupcakinator
|
218
|
+
licenses: []
|
219
|
+
post_install_message:
|
220
|
+
rdoc_options: []
|
221
|
+
require_paths:
|
222
|
+
- lib
|
223
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
+
none: false
|
225
|
+
requirements:
|
226
|
+
- - ! '>='
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '0'
|
229
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
|
+
none: false
|
231
|
+
requirements:
|
232
|
+
- - ! '>='
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '0'
|
235
|
+
requirements: []
|
236
|
+
rubyforge_project:
|
237
|
+
rubygems_version: 1.8.23
|
238
|
+
signing_key:
|
239
|
+
specification_version: 3
|
240
|
+
summary: Easy to add config from YAML to any class
|
241
|
+
test_files:
|
242
|
+
- spec/cupcakinator/base_spec.rb
|
243
|
+
- spec/cupcakinator_spec.rb
|
244
|
+
- spec/el_config.yml
|
245
|
+
- spec/spec_helper.rb
|
246
|
+
has_rdoc:
|