Repository is archived
No commit activity in last 3 years
No release in over 3 years
Simple configuration file generator using csv file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

ConfigGenerator

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'config_generator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install config_generator

Usage

Generate

$ generate-config [csv file] [templete files ...]

Example

data.csv

hostname addr subnet gateway
hostA 192.168.1.10 255.255.255.0 192.168.1.1
hostB 192.168.1.11 255.255.255.0 192.168.1.1

sample.conf

# sample configuration template
hostname = <%= hostname %>
address = <%= addr %>
subnetmask = <%= subnet %>
defaultgateway = <%= gateway %>

run

$ generate-config data.csv sample.conf

sample_0.conf

# sample configuration template
hostname = hostA
address = 192.168.1.10
subnetmask = 255.255.255.0
defaultgateway = 192.168.1.1

sample_1.conf

# sample configuration template
hostname = hostB
address = 192.168.1.11
subnetmask = 255.255.255.0
defaultgateway = 192.168.1.1

Contributing

  1. Fork it ( https://github.com/kurochan/config_generator/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