olddoc 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f71bf866c5df3305159326a07b851c4e6647474
4
- data.tar.gz: 96be498a4ec4f3883b3d251047950ebdef47ca83
3
+ metadata.gz: 0f02849f5be5e9ecb197b2d0cbe22fe40ef5110a
4
+ data.tar.gz: a7deb5ecea035aa9430419617fd8c0dcd4e0d86a
5
5
  SHA512:
6
- metadata.gz: f2ea9f583a932b846c104d4a88cd872bb381e3a30c4da51285d4e59fa91fcc7f91e5de94f6031f0fc96553c65215072a981477b6986857ab8d4736c56aa82636
7
- data.tar.gz: 06ec969de7b22509de5dd9b07358d968e126234177c0cdeea550139be850c77e7212bea58159109a35c891a31bfdfaeb905f29a43f105743e030ede2efc25af4
6
+ metadata.gz: 1787df0d30deb90919492d1830f9525b5e5be9cd203e22731b60e6a852d1a1a15e8ae74ac930d247e427d1d1732f074a2a28c83a2c351aaa83c1b626f3169d1f
7
+ data.tar.gz: 521ea75c81d29f38b207496a18d42ead1302dcd28b5b995efafb634804705519cbb55b59c55f451564c18d03dbd5e5477037566bbf64e1e0626821d568857ad0
data/.gitignore CHANGED
@@ -14,3 +14,4 @@ LATEST
14
14
  .gem-manifest
15
15
  .tgz-manifest
16
16
  /doc
17
+ /lib/olddoc/version.rb
data/.olddoc.yml CHANGED
@@ -8,3 +8,4 @@ merge_html:
8
8
  olddoc_1: Documentation/olddoc.1.html
9
9
  olddoc_5: Documentation/olddoc.5.html
10
10
  public_email: olddoc-public@80x24.org
11
+ source_code: git clone git://80x24.org/olddoc
@@ -28,6 +28,11 @@ at `ml_url`
28
28
  As of olddoc 1.2.0, `ml_url` and `nntp_url` may be YAML arrays
29
29
  with multiple URLs.
30
30
 
31
+ As of olddoc 1.3.0, the `source_code` array may be any number of
32
+ commands or URLs. This allows users of arbitrary version
33
+ control systems to specify instructions for getting the code
34
+ and not assume users are familiar with any particular system.
35
+
31
36
  # SEE ALSO
32
37
 
33
38
  olddoc(1)
data/GIT-VERSION-GEN ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+ # Copyright (C) 2016 all contributors <olddoc-public@80x24.org>
3
+ # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
4
+ # frozen_string_literal: true
5
+ CONSTANT = "Olddoc::VERSION"
6
+ RVF = "lib/olddoc/version.rb"
7
+ GVF = "GIT-VERSION-FILE"
8
+ DEF_VER = "v1.3.0"
9
+ vn = DEF_VER.dup
10
+
11
+ # First see if there is a version file (included in release tarballs),
12
+ # then try git-describe, then default.
13
+ if File.exist?(".git")
14
+ describe = `git describe --abbrev=4 HEAD 2>/dev/null`.strip
15
+ case describe
16
+ when /\Av[0-9]*/
17
+ vn = describe
18
+ system(*%w(git update-index -q --refresh))
19
+ unless `git diff-index --name-only HEAD --`.chomp.empty?
20
+ vn << "-dirty"
21
+ end
22
+ vn.tr!('-', '.')
23
+ end
24
+ end
25
+
26
+ vn = vn.sub!(/\Av/, "")
27
+ new_ruby_version = "#{CONSTANT} = '#{vn}'.freeze # :nodoc:\n"
28
+ cur_ruby_version = File.read(RVF) rescue nil
29
+ if new_ruby_version != cur_ruby_version
30
+ File.open(RVF, "w") { |fp| fp.write(new_ruby_version) }
31
+ end
32
+ File.chmod(0644, RVF)
33
+
34
+ # generate the makefile snippet
35
+ new_make_version = "VERSION = #{vn}\n"
36
+ cur_make_version = File.read(GVF) rescue nil
37
+ if new_make_version != cur_make_version
38
+ File.open(GVF, "w") { |fp| fp.write(new_make_version) }
39
+ end
40
+ File.chmod(0644, GVF)
41
+
42
+ puts vn if $0 == __FILE__
data/GNUmakefile CHANGED
@@ -3,7 +3,9 @@
3
3
  all::
4
4
  pkg = olddoc
5
5
  RUBY = ruby
6
- VERSION := $(shell $(RUBY) -Ilib -rolddoc -e 'puts Olddoc::VERSION')
6
+ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
7
+ @./GIT-VERSION-GEN
8
+ -include GIT-VERSION-FILE
7
9
 
8
10
  check-warnings:
9
11
  @(for i in $$(git ls-files '*.rb'| grep -v '^setup\.rb$$'); \
@@ -46,7 +48,7 @@ doc: $(placeholders)
46
48
  gem: $(pkggem)
47
49
 
48
50
  install-gem: $(pkggem)
49
- gem install $(CURDIR)/$<
51
+ gem install --local $(CURDIR)/$<
50
52
 
51
53
  $(pkggem): fix-perms .gem-manifest
52
54
  VERSION=$(VERSION) gem build $(pkg).gemspec
data/lib/olddoc.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  # Copyright (C) 2015-2016 all contributors <olddoc-public@80x24.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  module Olddoc # :nodoc:
4
- VERSION = '1.2.0' # :nodoc:
5
-
6
4
  autoload :Gemspec, 'olddoc/gemspec'
7
5
  autoload :History, 'olddoc/history'
8
6
  autoload :Merge, 'olddoc/merge'
@@ -8,4 +8,4 @@ type="application/atom+xml" /><%
8
8
  end
9
9
  %><meta
10
10
  http-equiv="Content-Type"
11
- content="text/html; <%= @options.charset %>">
11
+ content="text/html; charset=<%= @options.charset %>">
@@ -1,7 +1,8 @@
1
1
  <%
2
2
  public_email = @old_cfg['public_email']
3
3
  private_email = @old_cfg['private_email']
4
- archive_urls = Array(@old_cfg['ml_url']).concat(Array(@old_cfg['nntp_url']))
4
+ source_code = Array(@old_cfg['source_code']).dup
5
+ archive_urls = Array(@old_cfg['ml_url']) + Array(@old_cfg['nntp_url'])
5
6
  if url = archive_urls.shift %><hr /><pre>
6
7
  mail archives: <a
7
8
  href="<%= url %>"><%= url %></a><%
@@ -19,5 +20,10 @@ href="mailto:<%= public_email %>"><%= public_email %></a><%
19
20
  href="mailto:<%= private_email %>"><%= private_email %></a><%
20
21
  end
21
22
  end
23
+
24
+ if url_or_cmd = source_code.shift
25
+ %>
26
+ source code: <%= url_or_cmd %>
27
+ <% source_code.each do |x| %><%= "\t#{x}" %><% end
22
28
  end
23
- %></pre>
29
+ %></pre><% end %>
data/lib/rdoc/discover.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # :stopdoc:
2
2
  begin
3
- gem 'rdoc', '~> 4.1'
3
+ gem 'rdoc', [ '>= 4.2', '< 6.0' ]
4
4
  require_relative '../olddoc'
5
5
  rescue Gem::LoadError
6
6
  end unless defined?(Olddoc)
data/olddoc.gemspec CHANGED
@@ -2,6 +2,7 @@
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  $LOAD_PATH << 'lib'
4
4
  require 'olddoc'
5
+ require 'olddoc/version'
5
6
  extend Olddoc::Gemspec
6
7
  name, summary, title = readme_metadata
7
8
  Gem::Specification.new do |s|
@@ -14,8 +15,11 @@ Gem::Specification.new do |s|
14
15
  s.description = readme_description
15
16
  s.email = 'e@80x24.org'
16
17
  s.files = manifest
17
- s.add_dependency('rdoc', '~> 4.2')
18
+
19
+ # works fine with RDoc 5.x
20
+ s.add_dependency('rdoc', ['>= 4.2', '< 6.0'])
18
21
  s.add_dependency('builder', '~> 3.2')
22
+ s.required_ruby_version = '>= 1.9.3'
19
23
  s.homepage = Olddoc.config['rdoc_url']
20
24
  s.licenses = 'GPL-3.0+'
21
25
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: olddoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - olddoc hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-09 00:00:00.000000000 Z
11
+ date: 2016-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '4.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: builder
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -55,6 +61,7 @@ files:
55
61
  - Documentation/GNUmakefile
56
62
  - Documentation/olddoc.1.txt
57
63
  - Documentation/olddoc.5.txt
64
+ - GIT-VERSION-GEN
58
65
  - GNUmakefile
59
66
  - INSTALL
60
67
  - NEWS
@@ -104,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
111
  requirements:
105
112
  - - ">="
106
113
  - !ruby/object:Gem::Version
107
- version: '0'
114
+ version: 1.9.3
108
115
  required_rubygems_version: !ruby/object:Gem::Requirement
109
116
  requirements:
110
117
  - - ">="
@@ -112,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
119
  version: '0'
113
120
  requirements: []
114
121
  rubyforge_project:
115
- rubygems_version: 2.5.1
122
+ rubygems_version: 2.6.8
116
123
  signing_key:
117
124
  specification_version: 4
118
125
  summary: old-fashioned Ruby documentation generator