[DRE-commits] [ruby-launchy-shim] 01/02: Initial commit

Antonio Terceiro terceiro at moszumanska.debian.org
Tue Oct 20 21:56:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-launchy-shim.

commit 23e98a76f6a869484ea7a6f403e48b9ed16ad3d7
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Tue Oct 20 19:47:01 2015 -0200

    Initial commit
---
 Rakefile               |  9 +++++++++
 debian/changelog       |  5 +++++
 debian/compat          |  1 +
 debian/control         | 26 ++++++++++++++++++++++++++
 debian/copyright       | 19 +++++++++++++++++++
 debian/ruby-tests.rake |  1 +
 debian/rules           |  6 ++++++
 debian/source/format   |  1 +
 launchy.gemspec        | 20 ++++++++++++++++++++
 lib/launchy.rb         |  5 +++++
 test/launchy_test.rb   | 16 ++++++++++++++++
 11 files changed, 109 insertions(+)

diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..c51ee09
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,9 @@
+require 'rake/testtask'
+
+Rake::TestTask.new do |t|
+  t.libs << "test"
+  t.test_files = FileList['test/*_test.rb']
+  t.verbose = true
+end
+
+task :default => :test
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2eb49a2
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+ruby-launchy-shim (2.3.0) UNRELEASED; urgency=medium
+
+  * Initial release (Closes: #623914)
+
+ -- Antonio Terceiro <terceiro at debian.org>  Tue, 20 Oct 2015 19:06:38 -0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..e7a6abd
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,26 @@
+Source: ruby-launchy-shim
+Section: ruby
+Priority: optional
+Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
+Uploaders: Antonio Terceiro <terceiro at debian.org>
+Build-Depends: debhelper (>= 9~),
+               gem2deb,
+               rake
+Standards-Version: 3.9.6
+Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-launchy-shim.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-launchy-shim.git
+Homepage: http://packages.debian.org/ruby-launchy-shim
+Testsuite: autopkgtest-pkg-ruby
+XS-Ruby-Versions: all
+
+Package: ruby-launchy-shim
+Architecture: all
+XB-Ruby-Versions: ${ruby:Versions}
+Depends: ruby | ruby-interpreter,
+         ${misc:Depends},
+         ${shlibs:Depends}
+Description: helper class for launching a a browser in a fire and forget manner
+ Launchy is helper class for launching a web browser in a fire and forget manner
+ from Ruby programs. This is a minimal shim that replaces the original Launchy
+ on Debian systens, since the original propject contains lots of code to support
+ non-Debian systems.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..e444618
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,19 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-launchy-shim.git/
+
+Files: *
+Copyright: 2015 Antonio Terceiro <terceiro at debian.org>
+License: ISC
+
+License: ISC
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
new file mode 120000
index 0000000..c6de17e
--- /dev/null
+++ b/debian/ruby-tests.rake
@@ -0,0 +1 @@
+../Rakefile
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3454d59
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+export GEM2DEB_TEST_RUNNER = --check-dependencies
+
+%:
+	dh $@ --buildsystem=ruby --with ruby
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/launchy.gemspec b/launchy.gemspec
new file mode 100644
index 0000000..8afdf93
--- /dev/null
+++ b/launchy.gemspec
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+
+description = <<EOF
+Launchy is helper class for launching a web browser in a fire and forget manner
+from Ruby programs. This is a minimal shim that replaces the original Launchy
+on Debian systens, since the original propject contains lots of code to support
+non-Debian systems.
+EOF
+
+Gem::Specification.new do |s|
+  s.name = "launchy"
+  s.version = '2.3.0' # `dpkg-parsechanglog -SVersion`.strip
+  s.authors = ["Antonio Terceiro"]
+  s.date = "2015-10-20"
+  s.summary = "helper class for launching a web browser in a fire and forget manner"
+  s.description = description
+  s.email = "terceiro at debian.org"
+  s.files = ["lib/launchy.rb"]
+  s.homepage = "http://packages.debian.org/ruby-launchy-shim"
+end
diff --git a/lib/launchy.rb b/lib/launchy.rb
new file mode 100644
index 0000000..0a0cb53
--- /dev/null
+++ b/lib/launchy.rb
@@ -0,0 +1,5 @@
+module Launchy
+  def self.open(uri, options = {})
+    system('xdg-open', uri)
+  end
+end
diff --git a/test/launchy_test.rb b/test/launchy_test.rb
new file mode 100644
index 0000000..095b412
--- /dev/null
+++ b/test/launchy_test.rb
@@ -0,0 +1,16 @@
+require 'minitest/autorun'
+require 'launchy'
+
+class LaunchyTest < MiniTest::Test
+
+  def test_calls_xdg_open
+    args_used = nil
+    system = lambda { |*args| args_used = args.clone }
+    Launchy.stub :system, system do
+      Launchy.open('http://www.debian.org/')
+    end
+
+    assert_equal ['xdg-open', 'http://www.debian.org/'], args_used
+  end
+
+end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-launchy-shim.git



More information about the Pkg-ruby-extras-commits mailing list