opsworks 0.0.13 → 0.0.14

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 85a59b2adecb2ddabe49220d7750202d1cb87195
4
- data.tar.gz: d04a9012af41e3715ae64133f6406226154aa297
3
+ metadata.gz: a24c300ec4ca258fd1d93d50d8d7d9673bc06b6b
4
+ data.tar.gz: db3f12062346f283a16ea57f92967f6f9875a964
5
5
  SHA512:
6
- metadata.gz: 740e793648ab4b50b19941c268004410910ca8618c5002b34fdb2d12405d0c1b92250774bf78c2943086a3d3c2c6a63f909213a2a3e1acaba1d48cd9331cf5bf
7
- data.tar.gz: c135e453012bcb04985f19e6e9b6e2dad26d5b0cbed9deb72c9fb7dd69037866c7df522c7059c84bc7ad00588e797474ed3d41466d86435a00ae74990ef98dd0
6
+ metadata.gz: 90a7af50d584a6cbce7e13d9d6ccf2e38fa818507514073d5aeffec29c74750b6a6f9dbb09468eaf38404d4f65005b745d5241a62fdf0e46edcb4c7dc4e9ffd5
7
+ data.tar.gz: a00a6474a69df20cf59805ba82f49af1172be6ed30b9ecf81ea15fc958e90aa88da882689fc00fbd631b87a3121863ef3011673580135ef33c90d39fa7b94b84
@@ -4,7 +4,7 @@ require 'trollop'
4
4
  require 'opsworks'
5
5
 
6
6
  SSH_PREFIX = "# --- OpsWorks ---"
7
- SSH_POSTFIX = "# --- End of OpsWorks ---\n\n"
7
+ SSH_POSTFIX = "# --- End of OpsWorks ---"
8
8
 
9
9
  module OpsWorks::Commands
10
10
  class SSH
@@ -53,7 +53,9 @@ module OpsWorks::Commands
53
53
  parameters.map{ |param| param.join(" ") }.join("\n ")
54
54
  end
55
55
 
56
- new_contents = "\n#{SSH_PREFIX}\n#{instances.join("\n")}\n#{SSH_POSTFIX}"
56
+ new_contents = "\n\n#{SSH_PREFIX}\n" <<
57
+ "#{instances.join("\n")}\n" <<
58
+ "#{SSH_POSTFIX}\n\n"
57
59
 
58
60
  if options[:update]
59
61
  ssh_config = "#{ENV['HOME']}/.ssh/config"
@@ -74,7 +76,10 @@ module OpsWorks::Commands
74
76
  end
75
77
 
76
78
  File.open(ssh_config, "w") do |file|
77
- file.puts old_contents.gsub(/#{SSH_PREFIX}.*#{SSH_POSTFIX}/m, '')
79
+ file.puts old_contents.gsub(
80
+ /\n?\n?#{SSH_PREFIX}.*#{SSH_POSTFIX}\n?\n?/m,
81
+ ''
82
+ )
78
83
  file.puts new_contents
79
84
  end
80
85
 
data/lib/opsworks/meta.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module OpsWorks
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  AUTHORS = ["Adam Lindberg"]
4
4
  EMAIL = ["hello@alind.io"]
5
5
  DESCRIPTION = "Amazon OpsWorks CLI"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Lindberg