jenkinsgrowler 0.0.1 → 0.0.2

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.
@@ -46,7 +46,7 @@ module JenkinsGrowler
46
46
  options[:timezone] = timezone
47
47
  end
48
48
 
49
- opts.on( "-h", "--help", "Displays help message" ) do
49
+ opts.on( "-h", "--help", "Displays help message" ) do
50
50
  puts opts
51
51
  exit
52
52
  end
@@ -55,6 +55,7 @@ module JenkinsGrowler
55
55
  optparse.parse!(args)
56
56
 
57
57
  if(options[:server_url] == nil || options[:jobs].length == 0)
58
+ puts 'Error: Make sure [server_url] and at least one [job] is specified'
58
59
  puts optparse
59
60
  exit(-1)
60
61
  end
@@ -25,6 +25,12 @@ def last_build_output(job)
25
25
  end
26
26
 
27
27
  res = http.request(request)
28
+ if(res.is_a? Net::HTTPClientError) then
29
+ puts "Error: Not able to read the job status, failed with error [#{res.message}]"
30
+ puts" Make sure the basic authorization credentials are provided, if the site is protected or the job names given are right."
31
+ exit
32
+ end
33
+
28
34
  JSON.parse res.body
29
35
  end
30
36
 
@@ -46,8 +52,7 @@ end
46
52
 
47
53
 
48
54
  def build_status(job)
49
- buildOutput = last_build_output job
50
- puts(buildOutput)
55
+ buildOutput = last_build_output job
51
56
  building = buildOutput['building']
52
57
  buildTime = buildOutput['id']
53
58
  duration = buildOutput['duration']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkinsgrowler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,7 +27,8 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.12.3
30
- description: Jenkinsgrowler is a notifier for jenkins jobs
30
+ description: Jenkinsgrowler is a growl notifier for jenkins jobs, uses growlnotify
31
+ tool to notify
31
32
  email: vatsa.katta@gmail.com
32
33
  executables:
33
34
  - jenkinsgrowler