binman 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.markdown CHANGED
@@ -1,3 +1,13 @@
1
+ ## Version 3.2.0 (2012-10-14)
2
+
3
+ Minor:
4
+
5
+ * add binman:web task to produce man pages in HTML
6
+
7
+ Other:
8
+
9
+ * gemspec: package only roff files from inside man/
10
+
1
11
  ## Version 3.1.1 (2012-10-13)
2
12
 
3
13
  Patch:
data/README.markdown CHANGED
@@ -29,7 +29,7 @@ If you only want to view pre-built manual pages:
29
29
 
30
30
  If you also want to build your own manual pages:
31
31
 
32
- gem install md2man -v '~> 1'
32
+ gem install md2man -v '~> 1.4'
33
33
 
34
34
  ### Prerequisites
35
35
 
@@ -39,9 +39,9 @@ If you also want to build your own manual pages:
39
39
 
40
40
  git clone git://github.com/sunaku/binman
41
41
  cd binman
42
- bundle install --binstubs=bundle_bin
43
- bundle_bin/binman --help # run it directly
44
- bundle exec rake -T # packaging tasks
42
+ bundle install
43
+ bundle exec binman --help # run it directly
44
+ bundle exec rake --tasks # packaging tasks
45
45
 
46
46
  ## Usage
47
47
 
@@ -214,8 +214,8 @@ You can also write the manual as a multi-line Ruby comment inside an `if 0`:
214
214
 
215
215
  Add the following lines to your gemspec:
216
216
 
217
- s.files += Dir['man/**/*']
218
- s.add_development_dependency 'md2man', '~> 1'
217
+ s.files += Dir['man/man?/*.?']
218
+ s.add_development_dependency 'md2man', '~> 1.4'
219
219
 
220
220
  Add the following line to your Rakefile:
221
221
 
@@ -224,6 +224,7 @@ Add the following line to your Rakefile:
224
224
  You now have a `rake binman` task that pre-builds UNIX manual page files for
225
225
  your `bin/` scripts into a `man/` directory so that your end-users do not need
226
226
  [md2man] installed in order to view the manual pages you've embedded therein!
227
+ There are also sub-tasks to build manual pages individually as [roff] or HTML.
227
228
 
228
229
  If you're using Bundler, this task also hooks into its gem packaging tasks and
229
230
  ensures that your UNIX manual pages are pre-built and packaged into your gem:
@@ -235,6 +236,7 @@ ensures that your UNIX manual pages are pre-built and packaged into your gem:
235
236
 
236
237
  Released under the ISC license. See the LICENSE file for details.
237
238
 
239
+ [roff]: http://troff.org
238
240
  [binman]: https://github.com/sunaku/binman
239
241
  [binman-api]: http://rubydoc.info/gems/binman/frames
240
242
  [binman-bin]: https://raw.github.com/sunaku/binman/master/bin/binman
data/bin/binman CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  =begin =======================================================================
3
3
 
4
- # BINMAN 1 2012-10-13 3.1.1
4
+ # BINMAN 1 2012-10-14 3.2.0
5
5
 
6
6
  ## NAME
7
7
 
data/binman.gemspec CHANGED
@@ -11,11 +11,11 @@ Gem::Specification.new do |s|
11
11
  s.summary = 'man pages for bin scripts'
12
12
  s.description = 'Produces UNIX manual pages for executable scripts.'
13
13
 
14
- s.files = `git ls-files`.split("\n") + Dir['man/**/*']
14
+ s.files = `git ls-files`.split("\n") + Dir['man/man?/*.?']
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ['lib']
18
18
 
19
- s.add_development_dependency 'md2man', '~> 1'
19
+ s.add_development_dependency 'md2man', '~> 1.4'
20
20
  s.add_development_dependency 'rake', '>= 0.9.2.2', '< 1'
21
21
  end
@@ -1,19 +1,37 @@
1
1
  require 'rake'
2
2
 
3
- directory path = 'man/man1'
4
- bins = FileList['bin/*']
5
- mans = bins.pathmap("#{path}/%n.1")
3
+ # build man pages before building ruby gem using bundler
4
+ %w[build install release].each {|t| task t => :binman }
6
5
 
7
- desc 'Build UNIX manual pages for bin/ scripts.'
8
- task :binman => mans
6
+ #-----------------------------------------------------------------------------
7
+ desc 'Build manual pages for bin/ scripts.'
8
+ task :binman => ['binman:man', 'binman:web']
9
+ #-----------------------------------------------------------------------------
10
+
11
+ directory dir = 'man/man1'
12
+ bins = FileList['bin/*']
13
+ mkds = bins.pathmap("#{dir}/%n.1.markdown")
9
14
 
10
- bins.zip(mans).each do |bin, man|
11
- file man => [bin, path] do
15
+ bins.zip(mkds).each do |src, dst|
16
+ file dst => [dir, src] do
12
17
  require 'binman'
13
- roff = BinMan.dump(bin)
14
- File.open(man, 'w') {|f| f << roff }
18
+ output = BinMan.load(src)
19
+ File.open(dst, 'w') {|f| f << output }
15
20
  end
16
21
  end
17
22
 
18
- # build man pages before building ruby gem using bundler
19
- %w[build install release].each {|t| task t => :binman }
23
+ #-----------------------------------------------------------------------------
24
+ desc 'Build UNIX manual pages for bin/ scripts.'
25
+ task 'binman:man' => mkds do
26
+ #-----------------------------------------------------------------------------
27
+ require 'md2man/rakefile'
28
+ Rake::Task['md2man:man'].invoke
29
+ end
30
+
31
+ #-----------------------------------------------------------------------------
32
+ desc 'Build HTML manual pages for bin/ scripts.'
33
+ task 'binman:web' => mkds do
34
+ #-----------------------------------------------------------------------------
35
+ require 'md2man/rakefile'
36
+ Rake::Task['md2man:web'].invoke
37
+ end
@@ -1,3 +1,3 @@
1
1
  module BinMan
2
- VERSION = "3.1.1"
2
+ VERSION = "3.2.0"
3
3
  end
data/man/man1/binman.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH BINMAN 1 2012\-10\-13 3.1.1
1
+ .TH BINMAN 1 2012\-10\-14 3.2.0
2
2
  .SH NAME
3
3
  .PP
4
4
  binman \- man pages for bin scripts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '1'
21
+ version: '1.4'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: '1'
29
+ version: '1.4'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rake
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -81,12 +81,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
81
  - - ! '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
+ segments:
85
+ - 0
86
+ hash: -2476896195516585469
84
87
  required_rubygems_version: !ruby/object:Gem::Requirement
85
88
  none: false
86
89
  requirements:
87
90
  - - ! '>='
88
91
  - !ruby/object:Gem::Version
89
92
  version: '0'
93
+ segments:
94
+ - 0
95
+ hash: -2476896195516585469
90
96
  requirements: []
91
97
  rubyforge_project:
92
98
  rubygems_version: 1.8.23