sengiri_yaml 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17c2e86cf869e529807d3b7e11e58edcf525a23f
4
- data.tar.gz: f04110b354748b90356179be4e21e0ec56b1f3b3
3
+ metadata.gz: b47b759a07bd35a6b000cec3c24caec24f961202
4
+ data.tar.gz: c3c5e0f81bf005a146871b7e05915b592b5bf9a9
5
5
  SHA512:
6
- metadata.gz: 3962f9570b5eb677531a4899d59c12f8de68fc4ef622a8d7e91b7aeae5d379f6e1294ddc326f2371a7d9b8acb95c6d732ae2c697273706a3de3733bab797f31b
7
- data.tar.gz: 3044edf4e51b2364ded5d3dc9f47691c342cb9e3ba626b398ef39c4e97f992b096b9b9de2b013312914154b9dcd67d2aa8097a5d33aabc34a408a8ca9bedd7e2
6
+ metadata.gz: c7b150b112e87b114441113e799c61038cc71510349e8d4dab9ab030f963f5966602d88d4e5ced5ac20236f5a019f6fb5a73434baa405f2395031aba9dff33f9
7
+ data.tar.gz: b87d00a1ce254ecfc52a3b4fe9e075cba9050c4875ecc8c6ca9780697f09e3214c6cf8f8afd5ee51ff043f7ab14582693b027a2ae0a26e5970988f6e0f8890e7
data/README.md CHANGED
@@ -28,12 +28,32 @@ Or install it yourself as:
28
28
 
29
29
  ### divide yaml
30
30
  ```bash
31
+ $ cat "/path/to/fat.yml"
32
+ - data1: data1
33
+ value: 1
34
+ - data2: data2
35
+ value: 2
36
+
31
37
  $ sengiri_yaml "/path/to/fat.yml" "/path/to/fat_dir"
38
+
39
+ $ ls "/path/to/fat_dir"
40
+ data1.yml data2.yml
41
+
42
+ $ cat data1.yml
43
+ ---
44
+ - data1: data1
45
+ value: 1
46
+
47
+ $ cat data2.yml
48
+ ---
49
+ - data2: data2
50
+ value: 2
32
51
  ```
33
52
 
34
53
  ### load divided yaml
35
54
  ```ruby
36
55
  merged_data = SengiriYaml.load_dir("/path/to/fat_dir")
56
+ # => [{"data1" => "data1", "value" => 1}, {"data2" => "data2", "value" => 2}]
37
57
  ```
38
58
 
39
59
  ## Contributing
@@ -1,5 +1,6 @@
1
1
  module SengiriYaml
2
2
  require "yaml"
3
+ require "pathname"
3
4
 
4
5
  class Loader
5
6
  # load divided yaml files
@@ -1,3 +1,3 @@
1
1
  module SengiriYaml
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sengiri_yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-31 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler