sdoc 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,73 +1,78 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
4
 
5
5
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+
6
7
  <head>
7
- <title>search index</title>
8
- <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" charset="utf-8" />
9
- <link rel="stylesheet" href="../css/panel.css" type="text/css" media="screen" charset="utf-8" />
10
- <script src="../js/search_index.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../js/searcher.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="tree.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../js/searchdoc.js" type="text/javascript" charset="utf-8"></script>
15
- <script type="text/javascript" charset="utf-8">
16
- function placeholder() {
17
- if ($('<input type="text">')[0].placeholder !== undefined) return;
8
+ <title>search index</title>
9
+ <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" charset="utf-8" />
10
+ <link rel="stylesheet" href="../css/panel.css" type="text/css" media="screen" charset="utf-8" />
11
+ <script src="../js/search_index.js" type="text/javascript" charset="utf-8"></script>
12
+ <script src="../js/searcher.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="tree.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../js/searchdoc.js" type="text/javascript" charset="utf-8"></script>
16
+ <script type="text/javascript" charset="utf-8">
17
+ function placeholder() {
18
+ if ($('<input type="text">')[0].placeholder !== undefined) return;
18
19
 
19
- $('#search-label').click(function() {
20
- $('#search').focus();
21
- $('#search-label').hide();
22
- });
20
+ $('#search-label').click(function() {
21
+ $('#search').focus();
22
+ $('#search-label').hide();
23
+ });
23
24
 
24
- $('#search').focus(function() {
25
- $('#search-label').hide();
26
- });
27
- $('#search').blur(function() {
28
- this.value == '' && $('#search-label').show()
29
- });
25
+ $('#search').focus(function() {
26
+ $('#search-label').hide();
27
+ });
28
+ $('#search').blur(function() {
29
+ this.value == '' && $('#search-label').show();
30
+ });
30
31
 
31
- $('#search')[0].value == '' && $('#search-label').show();
32
- }
33
- $(function() {
34
- placeholder();
35
- $('#links').hide();
36
- var panel = new Searchdoc.Panel($('#panel'), search_data, tree, window.parent.frames[1]);
37
- $('#search').focus();
32
+ $('#search')[0].value == '' && $('#search-label').show();
33
+ }
34
+ $(function() {
35
+ placeholder();
36
+ $('#links').hide();
37
+ var panel = new Searchdoc.Panel($('#panel'), search_data, tree, window.parent.frames[1]);
38
+ $('#search').focus();
38
39
 
39
- var s = window.parent.location.search.match(/\?q=([^&]+)/);
40
- if (s) {
41
- s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
42
- if (s.length > 0)
43
- {
44
- $('#search').val(s);
45
- panel.search(s, true);
46
- }
47
- }
48
- })
49
- </script>
40
+ var s = window.parent.location.search.match(/\?q=([^&]+)/);
41
+ if (s) {
42
+ s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
43
+ if (s.length > 0) {
44
+ $('#search').val(s);
45
+ panel.search(s, true);
46
+ }
47
+ }
48
+ })
49
+ </script>
50
50
  </head>
51
+
51
52
  <body>
52
- <div class="panel panel_tree" id="panel">
53
- <div class="header">
54
- <div>
55
- <label for="search" id="search-label" style="display: none">Search</label>
56
- <table>
57
- <tr><td>
58
- <input type="Search" placeholder="Search" autosave="searchdoc" results="10" id="search" autocomplete="off"/>
59
- </td></tr>
60
- </table></div>
61
- </div>
62
- <div class="tree">
63
- <ul>
64
- </ul>
65
- </div>
66
- <div class="result">
67
- <ul>
68
- </ul>
69
- </div>
53
+ <div class="panel panel_tree" id="panel">
54
+ <div class="header">
55
+ <div>
56
+ <label for="search" id="search-label" style="display: none">Search</label>
57
+ <table>
58
+ <tr>
59
+ <td>
60
+ <input type="Search" placeholder="Search" autosave="searchdoc" results="10" id="search" autocomplete="off" />
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ </div>
70
65
  </div>
71
- <a href="links.html" id="links">index</a>
66
+ <div class="tree">
67
+ <ul>
68
+ </ul>
69
+ </div>
70
+ <div class="result">
71
+ <ul>
72
+ </ul>
73
+ </div>
74
+ </div>
75
+ <a href="links.html" id="links">index</a>
72
76
  </body>
77
+
73
78
  </html>
@@ -5,4 +5,4 @@
5
5
  <a href="../<%= file.path %>"><%= file.relative_name %></a>
6
6
  <% end %>
7
7
  </body>
8
- </html>
8
+ </html>
@@ -2,7 +2,6 @@ $:.unshift File.dirname(__FILE__)
2
2
  require "rubygems"
3
3
  gem 'rdoc'
4
4
 
5
- module SDoc
6
- end
5
+ module SDoc; end
7
6
 
8
7
  require 'sdoc/generator'
@@ -2,11 +2,6 @@ require 'rubygems'
2
2
  require 'erb'
3
3
  require 'pathname'
4
4
  require 'fileutils'
5
- if Gem::Specification.respond_to?(:find_by_name) ? Gem::Specification::find_by_name("json") : Gem.available?("json")
6
- gem "json", ">= 1.1.3"
7
- else
8
- gem "json_pure", ">= 1.1.3"
9
- end
10
5
  require 'json'
11
6
 
12
7
  require 'sdoc/github'
@@ -140,8 +135,8 @@ class RDoc::Generator::SDoc
140
135
  opt.separator nil
141
136
 
142
137
  opt.on("--without-search", "-s",
143
- "Do not generated index file for search engines.",
144
- "SDoc uses javascript to refrence individual documentation pages.",
138
+ "Do not generate index file for search engines.",
139
+ "SDoc uses javascript to reference individual documentation pages.",
145
140
  "Search engine crawlers are not smart enough to find all the",
146
141
  "referenced pages.",
147
142
  "To help them SDoc generates a static file with links to every",
@@ -1,12 +1,6 @@
1
1
  require 'optparse'
2
2
  require 'pathname'
3
3
  require 'fileutils'
4
-
5
- if Gem::Specification.respond_to?(:find_by_name) ? Gem::Specification::find_by_name("json") : Gem.available?("json")
6
- gem "json", ">= 1.1.3"
7
- else
8
- gem "json_pure", ">= 1.1.3"
9
- end
10
4
  require 'json'
11
5
 
12
6
  require 'sdoc/templatable'
@@ -1,5 +1,4 @@
1
1
  require 'erb'
2
- require "sdoc"
3
2
 
4
3
  module SDoc::Templatable
5
4
  ### Load and render the erb template in the given +templatefile+ within the
@@ -18,7 +17,7 @@ module SDoc::Templatable
18
17
  err.message,
19
18
  eval( "_erbout[-50,50]", context )
20
19
  ], err.backtrace
21
- end
20
+ end
22
21
  end
23
22
 
24
23
  ### Load and render the erb template with the given +template_name+ within
@@ -43,8 +42,7 @@ module SDoc::Templatable
43
42
  else
44
43
  output = output.gsub('<script>', '&lt;script&gt;')
45
44
  end
46
- rescue Exception => e
47
-
45
+ rescue Exception
48
46
  end
49
47
 
50
48
  unless $dryrun
@@ -1,3 +1,3 @@
1
1
  module SDoc
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -9,10 +9,12 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Vladimir Kolesnikov", "Nathan Broadbent", "Jean Mertz", "Zachary Scott"]
10
10
  s.description = %q{rdoc generator html with javascript search index.}
11
11
  s.summary = %q{rdoc html with javascript search index.}
12
- s.homepage = %q{http://github.com/voloko/sdoc}
13
- s.email = %q{voloko@gmail.com zachary@zacharyscott.net}
12
+ s.homepage = %q{https://github.com/zzak/sdoc}
13
+ s.email = %q{voloko@gmail.com mail@zzak.io}
14
14
  s.license = 'MIT'
15
15
 
16
+ s.require_path = 'lib'
17
+
16
18
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if
17
19
  s.respond_to? :required_rubygems_version=
18
20
 
@@ -20,19 +22,8 @@ Gem::Specification.new do |s|
20
22
  s.extra_rdoc_files = ["README.md"]
21
23
 
22
24
  s.add_runtime_dependency("rdoc", "~> 4.0")
23
-
24
- if defined?(JRUBY_VERSION)
25
- s.platform = Gem::Platform.new(['universal', 'java', nil])
26
- s.add_runtime_dependency("json_pure", "~> 1.7", ">= 1.7.7")
27
- else
28
- s.add_runtime_dependency("json", "~> 1.7", ">= 1.7.7")
29
- end
30
-
31
- s.add_development_dependency "bundler", "~> 1.3"
32
- s.add_development_dependency "rake"
33
- s.add_development_dependency "minitest", "~> 4.0"
25
+ s.add_runtime_dependency("json", "~> 1.7", ">= 1.7.7")
34
26
 
35
27
  s.files = `git ls-files`.split("\n")
36
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
37
28
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
38
29
  end
@@ -19,43 +19,43 @@ describe RDoc::Generator::SDoc do
19
19
  it "should parse github option" do
20
20
  assert !@options.github
21
21
 
22
- out, err = capture_io do
22
+ _, err = capture_io do
23
23
  @parser.parse %w[--github]
24
24
  end
25
25
 
26
- err.wont_match /^invalid options/
26
+ err.wont_match(/^invalid options/)
27
27
  @options.github.must_equal true
28
28
  end
29
29
 
30
30
  it "should parse github short-hand option" do
31
31
  assert !@options.github
32
32
 
33
- out, err = capture_io do
33
+ _, err = capture_io do
34
34
  @parser.parse %w[-g]
35
35
  end
36
36
 
37
- err.wont_match /^invalid options/
37
+ err.wont_match(/^invalid options/)
38
38
  @options.github.must_equal true
39
39
  end
40
40
 
41
41
  it "should parse no search engine index option" do
42
42
  @options.search_index.must_equal true
43
43
 
44
- out, err = capture_io do
44
+ _, err = capture_io do
45
45
  @parser.parse %w[--without-search]
46
46
  end
47
47
 
48
- err.wont_match /^invalid options/
48
+ err.wont_match(/^invalid options/)
49
49
  @options.search_index.must_equal false
50
50
  end
51
51
 
52
52
  it "should parse search-index shorthand option" do
53
53
  @options.search_index.must_equal true
54
- out, err = capture_io do
54
+ _, err = capture_io do
55
55
  @parser.parse %w[-s]
56
56
  end
57
57
 
58
- err.wont_match /^invalid options/
58
+ err.wont_match(/^invalid options/)
59
59
  @options.search_index.must_equal false
60
60
  end
61
61
 
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: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Kolesnikov
@@ -11,86 +11,44 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-08-11 00:00:00.000000000 Z
14
+ date: 2016-10-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rdoc
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - ~>
20
+ - - "~>"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '4.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
29
  version: '4.0'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: json
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ~>
34
+ - - "~>"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '1.7'
37
- - - '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: 1.7.7
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.7'
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: 1.7.7
50
- - !ruby/object:Gem::Dependency
51
- name: bundler
52
- requirement: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ~>
55
- - !ruby/object:Gem::Version
56
- version: '1.3'
57
- type: :development
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ~>
62
- - !ruby/object:Gem::Version
63
- version: '1.3'
64
- - !ruby/object:Gem::Dependency
65
- name: rake
66
- requirement: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - '>='
69
- - !ruby/object:Gem::Version
70
- version: '0'
71
- type: :development
72
- prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: minitest
80
- requirement: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ~>
83
- - !ruby/object:Gem::Version
84
- version: '4.0'
85
- type: :development
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ~>
90
- - !ruby/object:Gem::Version
91
- version: '4.0'
92
50
  description: rdoc generator html with javascript search index.
93
- email: voloko@gmail.com zachary@zacharyscott.net
51
+ email: voloko@gmail.com mail@zzak.io
94
52
  executables:
95
53
  - sdoc
96
54
  - sdoc-merge
@@ -98,8 +56,9 @@ extensions: []
98
56
  extra_rdoc_files:
99
57
  - README.md
100
58
  files:
101
- - .gitignore
102
- - .travis.yml
59
+ - ".gitignore"
60
+ - ".travis.yml"
61
+ - CHANGELOG.md
103
62
  - Gemfile
104
63
  - LICENSE
105
64
  - README.md
@@ -160,31 +119,30 @@ files:
160
119
  - sdoc.gemspec
161
120
  - spec/rdoc_generator_spec.rb
162
121
  - spec/spec_helper.rb
163
- homepage: http://github.com/voloko/sdoc
122
+ homepage: https://github.com/zzak/sdoc
164
123
  licenses:
165
124
  - MIT
166
125
  metadata: {}
167
126
  post_install_message:
168
127
  rdoc_options:
169
- - --charset=UTF-8
128
+ - "--charset=UTF-8"
170
129
  require_paths:
171
130
  - lib
172
131
  required_ruby_version: !ruby/object:Gem::Requirement
173
132
  requirements:
174
- - - '>='
133
+ - - ">="
175
134
  - !ruby/object:Gem::Version
176
135
  version: '0'
177
136
  required_rubygems_version: !ruby/object:Gem::Requirement
178
137
  requirements:
179
- - - '>='
138
+ - - ">="
180
139
  - !ruby/object:Gem::Version
181
140
  version: 1.3.6
182
141
  requirements: []
183
142
  rubyforge_project:
184
- rubygems_version: 2.0.14
143
+ rubygems_version: 2.5.1
185
144
  signing_key:
186
145
  specification_version: 4
187
146
  summary: rdoc html with javascript search index.
188
- test_files:
189
- - spec/rdoc_generator_spec.rb
190
- - spec/spec_helper.rb
147
+ test_files: []
148
+ has_rdoc: