From 8d66c8281c4e4fdbb85fb7d6b2a4afba1aded115 Mon Sep 17 00:00:00 2001 From: Alex Fish Date: Fri, 8 Nov 2013 20:34:21 +0000 Subject: [PATCH 1/3] Updating rubyzip requirement to be a bit more flexible --- yolo.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolo.gemspec b/yolo.gemspec index 876ec6f..4522ff6 100644 --- a/yolo.gemspec +++ b/yolo.gemspec @@ -13,5 +13,5 @@ Gem::Specification.new do |s| s.add_runtime_dependency "ocunit2junit", ["= 1.2"] s.add_runtime_dependency "calabash-cucumber" s.add_runtime_dependency "redcarpet" - s.add_runtime_dependency "rubyzip", ["= 1.1.0"] + s.add_runtime_dependency "rubyzip", [">= 1.0.0"] end From a59b334aba3e9b2daccef166331012e7ce6a6452 Mon Sep 17 00:00:00 2001 From: Alex Fish Date: Fri, 8 Nov 2013 20:55:17 +0000 Subject: [PATCH 2/3] Catching github release errors --- lib/yolo/formatters/error_formatter.rb | 10 ++++++++++ lib/yolo/tools/github.rb | 12 ++++++++---- yolo.gemspec | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/yolo/formatters/error_formatter.rb b/lib/yolo/formatters/error_formatter.rb index cc14719..3cd6e62 100644 --- a/lib/yolo/formatters/error_formatter.rb +++ b/lib/yolo/formatters/error_formatter.rb @@ -82,10 +82,20 @@ def missing_email_details puts red("Can't send mail notification, missing details") end + # + # Outputs a red string stating that the github token is missing in config + # def no_github_token puts red("No Github token found, please specify one in ~/.yolo/config.yml ") end + # + # Outputs a red string stating that there was a problem creating a github release + # + def no_github_release + puts red("There was a problem creating the release, maybe the tag already exists") + end + # # Outputs a red string stating that a release notes file could not be found # @param notes [String] The path which should contain a notes file diff --git a/lib/yolo/tools/github.rb b/lib/yolo/tools/github.rb index 3f39fef..45c8469 100644 --- a/lib/yolo/tools/github.rb +++ b/lib/yolo/tools/github.rb @@ -52,10 +52,14 @@ def release(bundle, version, body) response = http.request(request) response = JSON.parse(response.body) - @progress.created_release(version) - - url = response["upload_url"].gsub("{?name}","") - upload_bundle(bundle, url, "#{version}.zip") + if response.has_key?("upload_url") + @progress.created_release(version) + url = response["upload_url"].gsub("{?name}","") + upload_bundle(bundle, url, "#{version}.zip") + else + error = Yolo::Formatters::ErrorFormatter.new + error.no_github_release + end end # Upload the bundle to the github release url diff --git a/yolo.gemspec b/yolo.gemspec index 4522ff6..9921058 100644 --- a/yolo.gemspec +++ b/yolo.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'yolo' - s.version = '1.3.1' + s.version = '1.3.2.pre' s.date = Date.today.to_s s.executables << 'yolo' s.summary = "YOLO!" From 1c8da7dc9e6385f42ea80e1d17c0cb1b89c2a113 Mon Sep 17 00:00:00 2001 From: Alex Fish Date: Fri, 8 Nov 2013 20:55:53 +0000 Subject: [PATCH 3/3] Setting version 1.3.2 --- yolo.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolo.gemspec b/yolo.gemspec index 9921058..6b8c0d8 100644 --- a/yolo.gemspec +++ b/yolo.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'yolo' - s.version = '1.3.2.pre' + s.version = '1.3.2' s.date = Date.today.to_s s.executables << 'yolo' s.summary = "YOLO!"