rubygems-yardoc 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 KITAITI Makoto
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.markdown ADDED
@@ -0,0 +1,35 @@
1
+ rubygems-yardoc
2
+ ===============
3
+
4
+ This gem provides `gem yardoc` command which generate YARD documentation for specified gems.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'rubygems-yardoc'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install rubygems-yardoc
20
+
21
+ Usage
22
+ -----
23
+
24
+ $ gem yardoc GEMNAME [GEMNAME ...]
25
+
26
+ YARD Documentation for GEMNAME will be generated to `{GEM INSTALATION DIRECTORY}/doc/{GEMNAME}-{VERSION}/yardoc`
27
+
28
+ Contributing
29
+ ------------
30
+
31
+ 1. Fork it
32
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
33
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
34
+ 4. Push to the branch (`git push origin my-new-feature`)
35
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ require 'rake/clean'
2
+ require 'rubygems/specification'
3
+ require 'bundler/gem_helper'
4
+ require 'yard'
5
+
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
@@ -0,0 +1,29 @@
1
+ require 'rubygems/package'
2
+ require 'rubygems/command'
3
+ require 'shellwords'
4
+ require 'yard'
5
+
6
+ class Gem::Commands::YardocCommand < Gem::Command
7
+ def initialize
8
+ super 'yardoc', 'Generate YARD documentation for specified gems'
9
+ end
10
+
11
+ def arguments # :nodoc:
12
+ 'GEMNAME [GEMNAME ...] gem to generate YARD documentation'
13
+ end
14
+
15
+ def usage # :nodoc:
16
+ "gem #{command} #{arguments}"
17
+ end
18
+
19
+ def execute
20
+ gemnames = get_all_gem_names
21
+ gemnames.each do |gemname|
22
+ gemspec = Gem::Specification.find_by_name(gemname)
23
+ yardoc_dir = File.join(gemspec.doc_dir, 'yardoc')
24
+ Dir.chdir gemspec.gem_dir do
25
+ YARD::CLI::Yardoc.run '--output-dir', yardoc_dir
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,4 @@
1
+ require 'rubygems/command_manager'
2
+ require 'rubygems/commands/yardoc_command'
3
+
4
+ Gem::CommandManager.instance.register_command :yardoc
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "rubygems-yardoc"
7
+ gem.version = '0.0.1'
8
+ gem.authors = ["KITAITI Makoto"]
9
+ gem.email = ["KitaitiMakoto@gmail.com"]
10
+ gem.description = %q{Provides gem yardoc command which generate YARD document for specified gems}
11
+ gem.summary = %q{gem yardoc command-line tool}
12
+ gem.homepage = ""
13
+
14
+ gem.files = `git ls-files`.split($/)
15
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
+ gem.require_paths = ["lib"]
18
+
19
+ gem.add_runtime_dependency 'yard'
20
+
21
+ gem.add_development_dependency 'bundler'
22
+ gem.add_development_dependency 'redcarpet'
23
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubygems-yardoc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - KITAITI Makoto
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: yard
16
+ requirement: &15435140 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *15435140
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &15434680 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *15434680
36
+ - !ruby/object:Gem::Dependency
37
+ name: redcarpet
38
+ requirement: &15434240 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *15434240
47
+ description: Provides gem yardoc command which generate YARD document for specified
48
+ gems
49
+ email:
50
+ - KitaitiMakoto@gmail.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - .gitignore
56
+ - LICENSE.txt
57
+ - README.markdown
58
+ - Rakefile
59
+ - lib/rubygems/commands/yardoc_command.rb
60
+ - lib/rubygems_plugin.rb
61
+ - rubygems-yardoc.gemspec
62
+ homepage: ''
63
+ licenses: []
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 1.8.8
83
+ signing_key:
84
+ specification_version: 3
85
+ summary: gem yardoc command-line tool
86
+ test_files: []
87
+ has_rdoc: