taste_tester 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e725a9ee1acb9deed55ffbe08277f781058ddf3f
4
+ data.tar.gz: 6f2025f7cebc82628987b9c5210814f42faaf6fe
5
+ SHA512:
6
+ metadata.gz: a7230c46a3dcaefef98fe5c4cd27baba4892d2cc58551ef545c954871b73c4c61d1c808579842eb3bc11ab5f3dbd540f180012637a26b6702b4b96a83ce5ce36
7
+ data.tar.gz: ad0932f6ece6d46580b2781de4a01f1aa85b79fe128a86ea8729200734a6fd037d82a7abe8e2804308483864338c6daea03aec6c9e763934b68e10af3d7f864f
data/bin/taste-tester CHANGED
@@ -28,6 +28,7 @@ require 'taste_tester/logging'
28
28
  require 'taste_tester/config'
29
29
  require 'taste_tester/commands'
30
30
  require 'taste_tester/hooks'
31
+ require 'taste_tester/exceptions'
31
32
 
32
33
  include TasteTester::Logging
33
34
 
@@ -44,7 +45,7 @@ module TasteTester
44
45
  # that if people override chef_client_command the help message is correct.
45
46
  if File.exists?(File.expand_path(TasteTester::Config.config_file))
46
47
  TasteTester::Config.from_file(
47
- File.expand_path(TasteTester::Config.config_file)
48
+ File.expand_path(TasteTester::Config.config_file),
48
49
  )
49
50
  end
50
51
 
@@ -114,7 +115,7 @@ MODES:
114
115
  should be no need to do this manually.
115
116
  EOF
116
117
 
117
- mode = ARGV.shift unless ARGV.size > 0 && ARGV[0].start_with?('-')
118
+ mode = ARGV.shift unless !ARGV.empty? && ARGV[0].start_with?('-')
118
119
 
119
120
  unless mode
120
121
  mode = 'help'
@@ -205,12 +206,24 @@ MODES:
205
206
  options[:user_tunnel_port] = port
206
207
  end
207
208
 
209
+ opts.on(
210
+ '-m', '--my-hostname HOSTNAME', String, 'Hostname for local chef server'
211
+ ) do |hostname|
212
+ options[:my_hostname] = hostname
213
+ end
214
+
208
215
  opts.on(
209
216
  '-l', '--linkonly', 'Only setup the remote server, skip uploading.'
210
217
  ) do
211
218
  options[:linkonly] = true
212
219
  end
213
220
 
221
+ opts.on(
222
+ '-L', '--locallink', 'Configure the local chef client without ssh.'
223
+ ) do
224
+ options[:locallink] = true
225
+ end
226
+
214
227
  opts.on(
215
228
  '-t', '--testing-timestamp TIME',
216
229
  'Until when should the host remain in testing.' +
@@ -254,7 +267,7 @@ MODES:
254
267
 
255
268
  opts.on(
256
269
  '--repo-type TYPE',
257
- 'Override repo type, default is auto.'
270
+ 'Override repo type, default is auto.',
258
271
  ) do |type|
259
272
  options[:repo_type] = type
260
273
  end
@@ -362,28 +375,32 @@ MODES:
362
375
  TasteTester::Hooks.get(path)
363
376
  end
364
377
 
365
- case mode.to_sym
366
- when :start
367
- TasteTester::Commands.start
368
- when :stop
369
- TasteTester::Commands.stop
370
- when :restart
371
- TasteTester::Commands.restart
372
- when :keeptesting
373
- TasteTester::Commands.keeptesting
374
- when :status
375
- TasteTester::Commands.status
376
- when :test
377
- TasteTester::Commands.test
378
- when :untest
379
- TasteTester::Commands.untest
380
- when :run
381
- TasteTester::Commands.runchef
382
- when :upload
383
- TasteTester::Commands.upload
384
- else
385
- logger.error("Invalid mode: #{mode}")
386
- puts parser
378
+ begin
379
+ case mode.to_sym
380
+ when :start
381
+ TasteTester::Commands.start
382
+ when :stop
383
+ TasteTester::Commands.stop
384
+ when :restart
385
+ TasteTester::Commands.restart
386
+ when :keeptesting
387
+ TasteTester::Commands.keeptesting
388
+ when :status
389
+ TasteTester::Commands.status
390
+ when :test
391
+ TasteTester::Commands.test
392
+ when :untest
393
+ TasteTester::Commands.untest
394
+ when :run
395
+ TasteTester::Commands.runchef
396
+ when :upload
397
+ TasteTester::Commands.upload
398
+ else
399
+ logger.error("Invalid mode: #{mode}")
400
+ puts parser
401
+ exit(1)
402
+ end
403
+ rescue TasteTester::Exceptions::SshError
387
404
  exit(1)
388
405
  end
389
406
  end
@@ -43,6 +43,7 @@ module TasteTester
43
43
  :cookbook_dirs => TasteTester::Config.cookbooks,
44
44
  :databag_dir => TasteTester::Config.databags,
45
45
  :checksum_dir => TasteTester::Config.checksum_dir,
46
+ :role_type => TasteTester::Config.role_type,
46
47
  )
47
48
  @knife.write_user_config
48
49
  @repo = BetweenMeals::Repo.get(
@@ -51,7 +52,7 @@ module TasteTester
51
52
  logger,
52
53
  )
53
54
  unless @repo.exists?
54
- fail "Could not open repo from #{TasteTester::Config.repo}"
55
+ raise "Could not open repo from #{TasteTester::Config.repo}"
55
56
  end
56
57
  end
57
58
 
@@ -77,15 +77,18 @@ module TasteTester
77
77
  upload
78
78
  end
79
79
  server = TasteTester::Server.new
80
- repo = BetweenMeals::Repo.get(
81
- TasteTester::Config.repo_type,
82
- TasteTester::Config.repo,
83
- logger,
84
- )
85
- unless repo.exists?
86
- fail "Could not open repo from #{TasteTester::Config.repo}"
87
- end
88
- unless TasteTester::Config.skip_pre_test_hook
80
+ unless TasteTester::Config.linkonly
81
+ repo = BetweenMeals::Repo.get(
82
+ TasteTester::Config.repo_type,
83
+ TasteTester::Config.repo,
84
+ logger,
85
+ )
86
+ unless repo.exists?
87
+ raise "Could not open repo from #{TasteTester::Config.repo}"
88
+ end
89
+ end
90
+ unless TasteTester::Config.skip_pre_test_hook ||
91
+ TasteTester::Config.linkonly
89
92
  TasteTester::Hooks.pre_test(TasteTester::Config.dryrun, repo, hosts)
90
93
  end
91
94
  tested_hosts = []
@@ -99,7 +102,8 @@ module TasteTester
99
102
  tested_hosts << hostname
100
103
  end
101
104
  end
102
- unless TasteTester::Config.skip_post_test_hook
105
+ unless TasteTester::Config.skip_post_test_hook ||
106
+ TasteTester::Config.linkonly
103
107
  TasteTester::Hooks.post_test(TasteTester::Config.dryrun, repo,
104
108
  tested_hosts)
105
109
  end
@@ -33,6 +33,7 @@ module TasteTester
33
33
  cookbook_dirs ['cookbooks']
34
34
  role_dir 'roles'
35
35
  databag_dir 'databags'
36
+ role_type 'rb'
36
37
  config_file '/etc/taste-tester-config.rb'
37
38
  plugin_path nil
38
39
  chef_zero_path nil
@@ -52,6 +53,8 @@ module TasteTester
52
53
  use_ssl true
53
54
  chef_zero_logging true
54
55
  chef_config_path '/etc/chef'
56
+ chef_config 'client.rb'
57
+ my_hostname nil
55
58
 
56
59
  skip_pre_upload_hook false
57
60
  skip_post_upload_hook false
@@ -67,7 +70,7 @@ module TasteTester
67
70
 
68
71
  def self.relative_cookbook_dirs
69
72
  cookbook_dirs.map do |x|
70
- (base_dir && !base_dir.empty?) ? File.join(base_dir, x) : x
73
+ base_dir && !base_dir.empty? ? File.join(base_dir, x) : x
71
74
  end
72
75
  end
73
76
 
@@ -76,7 +79,7 @@ module TasteTester
76
79
  end
77
80
 
78
81
  def self.relative_role_dir
79
- (base_dir && !base_dir.empty?) ? File.join(base_dir, role_dir) : role_dir
82
+ base_dir && !base_dir.empty? ? File.join(base_dir, role_dir) : role_dir
80
83
  end
81
84
 
82
85
  def self.databags
@@ -0,0 +1,24 @@
1
+ # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2
2
+
3
+ # Copyright 2013-present Facebook
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TasteTester
18
+ module Exceptions
19
+ class SshError < StandardError
20
+ end
21
+ class LocalLinkError < StandardError
22
+ end
23
+ end
24
+ end
@@ -20,6 +20,7 @@ require 'open3'
20
20
  require 'colorize'
21
21
 
22
22
  require 'taste_tester/ssh'
23
+ require 'taste_tester/locallink'
23
24
  require 'taste_tester/tunnel'
24
25
 
25
26
  module TasteTester
@@ -44,13 +45,13 @@ module TasteTester
44
45
  cmd = "#{TasteTester::Config.ssh_command} " +
45
46
  "#{TasteTester::Config.user}@#{@name} "
46
47
  if TasteTester::Config.user != 'root'
47
- cc = Base64.encode64(cmds).gsub(/\n/, '')
48
+ cc = Base64.encode64(cmds).delete("\n")
48
49
  cmd += "\"echo '#{cc}' | base64 --decode | sudo bash -x\""
49
50
  else
50
51
  cmd += "\"#{cmds}\""
51
52
  end
52
53
  status = IO.popen(
53
- cmd
54
+ cmd,
54
55
  ) do |io|
55
56
  # rubocop:disable AssignmentInCondition
56
57
  while line = io.gets
@@ -62,7 +63,7 @@ module TasteTester
62
63
  end
63
64
  logger.warn("Finished #{TasteTester::Config.chef_client_command}" +
64
65
  " on #{@name} with status #{status}")
65
- if status == 0
66
+ if status.zero?
66
67
  msg = "#{TasteTester::Config.chef_client_command} was successful" +
67
68
  ' - please log to the host and confirm all the intended' +
68
69
  ' changes were made'
@@ -70,6 +71,15 @@ module TasteTester
70
71
  end
71
72
  end
72
73
 
74
+ def get_transport
75
+ if TasteTester::Config.locallink
76
+ transport = TasteTester::LocalLink.new
77
+ else
78
+ transport = TasteTester::SSH.new(@name)
79
+ end
80
+ transport
81
+ end
82
+
73
83
  def test
74
84
  logger.warn("Taste-testing on #{@name}")
75
85
 
@@ -81,63 +91,69 @@ module TasteTester
81
91
  @tunnel.run
82
92
  end
83
93
 
84
- @serialized_config = Base64.encode64(config).gsub(/\n/, '')
94
+ @serialized_config = Base64.encode64(config).delete("\n")
85
95
 
86
96
  # Then setup the testing
87
- ssh = TasteTester::SSH.new(@name)
88
- ssh << 'logger -t taste-tester Moving server into taste-tester' +
97
+ transport = get_transport
98
+
99
+ transport << 'logger -t taste-tester Moving server into taste-tester' +
89
100
  " for #{@user}"
90
- ssh << "touch -t #{TasteTester::Config.testing_end_time}" +
101
+ transport << "touch -t #{TasteTester::Config.testing_end_time}" +
91
102
  " #{TasteTester::Config.timestamp_file}"
92
- ssh << "echo -n '#{@serialized_config}' | base64 --decode" +
103
+ transport << "echo -n '#{@serialized_config}' | base64 --decode" +
93
104
  " > #{TasteTester::Config.chef_config_path}/client-taste-tester.rb"
94
- ssh << "rm -vf #{TasteTester::Config.chef_config_path}/client.rb"
95
- ssh << "( ln -vs #{TasteTester::Config.chef_config_path}" +
105
+ transport << "rm -vf #{TasteTester::Config.chef_config_path}/" +
106
+ TasteTester::Config.chef_config
107
+ transport << "( ln -vs #{TasteTester::Config.chef_config_path}" +
96
108
  "/client-taste-tester.rb #{TasteTester::Config.chef_config_path}/" +
97
- 'client.rb; true )'
98
- ssh.run!
109
+ "#{TasteTester::Config.chef_config}; true )"
110
+ transport.run!
99
111
 
100
112
  # Then run any other stuff they wanted
101
113
  cmds = TasteTester::Hooks.test_remote_cmds(
102
114
  TasteTester::Config.dryrun,
103
- @name
115
+ @name,
104
116
  )
105
117
 
106
118
  if cmds && cmds.any?
107
- ssh = TasteTester::SSH.new(@name)
108
- cmds.each { |c| ssh << c }
109
- ssh.run!
119
+ transport = get_transport
120
+ cmds.each { |c| transport << c }
121
+ transport.run!
110
122
  end
111
123
  end
112
124
 
113
125
  def untest
114
126
  logger.warn("Removing #{@name} from taste-tester")
115
- ssh = TasteTester::SSH.new(@name)
127
+ transport = get_transport
116
128
  if TasteTester::Config.use_ssh_tunnels
117
129
  TasteTester::Tunnel.kill(@name)
118
130
  end
131
+ config_prod = TasteTester::Config.chef_config.split('.').join('-prod.')
119
132
  [
120
- "rm -vf #{TasteTester::Config.chef_config_path}/client.rb",
133
+ "rm -vf #{TasteTester::Config.chef_config_path}/" +
134
+ TasteTester::Config.chef_config,
121
135
  "rm -vf #{TasteTester::Config.chef_config_path}/client-taste-tester.rb",
122
- "ln -vs #{TasteTester::Config.chef_config_path}/client-prod.rb " +
123
- "#{TasteTester::Config.chef_config_path}/client.rb",
136
+ "ln -vs #{TasteTester::Config.chef_config_path}/#{config_prod} " +
137
+ "#{TasteTester::Config.chef_config_path}/" +
138
+ TasteTester::Config.chef_config,
124
139
  "rm -vf #{TasteTester::Config.chef_config_path}/client.pem",
125
140
  "ln -vs #{TasteTester::Config.chef_config_path}/client-prod.pem " +
126
141
  "#{TasteTester::Config.chef_config_path}/client.pem",
127
142
  "rm -vf #{TasteTester::Config.timestamp_file}",
128
143
  'logger -t taste-tester Returning server to production',
129
144
  ].each do |cmd|
130
- ssh << cmd
145
+ transport << cmd
131
146
  end
132
- ssh.run!
147
+ transport.run!
133
148
  end
134
149
 
135
150
  def who_is_testing
136
- ssh = TasteTester::SSH.new(@name)
137
- ssh << 'grep "^# TasteTester by"' +
138
- " #{TasteTester::Config.chef_config_path}/client.rb"
139
- output = ssh.run
140
- if output.first == 0
151
+ transport = get_transport
152
+ transport << 'grep "^# TasteTester by"' +
153
+ " #{TasteTester::Config.chef_config_path}/" +
154
+ TasteTester::Config.chef_config
155
+ output = transport.run
156
+ if output.first.zero?
141
157
  user = output.last.match(/# TasteTester by (.*)$/)
142
158
  if user
143
159
  return user[1]
@@ -145,10 +161,11 @@ module TasteTester
145
161
  end
146
162
 
147
163
  # Legacy FB stuff, remove after migration. Safe for everyone else.
148
- ssh = TasteTester::SSH.new(@name)
149
- ssh << "file #{TasteTester::Config.chef_config_path}/client.rb"
150
- output = ssh.run
151
- if output.first == 0
164
+ transport = get_transport
165
+ transport << "file #{TasteTester::Config.chef_config_path}/" +
166
+ TasteTester::Config.chef_config
167
+ output = transport.run
168
+ if output.first.zero?
152
169
  user = output.last.match(/client-(.*)-(taste-tester|test).rb/)
153
170
  if user
154
171
  return user[1]
@@ -159,9 +176,10 @@ module TasteTester
159
176
  end
160
177
 
161
178
  def in_test?
162
- ssh = TasteTester::SSH.new(@name)
163
- ssh << "test -f #{TasteTester::Config.timestamp_file}"
164
- if ssh.run.first == 0 && who_is_testing && who_is_testing != ENV['USER']
179
+ transport = get_transport
180
+ transport << "test -f #{TasteTester::Config.timestamp_file}"
181
+ if transport.run.first.zero? && who_is_testing &&
182
+ who_is_testing != ENV['USER']
165
183
  true
166
184
  else
167
185
  false
@@ -176,10 +194,10 @@ module TasteTester
176
194
  @tunnel = TasteTester::Tunnel.new(@name, @server)
177
195
  @tunnel.run
178
196
  else
179
- ssh = TasteTester::SSH.new(@name)
180
- ssh << "touch -t #{TasteTester::Config.testing_end_time}" +
197
+ transport = get_transport
198
+ transport << "touch -t #{TasteTester::Config.testing_end_time}" +
181
199
  " #{TasteTester::Config.timestamp_file}"
182
- ssh.run!
200
+ transport.run!
183
201
  end
184
202
  end
185
203
 
@@ -190,7 +208,8 @@ module TasteTester
190
208
  if TasteTester::Config.use_ssh_tunnels
191
209
  url = "#{scheme}://localhost:#{@tunnel.port}"
192
210
  else
193
- url = "#{scheme}://#{@server.host}:#{TasteTester::State.port}"
211
+ url = "#{scheme}://#{@server.host}"
212
+ url << ":#{TasteTester::State.port}" if TasteTester::State.port
194
213
  end
195
214
  # rubocop:disable Metrics/LineLength
196
215
  ttconfig = <<-eos
@@ -205,7 +224,7 @@ log_level :info
205
224
  log_location STDOUT
206
225
  chef_server_url '#{url}'
207
226
  ssl_verify_mode :verify_none
208
- Ohai::Config[:plugin_path] << '#{TasteTester::Config.chef_config_path}/ohai_plugins'
227
+ ohai.plugin_path << '#{TasteTester::Config.chef_config_path}/ohai_plugins'
209
228
 
210
229
  eos
211
230
  # rubocop:enable Metrics/LineLength
@@ -0,0 +1,65 @@
1
+ # vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2
2
+
3
+ # Copyright 2013-present Facebook
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'taste_tester/exceptions'
18
+
19
+ module TasteTester
20
+ # Wrapper for running commands on local system
21
+ class LocalLink
22
+ include TasteTester::Logging
23
+ include BetweenMeals::Util
24
+
25
+ attr_reader :output
26
+
27
+ def initialize
28
+ @host = 'localhost'
29
+ @cmds = []
30
+ end
31
+
32
+ def add(string)
33
+ @cmds << string
34
+ end
35
+
36
+ alias << add
37
+
38
+ def run
39
+ @status, @output = exec(cmd, logger)
40
+ end
41
+
42
+ def run!
43
+ @status, @output = exec!(cmd, logger)
44
+ rescue => e
45
+ logger.error(e.message)
46
+ raise TasteTester::Exceptions::LocalLinkError
47
+ end
48
+
49
+ private
50
+
51
+ def cmd
52
+ @cmds.each do |cmd|
53
+ logger.info("Will run: '#{cmd}' on #{@host}")
54
+ end
55
+ cmds = @cmds.join(' && ')
56
+ if TasteTester::Config.user != 'root'
57
+ cc = Base64.encode64(cmds).delete("\n")
58
+ cmd = "echo '#{cc}' | base64 --decode | sudo bash -x"
59
+ else
60
+ cmd = cmds.to_s
61
+ end
62
+ cmd
63
+ end
64
+ end
65
+ end
@@ -63,7 +63,7 @@ module TasteTester
63
63
  else
64
64
  @addr = '::'
65
65
  begin
66
- @host = Socket.gethostname
66
+ @host = TasteTester::Config.my_hostname || Socket.gethostname
67
67
  rescue
68
68
  logger.error('Unable to find fqdn')
69
69
  exit 1
@@ -153,7 +153,8 @@ module TasteTester
153
153
  })
