[DRE-commits] [ruby-httparty] 01/03: create httparty manapge with help2man
Cédric Boutillier
boutil at moszumanska.debian.org
Thu Jan 23 21:03:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-httparty.
commit b26934777414a9b5c4a064a6c7c5e705d959da6f
Author: Cédric Boutillier <boutil at debian.org>
Date: Tue Jan 14 08:58:16 2014 +0100
create httparty manapge with help2man
---
debian/clean | 1 +
debian/control | 2 +-
debian/httparty.1.diff | 37 +++++++++++++++++++++++++++++++++++++
debian/httparty.h2m | 12 ++++++++++++
debian/rules | 8 ++++++++
5 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..13792e0
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+httparty.1
diff --git a/debian/control b/debian/control
index f35471f..3d0dbf8 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: ruby
Priority: optional
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
Uploaders: Cédric Boutillier <boutil at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), ruby-multi-json, ruby-multi-xml, ruby-fakeweb, ruby-rspec
+Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.5.0~), ruby-multi-json, ruby-multi-xml, ruby-fakeweb, ruby-rspec, help2man
Standards-Version: 3.9.5
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-httparty.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-httparty.git;a=summary
diff --git a/debian/httparty.1.diff b/debian/httparty.1.diff
new file mode 100644
index 0000000..1bc788c
--- /dev/null
+++ b/debian/httparty.1.diff
@@ -0,0 +1,37 @@
+--- httparty.1.a 2014-01-14 08:49:28.250985651 +0100
++++ httparty.1.b 2014-01-14 08:54:14.258993629 +0100
+@@ -8,25 +8,27 @@
+ it will output the response as a pretty-printed Ruby object (useful for
+ grokking the structure of output). This can also be overridden to output
+ formatted XML or JSON.
+-.PP
+-USAGE: bin/httparty [options] [url]
++.SH USAGE
++ bin/httparty [\fIoptions\fR] [\fIurl\fR]
++
++.SH OPTIONS
+ .TP
+-\fB\-f\fR, \fB\-\-format\fR [FORMAT]
++\fB\-f\fR, \fB\-\-format\fR [\fIFORMAT\fR]
+ Output format to use instead of pretty\-print ruby: plain, json or xml
+ .TP
+-\fB\-a\fR, \fB\-\-action\fR [ACTION]
++\fB\-a\fR, \fB\-\-action\fR [\fIACTION\fR]
+ HTTP action: get (default), post, put, delete, head, or options
+ .TP
+-\fB\-d\fR, \fB\-\-data\fR [BODY]
++\fB\-d\fR, \fB\-\-data\fR [\fIBODY\fR]
+ Data to put in request body (prefix with '@' for file)
+ .TP
+-\fB\-H\fR, \fB\-\-header\fR [NAME:VALUE]
++\fB\-H\fR, \fB\-\-header\fR [\fINAME:VALUE\fR]
+ Additional HTTP headers in NAME:VALUE form
+ .TP
+ \fB\-v\fR, \fB\-\-verbose\fR
+ If set, print verbose output
+ .TP
+-\fB\-u\fR, \fB\-\-user\fR [CREDS]
++\fB\-u\fR, \fB\-\-user\fR [\fICREDS\fR]
+ Use basic authentication. Value should be user:password
+ .TP
+ \fB\-r\fR, \fB\-\-response\-code\fR
diff --git a/debian/httparty.h2m b/debian/httparty.h2m
new file mode 100644
index 0000000..3817701
--- /dev/null
+++ b/debian/httparty.h2m
@@ -0,0 +1,12 @@
+[name]
+httparty \- query web services and examine the resulting output
+
+[description]
+`httparty' is a command-line tool to query
+query web services and examine the resulting output. By default
+it will output the response as a pretty-printed Ruby object (useful for
+grokking the structure of output). This can also be overridden to output
+formatted XML or JSON.
+
+[example]
+httparty "http://twitter.com/statuses/public_timeline.json"
diff --git a/debian/rules b/debian/rules
index a5e7dc8..03628b4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,5 +11,13 @@
# If you need to specify the .gemspec (eg there is more than one)
#export DH_RUBY_GEMSPEC=gem.gemspec
+UPSTREAM_VERSION = $(shell dpkg-parsechangelog | awk '{ if ($$1 == "Version:") { print($$2) } }' | cut -d - -f 1)
+
%:
dh $@ --buildsystem=ruby --with ruby
+
+override_dh_installman:
+ help2man --no-info --include=debian/httparty.h2m \
+ -h "-I lib/ bin/httparty -h" --version-string $(UPSTREAM_VERSION) /usr/bin/ruby > httparty.1
+ patch httparty.1 < debian/httparty.1.diff
+ dh_installman
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-httparty.git
More information about the Pkg-ruby-extras-commits
mailing list