homebrew_automation 0.1.17 → 0.1.18

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
  SHA256:
3
- metadata.gz: 631a391dc1b239b9195b9dd9ae7dfe554a9d622afd3437b672716e27d599b70a
4
- data.tar.gz: 0c40e8267deb8365212d2b60d976fadbf52c81c685fdba2d1404f473b8564405
3
+ metadata.gz: e089fca1788141913d23a696c25a7b224ad1844606cd52bc8c0eeb819f6fd9bc
4
+ data.tar.gz: 928913f37725c6ee1b2a1a982309424a5e51603420327f5b07a58855a184d4e2
5
5
  SHA512:
6
- metadata.gz: 302c739c1028ac4255fb2bd9e15e9f2979cc0df5dd67704795d6fcb3a58f391c790763813b83bc2242a40e9fb5eedf2f5bb8e3fab60a73523ab895130117a10c
7
- data.tar.gz: f9f41c0cee062f606391ac04e28739754c027c6b6cb6eb9643dca876b7b1dc26c2fb9a593debaebb54215bc3b1c855414cecaeff07148b884a81dc89a70809c9
6
+ metadata.gz: 0575f8dbbe9dc9edb076b682e1f1920f90af4f39d3660c7dc8dfe71ff81bf4ded50467b67782b415cc7da23ef3f9bf327bf53cb21638423844ca5e335e0ef223
7
+ data.tar.gz: f65ae6e458ab8fdcd0ed557415d2fb71608bd131fbca8c37763e14421c6db66cda35d446fd8f1daba989d917bdbaca424bb3350394f5f7fcd0735b0247e6b711
@@ -88,7 +88,7 @@ module HomebrewAutomation
88
88
  @brew.uninstall!(['--force'], fully_qualified_formula_name)
89
89
  end
90
90
  @brew.install!(
91
- %w[--verbose --build-bottle] + if @keep_tmp then %w[--keep-tmp] else [] end,
91
+ %w[--verbose --build-bottle --force] + if @keep_tmp then %w[--keep-tmp] else [] end,
92
92
  fully_qualified_formula_name)
93
93
  @brew.bottle!(
94
94
  %w[--verbose --json --no-rebuild],
@@ -7,9 +7,6 @@ module HomebrewAutomation
7
7
  class Error < StandardError
8
8
  end
9
9
 
10
- class OlderVersionAlreadyInstalled < StandardError
11
- end
12
-
13
10
  # +brew tap "$name" "$url"+
14
11
  #
15
12
  # @param name [String]
@@ -25,6 +22,9 @@ module HomebrewAutomation
25
22
  checked('brew', 'untap', name)
26
23
  end
27
24
 
25
+ class InstallFailed < StandardError
26
+ end
27
+
28
28
  # +brew install [opts] "$fully_qualified_formula_name"+
29
29
  #
30
30
  # @param opts [Array<String>]
@@ -32,7 +32,7 @@ module HomebrewAutomation
32
32
  def self.install!(opts, fully_qualified_formula_name)
33
33
  checked('brew', 'install', *opts, fully_qualified_formula_name)
34
34
  rescue Error
35
- raise OlderVersionAlreadyInstalled
35
+ raise InstallFailed
36
36
  end
37
37
 
38
38
  class UninstallFailed < StandardError
@@ -2,6 +2,6 @@
2
2
  module HomebrewAutomation
3
3
 
4
4
  # Yep.
5
- VERSION = '0.1.17'
5
+ VERSION = '0.1.18'
6
6
 
7
7
  end
@@ -77,35 +77,25 @@ module HomebrewAutomation
77
77
  logger.error!([
78
78
  "Something went wrong in a Bottle: " + e.message,
79
79
  "Original JSON:",
80
- e.original,
81
- "Backtrace:",
82
- e.backtrace.join("\n")
83
- ].join("\n"))
84
- raise
85
- rescue HomebrewAutomation::Brew::OlderVersionAlreadyInstalled => e
86
- logger.error!([
87
- "An older version of the Formula is already installed on your system. " \
88
- "Please either manually uninstall or upgrade it, then try again.",
89
- e.to_s,
90
- "Caused by: #{e.cause}",
91
- (e.cause ? e.cause.backtrace.join("\n") : '')
80
+ e.original
92
81
  ].join("\n"))
93
82
  raise
94
83
  rescue HomebrewAutomation::Brew::UninstallFailed => e
95
- logger.error!("brew uninstall failed:\n" + e.backtrace.join("\n"))
84
+ logger.error!("brew uninstall failed: #{e}")
85
+ raise
86
+ rescue HomebrewAutomation::Brew::InstallFailed => e
87
+ logger.error!("brew install failed: #{e}")
96
88
  raise
97
89
  rescue HomebrewAutomation::Brew::Error => e
98
- logger.error!(
99
- "Something went wrong in this Homebrew command: " +
100
- e.message + "\n" + e.backtrace.join("\n"))
90
+ logger.error!("Something went wrong in this Homebrew command: #{e}")
101
91
  raise
102
92
  rescue HomebrewAutomation::Git::Error => e
103
- logger.error!(
104
- "Something went wrong in this Git command: " +
105
- e.message + "\n" + e.backtrace.join("\n"))
93
+ logger.error!("Something went wrong in this Git command: #{e}")
106
94
  raise
107
95
  rescue HomebrewAutomation::SourceDist::SdistDoesNotExist => e
108
- logger.error!("The tar file from Github you named doesn't exist. Is it because you haven't pushed that tag to Github yet?")
96
+ logger.error!(
97
+ "The tar file from Github you named doesn't exist. " +
98
+ "Is it because you haven't pushed that tag to Github yet?")
109
99
  raise
110
100
  end
111
101
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homebrew_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - easoncxz