154
154
  logger.info("Starting chef-zero of port #{@state.port}")
155
155
  cmd = "#{chef_zero_path} --host #{@addr} --port #{@state.port} -d"
156
- cmd << " --log-file #{@log_file}" if TasteTester::Config.chef_zero_logging
156
+ cmd << " --log-file #{@log_file}" +
157
+ ' --log-level debug' if TasteTester::Config.chef_zero_logging
157
158
  cmd << ' --ssl' if TasteTester::Config.use_ssl
158
159
  Mixlib::ShellOut.new(cmd).run_command.error!
159
160
  end
@@ -14,6 +14,8 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
+ require 'taste_tester/exceptions'
18
+
17
19
  module TasteTester
18
20
  # Thin ssh wrapper
19
21
  class SSH
@@ -33,7 +35,7 @@ module TasteTester
33
35
  @cmds << string
34
36
  end
35
37
 
36
- alias_method :<<, :add
38
+ alias << add
37
39
 
38
40
  def run
39
41
  @status, @output = exec(cmd, logger)
@@ -53,7 +55,7 @@ MSG
53
55
  # rubocop:enable LineLength
54
56
  error.lines.each { |x| logger.error x.strip }
55
57
  logger.error(e.message)
56
- exit(1)
58
+ raise TasteTester::Exceptions::SshError
57
59
  end
58
60
 
59
61
  private
@@ -67,7 +69,7 @@ MSG
67
69
  "-T -o BatchMode=yes -o ConnectTimeout=#{@timeout} " +
68
70
  "#{TasteTester::Config.user}@#{@host} "
69
71
  if TasteTester::Config.user != 'root'
70
- cc = Base64.encode64(cmds).gsub(/\n/, '')
72
+ cc = Base64.encode64(cmds).delete("\n")
71
73
  cmd += "\"echo '#{cc}' | base64 --decode | sudo bash -x\""
72
74
  else
73
75
  cmd += "\'#{cmds}\'"
@@ -30,7 +30,7 @@ module TasteTester
30
30
 
31
31
  def initialize
32
32
  ref_dir = File.dirname(File.expand_path(
33
- TasteTester::Config.ref_file
33
+ TasteTester::Config.ref_file,
34
34
  ))
35
35
  unless File.directory?(ref_dir)
36
36
  begin
@@ -98,6 +98,13 @@ module TasteTester
98
98
  end
99
99
  end
100
100
 
101
+ def self.read(key)
102
+ JSON.parse(File.read(TasteTester::Config.ref_file))[key.to_s]
103
+ rescue => e
104
+ logger.debug(e)
105
+ nil
106
+ end
107
+
101
108
  private
102
109
 
103
110
  def write(key, val)
@@ -113,7 +120,7 @@ module TasteTester
113
120
  state.merge!(vals)
114
121
  ff = File.open(
115
122
  TasteTester::Config.ref_file,
116
- 'w'
123
+ 'w',
117
124
  )
118
125
  ff.write(state.to_json)
119
126
  ff.close
@@ -122,12 +129,5 @@ module TasteTester
122
129
  logger.debug(e)
123
130
  exit 0
124
131
  end
