Permalink
Browse files

Added tests.

Fixed problems with using set_or_append; now uses set_or_prepend.
Refactored how setting and getting of html options is done.
Changed some of the documentation.
Fixed other miscellaneous issues.
  • Loading branch information...
1 parent b66abee commit 834015769d6aef162b4a0f4ef2b6978730823f64 @obrie obrie committed Dec 15, 2006
Showing with 1,095 additions and 80 deletions.
  1. +27 −3 README
  2. +60 −1 Rakefile
  3. +14 −0 config.yml
  4. +0 −2 init.rb
  5. +79 −70 lib/table_helper.rb
  6. +54 −0 test/border_test.rb
  7. +67 −0 test/cell_test.rb
  8. +610 −0 test/collection_table_test.rb
  9. +154 −0 test/row_test.rb
  10. +14 −4 test/table_helper_test.rb
  11. +16 −0 test/test_helper.rb
View
30 README
@@ -1,4 +1,28 @@
-TableHelper
-===========
+= table_helper
+
+table_helper adds a helper method for generating HTML tables from collections.
+
+== Resources
+
+Wiki
+
+* http://wiki.pluginaweek.org/Table_helper
+
+Announcement
+
+* http://www.pluginaweek.org/
+
+Source
+
+* http://svn.pluginaweek.org/trunk/plugins/action_pack/table_helper
+
+Development
+
+* http://dev.pluginaweek.org/browser/trunk/plugins/action_pack/table_helper
+
+== Description
+
+
+
+== Testing
-Description goes here
View
@@ -1,6 +1,12 @@
-require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
+require 'rake/gempackagetask'
+require 'rake/contrib/sshpublisher'
+
+PKG_NAME = 'table_helper'
+PKG_VERSION = '0.0.1'
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
+RUBY_FORGE_PROJECT = 'pluginaweek'
desc 'Default: run unit tests.'
task :default => :test
@@ -20,3 +26,56 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
+
+spec = Gem::Specification.new do |s|
+ s.name = PKG_NAME
+ s.version = PKG_VERSION
+ s.platform = Gem::Platform::RUBY
+ s.summary = 'Adds a helper method for generating HTML tables from collections'
+
+ s.files = FileList['{lib,tasks,test}/**/*'].to_a + %w(init.rb MIT-LICENSE Rakefile README)
+ s.require_path = 'lib'
+ s.autorequire = 'table_helper'
+ s.has_rdoc = true
+ s.test_files = Dir['test/**/*_test.rb']
+
+ s.author = 'Aaron Pfeifer and Neil Abraham'
+ s.email = 'info@pluginaweek.org'
+ s.homepage = 'http://www.pluginaweek.org'
+end
+
+Rake::GemPackageTask.new(spec) do |p|
+ p.gem_spec = spec
+ p.need_tar = true
+ p.need_zip = true
+end
+
+desc 'Publish the beta gem'
+task :pgem => [:package] do
+ Rake::SshFilePublisher.new('pluginaweek@pluginaweek.org', '/home/pluginaweek/gems.pluginaweek.org/gems', 'pkg', "#{PKG_FILE_NAME}.gem").upload
+end
+
+desc 'Publish the API documentation'
+task :pdoc => [:rdoc] do
+ Rake::SshDirPublisher.new('pluginaweek@pluginaweek.org', "/home/pluginaweek/api.pluginaweek.org/#{PKG_NAME}", 'rdoc').upload
+end
+
+desc 'Publish the API docs and gem'
+task :publish => [:pdoc, :release]
+
+desc 'Publish the release files to RubyForge.'
+task :release => [:gem, :package] do
+ require 'rubyforge'
+
+ options = {'cookie_jar' => RubyForge::COOKIE_F}
+ options['password'] = ENV['RUBY_FORGE_PASSWORD'] if ENV['RUBY_FORGE_PASSWORD']
+ ruby_forge = RubyForge.new("./config.yml", options)
+ ruby_forge.login
+
+ %w( gem tgz zip ).each do |ext|
+ file = "pkg/#{PKG_FILE_NAME}.#{ext}"
+ puts "Releasing #{File.basename(file)}..."
+
+ ruby_forge.add_release(RUBY_FORGE_PROJECT, PKG_NAME, PKG_VERSION, file)
+ end
+end
View
@@ -0,0 +1,14 @@
+uri: http://rubyforge.org
+username: pluginaweek
+is_private: false
+rubyforge:
+ group_ids:
+ pluginaweek: 2608
+ package_ids:
+ table_helper:
+ type_ids:
+ .zip: 3000
+ .tgz: 5000
+ .gem: 1400
+ processor_ids:
+ Any: 8000
View
@@ -1,3 +1 @@
-require 'set_or_append'
-
require 'table_helper'
Oops, something went wrong.

0 comments on commit 8340157

Please sign in to comment.