gaston 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/LICENSE +21 -0
  2. data/README.md +68 -0
  3. data/lib/gaston/version.rb +1 -1
  4. metadata +6 -4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT LICENSE
2
+
3
+ Copyright (c) chatgris <jboyer@af83.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,68 @@
1
+ GASTON
2
+ ======
3
+
4
+ Gaston is a dead simple Ruby config store. Write your config in yaml files, and retrieve it through one Gaston.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ Ruby 1.9.2 is required.
10
+
11
+ Install it with rubygems:
12
+
13
+ gem install gaston
14
+
15
+ With bundler, add it to your `Gemfile`:
16
+
17
+ ``` ruby
18
+ gem "gaston", "~>0.1.1"
19
+ ```
20
+
21
+ Always specify environment in yaml :
22
+
23
+ Environment values are merged on `:gaston` values. `:gaston` is optional.
24
+
25
+ You can use erb inside values.
26
+
27
+ ``` yaml
28
+ :gaston:
29
+ api:
30
+ state: "awesome"
31
+ :development:
32
+ api:
33
+ key: "api_key"
34
+ :test:
35
+ api:
36
+ key: <%= ENV["API_KEY"] %>
37
+ ```
38
+
39
+ Create an initializer. You can define an environment with the `env` method, and specify config files with the `files` method. Default `env` is `:development`.
40
+
41
+ ``` ruby
42
+ Gaston.configure do |gaston|
43
+ gaston.env = Rails.env
44
+ gaston.files = Dir[Rails.root.join("config/gaston/**/*.yml")]
45
+ end
46
+ ```
47
+
48
+ Querying a config key :
49
+
50
+ ``` ruby
51
+ Gaston.api.state # => 'awesome'
52
+ Gaston.api.key # => 'api_key'
53
+ ```
54
+
55
+ Note on Patches/Pull Requests
56
+ -----------------------------
57
+
58
+ * Fork the project.
59
+ * Make your feature addition or bug fix.
60
+ * Add tests for it. This is important so I don't break it in a future version unintentionally.
61
+ * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull)
62
+ * Send me a pull request. Bonus points for topic branches.
63
+
64
+
65
+ Copyright
66
+ ---------
67
+
68
+ MIT. See LICENSE for further details.
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  class Gaston
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.5"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaston
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
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: 2012-10-12 00:00:00.000000000 Z
12
+ date: 2012-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -27,12 +27,14 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.8'
30
- description: ! '[Dead simple Ruby config store.]'
30
+ description: Dead simple Ruby config store.
31
31
  email: jboyer@af83.com
32
32
  executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
+ - LICENSE
37
+ - README.md
36
38
  - lib/gaston.rb
37
39
  - lib/gaston/configuration.rb
38
40
  - lib/gaston/parse.rb
@@ -61,5 +63,5 @@ rubyforge_project:
61
63
  rubygems_version: 1.8.24
62
64
  signing_key:
63
65
  specification_version: 3
64
- summary: ! '[Dead simple Ruby config store.]'
66
+ summary: Dead simple Ruby config store.
65
67
  test_files: []