0.0
No release in over a year
divide yaml file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

SengiriYaml

Gem Version Build Status Code Climate Coverage Status

divide yaml file

Installation

Add this line to your application's Gemfile:

gem 'sengiri_yaml'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sengiri_yaml

Usage

divide yaml

$ cat "/path/to/fat.yml"
- data1: data1
  value: 1
- data2: data2
  value: 2

$ sengiri_yaml "/path/to/fat.yml" "/path/to/fat_dir"

$ ls "/path/to/fat_dir"
data1.yml data2.yml

$ cat data1.yml
---
- data1: data1
  value: 1

$ cat data2.yml
---
- data2: data2
  value: 2

load divided yaml

merged_data = SengiriYaml.load_dir("/path/to/fat_dir")
# => [{"data1" => "data1", "value" => 1}, {"data2" => "data2", "value" => 2}]

Contributing

  1. Fork it ( https://github.com/sue445/sengiri_yaml/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request