From 42e150e37126c69dc43a032f2e5a2fa0bc6472fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Sat, 24 Aug 2013 18:10:47 +0200 Subject: [PATCH] Make gem building work on all platforms. --- Ruby/Rakefile | 5 +++-- Ruby/terminal-notifier.gemspec | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Ruby/Rakefile b/Ruby/Rakefile index 428ec9b..9530ed5 100644 --- a/Ruby/Rakefile +++ b/Ruby/Rakefile @@ -6,7 +6,7 @@ def version end def filename - "terminal-notifier_#{version}" + "terminal-notifier-#{version}" end def zipfile @@ -18,9 +18,10 @@ task :clean do rm_rf "vendor" end +desc "Fetch latest build from the GitHub releases" task :update_build do unless File.exist?(zipfile) - sh "curl -O 'http://cloud.github.com/downloads/alloy/terminal-notifier/terminal-notifier_#{version}.zip'" + sh "curl -L -O 'https://github.com/alloy/terminal-notifier/releases/download/#{version}/terminal-notifier-#{version}.zip'" end rm_rf "vendor" diff --git a/Ruby/terminal-notifier.gemspec b/Ruby/terminal-notifier.gemspec index 0fbbdcb..f05b9f0 100644 --- a/Ruby/terminal-notifier.gemspec +++ b/Ruby/terminal-notifier.gemspec @@ -1,13 +1,14 @@ # -*- encoding: utf-8 -*- plist = File.expand_path('../../Terminal Notifier/Terminal Notifier-Info.plist', __FILE__) -#version = `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip -#at least allow rake spec to run and fail on Linux -version = '1.4.2' +# Also run on non-OSX machines, otherwise bundle installs directly from the repo will fail. +# version = `/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' '#{plist}'`.strip +version = File.read(plist).match(%r{(\d+\.\d+\.\d+)})[1] + Gem::Specification.new do |gem| gem.name = "terminal-notifier" gem.version = version - gem.summary = 'Send User Notifications on Mac OS X 10.8.' + gem.summary = 'Send User Notifications on Mac OS X 10.8 or higher.' gem.authors = ["Eloy Duran"] gem.email = ["eloy.de.enige@gmail.com"] gem.homepage = 'https://github.com/alloy/terminal-notifier'