cupcakinator 0.0.2 → 0.0.4
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/.travis.yml +5 -0
- data/README.md +36 -5
- data/cupcakinator.gemspec +1 -0
- data/lib/cupcakinator/version.rb +1 -1
- metadata +5 -3
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,7 +1,37 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# cupcakinator [](https://travis-ci.org/rubyisbeautiful/cupcakinator)
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
cupcakinator provides a simple way to use the 'config' pattern in any class. For example, given class Foo:
|
6
|
+
|
7
|
+
class Foo
|
8
|
+
include Cupcakinator
|
9
|
+
|
10
|
+
cupcakinate
|
11
|
+
end
|
12
|
+
|
13
|
+
and the file ./config/config.yml:
|
14
|
+
|
15
|
+
---
|
16
|
+
bacon:
|
17
|
+
flavor: pork
|
18
|
+
meatball:
|
19
|
+
flavor:
|
20
|
+
- pork
|
21
|
+
- chicken
|
22
|
+
You can do:
|
23
|
+
|
24
|
+
>> Foo.config.bacon.flavor
|
25
|
+
'pork'
|
26
|
+
>> Foo.config.meatball.flavor
|
27
|
+
['pork','chicken']
|
28
|
+
>> Foo.new.config.bacon.flavor
|
29
|
+
'pork'
|
30
|
+
|
31
|
+
etc..
|
32
|
+
Options include dir, file, and method.
|
33
|
+
|
34
|
+
|
5
35
|
## Installation
|
6
36
|
|
7
37
|
Add this line to your application's Gemfile:
|
@@ -18,7 +48,8 @@ Or install it yourself as:
|
|
18
48
|
|
19
49
|
## Usage
|
20
50
|
|
21
|
-
|
51
|
+
include Cupcakinator
|
52
|
+
call 'cupcakinator' in your class with dir, file, and method options
|
22
53
|
|
23
54
|
## Contributing
|
24
55
|
|
data/cupcakinator.gemspec
CHANGED
data/lib/cupcakinator/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cupcakinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
@@ -198,6 +198,7 @@ files:
|
|
198
198
|
- .gitignore
|
199
199
|
- .rspec
|
200
200
|
- .ruby-version
|
201
|
+
- .travis.yml
|
201
202
|
- Gemfile
|
202
203
|
- Guardfile
|
203
204
|
- LICENSE
|
@@ -215,7 +216,8 @@ files:
|
|
215
216
|
- spec/el_config.yml
|
216
217
|
- spec/spec_helper.rb
|
217
218
|
homepage: http://github.com/rubyisbeautiful/cupcakinator
|
218
|
-
licenses:
|
219
|
+
licenses:
|
220
|
+
- MIT
|
219
221
|
post_install_message:
|
220
222
|
rdoc_options: []
|
221
223
|
require_paths:
|