Skip to content

Commit

Permalink
Replace project template files with newer templates for doc publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
raggi committed Jan 16, 2009
1 parent 7787ca1 commit 8bf557a
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 127 deletions.
1 change: 0 additions & 1 deletion Manifest.txt
Expand Up @@ -7,7 +7,6 @@ spec/.bacon
spec/helper.rb spec/helper.rb
spec/runner spec/runner
spec/spec_rubyw_helper.rb spec/spec_rubyw_helper.rb
tasks/ann.rake
tasks/autospec.rake tasks/autospec.rake
tasks/bacon.rake tasks/bacon.rake
tasks/bones.rake tasks/bones.rake
Expand Down
2 changes: 1 addition & 1 deletion lib/rubyw_helper.rb
Expand Up @@ -3,7 +3,7 @@


class RubywHelper class RubywHelper


Version = VERSION = '0.1.3' Version = VERSION = '0.1.4'
def self.version; Version; end def self.version; Version; end


app_name = File.basename($0) app_name = File.basename($0)
Expand Down
44 changes: 44 additions & 0 deletions rubyw_helper.gemspec
@@ -0,0 +1,44 @@
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{rubyw_helper}
s.version = "0.1.3"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["James Tucker"]
s.date = %q{2009-01-16}
s.description = %q{A simple redirector for use when you just want to safely redirect stdio. Simply encapsulates a few different safety mechanisms when redirecting stdio, with the primary goal of making it easier to write apps that run under rubyw.exe, where ruby loads with stdio closed. Whilst the primary intention for use is under win32, and was actually developed as an external helper for specifically win32-service usage, this gem may be useful to some other folks on other platforms. It is not win32 specific.}
s.email = %q{raggi@rubyforge.org}
s.extra_rdoc_files = ["History.txt", "README.rdoc"]
s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "lib/rubyw_helper.rb", "spec/.bacon", "spec/helper.rb", "spec/runner", "spec/spec_rubyw_helper.rb", "tasks/autospec.rake", "tasks/bacon.rake", "tasks/bones.rake", "tasks/gem.rake", "tasks/git.rake", "tasks/manifest.rake", "tasks/notes.rake", "tasks/post_load.rake", "tasks/rdoc.rake", "tasks/rubyforge.rake", "tasks/setup.rb"]
s.has_rdoc = true
s.homepage = %q{http://github.com/raggi/rubyw_helper}
s.rdoc_options = ["--main", "README.rdoc"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{libraggi}
s.rubygems_version = %q{1.3.1}
s.summary = %q{A simple redirector for use when you just want to safely redirect stdio}
s.test_files = ["spec/spec_rubyw_helper.rb"]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<exception_string>, [">= 0"])
s.add_development_dependency(%q<rake>, [">= 0"])
s.add_development_dependency(%q<bones>, [">= 0"])
s.add_development_dependency(%q<bacon>, [">= 0"])
else
s.add_dependency(%q<exception_string>, [">= 0"])
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<bones>, [">= 0"])
s.add_dependency(%q<bacon>, [">= 0"])
end
else
s.add_dependency(%q<exception_string>, [">= 0"])
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<bones>, [">= 0"])
s.add_dependency(%q<bacon>, [">= 0"])
end
end
81 changes: 0 additions & 81 deletions tasks/ann.rake

This file was deleted.

2 changes: 2 additions & 0 deletions tasks/bacon.rake
@@ -1,5 +1,7 @@
desc "Run the executable test specifications"
task :spec do task :spec do
ruby 'spec/runner' ruby 'spec/runner'
end end


desc "Run the executable test specifications"
task :test => :spec task :test => :spec
12 changes: 12 additions & 0 deletions tasks/gem.rake
Expand Up @@ -18,6 +18,9 @@ namespace :gem do
PROJ.gem.dependencies.each do |dep| PROJ.gem.dependencies.each do |dep|
s.add_dependency(*dep) s.add_dependency(*dep)
end end
PROJ.gem.development_dependencies.each do |dep|
s.add_development_dependency(*dep)
end


s.files = PROJ.gem.files s.files = PROJ.gem.files
s.executables = PROJ.gem.executables.map {|fn| File.basename(fn)} s.executables = PROJ.gem.executables.map {|fn| File.basename(fn)}
Expand Down Expand Up @@ -114,6 +117,15 @@ namespace :gem do
sh "#{SUDO} #{GEM} cleanup #{PROJ.gem._spec.name}" sh "#{SUDO} #{GEM} cleanup #{PROJ.gem._spec.name}"
end end


file "#{PROJ.name}.gemspec" => PROJ.gem._spec.files do |t|
open(t.name, 'w') { |f| f.write PROJ.gem._spec.to_ruby }
end
CLOBBER.include("#{PROJ.name}.gemspec")

desc 'Generate gemspec'
task :spec => "#{PROJ.name}.gemspec"
task :release => :spec

end # namespace :gem end # namespace :gem


desc 'Alias to gem:package' desc 'Alias to gem:package'
Expand Down
8 changes: 4 additions & 4 deletions tasks/post_load.rake
Expand Up @@ -3,9 +3,11 @@
# This file does not define any rake tasks. It is used to load some project # This file does not define any rake tasks. It is used to load some project
# settings if they are not defined by the user. # settings if they are not defined by the user.


PROJ.rdoc.main ||= PROJ.readme_file
PROJ.rdoc.dir ||= File.join('doc', PROJ.name)

PROJ.rdoc.exclude << "^#{Regexp.escape(PROJ.manifest_file)}$" PROJ.rdoc.exclude << "^#{Regexp.escape(PROJ.manifest_file)}$"
PROJ.exclude << ["^#{Regexp.escape(PROJ.ann.file)}$", PROJ.exclude << ["^#{Regexp.escape(PROJ.rdoc.dir)}/",
"^#{Regexp.escape(PROJ.rdoc.dir)}/",
"^#{Regexp.escape(PROJ.rcov.dir)}/"] "^#{Regexp.escape(PROJ.rcov.dir)}/"]


flatten_arrays = lambda do |this,os| flatten_arrays = lambda do |this,os|
Expand Down Expand Up @@ -34,6 +36,4 @@ PROJ.gem.files ||=


PROJ.gem.executables ||= PROJ.gem.files.find_all {|fn| fn =~ %r/^bin/} PROJ.gem.executables ||= PROJ.gem.files.find_all {|fn| fn =~ %r/^bin/}


PROJ.rdoc.main ||= PROJ.readme_file

# EOF # EOF
2 changes: 1 addition & 1 deletion tasks/rubyforge.rake
Expand Up @@ -46,7 +46,7 @@ namespace :doc do
host = "#{config['username']}@rubyforge.org" host = "#{config['username']}@rubyforge.org"
remote_dir = "/var/www/gforge-projects/#{PROJ.rubyforge.name}/" remote_dir = "/var/www/gforge-projects/#{PROJ.rubyforge.name}/"
remote_dir << PROJ.rdoc.remote_dir if PROJ.rdoc.remote_dir remote_dir << PROJ.rdoc.remote_dir if PROJ.rdoc.remote_dir
local_dir = PROJ.rdoc.dir local_dir = File.dirname(PROJ.rdoc.dir)


Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
end end
Expand Down
48 changes: 9 additions & 39 deletions tasks/setup.rb
Expand Up @@ -18,7 +18,8 @@ class OpenStruct; undef :gem; end
:email => nil, :email => nil,
:url => "\000", :url => "\000",
:version => ENV['VERSION'] || '0.0.0', :version => ENV['VERSION'] || '0.0.0',
:exclude => %w(tmp$ bak$ ~$ CVS \.svn/ \.git/ ^pkg/), :exclude => %w(tmp$ bak$ ~$ CVS \.git/ \.hg/ \.svn/ ^pkg/ ^doc/ \.DS_Store
\.hgignore \.gitignore \.dotest \.swp$ .*\.gemspec$),
:release_name => ENV['RELEASE'], :release_name => ENV['RELEASE'],


# System Defaults # System Defaults
Expand All @@ -28,26 +29,10 @@ class OpenStruct; undef :gem; end
:manifest_file => 'Manifest.txt', :manifest_file => 'Manifest.txt',
:readme_file => 'README.rdoc', :readme_file => 'README.rdoc',


# Announce
:ann => OpenStruct.new(
:file => 'announcement.txt',
:text => nil,
:paragraphs => [],
:email => {
:from => nil,
:to => %w(ruby-talk@ruby-lang.org),
:server => 'localhost',
:port => 25,
:domain => ENV['HOSTNAME'],
:acct => nil,
:passwd => nil,
:authtype => :plain
}
),

# Gem Packaging # Gem Packaging
:gem => OpenStruct.new( :gem => OpenStruct.new(
:dependencies => [], :dependencies => [],
:development_dependencies => ['rake', 'bones', 'bacon'],
:executables => nil, :executables => nil,
:extensions => FileList['ext/**/extconf.rb'], :extensions => FileList['ext/**/extconf.rb'],
:files => nil, :files => nil,
Expand All @@ -59,7 +44,7 @@ class OpenStruct; undef :gem; end
# File Annotations # File Annotations
:notes => OpenStruct.new( :notes => OpenStruct.new(
:exclude => %w(^tasks/setup\.rb$), :exclude => %w(^tasks/setup\.rb$),
:extensions => %w(.txt .rb .erb) << '', :extensions => %w(.txt .rb .erb .rdoc) << '',
:tags => %w(FIXME OPTIMIZE TODO) :tags => %w(FIXME OPTIMIZE TODO)
), ),


Expand All @@ -77,7 +62,7 @@ class OpenStruct; undef :gem; end
:include => %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$), :include => %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$),
:exclude => %w(extconf\.rb$), :exclude => %w(extconf\.rb$),
:main => nil, :main => nil,
:dir => 'doc', :dir => nil,
:remote_dir => nil :remote_dir => nil
), ),


Expand All @@ -86,25 +71,10 @@ class OpenStruct; undef :gem; end
:name => "\000" :name => "\000"
), ),


# Rspec # Tests
:spec => OpenStruct.new(
:files => FileList['spec/**/*_spec.rb'],
:opts => []
),

# Subversion Repository
:svn => OpenStruct.new(
:root => nil,
:path => '',
:trunk => 'trunk',
:tags => 'tags',
:branches => 'branches'
),

# Test::Unit
:test => OpenStruct.new( :test => OpenStruct.new(
:files => FileList['test/**/test_*.rb'], :files => FileList['{test,spec}/{{test,spec}_*.rb,*_spec.rb}'],
:file => 'test/all.rb', :file => '',
:opts => [] :opts => []
) )
) )
Expand Down Expand Up @@ -166,7 +136,7 @@ def quiet( &block )
# specified. # specified.
# #
# changes = paragraphs_of('History.txt', 0..1).join("\n\n") # changes = paragraphs_of('History.txt', 0..1).join("\n\n")
# summary, *description = paragraphs_of('README.txt', 3, 3..8) # summary, *description = paragraphs_of('README.rdoc', 3, 3..8)
# #
def paragraphs_of( path, *paragraphs ) def paragraphs_of( path, *paragraphs )
title = String === paragraphs.first ? paragraphs.shift : nil title = String === paragraphs.first ? paragraphs.shift : nil
Expand Down

0 comments on commit 8bf557a

Please sign in to comment.