syncwrap 2.5.0 → 2.5.1

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: 521c163fcf6e3d89223fbc6dc5791b4f9010978d
4
- data.tar.gz: 9842766eb24481a03bad1c8b21dfcc2ed7cedd77
3
+ metadata.gz: 081970fc00b932bd2296f5a2678b029a2ce0d89d
4
+ data.tar.gz: 74a6e24b78b9983bc8b54c2486d997a62b08efd4
5
5
  SHA512:
6
- metadata.gz: 97ef2d6fadd8dd574f121392e6d93f12af4f30eec886e9c9cc327ef3c63ba5b229cf60d35e8ab6c31aa8ca8138c10de9701fd15782192b453d96db35fd1c7118
7
- data.tar.gz: 831d26efc475c9ce0ceaa79f13342d4bf324bdde23cd2f57a465e8a358bbf0afef9b4f0a087967b13d46910622b46feaa1cdd7aa70038681e5c57e7b9582833e
6
+ metadata.gz: 1831e1c8dfeae16ee2b24d56bfb6388bbd468cbb381e974d05adf6b7c198495f8b2c6d30a9d75f58ab19c4da1f715fe3e84500b5ed098a55fe8c0c477a5f3252
7
+ data.tar.gz: 459cbbf8efd87fef6fa95692caa6ab72886b4d72f70c6e65d72af351452dae89de978c1e04fd267bf211de1080764a40b84a36f9ce6cc276c605fbe143ca4f1c
data/History.rdoc CHANGED
@@ -1,5 +1,15 @@
1
+ === 2.5.1 (2015-10-19)
2
+ * Add SyncWrap::RHEL#dist_uninstall :succeed flag for removing
3
+ packages which may not exist
4
+ * Fix for CRubyVM on minimal CentOS 7.1: Use above :succeed flag on
5
+ distro ruby uninstall, add ruby 2.2
6
+ * Fix --delete-attached-storage on AWS HVM by broadening pattern of
7
+ device names
8
+ * Fix a timing issue observed with SyncWrap::AmazonEC2 instance
9
+ creation
10
+
1
11
  === 2.5.0 (2015-3-20)
2
- * Merge 9.4 release postgresql.conf additions (comments only).
12
+ * Merge 9.4 release postgresql.conf additions (comments only)
3
13
  * Add :manifest option to rput and SourceTree (with ./Manifest.txt default)
4
14
  * Upgrade SyncWrap::JRubyVM default version to 1.7.19
5
15
 
@@ -126,6 +126,10 @@ module SyncWrap
126
126
 
127
127
  inst = ec2.instances.create( iopts )
128
128
 
129
+ wait_until( "instance #{inst.id} to register" ) do
130
+ inst.status != :pending
131
+ end
132
+
129
133
  inst.add_tag( 'Name', value: name )
130
134
 
131
135
  if opts[ :roles ]
@@ -257,10 +261,10 @@ module SyncWrap
257
261
  end
258
262
 
259
263
  # Terminate an instance and wait for it to be terminated. If
260
- # requested, /dev/sdh# attached EBS volumes which are not
261
- # otherwise marked for :delete_on_termination will _also_ be
262
- # terminated. The minimum required properties in iprops are
263
- # :region and :id.
264
+ # requested, /dev/sdh# (PV style) or /dev/sd[f-p] attached EBS
265
+ # volumes which are not otherwise marked for
266
+ # :delete_on_termination will _also_ be terminated. The minimum
267
+ # required properties in iprops are :region and :id.
264
268
  #
265
269
  # _WARNING_: data _will_ be lost!
266
270
  def aws_terminate_instance( iprops, delete_attached_storage = false, do_wait = true )
@@ -274,7 +278,10 @@ module SyncWrap
274
278
  if delete_attached_storage
275
279
  ebs_volumes = inst.block_devices.map do |dev|
276
280
  ebs = dev[ :ebs ]
277
- if ebs && dev[:device_name] =~ /dh\d+$/ && !ebs[:delete_on_termination]
281
+
282
+ if ebs && !ebs[:delete_on_termination] &&
283
+ ( dev[:device_name] =~ /dh\d+$/ ||
284
+ dev[:device_name] =~ /sd[f-p]$/ )
278
285
  ebs[ :volume_id ]
279
286
  end
280
287
  end.compact
data/lib/syncwrap/base.rb CHANGED
@@ -15,7 +15,7 @@
15
15
  #++
16
16
 
17
17
  module SyncWrap
18
- VERSION='2.5.0'
18
+ VERSION='2.5.1'
19
19
 
20
20
  GEM_ROOT = File.dirname(File.dirname(File.dirname(__FILE__))) # :nodoc:
21
21
  end
@@ -29,6 +29,7 @@ module SyncWrap
29
29
  end
30
30
 
31
31
  def dist_uninstall( *pkgs )
32
+ opts = pkgs.last.is_a?( Hash ) && pkgs.pop || {}
32
33
  sudo "pacman -R --noconfirm #{pkgs.join ' '}"
33
34
  end
34
35
 
@@ -93,9 +93,11 @@ module SyncWrap
93
93
 
94
94
  def uninstall_distro_ruby
95
95
  if distro.is_a?( RHEL )
96
- dist_uninstall( %w[ ruby ruby18 ruby19 ruby20 ruby21 ] )
96
+ dist_uninstall( %w[ ruby ruby18 ruby19 ruby20 ruby21 ruby22 ],
97
+ succeed: true )
97
98
  else
98
- dist_uninstall( %w[ ruby ruby1.8 ruby1.9 ruby1.9.1 ruby1.9.3 ruby2.0 ruby2.1 ] )
99
+ dist_uninstall( %w[ ruby ruby1.8 ruby1.9 ruby1.9.1
100
+ ruby1.9.3 ruby2.0 ruby2.1 ruby2.2 ] )
99
101
  end
100
102
  end
101
103
 
@@ -51,8 +51,10 @@ module SyncWrap
51
51
  sudo( "apt-get -yq install #{args.join ' '}" )
52
52
  end
53
53
 
54
- # Uninstall the specified package names.
54
+ # Uninstall the specified package names. A trailing hash is
55
+ # interpreted as options.
55
56
  def dist_uninstall( *pkgs )
57
+ opts = pkgs.last.is_a?( Hash ) && pkgs.pop || {}
56
58
  sudo "aptitude -yq purge #{pkgs.join ' '}"
57
59
  end
58
60
 
@@ -51,9 +51,24 @@ module SyncWrap
51
51
  end
52
52
  end
53
53
 
54
- # Uninstall the specified package names.
54
+ # Uninstall the specified package names. A trailing hash is
55
+ # interpreted as options, see below.
56
+ #
57
+ # ==== Options
58
+ # :succeed:: Succeed even if no such packages are installed
59
+ #
60
+ # Other options will be ignored.
55
61
  def dist_uninstall( *pkgs )
56
- sudo "yum remove -q -y #{pkgs.join( ' ' )}"
62
+ opts = pkgs.last.is_a?( Hash ) && pkgs.pop || {}
63
+ if opts[ :succeed ]
64
+ sudo <<-SH
65
+ if yum list -q installed #{pkgs.join( ' ' )} >/dev/null 2>&1; then
66
+ yum remove -q -y #{pkgs.join( ' ' )}
67
+ fi
68
+ SH
69
+ else
70
+ sudo "yum remove -q -y #{pkgs.join( ' ' )}"
71
+ end
57
72
  end
58
73
 
59
74
  # Install a System V style init.d service script
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syncwrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Kellum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
272
  version: '0'
273
273
  requirements: []
274
274
  rubyforge_project:
275
- rubygems_version: 2.2.2
275
+ rubygems_version: 2.4.5.1
276
276
  signing_key:
277
277
  specification_version: 4
278
278
  summary: A rather direct provisioning and deployment system in ruby, bash over ssh,