wci-bash 0.20181204154457.0 → 0.20181204160710.0

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: c1b2d3c96d8260fc6be25b0024b38a811137f9b3
4
- data.tar.gz: 60e57df4c12f48144d0fb2427b78c76a50934a91
3
+ metadata.gz: 030ba489ead09bf5040cdfea5feee39c5357c826
4
+ data.tar.gz: 45429951357c96bcdde7ab1c0b97667ca9ec379c
5
5
  SHA512:
6
- metadata.gz: de7a9c48ad2036a7f1d45e59378776addddd5d230ad8061a47d961f084eceb1b273ecfadfbdabcf5e001bdcc6c919b1e0f11ed71f082a8fe7c1b01867e7221d8
7
- data.tar.gz: 139a728c8fd875eb2e808a49621d962b176ce012aa3788eed604317294941595058b886ebd8d9aaf19e711abfa67fe7bffe8b176454469c15137e9b6e78767e6
6
+ metadata.gz: 338724b6fff937389f586e04dfce9a54da080513867acbc7ccd69848d31b4c07ab0781b545ca8a41b5ca585dda7c0f51185e19b2451f803a64e94b02c8e36b04
7
+ data.tar.gz: bbe1a4a394aea408cdd74e38dc5b242e4814cfd9d2d171c856f5b5a80ed4a8e01977604ead6430d8792eb22b4daec57f43e81522d24342e28f987d415aa852b0
@@ -4,6 +4,7 @@ require 'fileutils'
4
4
 
5
5
  this_file_dir = File.expand_path(File.dirname(__FILE__))
6
6
  this_gem_dir = File.dirname(this_file_dir)
7
+ this_gem_id = File.basename(this_gem_dir)
7
8
  this_lib_dir = this_gem_dir + '/lib'
8
9
  this_lib_entry = this_lib_dir + '/wci.bash'
9
10
 
@@ -17,3 +18,6 @@ end
17
18
 
18
19
  p 'Creating symlink from: ' + symlink_path + ' to: ' + this_lib_entry
19
20
  FileUtils.ln_s(this_lib_entry, symlink_path)
21
+
22
+ FileUtils.chmod(0700, this_file_dir + '/wci-uninstall_old_gems')
23
+ system(this_file_dir + '/wci-uninstall_old_gems ' + this_gem_id)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+
3
+ GEM_ID="$1"
4
+ GEM_NAME="$(echo "${GEM_ID}" | rev | cut -f2-100 -d\- | rev)"
5
+ GEM_VERSION="$(echo "${GEM_ID}" | rev | cut -f1 -d\- | rev)"
6
+
7
+ gem uninstall -x --version "< ${GEM_VERSION}" "${GEM_NAME}" 2>/dev/null
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wci-bash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20181204154457.0
4
+ version: 0.20181204160710.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WCI
@@ -22,6 +22,7 @@ files:
22
22
  - README.md
23
23
  - bin/wci-configure
24
24
  - bin/wci-uninstall
25
+ - bin/wci-uninstall_old_gems
25
26
  - lib/include.d/functions.bash
26
27
  - lib/wci.bash
27
28
  homepage: http://wibble.city