elb 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. data/lib/elb/deploy.rb +12 -1
  2. data/lib/elb/version.rb +1 -1
  3. metadata +4 -4
data/lib/elb/deploy.rb CHANGED
@@ -12,8 +12,10 @@ module Elb
12
12
  def run
13
13
  UI.say("Restarting server started")
14
14
  deregister
15
+ drop_inbound
15
16
  restart
16
17
  warm
18
+ add_inbound
17
19
  register
18
20
  UI.say("Restarting server completed")
19
21
  end
@@ -39,6 +41,15 @@ module Elb
39
41
  wait(@options[:wait]) # takes a while for the elb to deregister
40
42
  end
41
43
 
44
+ def drop_inbound
45
+ %x{iptables -A INPUT -j DROP -p tcp --destination-port 80 -i eth0}
46
+ end
47
+
48
+ def add_inbound
49
+ %x{iptables -D INPUT -j DROP -p tcp --destination-port 80 -i eth0}
50
+ end
51
+
52
+
42
53
  def restart
43
54
  UI.say("Restarting server")
44
55
  system(@options[:restart_command])
@@ -62,4 +73,4 @@ module Elb
62
73
  sleep n
63
74
  end
64
75
  end
65
- end
76
+ end
data/lib/elb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Elb
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tung Nguyen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-06-08 00:00:00 Z
18
+ date: 2014-07-23 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: thor