manpages 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +28 -12
- data/lib/manpages/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 004f3ea0f6975be144e959a07a1e675ca74f0a74
|
4
|
+
data.tar.gz: 214fdd72a12baa995026e39886663936ca163809
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a044a4fbb40dc96cf9991f9c60e45829f5f0454ad7a68684612e850c4188d854d75547ba6e8a6fdad727d72f1bc0e6cddef42a1a160d967ececed6098be8cc3f
|
7
|
+
data.tar.gz: 062589cd697b53156be38eb97d9f329a91ee2509b866d5710157263749544cee26b5bedffdd55765177db4ceedc82b09b946eba31e1a1557d726bb97707979f1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,32 +5,48 @@
|
|
5
5
|
|
6
6
|
This plugin will add man pages support to ruby gems. Instead
|
7
7
|
of adding a new command like [gem-man](https://github.com/defunkt/gem-man)
|
8
|
-
it will try to link the files to place
|
8
|
+
it will try to link the files to a place the `man` command automatically
|
9
|
+
discovers.
|
9
10
|
|
10
|
-
With rvm and chruby it works out of the box, but sadly for rbenv we need to add
|
11
|
-
hooks that modify the `MANPATH` depending on the ruby version currently used.
|
11
|
+
With rvm and chruby it works out of the box, but sadly for rbenv we need to [add
|
12
|
+
hooks that](#using-this-with-rbenv) modify the `MANPATH` depending on the ruby version currently used.
|
12
13
|
|
13
14
|
# Installation
|
14
15
|
|
15
16
|
`gem install manpages`
|
16
17
|
|
17
|
-
This plugin automatically hooks into the ruby gems system.
|
18
|
+
This plugin automatically hooks into the ruby gems system. Every gem
|
19
|
+
installed afterwards is checked for manpages. If this gem finds them, it
|
20
|
+
exposes them to the `man` command.
|
21
|
+
|
22
|
+
# Using this with rbenv
|
23
|
+
|
24
|
+
Sadly rbenv uses shims to hide the actual executables. This makes it impossible for
|
25
|
+
man to find the pages. The only solution is to add hooks that modify the `MANPATH`
|
26
|
+
environment variable.
|
27
|
+
|
28
|
+
This gem will [soon](https://github.com/bitboxer/manpages/issues/2) provide a hook to fix this problem.
|
18
29
|
|
19
30
|
# How this works
|
20
31
|
|
21
|
-
After a gem is installed, this plugin will check for a directory called `man`
|
22
|
-
|
32
|
+
After a gem is installed, this plugin will check for a directory called `man` within the
|
33
|
+
gem and link the manpages it finds to `BIN_DIR/../share/man`, where `BIN_DIR` is the
|
23
34
|
directory where the executable of the gem is installed.
|
24
35
|
|
25
36
|
Most man versions will automatically search this directory and no additional work
|
26
|
-
is required.
|
37
|
+
is required. If you install a gem that includes a man page (e.g. [guard](https://github.com/guard/guard)), you can
|
27
38
|
simply use `man guard` and you will see the man page the gem provided.
|
28
39
|
|
29
|
-
#
|
40
|
+
# Providing man pages with your gem
|
30
41
|
|
31
|
-
|
32
|
-
|
33
|
-
|
42
|
+
The most common way in the ruby world to create a man page is through a tool
|
43
|
+
called [ronn](https://github.com/rtomayko/ronn#readme). Ronn uses a modified
|
44
|
+
variant of markdown as source file. More details about the format can be found
|
45
|
+
[here](https://github.com/rtomayko/ronn/blob/master/man/ronn-format.7.ronn).
|
34
46
|
|
35
|
-
|
47
|
+
Make sure the resulting manpage is in a folder called `man` in the root of the
|
48
|
+
gem. Files stored in that directory will automatically be exposed to the
|
49
|
+
`man` command.
|
36
50
|
|
51
|
+
Examples for gems with manpages are [guard](https://github.com/guard/guard/tree/master/man) or
|
52
|
+
[gem-man](https://github.com/defunkt/gem-man/tree/master/man).
|
data/lib/manpages/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manpages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bodo Tasche
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|