[DRE-commits] [ruby-execjs] 05/09: run coffeescript test if coffeescript is installed, ignore otherwise
Caitlin Matos
cm-guest at moszumanska.debian.org
Sat Jul 26 03:26:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
cm-guest pushed a commit to branch master
in repository ruby-execjs.
commit 575abb9a600b43fc5c2ab1e2ba8d5a7d91876940
Author: Caitlin Matos <caitlin.matos at zoho.com>
Date: Thu Jul 24 20:59:32 2014 -0400
run coffeescript test if coffeescript is installed, ignore otherwise
---
debian/copyright | 11 ++++++-----
debian/ruby-tests.rb | 13 +++++++++----
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/debian/copyright b/debian/copyright
index 685d1a9..9b07894 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -12,12 +12,13 @@ Copyright: 2012 Antonio Terceiro <terceiro at debian.org>
License: Expat
Files: debian/ruby-tests.rb
-Copyright: 2012 Antonio Terceiro
- 2011-2012 Sam Stephenson
- 2011-2012 Josh Peek
+Copyright: 2014 Caitlin Matos <caitlin.matos at zoho.com>
+ 2011-2014 Sam Stephenson <sstephenson at gmail.com>
+ 2011-2014 Josh Peek <josh at joshpeek.com>
License: Expat
- This file is a slightly modified version of test/test_execjs.rb present in the
- upstream Git repository.
+ This file is a slightly modified version of test/test_execjs.rb from the
+ upstream Git repository. It has been modified to only run a coffeescript
+ test if it is installed.
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
index e687937..338b2c2 100644
--- a/debian/ruby-tests.rb
+++ b/debian/ruby-tests.rb
@@ -164,10 +164,15 @@ class TestExecJS < Test
end
end
+ # only run if coffeescript is installed
def test_coffeescript
- require "open-uri"
- assert source = open("http://coffeescript.org/extras/coffee-script.js").read
- context = ExecJS.compile(source)
- assert_equal 64, context.call("CoffeeScript.eval", "((x) -> x * x)(8)")
+ begin
+ require "open-uri"
+ assert source = open("http://coffeescript.org/extras/coffee-script.js").read
+ context = ExecJS.compile(source)
+ assert_equal 64, context.call("CoffeeScript.eval", "((x) -> x * x)(8)")
+ rescue
+ # do nothing
+ end
end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-execjs.git
More information about the Pkg-ruby-extras-commits
mailing list