sdoc 2.0.2 → 2.0.3

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
  SHA256:
3
- metadata.gz: 44ae55cdc435032ac5559c5ed464d51eeef0cdf3ea60dd011e5780608b4227fe
4
- data.tar.gz: 330c7f40c26d49868642edc95c0866310bc0f0062311144fde76f1c48f0e0388
3
+ metadata.gz: 234ba541d36b61d2b4bb680ab8df4e2463d4cc63f0517f160270a3e7a48f0f81
4
+ data.tar.gz: afae81f60c7f9218da174c06cb4d5799f7c0db8e5188c6dc49c54ea3bacb5dc3
5
5
  SHA512:
6
- metadata.gz: 3caf8b5bf5bee61514ebb8be5f6013097ca77396ca19cd6f60c7226612ae55e6f2e86d1ec9b59a74b5f367574bc229497c82655713eee60735b979454ec1e850
7
- data.tar.gz: 0b5265d770ef7db8bc448ca68843076d00bb22d5ef7d43cc43dbc587fe80177fc2aa725b99864907e80898110639541b718857b040eccc832e93a6fc95e8ca5f
6
+ metadata.gz: 3b24a3309f283113f8b0f0cd1e2e0d7711a40a293612599499f09b6d6793f25669e9aa0f9925ef9d844a31a89be30f296fdd8f47d3161a8f24629d5d2f41b99c
7
+ data.tar.gz: f5355d4fd9d7aa0478db5c6aa398502c1480ece246f811b795721471e15eddc74dafe7640cca5de2e32751a65d5fcea0d156933aa2eabc691d1daba222428fdd
@@ -1,3 +1,8 @@
1
+ 2.0.3
2
+ =====
3
+
4
+ * Use @options.title for the index
5
+
1
6
  2.0.2
2
7
  =====
3
8
 
data/README.md CHANGED
@@ -101,6 +101,14 @@ rake test:rails
101
101
  This task will generate documentation for the Rails master branch.
102
102
  Since the task doesn't do any file filtering it contains a lot of extra pages.
103
103
 
104
+ To view the just generated documentation start up a rack application by running:
105
+
106
+ ```bash
107
+ rackup config.ru
108
+ ```
109
+
110
+ Then open http://localhost:9292 in the browser to view the documentation.
111
+
104
112
  ### Who?
105
113
 
106
114
  * Vladimir Kolesnikov ([voloko](https://github.com/voloko))
@@ -0,0 +1,30 @@
1
+ # Rack application for serving the documentation locally.
2
+ # After generating the documentation run:
3
+ #
4
+ # bundle exec rackup config.ru
5
+ #
6
+ require 'bundler/setup'
7
+
8
+ root = "doc/rails"
9
+ unless Dir.exists?(root)
10
+ puts <<~MESSAGE
11
+ Could not find any docs in #{root}.
12
+ Run the following command to generate sample documentation:
13
+ bundle exec rake test:rails
14
+ MESSAGE
15
+ exit
16
+ end
17
+
18
+ use Rack::Static,
19
+ :urls => ["/files", "/images", "/js", "/css", "/panel", "/i", "/classes"],
20
+ :root => root
21
+ run lambda { |env|
22
+ [
23
+ 200,
24
+ {
25
+ 'Content-Type' => 'text/html',
26
+ 'Cache-Control' => 'public, max-age=86400'
27
+ },
28
+ File.open("#{root}/index.html", File::RDONLY)
29
+ ]
30
+ }
@@ -3,7 +3,7 @@
3
3
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
5
  <head>
6
- <title><%= h index.name %></title>
6
+ <title><%= @options.title %></title>
7
7
  <meta http-equiv="Content-Type" content="text/html; charset=<%= @options.charset %>" />
8
8
  <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix, tree_keys: []} %>
9
9
  </head>
@@ -1,3 +1,3 @@
1
1
  module SDoc
2
- VERSION = '2.0.2'
2
+ VERSION = '2.0.3'
3
3
  end
@@ -24,6 +24,8 @@ Gem::Specification.new do |s|
24
24
 
25
25
  s.add_runtime_dependency("rdoc", ">= 5.0")
26
26
 
27
+ s.add_development_dependency("rack")
28
+
27
29
  s.files = `git ls-files`.split("\n")
28
30
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
29
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Kolesnikov
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-11-09 00:00:00.000000000 Z
14
+ date: 2020-12-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rdoc
@@ -27,6 +27,20 @@ dependencies:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '5.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rack
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
30
44
  description: rdoc generator html with javascript search index.
31
45
  email: voloko@gmail.com mail@zzak.io
32
46
  executables:
@@ -45,6 +59,7 @@ files:
45
59
  - Rakefile
46
60
  - bin/sdoc
47
61
  - bin/sdoc-merge
62
+ - config.ru
48
63
  - lib/rdoc/discover.rb
49
64
  - lib/rdoc/generator/template/merge/index.rhtml
50
65
  - lib/rdoc/generator/template/rails/_context.rhtml