kori 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +1 -0
- data/README.md +10 -5
- data/kori.gemspec +1 -1
- data/lib/kori.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a174295f0da0dd1d18d2d923e39bcc9acc1f55a
|
4
|
+
data.tar.gz: 7d906c048cc5f37f16a3475b5b68526bb11a670e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5492aacdd29e4b870406ad6ea932a027324ee7d2999d0c6326f8a6e49ba4881c9ce32641c6c619b814fc898ba3a6c3860e0c8a76e735ff384613ccdcfa9fddf3
|
7
|
+
data.tar.gz: 440b0476586446c93acd5c4653954e3a8c6a645e4ee239290feb7c054f4d63c52867f9f91b81ff077438dc794edd9e5af065fc157036e1ede7b9abfbac413d57
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Kori
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/kori.svg)](https://badge.fury.io/rb/kori)
|
4
|
+
[![Build Status](https://travis-ci.org/nalabjp/kori.svg?branch=master)](https://travis-ci.org/nalabjp/kori)
|
5
|
+
[![Code Climate](https://codeclimate.com/repos/5648b1ae1787d73e1f016cf6/badges/5e21bf44e70faa02d88a/gpa.svg)](https://codeclimate.com/repos/5648b1ae1787d73e1f016cf6/feed)
|
6
|
+
[![Test Coverage](https://codeclimate.com/repos/5648b1ae1787d73e1f016cf6/badges/5e21bf44e70faa02d88a/coverage.svg)](https://codeclimate.com/repos/5648b1ae1787d73e1f016cf6/coverage)
|
7
|
+
|
3
8
|
Kori generate deep frozen objects from yaml or hash.
|
4
9
|
It using a [ice_nine](https://github.com/dkubb/ice_nine), inspired by [Settingslogic](https://github.com/settingslogic/settingslogic).
|
5
10
|
|
@@ -14,7 +19,7 @@ Kori(kōri) means Ice in japanese.
|
|
14
19
|
require 'kori'
|
15
20
|
|
16
21
|
# From Hash
|
17
|
-
config = Kori.
|
22
|
+
config = Kori.freeze({ a: 1, b: { c: 'abc' } })
|
18
23
|
config.a # 1
|
19
24
|
config[:a] # 1
|
20
25
|
config['a'] # 1
|
@@ -27,12 +32,12 @@ Kori(kōri) means Ice in japanese.
|
|
27
32
|
config.b.c.frozen? # true
|
28
33
|
|
29
34
|
# From YAML
|
30
|
-
config = Kori.
|
31
|
-
config = Kori.
|
35
|
+
config = Kori.freeze('app_config.yml') # load from ./app_config.yml
|
36
|
+
config = Kori.freeze('/path/to/app_config.yml') # load from /path/to/app_config.yml
|
32
37
|
|
33
38
|
# If you are using Rails, it is possible to use as `Rails.application.config_for`
|
34
|
-
config = Kori.
|
35
|
-
config = Kori.
|
39
|
+
config = Kori.freeze(:app_config) # load from /rails_root/config/app_config.yml
|
40
|
+
config = Kori.freeze('subdir/app_config') # load from /rails_root/config/subdir/app_config.yml
|
36
41
|
|
37
42
|
## License
|
38
43
|
|
data/kori.gemspec
CHANGED
data/lib/kori.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nalabjp
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ice_nine
|