bones 3.0.1 → 3.1.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.
- data/History.txt +5 -0
- data/Rakefile +1 -0
- data/lib/bones.rb +1 -1
- data/lib/bones/plugins/rdoc.rb +4 -2
- data/lib/bones/plugins/yard.rb +90 -0
- metadata +8 -7
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/bones.rb
CHANGED
@@ -13,7 +13,7 @@ module Bones
|
|
13
13
|
extend LittlePlugger
|
14
14
|
|
15
15
|
# :stopdoc:
|
16
|
-
VERSION = '3.0
|
16
|
+
VERSION = '3.1.0'
|
17
17
|
PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
18
18
|
LIBPATH = File.expand_path(File.join(PATH, 'lib'))
|
19
19
|
HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])
|
data/lib/bones/plugins/rdoc.rb
CHANGED
@@ -79,8 +79,10 @@ module Bones::Plugins::Rdoc
|
|
79
79
|
end
|
80
80
|
end # namespace :doc
|
81
81
|
|
82
|
-
|
83
|
-
|
82
|
+
unless have? :yard
|
83
|
+
desc 'Alias to doc:rdoc'
|
84
|
+
task :doc => 'doc:rdoc'
|
85
|
+
end
|
84
86
|
|
85
87
|
desc 'Remove all build products'
|
86
88
|
task :clobber => %w(doc:clobber_rdoc doc:clobber_ri)
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
module Bones::Plugins::Yard
|
3
|
+
include ::Bones::Helpers
|
4
|
+
extend self
|
5
|
+
|
6
|
+
def initialize_yard
|
7
|
+
require 'yard'
|
8
|
+
require 'yard/rake/yardoc_task'
|
9
|
+
have?(:yard) { true }
|
10
|
+
|
11
|
+
# FIXME This is a monkey-patch till yard fixes the namespace method collision
|
12
|
+
Module.class_eval 'remove_method :namespace'
|
13
|
+
|
14
|
+
::Bones.config {
|
15
|
+
desc 'Configuration settings for yard'
|
16
|
+
yard {
|
17
|
+
|
18
|
+
opts [], :desc => 'Array of yard options to use when generating documentation.'
|
19
|
+
|
20
|
+
include %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$), :desc => <<-__
|
21
|
+
An array of patterns that will be used to find the files for which
|
22
|
+
documentation should be generated. This is an array of strings that
|
23
|
+
will be converted in regular expressions.
|
24
|
+
__
|
25
|
+
|
26
|
+
exclude %w(extconf\.rb$), :desc => <<-__
|
27
|
+
An array of patterns that will be used to exclude files from yard
|
28
|
+
processing. This is an array of strings that will be converted in
|
29
|
+
regular expressions.
|
30
|
+
__
|
31
|
+
|
32
|
+
main nil, :desc => <<-__
|
33
|
+
The main yard file for the project. This defaults to the project's
|
34
|
+
README file.
|
35
|
+
__
|
36
|
+
|
37
|
+
dir 'doc', :desc => 'Output directory for generated documentation.'
|
38
|
+
}
|
39
|
+
}
|
40
|
+
rescue LoadError
|
41
|
+
have?(:yard) { false }
|
42
|
+
end
|
43
|
+
|
44
|
+
def post_load
|
45
|
+
return unless have? :yard
|
46
|
+
config = ::Bones.config
|
47
|
+
|
48
|
+
config.exclude << "^#{Regexp.escape(config.yard.dir)}/"
|
49
|
+
config.yard.main ||= config.readme_file
|
50
|
+
end
|
51
|
+
|
52
|
+
def define_tasks
|
53
|
+
return unless have?(:yard)
|
54
|
+
config = ::Bones.config
|
55
|
+
|
56
|
+
namespace :doc do
|
57
|
+
desc 'Generate Yard documentation'
|
58
|
+
YARD::Rake::YardocTask.new(:yard) do |yd|
|
59
|
+
yard = config.yard
|
60
|
+
|
61
|
+
incl = Regexp.new(yard.include.join('|'))
|
62
|
+
excl = Regexp.new(yard.exclude.join('|'))
|
63
|
+
yd.files = config.gem.files.find_all do |fn|
|
64
|
+
case fn
|
65
|
+
when excl; false
|
66
|
+
when incl; true
|
67
|
+
else false end
|
68
|
+
end
|
69
|
+
|
70
|
+
yd.options << '--main' << yard.main
|
71
|
+
yd.options << '--output-dir' << yard.dir
|
72
|
+
yd.options << '--title' << "#{config.name}-#{config.version} Documentation"
|
73
|
+
|
74
|
+
yd.options.concat(yard.opts)
|
75
|
+
end
|
76
|
+
|
77
|
+
task :clobber_yard do
|
78
|
+
rm_r config.yard.dir rescue nil
|
79
|
+
end
|
80
|
+
end # namespace :doc
|
81
|
+
|
82
|
+
desc 'Alias to doc:yard'
|
83
|
+
task :doc => 'doc:yard'
|
84
|
+
|
85
|
+
task :clobber => %w(doc:clobber_yard)
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
# EOF
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.2.
|
53
|
+
version: 1.2.9
|
54
54
|
version:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bones-git
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
63
|
+
version: 1.1.1
|
64
64
|
version:
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: bones-extras
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 1.0
|
73
|
+
version: 1.1.0
|
74
74
|
version:
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: bones
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 3.0
|
83
|
+
version: 3.1.0
|
84
84
|
version:
|
85
85
|
description: |-
|
86
86
|
Mr Bones is a handy tool that creates new Ruby projects from a code
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- lib/bones/plugins/notes.rb
|
132
132
|
- lib/bones/plugins/rdoc.rb
|
133
133
|
- lib/bones/plugins/test.rb
|
134
|
+
- lib/bones/plugins/yard.rb
|
134
135
|
- lib/bones/smtp_tls.rb
|
135
136
|
- spec/bones/app/file_manager_spec.rb
|
136
137
|
- spec/bones/app_spec.rb
|
@@ -172,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
173
|
version:
|
173
174
|
requirements: []
|
174
175
|
|
175
|
-
rubyforge_project:
|
176
|
+
rubyforge_project: codeforpeople
|
176
177
|
rubygems_version: 1.3.5
|
177
178
|
signing_key:
|
178
179
|
specification_version: 3
|