binman 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,19 @@
1
+ ------------------------------------------------------------------------------
2
+ Version 1.1.0 (2011-11-05)
3
+ ------------------------------------------------------------------------------
4
+
5
+ Compatible changes:
6
+
7
+ * The `binman/rake_tasks` library has been renamed (with deprecation) to
8
+ `binman/rakefile`. The deprecation warning will be removed in the next
9
+ major release.
10
+
11
+ New features:
12
+
13
+ * Add `binman/gemspec` packaging convenience library which automatically
14
+ builds and includes your UNIX man page files in your gem packages and also
15
+ adds binman as a runtime and development gem dependency.
16
+
1
17
  ------------------------------------------------------------------------------
2
18
  Version 1.0.0 (2011-10-13)
3
19
  ------------------------------------------------------------------------------
@@ -87,13 +87,16 @@ Add the following line to your `Rakefile` and you've got a `binman` task!
87
87
 
88
88
  It will pre-build UNIX man page files for your `bin/` scripts into a `man/`
89
89
  directory so that your end-users do not need the markdown to roff converter
90
- installed in order to view your man pages! Just remember to add the `man/`
91
- directory's contents to your gemspec or release package:
90
+ installed in order to view your man pages!
92
91
 
93
- Gem::Specification.new do |s|
94
- # ... your stuff ...
95
- s.files += Dir['man/**/*']
96
- end
92
+ ### In your gemspec
93
+
94
+ To automatically build and include your UNIX man page files in your gem
95
+ packages, add the following line to the top of your `*.gemspec` file:
96
+
97
+ require 'binman/gemspec'
98
+
99
+ Doing this also adds binman as a runtime and development gem dependency.
97
100
 
98
101
  ------------------------------------------------------------------------------
99
102
  License
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
1
  require "bundler/gem_tasks"
2
- require "binman/rake_tasks"
2
+ require "binman/rakefile"
data/bin/binman CHANGED
@@ -2,7 +2,7 @@
2
2
  # encoding: utf-8
3
3
  =begin
4
4
 
5
- BINMAN 1 "2011-10-13" "1.0.0" "Ruby User Manuals"
5
+ BINMAN 1 "2011-11-05" "1.1.0" "Ruby User Manuals"
6
6
  =================================================
7
7
 
8
8
  NAME
@@ -97,6 +97,6 @@ when 'show'
97
97
  when 'load', 'dump', 'conv'
98
98
  puts BinMan.send(command, source)
99
99
  else
100
- warn 'bad command; try --help'
100
+ warn 'binman: bad command; try --help'
101
101
  exit!
102
102
  end
@@ -1,10 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
  require "binman/version"
4
-
5
- # pre-build man page files
6
- require 'binman/rake_tasks'
7
- Rake::Task[:binman].invoke
4
+ require "binman/gemspec"
8
5
 
9
6
  Gem::Specification.new do |s|
10
7
  s.name = "binman"
@@ -15,7 +12,7 @@ Gem::Specification.new do |s|
15
12
  s.summary = "UNIX man pages for Ruby bin/ scripts"
16
13
  s.description = nil
17
14
 
18
- s.files = `git ls-files`.split("\n").concat(Dir['man/**/*'])
15
+ s.files = `git ls-files`.split("\n")
19
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
18
  s.require_paths = ["lib"]
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+
3
+ class Gem::Specification
4
+ alias _582ab9fd_ffc8_4972_b37f_1a46031a9163 initialize
5
+ def initialize *args, &block
6
+ _582ab9fd_ffc8_4972_b37f_1a46031a9163(*args, &block)
7
+
8
+ # pre-build man page files
9
+ require 'binman/rake_tasks'
10
+ Rake::Task[:binman].invoke
11
+
12
+ # and add them to the gem
13
+ self.files += Dir['man/**/*']
14
+
15
+ # add binman as dependency
16
+ unless self.name == 'binman'
17
+ binman_gem = ['binman', '~> 1']
18
+ self.add_runtime_dependency(*binman_gem)
19
+ binman_vers = Gem::Dependency.new(*binman_gem)
20
+ binman_spec = Gem::SpecFetcher.fetcher.fetch(binman_vers).flatten.first
21
+ binman_spec.development_dependencies.unshift(binman_vers).each do |dep|
22
+ self.add_development_dependency dep.name, dep.requirements_list
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,18 +1,2 @@
1
- require 'rake'
2
-
3
- path = 'man/man1'
4
- bins = FileList['bin/*']
5
- mans = bins.pathmap("#{path}/%n.1")
6
-
7
- bins.zip(mans).each do |bin, man|
8
- file man => [bin, path] do
9
- require 'binman'
10
- roff = BinMan.dump(bin)
11
- File.open(man, 'w') {|f| f << roff }
12
- end
13
- end
14
-
15
-
16
- desc 'Build UNIX man pages for bin/ scripts.'
17
- task :binman => mans
18
- directory path
1
+ warn 'binman: "binman/rake_tasks" is deprecated; use "binman/rakefile" instead'
2
+ require 'binman/rakefile'
@@ -0,0 +1,18 @@
1
+ require 'rake'
2
+
3
+ path = 'man/man1'
4
+ bins = FileList['bin/*']
5
+ mans = bins.pathmap("#{path}/%n.1")
6
+
7
+ bins.zip(mans).each do |bin, man|
8
+ file man => [bin, path] do
9
+ require 'binman'
10
+ roff = BinMan.dump(bin)
11
+ File.open(man, 'w') {|f| f << roff }
12
+ end
13
+ end
14
+
15
+
16
+ desc 'Build UNIX man pages for bin/ scripts.'
17
+ task :binman => mans
18
+ directory path
@@ -1,3 +1,3 @@
1
1
  module BinMan
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,4 +1,4 @@
1
- .TH BINMAN 1 "2011-10-13" "1.0.0" "Ruby User Manuals"
1
+ .TH BINMAN 1 "2011-11-05" "1.1.0" "Ruby User Manuals"
2
2
  .SH NAME
3
3
  .PP
4
4
  binman \- UNIX man pages for Ruby \fBbin/\fP 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: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-14 00:00:00.000000000 Z
12
+ date: 2011-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redcarpet-manpage
16
- requirement: &19205100 !ruby/object:Gem::Requirement
16
+ requirement: &20757380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.0.1
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *19205100
24
+ version_requirements: *20757380
25
25
  description: ''
26
26
  email:
27
27
  - sunaku@gmail.com
@@ -39,7 +39,9 @@ files:
39
39
  - bin/binman
40
40
  - binman.gemspec
41
41
  - lib/binman.rb
42
+ - lib/binman/gemspec.rb
42
43
  - lib/binman/rake_tasks.rb
44
+ - lib/binman/rakefile.rb
43
45
  - lib/binman/version.rb
44
46
  - man/man1/binman.1
45
47
  homepage: http://github.com/sunaku/binman
@@ -67,3 +69,4 @@ signing_key:
67
69
  specification_version: 3
68
70
  summary: UNIX man pages for Ruby bin/ scripts
69
71
  test_files: []
72
+ has_rdoc: