homebrew_automation 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fa749397cec51ec4237dcc7d68977f9d9f17efc3474247f7a15ebe5b5d22a27
4
- data.tar.gz: bcf765d4779748aab17dddea1f6c1c653e2e7152ba9afb7383bfc664804a3e58
3
+ metadata.gz: 9a3d541470864fdabac7601c9b4bca62c97f3b8a94f1af65d8dd36ab5bdd93d9
4
+ data.tar.gz: 23d0c6a2f2e625ace46a36bbdf18b13cd43611e66bf52655ea098208bf5d1dc0
5
5
  SHA512:
6
- metadata.gz: e7d0d5385ed82116aee5ee18d08c18bc93eabb527b3081347696ffff6c725d512d58799cb865942859e9ffdf33d914527c6647cd07b43845d39d173ea624a36d
7
- data.tar.gz: 915c01241c91bdb4f5ccf369f9d7db8abaa34a1a5c80e8755124d63d055812c856075e45ec1e63a69f3591cdda79a289b7257b211f3c0f19570f10e2b4bbfff5
6
+ metadata.gz: 175915af38029378ecdc8b78fd463eb55e14e34d6d18222479f2feca5883c8f6f46341a68bba2ab44125b16121ec38392e0caaae973c45b32e86622dc69dea76
7
+ data.tar.gz: 362510628786c45559de477492efb7857ada4b3bd6b6973733c662b5307f0e550a2f515c87f80b2cde57a2cbc65c13fe5dde16a02fdc844c225aabb16aeb0871
@@ -33,11 +33,11 @@ module HomebrewAutomation
33
33
  # @raise [StandardError]
34
34
  # @return [nil]
35
35
  def build
36
- die unless system 'brew', 'tap', tmp_tap_name, @tap_url
36
+ complain unless system 'brew', 'tap', tmp_tap_name, @tap_url
37
37
  maybe_keep_tmp = @keep_tmp ? ['--keep-tmp'] : []
38
38
  install_cmd = ['brew', 'install', '--verbose'] + maybe_keep_tmp + ['--build-bottle', fully_qualified_formula_name]
39
- die unless system(*install_cmd)
40
- die unless system 'brew', 'bottle', '--verbose', '--json', '--no-rebuild', fully_qualified_formula_name
39
+ complain unless system(*install_cmd)
40
+ complain unless system 'brew', 'bottle', '--verbose', '--json', '--no-rebuild', fully_qualified_formula_name
41
41
  end
42
42
 
43
43
  # Read and analyse metadata JSON file
@@ -49,11 +49,11 @@ module HomebrewAutomation
49
49
  return locate_tarball
50
50
  end
51
51
  json = JSON.parse(File.read(json_filename))
52
- focus = json || die
53
- focus = focus[json.keys.first] || die
54
- focus = focus['bottle'] || die
55
- focus = focus['tags'] || die
56
- focus = focus[@os_name] || die
52
+ focus = json || complain
53
+ focus = focus[json.keys.first] || complain
54
+ focus = focus['bottle'] || complain
55
+ focus = focus['tags'] || complain
56
+ focus = focus[@os_name] || complain
57
57
  @minus_minus, @filename = focus['local_filename'], focus['filename']
58
58
  end
59
59
 
@@ -95,8 +95,9 @@ module HomebrewAutomation
95
95
  tmp_tap_name + '/' + @formula_name
96
96
  end
97
97
 
98
- def die
99
- raise StandardError.new
98
+ def complain
99
+ puts "HEY! Something has gone wrong and I need to complain. Stacktrace follows:"
100
+ puts caller
100
101
  end
101
102
 
102
103
  end
@@ -99,30 +99,31 @@ module HomebrewAutomation
99
99
  # @param msg [String] Git commit message
100
100
  # @raise [StandardError]
101
101
  def git_commit_am(msg)
102
- die unless system "git", "commit", "-am", msg
102
+ complain unless system "git", "commit", "-am", msg
103
103
  end
104
104
 
105
105
  # Just +git push+
106
106
  #
107
107
  # @raise [StandardError]
108
108
  def git_push
109
- die unless system "git", "push"
109
+ complain unless system "git", "push"
110
110
  end
111
111
 
112
112
  # @raise [StandardError]
113
113
  def _git_clone
114
- die unless system "git", "clone", @url
114
+ complain unless system "git", "clone", @url
115
115
  end
116
116
 
117
117
  # @raise [StandardError]
118
118
  def _remove_git_submodule
119
- die unless system "rm", "-rf", @repo
119
+ complain unless system "rm", "-rf", @repo
120
120
  end
121
121
 
122
122
  private
123
123
 
124
- def die
125
- raise StandardError.new
124
+ def complain
125
+ puts "HEY! Something has gone wrong and I need to complain. Stacktrace follows:"
126
+ puts caller
126
127
  end
127
128
 
128
129
  end
@@ -2,6 +2,6 @@
2
2
  module HomebrewAutomation
3
3
 
4
4
  # Yep.
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
 
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homebrew_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - easoncxz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-28 00:00:00.000000000 Z
11
+ date: 2019-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec