divide yaml file
Add this line to your application's Gemfile:
gem 'sengiri_yaml'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sengiri_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
merged_data = SengiriYaml.load_dir("/path/to/fat_dir")
# => [{"data1" => "data1", "value" => 1}, {"data2" => "data2", "value" => 2}]
- Fork it ( https://github.com/sue445/sengiri_yaml/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request