Permalink
Browse files

Administrative Changes

* Convert testing from test/spec -> shoulda
* Convert packaging from bones -> echoe
  • Loading branch information...
1 parent d226f07 commit 61c7d14b57f72af1bb40d8ed39dfa5052eced87f Bruce Williams committed Aug 17, 2008
Showing with 177 additions and 650 deletions.
  1. +25 −0 CHANGELOG
  2. +0 −29 HISTORY.rdoc
  3. +6 −12 Manifest.txt → Manifest
  4. +18 −20 Rakefile
  5. +0 −48 tasks/doc.rake
  6. +0 −110 tasks/gem.rake
  7. +0 −49 tasks/manifest.rake
  8. +0 −26 tasks/post_load.rake
  9. +0 −205 tasks/setup.rb
  10. +0 −38 tasks/test.rake
  11. +55 −51 test/document_test.rb
  12. +18 −14 test/filter_test.rb
  13. +48 −44 test/tempdir_test.rb
  14. +7 −4 test/test_helper.rb
View
@@ -0,0 +1,25 @@
+v1.99.0 2008-04-20
+
+ Released RTeX v1.99.0 as a Rubygem, with a standalone executable for PDF generation
+ and support for plugin installation from the executable.
+
+ This release requires Rails >= 2.0.1
+
+ Thanks to:
+ * Jonas Bähr for a patch with additional LaTeX escaping
+ * Fouad Mardini for a TemplateHandler patch
+
+v1.0.0+
+
+ Added quite a few *long* overdue fixes & enhancements sent in by various people.
+
+ * Added latex escaping 'l' method (Thanks, Benjamin Quorning)
+ * Added support for @options_for_rtex hash for configuration:
+ * Added :tempdir option, and changed default temporary directory
+ (Thanks, Francesco Levorato)
+ * Added :preprocess option to support running through latex before pdflatex
+ (Thanks Charles Lesburg, Benjamin Quorning)
+ * Moved old @filename setting to :filename option in this hash
+
+ If you're using the same settings for @options_for_rtex often, you might want to
+ put your assignment in a before_filter (perhaps overriding :filename, etc in your actions).
View
@@ -1,29 +0,0 @@
-2008-04-20
-
-Released RTeX v1.99.0 as a Rubygem, with a standalone executable for PDF generation
-and support for plugin installation from the executable.
-
-This release requires Rails >= 2.0.1
-
-Thanks to:
-* Jonas Bähr for a patch with additional LaTeX escaping
-* Fouad Mardini for a TemplateHandler patch
-
-2007
-
-No active development, maintenance primarily by Wiebe Cazemier
-
-2006-07-27
-
-Added quite a few *long* overdue fixes & enhancements sent in by various people.
-
-* Added latex escaping 'l' method (Thanks, Benjamin Quorning)
-* Added support for @options_for_rtex hash for configuration:
- * Added :tempdir option, and changed default temporary directory
- (Thanks, Francesco Levorato)
- * Added :preprocess option to support running through latex before pdflatex
- (Thanks Charles Lesburg, Benjamin Quorning)
- * Moved old @filename setting to :filename option in this hash
-
-If you're using the same settings for @options_for_rtex often, you might want to
-put your assignment in a before_filter (perhaps overriding :filename, etc in your actions).
View
@@ -1,24 +1,18 @@
-HISTORY.rdoc
-Manifest.txt
-README.rdoc
-README_RAILS.rdoc
-Rakefile
bin/rtex
+CHANGELOG
init.rb
-lib/rtex.rb
lib/rtex/document.rb
lib/rtex/escaping.rb
lib/rtex/framework/merb.rb
lib/rtex/framework/rails.rb
lib/rtex/tempdir.rb
lib/rtex/version.rb
+lib/rtex.rb
+Manifest
rails/init.rb
-tasks/doc.rake
-tasks/gem.rake
-tasks/manifest.rake
-tasks/post_load.rake
-tasks/setup.rb
-tasks/test.rake
+Rakefile
+README.rdoc
+README_RAILS.rdoc
test/document_test.rb
test/filter_test.rb
test/fixtures/first.tex
View
@@ -1,23 +1,21 @@
-require File.dirname(__FILE__) << "/lib/rtex/version"
-
-load 'tasks/setup.rb'
-
-PROJ.name = 'rtex'
-PROJ.authors = ['Bruce Williams', 'Wiebe Cazemier']
-PROJ.email = ['bruce@codefluency.com']
-PROJ.url = 'http://rtex.rubyforge.org'
-PROJ.rubyforge_name = 'rtex'
+require 'rubygems'
+require 'echoe'
-PROJ.libs = %w[]
-PROJ.ruby_opts = []
-PROJ.test_opts = []
-
-PROJ.rdoc_main = 'README.rdoc'
-PROJ.rdoc_include.push 'README.rdoc', 'README_RAILS.rdoc'
-
-PROJ.description = "LaTeX preprocessor for PDF generation; Rails plugin"
-PROJ.summary = PROJ.description
+require File.dirname(__FILE__) << "/lib/rtex/version"
-PROJ.version = RTeX::Version::STRING
+Echoe.new 'rtex' do |p|
+ p.version = RTeX::Version::STRING
+ p.author = ['Bruce Williams', 'Wiebe Cazemier']
+ p.email = 'bruce@codefluency.com'
+ p.project = 'rtex'
+ p.summary = "LaTeX preprocessor for PDF generation; Rails plugin"
+ p.url = "http://rtex.rubyforge.org"
+ p.include_rakefile = true
+ p.development_dependencies = %w(Shoulda echoe)
+ p.rcov_options = '--exclude gems --exclude version.rb --sort coverage --text-summary --html -o coverage'
+ p.ignore_pattern = /^(pkg|doc|site)|\.svn|CVS|\.bzr|\.DS|\.git/
+end
-task 'gem:package' => 'manifest:assert'
+task :coverage do
+ system "open coverage/index.html" if PLATFORM['darwin']
+end
View
@@ -1,48 +0,0 @@
-# $Id$
-
-require 'rake/rdoctask'
-
-namespace :doc do
-
- desc 'Generate RDoc documentation'
- Rake::RDocTask.new do |rd|
- rd.main = PROJ.rdoc_main
- rd.rdoc_dir = PROJ.rdoc_dir
-
- incl = Regexp.new(PROJ.rdoc_include.join('|'))
- excl = Regexp.new(PROJ.rdoc_exclude.join('|'))
- files = PROJ.files.find_all do |fn|
- case fn
- when excl; false
- when incl; true
- else false end
- end
- rd.rdoc_files.push(*files)
-
- title = "#{PROJ.name}-#{PROJ.version} Documentation"
- title = "#{PROJ.rubyforge_name}'s " + title if PROJ.rubyforge_name != title
-
- rd.options << "-t #{title}"
- rd.options.concat(PROJ.rdoc_opts)
- end
-
- desc 'Generate ri locally for testing'
- task :ri => :clobber_ri do
- sh "#{RDOC} --ri -o ri ."
- end
-
- task :clobber_ri do
- rm_r 'ri' rescue nil
- end
-
-end # namespace :doc
-
-desc 'Alias to doc:rdoc'
-task :doc => 'doc:rdoc'
-
-desc 'Remove all build products'
-task :clobber => %w(doc:clobber_rdoc doc:clobber_ri)
-
-remove_desc_for_task %w(doc:clobber_rdoc)
-
-# EOF
View
@@ -1,110 +0,0 @@
-# $Id$
-
-require 'rake/gempackagetask'
-
-namespace :gem do
-
- PROJ.spec = Gem::Specification.new do |s|
- s.name = PROJ.name
- s.version = PROJ.version
- s.summary = PROJ.summary
- s.authors = Array(PROJ.authors)
- s.email = PROJ.email
- s.homepage = Array(PROJ.url).first
- s.rubyforge_project = PROJ.rubyforge_name
- s.post_install_message = PROJ.post_install_message
-
- s.description = PROJ.description
-
- PROJ.dependencies.each do |dep|
- s.add_dependency(*dep)
- end
-
- s.files = PROJ.files
- s.executables = PROJ.executables.map {|fn| File.basename(fn)}
- s.extensions = PROJ.files.grep %r/extconf\.rb$/
-
- s.bindir = 'bin'
- dirs = Dir["{#{PROJ.libs.join(',')}}"]
- s.require_paths = dirs unless dirs.empty?
-
- incl = Regexp.new(PROJ.rdoc_include.join('|'))
- excl = PROJ.rdoc_exclude.dup.concat %w[\.rb$ ^(\.\/|\/)?ext]
- excl = Regexp.new(excl.join('|'))
- rdoc_files = PROJ.files.find_all do |fn|
- case fn
- when excl; false
- when incl; true
- else false end
- end
- s.rdoc_options = PROJ.rdoc_opts + ['--main', PROJ.rdoc_main]
- s.extra_rdoc_files = rdoc_files
- s.has_rdoc = true
-
- if test ?f, PROJ.test_file
- s.test_file = PROJ.test_file
- else
- s.test_files = PROJ.tests.to_a
- end
-
- # Do any extra stuff the user wants
-# spec_extras.each do |msg, val|
-# case val
-# when Proc
-# val.call(s.send(msg))
-# else
-# s.send "#{msg}=", val
-# end
-# end
- end
-
- desc 'Show information about the gem'
- task :debug do
- puts PROJ.spec.to_ruby
- end
-
- pkg = Rake::PackageTask.new(PROJ.name, PROJ.version) do |pkg|
- pkg.need_tar = PROJ.need_tar
- pkg.need_zip = PROJ.need_zip
- pkg.package_files += PROJ.spec.files
- end
- Rake::Task['gem:package'].instance_variable_set(:@full_comment, nil)
-
- gem_file = if PROJ.spec.platform == Gem::Platform::RUBY
- "#{pkg.package_name}.gem"
- else
- "#{pkg.package_name}-#{PROJ.spec.platform}.gem"
- end
-
- desc "Build the gem file #{gem_file}"
- task :package => "#{pkg.package_dir}/#{gem_file}"
-
- file "#{pkg.package_dir}/#{gem_file}" => [pkg.package_dir] + PROJ.spec.files do
- when_writing("Creating GEM") {
- Gem::Builder.new(PROJ.spec).build
- verbose(true) {
- mv gem_file, "#{pkg.package_dir}/#{gem_file}"
- }
- }
- end
-
- desc 'Install the gem'
- task :install => [:clobber, :package] do
- sh "#{SUDO} #{GEM} install pkg/#{PROJ.spec.full_name}"
- end
-
- desc 'Uninstall the gem'
- task :uninstall do
- sh "#{SUDO} #{GEM} uninstall -v '#{PROJ.version}' -x #{PROJ.name}"
- end
-
-end # namespace :gem
-
-desc 'Alias to gem:package'
-task :gem => 'gem:package'
-
-task :clobber => 'gem:clobber_package'
-
-remove_desc_for_task %w(gem:clobber_package)
-
-# EOF
View
@@ -1,49 +0,0 @@
-# $Id$
-
-require 'find'
-
-namespace :manifest do
-
- desc 'Verify the manifest'
- task :check do
- fn = PROJ.manifest_file + '.tmp'
- files = manifest_files
-
- File.open(fn, 'w') {|fp| fp.puts files}
- lines = %x(#{DIFF} -du #{PROJ.manifest_file} #{fn}).split("\n")
- if HAVE_FACETS_ANSICODE and ENV.has_key?('TERM')
- lines.map! do |line|
- case line
- when %r/^(-{3}|\+{3})/; nil
- when %r/^@/; Console::ANSICode.blue line
- when %r/^\+/; Console::ANSICode.green line
- when %r/^\-/; Console::ANSICode.red line
- else line end
- end
- end
- puts lines.compact
- rm fn rescue nil
- end
-
- desc 'Create a new manifest'
- task :create do
- files = manifest_files
- unless test(?f, PROJ.manifest_file)
- files << PROJ.manifest_file
- files.sort!
- end
- File.open(PROJ.manifest_file, 'w') {|fp| fp.puts files}
- end
-
- task :assert do
- files = manifest_files
- manifest = File.read(PROJ.manifest_file).split($/)
- raise "ERROR: #{PROJ.manifest_file} is out of date" unless files == manifest
- end
-
-end # namespace :manifest
-
-desc 'Alias to manifest:check'
-task :manifest => 'manifest:check'
-
-# EOF
View
@@ -1,26 +0,0 @@
-# $Id$
-
-# This file does not define any rake tasks. It is used to load some project
-# settings if they are not defined by the user.
-
-PROJ.rdoc_exclude << "^#{Regexp.escape(PROJ.manifest_file)}$"
-PROJ.exclude << "^#{Regexp.escape(PROJ.ann_file)}$"
-
-PROJ.changes ||= paragraphs_of(PROJ.history_file, 0..1).join("\n\n")
-
-PROJ.description ||= paragraphs_of(PROJ.readme_file, 'description').join("\n\n")
-
-PROJ.summary ||= PROJ.description.split('.').first
-
-PROJ.files ||=
- if test(?f, PROJ.manifest_file)
- files = File.readlines(PROJ.manifest_file).map {|fn| fn.chomp.strip}
- files.delete ''
- files
- else [] end
-
-PROJ.executables ||= PROJ.files.find_all {|fn| fn =~ %r/^bin/}
-
-PROJ.rdoc_main ||= PROJ.readme_file
-
-# EOF
Oops, something went wrong.

0 comments on commit 61c7d14

Please sign in to comment.