bones-yard 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ == 1.0.0 / 2010-10-17
2
+
3
+ * 1 major enhancement
4
+ * Birthday!
@@ -0,0 +1,37 @@
1
+ bones-yard
2
+ by Tim Pease
3
+ http://rubygems.org/gems/bones-yard
4
+
5
+ == DESCRIPTION:
6
+
7
+ The yard package for Mr Bones provides tasks to incorporate Yard based
8
+ documentation into bones based projects.
9
+
10
+ == INSTALL:
11
+
12
+ gem install bones-yard
13
+
14
+ == LICENSE:
15
+
16
+ (The MIT License)
17
+
18
+ Copyright (c) 2010
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining
21
+ a copy of this software and associated documentation files (the
22
+ 'Software'), to deal in the Software without restriction, including
23
+ without limitation the rights to use, copy, modify, merge, publish,
24
+ distribute, sublicense, and/or sell copies of the Software, and to
25
+ permit persons to whom the Software is furnished to do so, subject to
26
+ the following conditions:
27
+
28
+ The above copyright notice and this permission notice shall be
29
+ included in all copies or substantial portions of the Software.
30
+
31
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
32
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+
2
+ begin
3
+ require 'bones'
4
+ rescue LoadError
5
+ abort '### Please install the "bones" gem ###'
6
+ end
7
+
8
+ Bones {
9
+ name 'bones-yard'
10
+ authors 'Tim Pease'
11
+ email 'tim.pease@gmail.com'
12
+ url 'http://github.com/TwP/bones-yard'
13
+ ignore_file '.gitignore'
14
+
15
+ depend_on 'bones'
16
+ depend_on 'yard', '>= 0.5.8'
17
+
18
+ use_gmail
19
+ }
20
+
@@ -0,0 +1,87 @@
1
+
2
+ module Bones::Plugins::Rubyforge
3
+ include ::Bones::Helpers
4
+ extend self
5
+
6
+ def initialize_rubyforge
7
+ require 'rubyforge'
8
+ require 'rake/contrib/sshpublisher'
9
+ have?(:rubyforge) { true }
10
+
11
+ ::Bones.config {
12
+ desc 'Configuration settings for RubyForge publishing.'
13
+ rubyforge {
14
+ name nil, :desc => <<-__
15
+ The RubyForge project name where your code will be published. If not
16
+ supplied, the RubyForge name will default to the base 'name' of your
17
+ gem. The RubyForge name is used when your gem name differs from the
18
+ registered project name; for example if you release multiple gems
19
+ under the same project.
20
+ __
21
+ }
22
+
23
+ rdoc {
24
+ remote_dir nil, :desc => <<-__
25
+ This is the remote directory to use when publishing RDoc HTML
26
+ documentation to your RubyForge project page. If not specified, this
27
+ defaults to the root of the project page.
28
+ __
29
+ }
30
+ }
31
+ rescue LoadError
32
+ have?(:rubyforge) { false }
33
+ end
34
+
35
+ def post_load
36
+ return unless have? :rubyforge
37
+ config = ::Bones.config
38
+ config.rubyforge.name ||= config.name
39
+ end
40
+
41
+ def define_tasks
42
+ return unless have? :rubyforge
43
+ config = ::Bones.config
44
+
45
+ namespace :rubyforge do
46
+ desc 'Package gem and upload to RubyForge'
47
+ task :release => ['gem:clobber_package', 'gem:package'] do |t|
48
+ v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
49
+ abort "Versions don't match #{v} vs #{config.version}" if v != config.version
50
+ pkg = "pkg/#{config.gem._spec.full_name}"
51
+
52
+ rf = RubyForge.new
53
+ rf.configure rescue nil
54
+ puts 'Logging in'
55
+ rf.login
56
+
57
+ c = rf.userconfig
58
+ c['release_notes'] = config.description if config.description
59
+ c['release_changes'] = config.changes if config.changes
60
+ c['preformatted'] = true
61
+
62
+ files = Dir.glob("#{pkg}*.*")
63
+
64
+ puts "Releasing #{config.name} v. #{config.version}"
65
+ rf.add_release config.rubyforge.name, config.name, config.version, *files
66
+ end
67
+
68
+ desc 'Publish RDoc to RubyForge'
69
+ task :doc_release => %w(doc:clobber_rdoc doc:rdoc) do
70
+ rubyforge_config = YAML.load(
71
+ File.read(File.expand_path('~/.rubyforge/user-config.yml'))
72
+ )
73
+
74
+ host = "#{rubyforge_config['username']}@rubyforge.org"
75
+ remote_dir = "/var/www/gforge-projects/#{config.rubyforge.name}/"
76
+ remote_dir << config.rdoc.remote_dir if config.rdoc.remote_dir
77
+ local_dir = config.rdoc.dir
78
+
79
+ Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
80
+ end
81
+ end
82
+
83
+ end
84
+
85
+ end # module Bones::Plugins::Rubyforge
86
+
87
+ # EOF
@@ -0,0 +1,86 @@
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
+ ::Bones.config {
12
+ desc 'Configuration settings for yard'
13
+ yard {
14
+ opts [], :desc => 'Array of yard options to use when generating documentation.'
15
+
16
+ include %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$), :desc => <<-__
17
+ An array of patterns that will be used to find the files for which
18
+ documentation should be generated. This is an array of strings that
19
+ will be converted in regular expressions.
20
+ __
21
+
22
+ exclude %w(extconf\.rb$), :desc => <<-__
23
+ An array of patterns that will be used to exclude files from yard
24
+ processing. This is an array of strings that will be converted in
25
+ regular expressions.
26
+ __
27
+
28
+ main nil, :desc => <<-__
29
+ The main yard file for the project. This defaults to the project's
30
+ README file.
31
+ __
32
+
33
+ dir 'doc', :desc => 'Output directory for generated documentation.'
34
+ }
35
+ }
36
+ rescue LoadError
37
+ have?(:yard) { false }
38
+ end
39
+
40
+ def post_load
41
+ return unless have? :yard
42
+ config = ::Bones.config
43
+
44
+ config.exclude << "^#{Regexp.escape(config.yard.dir)}/"
45
+ config.yard.main ||= config.readme_file
46
+ end
47
+
48
+ def define_tasks
49
+ return unless have?(:yard)
50
+ config = ::Bones.config
51
+
52
+ namespace :doc do
53
+ desc 'Generate Yard documentation'
54
+ YARD::Rake::YardocTask.new(:yard) do |yd|
55
+ yard = config.yard
56
+
57
+ incl = Regexp.new(yard.include.join('|'))
58
+ excl = Regexp.new(yard.exclude.join('|'))
59
+ yd.files = config.gem.files.find_all do |fn|
60
+ case fn
61
+ when excl; false
62
+ when incl; true
63
+ else false end
64
+ end
65
+
66
+ yd.options << '--main' << yard.main
67
+ yd.options << '--output-dir' << yard.dir
68
+ yd.options << '--title' << "#{config.name}-#{config.version} Documentation"
69
+
70
+ yd.options.concat(yard.opts)
71
+ end
72
+
73
+ task :clobber_yard do
74
+ rm_r config.yard.dir rescue nil
75
+ end
76
+ end # namespace :doc
77
+
78
+ desc 'Alias to doc:yard'
79
+ task :doc => 'doc:yard'
80
+
81
+ task :clobber => %w(doc:clobber_yard)
82
+ end
83
+
84
+ end
85
+
86
+ # EOF
@@ -0,0 +1 @@
1
+ 1.0.0
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bones-yard
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Tim Pease
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-17 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: bones
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 19
30
+ segments:
31
+ - 3
32
+ - 5
33
+ - 0
34
+ version: 3.5.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: yard
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 27
46
+ segments:
47
+ - 0
48
+ - 5
49
+ - 8
50
+ version: 0.5.8
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: bones
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 19
62
+ segments:
63
+ - 3
64
+ - 5
65
+ - 0
66
+ version: 3.5.0
67
+ type: :development
68
+ version_requirements: *id003
69
+ description: |-
70
+ The yard package for Mr Bones provides tasks to incorporate Yard based
71
+ documentation into bones based projects.
72
+ email: tim.pease@gmail.com
73
+ executables: []
74
+
75
+ extensions: []
76
+
77
+ extra_rdoc_files:
78
+ - History.txt
79
+ - README.txt
80
+ - version.txt
81
+ files:
82
+ - History.txt
83
+ - README.txt
84
+ - Rakefile
85
+ - lib/bones/plugins/rubyforge.rb
86
+ - lib/bones/plugins/yard.rb
87
+ - version.txt
88
+ has_rdoc: true
89
+ homepage: http://github.com/TwP/bones-yard
90
+ licenses: []
91
+
92
+ post_install_message:
93
+ rdoc_options:
94
+ - --main
95
+ - README.txt
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
106
+ version: "0"
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ hash: 3
113
+ segments:
114
+ - 0
115
+ version: "0"
116
+ requirements: []
117
+
118
+ rubyforge_project: bones-yard
119
+ rubygems_version: 1.3.7
120
+ signing_key:
121
+ specification_version: 3
122
+ summary: The yard package for Mr Bones provides tasks to incorporate Yard based documentation into bones based projects
123
+ test_files: []
124
+