foreplay 0.10.3 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdfb1f3845240c583bf00361262de1f57479a097
4
- data.tar.gz: b62dea61a2453d174a06f02641c02a1fee73520e
3
+ metadata.gz: 88819e9e2b64f99fe34c4f2db6644ebba55e9ad6
4
+ data.tar.gz: 4e8818325e534443f4e066fc3157d7496dc07a38
5
5
  SHA512:
6
- metadata.gz: e8208dff717e38de326be2b8fd34ea846c998b227c0840c64f53d59739405b7c1323fc4d5080f8a6a91c029b8e96363cb7e6ec027aa3516b9501e86b9e966dc4
7
- data.tar.gz: a3722cfb412a6661a305a745f91a4d4e7dfb7a6e02e59eec90ad15f4cbb9f3e30a7e94e2afbe16bb0db1572ca98c3301ece39d66a273648bf127b2c4be38ad75
6
+ metadata.gz: fe138f745c09e417df8a3548dc9e8e0d756336930c4d0b646a04e5a880ce1f15d1ef4cbd73596192150cd50505d2bf4a5acc6fbdadd221ba5dea670a54596640
7
+ data.tar.gz: 27a1ec20a0f06a3c374c30904518b1e1c7ca221a604a654ea4393ee0b0bdbe639495a2fbda7926ba4ce76655341058886bcd495c418a1f6e1c8f127c8645e5fc
@@ -14,6 +14,8 @@ module Foreplay
14
14
  @server = s
15
15
  @steps = st
16
16
  @instructions = i
17
+
18
+ @options = nil
17
19
  end
18
20
 
19
21
  def deploy
@@ -9,6 +9,11 @@ module Foreplay
9
9
  @mode = m
10
10
  @instructions = i
11
11
  @server = s
12
+
13
+ @path = nil
14
+ @host = nil
15
+ @port_details = nil
16
+ @current_port_remote = nil
12
17
  end
13
18
 
14
19
  def execute
@@ -8,6 +8,9 @@ module Foreplay
8
8
  @host = h
9
9
  @step = s
10
10
  @instructions = i
11
+
12
+ @commands = nil
13
+ @redirect = nil
11
14
  end
12
15
 
13
16
  def commands
@@ -67,20 +67,20 @@
67
67
  commentary: "Setting the port for the new instance to <%= current_port %>"
68
68
  - command: 'sleep 60'
69
69
  commentary: 'Waiting 60s to give service time to start'
70
- - command: "sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port <%= current_port %>"
71
- commentary: "Adding firewall rule to direct incoming traffic on port 80 to port <%= current_port %>"
72
- - command: "sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port <%= former_port %>"
73
- commentary: "Removing previous firewall rule directing traffic to port <%= former_port %>"
74
- ignore_error: true
75
- - command: 'sudo iptables-save > /etc/iptables/rules.v4'
76
- commentary: 'Attempting to save firewall rules to /etc/iptables/rules.v4'
77
- ignore_error: true
78
- - command: 'sudo iptables-save > /etc/iptables.up.rules'
79
- commentary: 'Attempting to save firewall rules to /etc/iptables.up.rules'
80
- ignore_error: true
81
- - command: 'sudo iptables-save -c | egrep REDIRECT --color=never'
82
- ignore_error: true
83
- commentary: 'Current firewall NAT configuration:'
70
+ #- command: "sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port <%= current_port %>"
71
+ # commentary: "Adding firewall rule to direct incoming traffic on port 80 to port <%= current_port %>"
72
+ #- command: "sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port <%= former_port %>"
73
+ # commentary: "Removing previous firewall rule directing traffic to port <%= former_port %>"
74
+ # ignore_error: true
75
+ #- command: 'sudo iptables-save > /etc/iptables/rules.v4'
76
+ # commentary: 'Attempting to save firewall rules to /etc/iptables/rules.v4'
77
+ # ignore_error: true
78
+ #- command: 'sudo iptables-save > /etc/iptables.up.rules'
79
+ # commentary: 'Attempting to save firewall rules to /etc/iptables.up.rules'
80
+ # ignore_error: true
81
+ #- command: 'sudo iptables-save -c | egrep REDIRECT --color=never'
82
+ # ignore_error: true
83
+ # commentary: 'Current firewall NAT configuration:'
84
84
  - command: "sudo stop <%= former_service %> || echo 'No previous instance running'"
85
85
  commentary: 'Stopping the previous instance'
86
86
  ignore_error: true
@@ -17,6 +17,9 @@ module Foreplay
17
17
  def initialize(e, f)
18
18
  @environment = e
19
19
  @filters = f
20
+
21
+ @defaults = nil
22
+ @roles_all = nil
20
23
  end
21
24
 
22
25
  [:deploy, :check].each { |m| define_method(m) { execute m } }
@@ -1,3 +1,3 @@
1
1
  module Foreplay
2
- VERSION = '0.10.3'
2
+ VERSION = '0.11.0'
3
3
  end
@@ -171,11 +171,11 @@ describe Foreplay::Launcher do
171
171
  'mkdir -p .foreplay/foreplay && touch .foreplay/foreplay/current_port && cat .foreplay/foreplay/current_port',
172
172
  'echo 50000 > $HOME/.foreplay/foreplay/current_port',
173
173
  'sleep 60',
174
- 'sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 50000',
175
- 'sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 51000',
176
- 'sudo iptables-save > /etc/iptables/rules.v4',
177
- 'sudo iptables-save > /etc/iptables.up.rules',
178
- 'sudo iptables-save -c | egrep REDIRECT --color=never',
174
+ #- 'sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 50000',
175
+ #- 'sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 51000',
176
+ #- 'sudo iptables-save > /etc/iptables/rules.v4',
177
+ #- 'sudo iptables-save > /etc/iptables.up.rules',
178
+ #- 'sudo iptables-save -c | egrep REDIRECT --color=never',
179
179
  'sudo stop foreplay-51000 || echo \'No previous instance running\''
180
180
  ].each do |command|
181
181
  expect(shell).to receive(:execute).with(command).and_return(process)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreplay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman