README.md in net-ip-0.0.3 vs README.md in net-ip-0.0.4

- old
+ new

@@ -1,47 +1,29 @@ -# Net::Ip +# Net::IP -TODO: Write a gem description +[![Build Status](https://travis-ci.org/jbussdieker/ruby-net-ip.png?branch=master)](https://travis-ci.org/jbussdieker/ruby-net-ip) +[![Code Climate](https://codeclimate.com/github/jbussdieker/ruby-net-ip.png)](https://codeclimate.com/github/jbussdieker/ruby-net-ip) +[![Gem Version](https://badge.fury.io/rb/net-ip.png)](http://badge.fury.io/rb/net-ip) -## Installation +Tools for working with IP routes -Add this line to your application's Gemfile: - - gem 'net-ip' - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install net-ip - ## Usage ````ruby require 'net/ip' Net::IP::Route.flush(:cache) -Net::IP::Route.each do |rt| - p rt +Net::IP::Route.each do |route| + puts route end -Net::IP::Route.find_gateways("eth0").each do |gw| - puts gw.via +Net::IP::Route.find_gateways("eth0").each do |gateway| + puts gateway.via end gws = ["192.168.0.1", "192.168.0.2"].collect do |ip| Net::IP::Route.new(:via => ip, :dev => "eth0", :weight => 1) end Net::IP::Route.update_gateways(gws) ```` - -## Contributing - -1. Fork it -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 new Pull Request