diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..0af9668 --- /dev/null +++ b/Gemfile @@ -0,0 +1,14 @@ +source "http://rubygems.org" +# Add dependencies required to use your gem here. +# Example: +# gem "activesupport", ">= 2.3.5" + +# Add dependencies to develop your gem here. +# Include everything needed to run rake, tests, features, etc. + +group :development do + gem "shoulda", ">= 0" + gem "bundler", "~> 1.0.0" + gem "jeweler", "~> 1.6.4" + gem "rcov", ">= 0" +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..c964144 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,20 @@ +GEM + remote: http://rubygems.org/ + specs: + git (1.2.5) + jeweler (1.6.4) + bundler (~> 1.0) + git (>= 1.2.5) + rake + rake (0.9.2) + rcov (0.9.10) + shoulda (2.11.3) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.0.0) + jeweler (~> 1.6.4) + rcov + shoulda diff --git a/LICENSE.txt b/LICENSE.txt index 77049e6..98c754f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -18,4 +18,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Rakefile b/Rakefile index 6923ff3..5de20d4 100644 --- a/Rakefile +++ b/Rakefile @@ -1,51 +1,53 @@ +# encoding: utf-8 + require 'rubygems' +require 'bundler' +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + $stderr.puts e.message + $stderr.puts "Run `bundle install` to install missing gems" + exit e.status_code +end require 'rake' -require 'rake/clean' -require 'rake/testtask' -require 'rake/packagetask' -require 'rake/gempackagetask' -require 'rake/rdoctask' -require 'rake/contrib/rubyforgepublisher' -require 'fileutils' -require 'hoe' - -include FileUtils -require File.join(File.dirname(__FILE__), 'lib', 'htmldoc', 'version') -AUTHOR = "Craig R Webster" -EMAIL = "craig@barkingiguana.com" -DESCRIPTION = "A wrapper around HTMLDOC, a PDF generation utility" -GEM_NAME = "htmldoc" -RUBYFORGE_PROJECT = "htmldoc" -HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org" +require 'jeweler' +Jeweler::Tasks.new do |gem| + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options + gem.name = "htmldoc-hulihanapplications" + gem.homepage = "http://github.com/hulihanapplications/htmldoc" + gem.license = "MIT" + gem.summary = %Q{Wrapper around HTMLDOC (canonical repository)} + gem.description = %Q{A fork of the craigw's htmldoc: https://github.com/craigw/htmldoc.} + gem.email = "dave@hulihanapplications.com" + gem.authors = ["Hulihan Applications", "Dave Hulihan"] + # dependencies defined in Gemfile +end +Jeweler::RubygemsDotOrgTasks.new -NAME = "HTMLDOC" -RDOC_OPTS = ['--quiet', '--title', "htmldoc documentation", - "--opname", "index.html", - "--line-numbers", - "--main", "README", - "--inline-source"] +require 'rake/testtask' +Rake::TestTask.new(:test) do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true +end -class Hoe - def extra_deps - @extra_deps.reject { |x| Array(x).first == 'hoe' } - end +require 'rcov/rcovtask' +Rcov::RcovTask.new do |test| + test.libs << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true + test.rcov_opts << '--exclude "gems/*"' end -# Generate all the Rake tasks -# Run 'rake -T' to see list of generated tasks (from gem root directory) -hoe = Hoe.new(GEM_NAME, PDF::HTMLDOC::VERSION::STRING) do |p| +task :default => :test - p.author = AUTHOR - p.email = EMAIL - p.summary = DESCRIPTION - p.url = HOMEPATH - p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT - p.test_globs = ["test/**/*_test.rb"] - p.clean_globs = CLEAN #An array of file patterns to delete on clean. - p.description = p.paragraphs_of('README.txt', 1..1).join("\n\n") - p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") +require 'rake/rdoctask' +Rake::RDocTask.new do |rdoc| + version = File.exist?('VERSION') ? File.read('VERSION') : "" - #p.extra_deps - An array of rubygem dependencies. - #p.spec_extras - A hash of extra values to set in the gemspec. + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "lablr #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') end diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..72f9fa8 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.2.4 \ No newline at end of file diff --git a/htmldoc-hulihanapplications.gemspec b/htmldoc-hulihanapplications.gemspec new file mode 100644 index 0000000..e63dd48 --- /dev/null +++ b/htmldoc-hulihanapplications.gemspec @@ -0,0 +1,64 @@ +# Generated by jeweler +# DO NOT EDIT THIS FILE DIRECTLY +# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = %q{htmldoc-hulihanapplications} + s.version = "0.2.4" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Hulihan Applications", "Dave Hulihan"] + s.date = %q{2011-09-09} + s.description = %q{A fork of the craigw's htmldoc: https://github.com/craigw/htmldoc.} + s.email = %q{dave@hulihanapplications.com} + s.extra_rdoc_files = [ + "LICENSE.txt", + "README.txt" + ] + s.files = [ + "Gemfile", + "Gemfile.lock", + "History.txt", + "LICENSE.txt", + "Manifest.txt", + "README.txt", + "Rakefile", + "VERSION", + "htmldoc-hulihanapplications.gemspec", + "init.rb", + "lib/htmldoc.rb", + "lib/htmldoc/version.rb", + "setup.rb", + "test/basic_test.rb", + "test/generation_test.rb", + "test/test_helper.rb" + ] + s.homepage = %q{http://github.com/hulihanapplications/htmldoc} + s.licenses = ["MIT"] + s.require_paths = ["lib"] + s.rubygems_version = %q{1.6.2} + s.summary = %q{Wrapper around HTMLDOC (canonical repository)} + + if s.respond_to? :specification_version then + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + s.add_development_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, ["~> 1.0.0"]) + s.add_development_dependency(%q, ["~> 1.6.4"]) + s.add_development_dependency(%q, [">= 0"]) + else + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, ["~> 1.0.0"]) + s.add_dependency(%q, ["~> 1.6.4"]) + s.add_dependency(%q, [">= 0"]) + end + else + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, ["~> 1.0.0"]) + s.add_dependency(%q, ["~> 1.6.4"]) + s.add_dependency(%q, [">= 0"]) + end +end + diff --git a/lib/htmldoc.rb b/lib/htmldoc.rb index 989de38..19006bf 100644 --- a/lib/htmldoc.rb +++ b/lib/htmldoc.rb @@ -32,7 +32,7 @@ class HTMLDoc :pagelayout, :pagemode, :path, :permissions, :portrait, :referer, :right, :size, :textcolor, :textfont, :titlefile, :titleimage, :tocfooter, :tocheader, :toclevels, :toctitle, - :user_password, :webpage] + :top, :user_password, :webpage] @@extra_options = [:compression, :duplex, :embedfonts, :encryption, :jpeg, :links, :localfiles, :numbered, :pscommands, :strict, :title,