jekyll_quick_man 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/jekyll_quick_man.rb +6 -15
  3. metadata +7 -9
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a5c1f72bcbcf09290348f6dde21e531c6c74c987
4
+ data.tar.gz: 924c0918d077f6850b7b6f35c06e504375223b68
5
+ SHA512:
6
+ metadata.gz: b43ebc0bab7be6de4bccf942e5cceebf8b83433a89212310d90a42a6fb34c9947eabbc246edba9f7dbc0f8b47145c6ec9b8f412093a6be3d9efe957f9e5af7fe
7
+ data.tar.gz: 3931a6fe26d03b681c3c8af5c01d0b53032599540e4ed0f0e4fd3fd349277159cc29e1ee6b0f7ba736c0bc433142bf6b6894ae52e2cd9c07509aa9d5ea054551
@@ -18,6 +18,7 @@ module Jekyll
18
18
 
19
19
  def generate_anchor(man)
20
20
  description = determine_description(man)
21
+ p "WARNING: None of the checked sources contained information about '#{@page}'" if description.empty?
21
22
  title = "#{@provider} Manpage zu#{determine_type} '#{@page}#{description}'"
22
23
 
23
24
  href = determine_url
@@ -31,12 +32,14 @@ module Jekyll
31
32
  # locale = "--locale=de"
32
33
  thats_it = `whatis #{man_path} #{section} --long --systems=#{@provider},man #{@page} 2> /dev/null`
33
34
 
34
- if thats_it
35
+ description = nil
36
+
37
+ if thats_it != ''
35
38
  description = " - #{thats_it.split(/\) +-+ +/).last}"
36
39
  description.gsub!(/\n\Z/,'')
37
40
  end
38
41
 
39
- description || nil
42
+ description
40
43
  end
41
44
 
42
45
  def determine_description_via_config(man)
@@ -51,26 +54,14 @@ module Jekyll
51
54
  # support for yaml paths like man.ssh
52
55
  description = " - #{man_page}"
53
56
  end
54
- else
55
- p "WARNING: Missing man page for '#{@page}'. Links will be generated without man descriptions."
56
57
  end
57
-
58
- else
59
- p 'WARNING: Zero man pages defined in config file. Links will be generated without man descriptions.'
60
58
  end
61
59
 
62
60
  description || ''
63
61
  end
64
62
 
65
63
  def determine_description(man)
66
- description = determine_description_via_whatis
67
-
68
- unless description
69
- p "whatis failed to find a descripton for #{@page}. Trying config file as a fall back ..."
70
- description = determine_description_via_config(man)
71
- end
72
-
73
- description || ''
64
+ determine_description_via_whatis || determine_description_via_config(man) || ''
74
65
  end
75
66
 
76
67
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_quick_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - GSI
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-26 00:00:00.000000000 Z
11
+ date: 2014-03-29 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Jekyll tag that renders pretty links to man page sources on the internet
15
14
  email: rubygems.org@groovy-skills.com
@@ -21,27 +20,26 @@ files:
21
20
  homepage: https://github.com/GSI/jekyll_quick_man
22
21
  licenses:
23
22
  - MIT
23
+ metadata: {}
24
24
  post_install_message:
25
25
  rdoc_options: []
26
26
  require_paths:
27
27
  - lib
28
28
  required_ruby_version: !ruby/object:Gem::Requirement
29
- none: false
30
29
  requirements:
31
- - - ! '>='
30
+ - - '>='
32
31
  - !ruby/object:Gem::Version
33
32
  version: '0'
34
33
  required_rubygems_version: !ruby/object:Gem::Requirement
35
- none: false
36
34
  requirements:
37
- - - ! '>='
35
+ - - '>='
38
36
  - !ruby/object:Gem::Version
39
37
  version: '0'
40
38
  requirements: []
41
39
  rubyforge_project:
42
- rubygems_version: 1.8.24
40
+ rubygems_version: 2.2.1
43
41
  signing_key:
44
- specification_version: 3
42
+ specification_version: 4
45
43
  summary: Jekyll Quick Man
46
44
  test_files: []
47
45
  has_rdoc: