sdoc 0.4.0.rc.1 → 0.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd2d4eb7ab04479c587beb38e4914c9dffccb38b
4
- data.tar.gz: 19f04f53d7d8b389d1c89d626ec5e6eb5feb932f
3
+ metadata.gz: 067a0e0ce20ba977d36da7bb1973265df51a9e82
4
+ data.tar.gz: 9ace3bdb783a389d48fb306f2cb889c48e561512
5
5
  SHA512:
6
- metadata.gz: 86e9f89fca9d9742202cc177ae9476129f0d1954a7490f79031ebfc284bbed35f42474c95e269a8e6c279901b8d8f56e15367552061c06e965f89de99a5ed343
7
- data.tar.gz: ae5dd03a65d7fd05b1eff34c0ced235a9d24b00fb096bec1e8d9fecef843e7754a49ace874d879a4d97c10894d391b795140b708d8f41e17e7d8c8104bf39b4f
6
+ metadata.gz: 74a0a0ed5885d5a5476e0aeab695a8290e48021be825f012b3222609726f79314504d78b2845b9a0c8810cee95340a648800efc3dd876aa87a7a7c6aa41963a6
7
+ data.tar.gz: 5800a6d342566ee966a76c88d0ff51ffd834dda6954b6fb281cb54b4b2c8de7a44e967084ff281830cfff9ffd9f04956f2b3b31975aabe189614e461bb97c8b5
data/.gitignore CHANGED
@@ -4,3 +4,5 @@ pkg
4
4
  doc
5
5
  /test.rb
6
6
  Gemfile.lock
7
+ /.rake_tasks~
8
+ /*.gem
data/bin/sdoc CHANGED
@@ -2,7 +2,7 @@
2
2
  require 'sdoc'
3
3
 
4
4
  begin
5
- ARGV.push('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?
5
+ ARGV.unshift('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?
6
6
  r = RDoc::RDoc.new
7
7
  r.document ARGV
8
8
  rescue SystemExit
@@ -24,4 +24,3 @@ rescue Exception => e
24
24
 
25
25
  exit 1
26
26
  end
27
-
@@ -21,4 +21,3 @@ rescue Exception => e
21
21
  end
22
22
  exit 1
23
23
  end
24
-
@@ -2,6 +2,8 @@ $:.unshift File.dirname(__FILE__)
2
2
  require "rubygems"
3
3
  gem 'rdoc'
4
4
 
5
- module SDoc end
5
+ module SDoc
6
+ VERSION = "0.4.0"
7
+ end
6
8
 
7
9
  require 'sdoc/generator'
@@ -134,19 +134,19 @@ class RDoc::Generator::SDoc
134
134
  opt.separator "SDoc generator options:"
135
135
  opt.separator nil
136
136
  opt.on("--github", "-g",
137
- "Generate links to github.") do |value|
137
+ "Generate links to github.") do |value|
138
138
  options.github = true
139
139
  end
140
140
  opt.separator nil
141
141
 
142
142
  opt.on("--without-search", "-s",
143
- "Do not generated index file for search engines.",
144
- "SDoc uses javascript to refrence individual documentation pages.",
145
- "Search engine crawlers are not smart enough to find all the",
146
- "referenced pages.",
147
- "To help them SDoc generates a static file with links to every",
148
- "documentation page. This file is not shown to the user."
149
- ) do
143
+ "Do not generated index file for search engines.",
144
+ "SDoc uses javascript to refrence individual documentation pages.",
145
+ "Search engine crawlers are not smart enough to find all the",
146
+ "referenced pages.",
147
+ "To help them SDoc generates a static file with links to every",
148
+ "documentation page. This file is not shown to the user."
149
+ ) do
150
150
  options.search_index = false
151
151
  end
152
152
  opt.separator nil
@@ -14,7 +14,7 @@ module SDoc::Helpers
14
14
  end
15
15
  yield group unless group[:methods].size == 0
16
16
  end
17
-
17
+
18
18
  protected
19
19
  def group_name name
20
20
  if match = name.match(/^([a-z])/i)
@@ -23,4 +23,4 @@ protected
23
23
  '#'
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -27,7 +27,7 @@ class SDoc::Merge
27
27
  def merge(options)
28
28
  parse_options options
29
29
 
30
- @outputdir = Pathname.new( @op_dir )
30
+ @outputdir = Pathname.new( @op_dir )
31
31
 
32
32
  check_directories
33
33
  setup_output_dir
@@ -56,8 +56,8 @@ class SDoc::Merge
56
56
  end
57
57
 
58
58
  opt.on("-u", "--urls [URLS]", "Paths to merged docs. If you",
59
- "set this files and classes won't be actualy",
60
- "copied to merged build") do |v|
59
+ "set this files and classes won't be actualy",
60
+ "copied to merged build") do |v|
61
61
  @urls = v.split(' ').map{|name| name.strip }
62
62
  end
63
63
  end
@@ -198,7 +198,7 @@ class SDoc::Merge
198
198
 
199
199
  def setup_output_dir
200
200
  if File.exists? @op_dir
201
- error "#{@op_dir} allready exists"
201
+ error "#{@op_dir} already exists"
202
202
  end
203
203
  FileUtils.mkdir_p @op_dir
204
204
  end
@@ -2,13 +2,13 @@ require 'erb'
2
2
  require "sdoc"
3
3
 
4
4
  module SDoc::Templatable
5
- ### Load and render the erb template in the given +templatefile+ within the
6
- ### specified +context+ (a Binding object) and return output
7
- ### Both +templatefile+ and +outfile+ should be Pathname-like objects.
5
+ ### Load and render the erb template in the given +templatefile+ within the
6
+ ### specified +context+ (a Binding object) and return output
7
+ ### Both +templatefile+ and +outfile+ should be Pathname-like objects.
8
8
  def eval_template(templatefile, context)
9
- template_src = templatefile.read
10
- template = ERB.new( template_src, nil, '<>' )
11
- template.filename = templatefile.to_s
9
+ template_src = templatefile.read
10
+ template = ERB.new( template_src, nil, '<>' )
11
+ template.filename = templatefile.to_s
12
12
 
13
13
  begin
14
14
  template.result( context )
@@ -29,10 +29,10 @@ module SDoc::Templatable
29
29
  eval("#{source};eval_template(templatefile, binding)")
30
30
  end
31
31
 
32
- ### Load and render the erb template in the given +templatefile+ within the
33
- ### specified +context+ (a Binding object) and write it out to +outfile+.
34
- ### Both +templatefile+ and +outfile+ should be Pathname-like objects.
35
- def render_template( templatefile, context, outfile )
32
+ ### Load and render the erb template in the given +templatefile+ within the
33
+ ### specified +context+ (a Binding object) and write it out to +outfile+.
34
+ ### Both +templatefile+ and +outfile+ should be Pathname-like objects.
35
+ def render_template( templatefile, context, outfile )
36
36
  output = eval_template(templatefile, context)
37
37
 
38
38
  # TODO delete this dirty hack when documentation for example for GeneratorMethods will not be cutted off by <script> tag
@@ -47,14 +47,14 @@ module SDoc::Templatable
47
47
 
48
48
  end
49
49
 
50
- unless $dryrun
51
- outfile.dirname.mkpath
52
- outfile.open( 'w', 0644 ) do |file|
53
- file.print( output )
54
- end
55
- else
56
- debug_msg " would have written %d bytes to %s" %
57
- [ output.length, outfile ]
58
- end
59
- end
50
+ unless $dryrun
51
+ outfile.dirname.mkpath
52
+ outfile.open( 'w', 0644 ) do |file|
53
+ file.print( output )
54
+ end
55
+ else
56
+ debug_msg " would have written %d bytes to %s" %
57
+ [ output.length, outfile ]
58
+ end
59
+ end
60
60
  end
@@ -1,14 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ require_relative 'lib/sdoc.rb'
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = "sdoc"
5
- s.version = "0.4.0.rc.1"
6
+ s.version = SDoc::VERSION
6
7
 
7
8
  s.authors = ["Vladimir Kolesnikov", "Nathan Broadbent", "Jean Mertz", "Zachary Scott"]
8
9
  s.description = %q{rdoc generator html with javascript search index.}
9
10
  s.summary = %q{rdoc html with javascript search index.}
10
11
  s.homepage = %q{http://github.com/voloko/sdoc}
11
- s.email = %q{voloko@gmail.com}
12
+ s.email = %q{voloko@gmail.com zachary@zacharyscott.net}
12
13
  s.license = 'MIT'
13
14
 
14
15
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if
@@ -21,9 +22,9 @@ Gem::Specification.new do |s|
21
22
 
22
23
  if defined?(JRUBY_VERSION)
23
24
  s.platform = Gem::Platform.new(['universal', 'java', nil])
24
- s.add_runtime_dependency("json_pure", ">= 1.1.3")
25
+ s.add_runtime_dependency("json_pure", "~> 1.8")
25
26
  else
26
- s.add_runtime_dependency("json", ">= 1.1.3")
27
+ s.add_runtime_dependency("json", "~> 1.8")
27
28
  end
28
29
 
29
30
  s.add_development_dependency "bundler", "~> 1.3"
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.0.rc.1
4
+ version: 0.4.0
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: 2013-12-26 00:00:00.000000000 Z
14
+ date: 2014-01-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rdoc
@@ -37,16 +37,16 @@ dependencies:
37
37
  name: json
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ">="
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: 1.1.3
42
+ version: '1.8'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ">="
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: 1.1.3
49
+ version: '1.8'
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: bundler
52
52
  requirement: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  - !ruby/object:Gem::Version
91
91
  version: '4.0'
92
92
  description: rdoc generator html with javascript search index.
93
- email: voloko@gmail.com
93
+ email: voloko@gmail.com zachary@zacharyscott.net
94
94
  executables:
95
95
  - sdoc
96
96
  - sdoc-merge
@@ -99,7 +99,6 @@ extra_rdoc_files:
99
99
  - README.md
100
100
  files:
101
101
  - ".gitignore"
102
- - ".rake_tasks~"
103
102
  - ".travis.yml"
104
103
  - Gemfile
105
104
  - LICENSE
@@ -1,20 +0,0 @@
1
- build
2
- check_dependencies
3
- check_dependencies:development
4
- check_dependencies:runtime
5
- gem_file_list
6
- gemspec
7
- gemspec:debug
8
- gemspec:generate
9
- gemspec:validate
10
- ghost
11
- git:release
12
- github:release
13
- install
14
- release
15
- test
16
- version
17
- version:bump:major
18
- version:bump:minor
19
- version:bump:patch
20
- version:write