rubygems-yardoc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +18 -2
- data/Rakefile +1 -18
- data/lib/rubygems/commands/yardoc_command.rb +17 -11
- data/lib/rubygems_plugin.rb +0 -1
- data/rubygems-yardoc.gemspec +4 -3
- metadata +10 -10
data/README.markdown
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
rubygems-yardoc
|
2
2
|
===============
|
3
3
|
|
4
|
-
This gem provides `gem yardoc` command which
|
4
|
+
This gem provides `gem yardoc` command which generates YARD documentations for specified gems.
|
5
5
|
|
6
6
|
Installation
|
7
7
|
------------
|
@@ -18,12 +18,28 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install rubygems-yardoc
|
20
20
|
|
21
|
+
Installing `redcarpet` by writing:
|
22
|
+
|
23
|
+
gem 'recarpet'
|
24
|
+
|
25
|
+
And executing:
|
26
|
+
|
27
|
+
$ bundle
|
28
|
+
|
29
|
+
Or just executing:
|
30
|
+
|
31
|
+
$ gem install redcarpet
|
32
|
+
|
33
|
+
often helps you because many gems use Markdown to write README files
|
34
|
+
and YARD require `redcapet` when parsing Markdown.
|
35
|
+
|
21
36
|
Usage
|
22
37
|
-----
|
23
38
|
|
24
39
|
$ gem yardoc GEMNAME [GEMNAME ...]
|
25
40
|
|
26
|
-
|
41
|
+
Make `yard` directory into specified gem's doc directory and
|
42
|
+
YARD Documentation for the gem will be generated into the directory
|
27
43
|
|
28
44
|
Contributing
|
29
45
|
------------
|
data/Rakefile
CHANGED
@@ -1,23 +1,6 @@
|
|
1
1
|
require 'rake/clean'
|
2
2
|
require 'rubygems/specification'
|
3
|
-
require 'bundler/
|
3
|
+
require 'bundler/gem_tasks'
|
4
4
|
require 'yard'
|
5
5
|
|
6
6
|
YARD::Rake::YardocTask.new
|
7
|
-
|
8
|
-
spec = Gem::Specification.load(File.join(File.dirname(__FILE__), 'rubygems-yardoc.gemspec'))
|
9
|
-
|
10
|
-
desc "Build #{spec.name}-#{spec.version}.gem into the pkg directory."
|
11
|
-
task :build do
|
12
|
-
Bundler::GemHelper.new.build_gem
|
13
|
-
end
|
14
|
-
|
15
|
-
desc "Build and install #{spec.name}-#{spec.version}.gem into system gems."
|
16
|
-
task :install do
|
17
|
-
Bundler::GemHelper.new.install_gem
|
18
|
-
end
|
19
|
-
|
20
|
-
desc "Create tag v#{spec.version} and build and push #{spec.name}-#{spec.version}.gem to Rubygems"
|
21
|
-
task :release do
|
22
|
-
Bundler::GemHelper.new.release_gem
|
23
|
-
end
|
@@ -1,29 +1,35 @@
|
|
1
1
|
require 'rubygems/package'
|
2
2
|
require 'rubygems/command'
|
3
|
-
require 'shellwords'
|
4
3
|
require 'yard'
|
5
4
|
|
6
5
|
class Gem::Commands::YardocCommand < Gem::Command
|
6
|
+
VERSION = '0.0.2'
|
7
|
+
|
7
8
|
def initialize
|
8
|
-
super 'yardoc', 'Generate YARD
|
9
|
+
super 'yardoc', 'Generate YARD documentations for specified gems into doc directory'
|
9
10
|
end
|
10
11
|
|
11
12
|
def arguments # :nodoc:
|
12
|
-
'GEMNAME [GEMNAME ...]
|
13
|
+
'GEMNAME [GEMNAME ...] gem to generate YARD documentation'
|
13
14
|
end
|
14
15
|
|
15
16
|
def usage # :nodoc:
|
16
|
-
"
|
17
|
+
"#{program_name} GEMNAME [GEMNAME ...]"
|
17
18
|
end
|
18
19
|
|
19
20
|
def execute
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
get_all_gem_names.each do |name|
|
22
|
+
run_yardoc name
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def run_yardoc(gem_name)
|
27
|
+
spec = Gem::Specification.find_by_name(gem_name)
|
28
|
+
yardoc_dir = File.join(spec.doc_dir, 'yardoc')
|
29
|
+
Dir.chdir spec.gem_dir do
|
30
|
+
YARD::CLI::Yardoc.run '--output-dir', yardoc_dir
|
27
31
|
end
|
32
|
+
$stderr.puts 'YARD documentation is generated in:'
|
33
|
+
$stderr.puts yardoc_dir
|
28
34
|
end
|
29
35
|
end
|
data/lib/rubygems_plugin.rb
CHANGED
data/rubygems-yardoc.gemspec
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rubygems/commands/yardoc_command'
|
4
5
|
|
5
6
|
Gem::Specification.new do |gem|
|
6
7
|
gem.name = "rubygems-yardoc"
|
7
|
-
gem.version =
|
8
|
+
gem.version = Gem::Commands::YardocCommand::VERSION
|
8
9
|
gem.authors = ["KITAITI Makoto"]
|
9
10
|
gem.email = ["KitaitiMakoto@gmail.com"]
|
10
|
-
gem.description = %q{Provides gem yardoc command which
|
11
|
+
gem.description = %q{Provides a "gem yardoc" command which generates YARD documentations for specified gems}
|
11
12
|
gem.summary = %q{gem yardoc command-line tool}
|
12
|
-
gem.homepage
|
13
|
+
gem.homepage = "https://github.com/KitaitiMakoto/rubygems-yardoc"
|
13
14
|
|
14
15
|
gem.files = `git ls-files`.split($/)
|
15
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-yardoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-01-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yard
|
16
|
-
requirement: &
|
16
|
+
requirement: &12928800 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *12928800
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &12928380 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *12928380
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: redcarpet
|
38
|
-
requirement: &
|
38
|
+
requirement: &12944320 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,9 +43,9 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
-
description: Provides gem yardoc command which
|
48
|
-
gems
|
46
|
+
version_requirements: *12944320
|
47
|
+
description: Provides a "gem yardoc" command which generates YARD documentations for
|
48
|
+
specified gems
|
49
49
|
email:
|
50
50
|
- KitaitiMakoto@gmail.com
|
51
51
|
executables: []
|
@@ -59,7 +59,7 @@ files:
|
|
59
59
|
- lib/rubygems/commands/yardoc_command.rb
|
60
60
|
- lib/rubygems_plugin.rb
|
61
61
|
- rubygems-yardoc.gemspec
|
62
|
-
homepage:
|
62
|
+
homepage: https://github.com/KitaitiMakoto/rubygems-yardoc
|
63
63
|
licenses: []
|
64
64
|
post_install_message:
|
65
65
|
rdoc_options: []
|