haproxy_join 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/haproxy_join +11 -2
- metadata +16 -5
data/bin/haproxy_join
CHANGED
@@ -24,7 +24,12 @@
|
|
24
24
|
## OTHER DEALINGS IN THE SOFTWARE.
|
25
25
|
|
26
26
|
require 'find'
|
27
|
-
|
27
|
+
begin
|
28
|
+
require 'ftools'
|
29
|
+
rescue LoadError
|
30
|
+
# Not on a 1.8 vm. Try 1.9 fileutils
|
31
|
+
require 'fileutils'
|
32
|
+
end
|
28
33
|
|
29
34
|
def write_main(haproxy_dir)
|
30
35
|
global = File.new(
|
@@ -77,7 +82,11 @@ def main
|
|
77
82
|
main_config = File.join(haproxy_dir, haproxy_filename)
|
78
83
|
|
79
84
|
if File.exist?(main_config)
|
80
|
-
|
85
|
+
begin
|
86
|
+
File.copy(main_config, main_config + ".BAK-" + Time.now.strftime("%Y%m%d%H%M%S"))
|
87
|
+
rescue NoMethodError
|
88
|
+
File.copy(main_config, main_config + ".BAK-" + Time.now.strftime("%Y%m%d%H%M%S"))
|
89
|
+
end
|
81
90
|
end
|
82
91
|
|
83
92
|
@haproxy_config = File.new(main_config, "w")
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haproxy_join
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 15
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
version: "0.2"
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- joe williams
|
@@ -9,7 +14,7 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2011-05-31 00:00:00 -07:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
@@ -34,21 +39,27 @@ rdoc_options: []
|
|
34
39
|
require_paths:
|
35
40
|
- lib
|
36
41
|
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
37
43
|
requirements:
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 3
|
47
|
+
segments:
|
48
|
+
- 0
|
40
49
|
version: "0"
|
41
|
-
version:
|
42
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
43
52
|
requirements:
|
44
53
|
- - ">="
|
45
54
|
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
56
|
+
segments:
|
57
|
+
- 0
|
46
58
|
version: "0"
|
47
|
-
version:
|
48
59
|
requirements: []
|
49
60
|
|
50
61
|
rubyforge_project:
|
51
|
-
rubygems_version: 1.3.
|
62
|
+
rubygems_version: 1.3.7
|
52
63
|
signing_key:
|
53
64
|
specification_version: 3
|
54
65
|
summary: haproxy config management
|