125
-
126
- def self.read(key)
127
- JSON.parse(File.read(TasteTester::Config.ref_file))[key.to_s]
128
- rescue => e
129
- logger.debug(e)
130
- nil
131
- end
132
132
  end
133
133
  end
@@ -65,7 +65,7 @@ module TasteTester
65
65
  '-o ServerAliveInterval=10 -o ServerAliveCountMax=6 ' +
66
66
  "-f -R #{@port}:localhost:#{@server.port} "
67
67
  if TasteTester::Config.user != 'root'
68
- cc = Base64.encode64(cmds).gsub(/\n/, '')
68
+ cc = Base64.encode64(cmds).delete("\n")
69
69
  cmd += "#{TasteTester::Config.user}@#{@host} \"echo '#{cc}' | base64" +
70
70
  ' --decode | sudo bash -x"'
71
71
  else
metadata CHANGED
@@ -1,165 +1,147 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: taste_tester
3
- version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 10
10
- version: 0.0.10
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.11
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Phil Dibowitz
14
8
  - Marcin Sawicki
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2015-11-26 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2016-09-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: between_meals
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 19
30
- segments:
31
- - 0
32
- - 0
33
- - 6
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
34
20
  version: 0.0.6
35
21
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: mixlib-config
39
22
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 0.0.6
28
+ - !ruby/object:Gem::Dependency
29
+ name: mixlib-config
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
49
35
  type: :runtime
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: colorize
53
36
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: colorize
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
63
49
  type: :runtime
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: rubocop
67
50
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
77
63
  type: :development
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: chef-zero
81
64
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: chef-zero
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
91
77
  type: :development
92
- version_requirements: *id005
93
- - !ruby/object:Gem::Dependency
94
- name: knife-solo
95
78
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: knife-solo
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
105
91
  type: :development
106
- version_requirements: *id006
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
107
98
  description: Utility for testing Chef changes using chef-zero
108
99
  email:
109
- executables:
100
+ executables:
110
101
  - taste-tester
111
102
  extensions: []
112
-
113
- extra_rdoc_files:
103
+ extra_rdoc_files:
114
104
  - README.md
115
105
  - LICENSE
116
- files:
106
+ files:
117
107
  - README.md
118
108
  - LICENSE
109
+ - lib/taste_tester/logging.rb
110
+ - lib/taste_tester/server.rb
111
+ - lib/taste_tester/tunnel.rb
112
+ - lib/taste_tester/commands.rb
119
113
  - lib/taste_tester/host.rb
114
+ - lib/taste_tester/config.rb
115
+ - lib/taste_tester/locallink.rb
120
116
  - lib/taste_tester/client.rb
121
117
  - lib/taste_tester/hooks.rb
122
- - lib/taste_tester/commands.rb
118
+ - lib/taste_tester/exceptions.rb
123
119
  - lib/taste_tester/state.rb
124
120
  - lib/taste_tester/ssh.rb
125
- - lib/taste_tester/server.rb
126
- - lib/taste_tester/tunnel.rb
127
- - lib/taste_tester/logging.rb
128
- - lib/taste_tester/config.rb
129
121
  - bin/taste-tester
130
122
  - scripts/taste-untester
131
123
  homepage: https://github.com/facebook/taste-tester
132
- licenses:
124
+ licenses:
133
125
  - Apache
126
+ metadata: {}
134
127
  post_install_message:
135
128
  rdoc_options: []
136
-
137
- require_paths:
129
+ require_paths:
138
130
  - lib
139
- required_ruby_version: !ruby/object:Gem::Requirement
140
- none: false
141
- requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
146
- - 0
147
- version: "0"
148
- required_rubygems_version: !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- hash: 3
154
- segments:
155
- - 0
156
- version: "0"
131
+ required_ruby_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
157
141
  requirements: []
158
-
159
142
  rubyforge_project:
160
- rubygems_version: 1.8.5
143
+ rubygems_version: 2.0.14
161
144
  signing_key:
162
- specification_version: 3
145
+ specification_version: 4
163
146
  summary: Taste Tester
164
147
  test_files: []
165
-