ispunity 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/ispunity +2 -1
- data/isp_unity.gemspec +2 -1
- data/lib/isp_unity.rb +0 -6
- data/lib/isp_unity/version.rb +1 -1
- data/lib/load_balance/load_balance.rb +1 -1
- data/lib/rule/rule.rb +1 -1
- metadata +2 -3
- data/lib/version.rb +0 -3
data/bin/ispunity
CHANGED
data/isp_unity.gemspec
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
3
4
|
require "isp_unity/version"
|
4
5
|
|
5
6
|
Gem::Specification.new do |s|
|
6
7
|
s.name = "ispunity"
|
7
|
-
s.version =
|
8
|
+
s.version = IspUnity::VERSION
|
8
9
|
s.authors = ["Pratik Shah", "Siva Gollapalli", "Arun Tomar"]
|
9
10
|
s.email = ["pratik14shah@gmail.com", "sivagollapalli@yahoo.com", "arun@solutionenterprises.co.in"]
|
10
11
|
s.homepage = "http://www.ispunity.com"
|
data/lib/isp_unity.rb
CHANGED
@@ -9,7 +9,6 @@ require 'rule/rule'
|
|
9
9
|
require 'isp_unity/isp'
|
10
10
|
require 'isp_unity/version'
|
11
11
|
require 'isp_unity/routing_table'
|
12
|
-
require 'isp_unity/version'
|
13
12
|
|
14
13
|
|
15
14
|
module IspUnity
|
@@ -68,11 +67,6 @@ module IspUnity
|
|
68
67
|
SystemCall.execute('ip route flush cache')
|
69
68
|
end
|
70
69
|
end
|
71
|
-
|
72
|
-
def version
|
73
|
-
version = "0.0.2"
|
74
|
-
end
|
75
|
-
|
76
70
|
end
|
77
71
|
end
|
78
72
|
|
data/lib/isp_unity/version.rb
CHANGED
@@ -19,7 +19,7 @@ class LoadBalance
|
|
19
19
|
@commands << "/sbin/ip route replace default via #{alive_isps[0].gateway} dev #{alive_isps[0].interface}"
|
20
20
|
else
|
21
21
|
IspUnityLog.info("Multiple isps are alive")
|
22
|
-
@commands << "/sbin/ip route replace default
|
22
|
+
@commands << "/sbin/ip route replace equalize default "
|
23
23
|
alive_isps.each do |isp|
|
24
24
|
@commands[0] += " nexthop via #{isp.gateway} dev #{isp.interface} weight #{isp.weight} "
|
25
25
|
end
|
data/lib/rule/rule.rb
CHANGED
@@ -8,7 +8,7 @@ class Rule
|
|
8
8
|
@commands = []
|
9
9
|
isps.each do |isp|
|
10
10
|
output = `/sbin/ip rule show`
|
11
|
-
@commands << "/sbin/ip rule add from #{isp.
|
11
|
+
@commands << "/sbin/ip rule add from #{isp.ip_address} table #{isp.name}" unless output.include?(isp.name)
|
12
12
|
end
|
13
13
|
@commands
|
14
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ispunity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-05-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: log4r
|
@@ -109,7 +109,6 @@ files:
|
|
109
109
|
- lib/route/route.rb
|
110
110
|
- lib/rule/rule.rb
|
111
111
|
- lib/system_call.rb
|
112
|
-
- lib/version.rb
|
113
112
|
- license
|
114
113
|
- log/isp_unity.log
|
115
114
|
- monitor.rb
|
data/lib/version.rb
DELETED