[DRE-commits] [ruby-rack-flash3] 02/03: Start support for running example app, tests.

Ben Armstrong synrg at alioth.debian.org
Thu Aug 15 14:06:58 UTC 2013


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

synrg pushed a commit to branch master
in repository ruby-rack-flash3.

commit 6b26a6e32f1fae82e9dd0e95577446988be917e5
Author: Ben Armstrong <synrg at debian.org>
Date:   Thu Aug 15 11:05:40 2013 -0300

    Start support for running example app, tests.
---
 debian/README.Debian              |   14 ++++++++++++++
 debian/patches/fix_requires.patch |   34 ++++++++++++++++++++++++++++++++++
 debian/patches/series             |    1 +
 debian/ruby-rack-flash3.docs      |    4 ++--
 debian/rules                      |    4 ++++
 5 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..1608783
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,14 @@
+To run the example application, install sinatra (as root):
+
+    # apt-get install ruby-sinatra
+
+Then cd to the examples directory and run the application:
+
+    $ cd /usr/share/doc/examples/ruby-rack-flash3/examples
+    $ ruby sinatra_app.rb
+
+Use your web browser to view the test application at:
+
+    http://localhost:4567/
+
+ -- Ben Armstrong <synrg at sanctuary.nslug.ns.ca>  Thu, 15 Aug 2013 09:09:18 -0300
diff --git a/debian/patches/fix_requires.patch b/debian/patches/fix_requires.patch
new file mode 100644
index 0000000..499db15
--- /dev/null
+++ b/debian/patches/fix_requires.patch
@@ -0,0 +1,34 @@
+Description: Fix requires: rubygems, etc.
+ Dependencies for tests are satisfied by Build-Depends. Remove the
+ require 'rubygems' and versioned dependency on sinatra. Likewise,
+ remove it from examples and change the require 'rack-flash' to use
+ the installed version.
+Author: Ben Armstrong <synrg at sanctuary.nslug.ns.ca>
+Last-Update: 2013-08-15
+Forwarded: no
+
+--- a/test/helper.rb
++++ b/test/helper.rb
+@@ -1,5 +1,3 @@
+-require 'rubygems'
+-gem 'sinatra', '<=1.3.2'
+ require 'sinatra/base'
+ require 'bacon'
+ require 'rack/test'
+@@ -48,4 +46,4 @@ module Rack
+       @sweeped
+     end
+   end
+-end
+\ No newline at end of file
++end
+--- a/example/sinatra_app.rb
++++ b/example/sinatra_app.rb
+@@ -1,6 +1,5 @@
+-require 'rubygems'
+ require 'sinatra/base'
+-require File.dirname(__FILE__) + '/../lib/rack-flash'
++require 'rack-flash'
+ 
+ class MyApp < Sinatra::Base
+   use Rack::Flash
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8012359
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_requires.patch
diff --git a/debian/ruby-rack-flash3.docs b/debian/ruby-rack-flash3.docs
index 07b3c9e..b9de7ba 100644
--- a/debian/ruby-rack-flash3.docs
+++ b/debian/ruby-rack-flash3.docs
@@ -1,2 +1,2 @@
-# FIXME: READMEs found
-# README.md
+README.md
+examples
diff --git a/debian/rules b/debian/rules
index a5e7dc8..5ce1e4f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,3 +13,7 @@
 
 %:
 	dh $@ --buildsystem=ruby --with ruby
+override_dh_installdocs:
+	cp -r example examples
+	dh_installdocs
+	rm -rf examples

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



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