From 6bd43d11edcaaf028859d7219460e78ddee080c5 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Wed, 5 Nov 2008 18:50:11 -0500 Subject: [PATCH] Adding homebrew rake gem and rake clean --- Manifest.txt | 76 -------------------------------------------------- Rakefile | 51 +++++++++++++++++++++++---------- webrat.gemspec | 35 ----------------------- 3 files changed, 36 insertions(+), 126 deletions(-) delete mode 100644 Manifest.txt delete mode 100644 webrat.gemspec diff --git a/Manifest.txt b/Manifest.txt deleted file mode 100644 index 202bdc8..0000000 --- a/Manifest.txt +++ /dev/null @@ -1,76 +0,0 @@ -History.txt -MIT-LICENSE.txt -Manifest.txt -README.txt -Rakefile -TODO.txt -init.rb -install.rb -lib/webrat.rb -lib/webrat/core.rb -lib/webrat/core/area.rb -lib/webrat/core/assertions.rb -lib/webrat/core/field.rb -lib/webrat/core/flunk.rb -lib/webrat/core/form.rb -lib/webrat/core/label.rb -lib/webrat/core/link.rb -lib/webrat/core/logging.rb -lib/webrat/core/methods.rb -lib/webrat/core/mime.rb -lib/webrat/core/scope.rb -lib/webrat/core/select_option.rb -lib/webrat/core/session.rb -lib/webrat/core_extensions/blank.rb -lib/webrat/core_extensions/hash_with_indifferent_access.rb -lib/webrat/core_extensions/nil_to_param.rb -lib/webrat/mechanize.rb -lib/webrat/mechanize/mechanize_session.rb -lib/webrat/merb.rb -lib/webrat/merb/param_parser.rb -lib/webrat/rack/rack_session.rb -lib/webrat/rails.rb -lib/webrat/rails/rails_session.rb -lib/webrat/rails/redirect_actions.rb -lib/webrat/rails/session.rb -lib/webrat/selenium.rb -lib/webrat/selenium/location_strategy_javascript/button.js -lib/webrat/selenium/location_strategy_javascript/label.js -lib/webrat/selenium/location_strategy_javascript/webrat.js -lib/webrat/selenium/location_strategy_javascript/webratlink.js -lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js -lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js -lib/webrat/selenium/selenium_extensions.js -lib/webrat/selenium/selenium_session.rb -lib/webrat/sinatra/sinatra_session.rb -spec/api/basic_auth_spec.rb -spec/api/checks_spec.rb -spec/api/chooses_spec.rb -spec/api/clicks_area_spec.rb -spec/api/clicks_button_spec.rb -spec/api/clicks_link_spec.rb -spec/api/element_labeled_spec.rb -spec/api/fills_in_spec.rb -spec/api/reloads_spec.rb -spec/api/save_and_open_spec.rb -spec/api/selects_spec.rb -spec/api/should_not_see_spec.rb -spec/api/should_see_spec.rb -spec/api/visits_spec.rb -spec/api/within_spec.rb -spec/fakes/test_session.rb -spec/rcov.opts -spec/spec.opts -spec/spec_helper.rb -spec/webrat/core/field_spec.rb -spec/webrat/core/logging_spec.rb -spec/webrat/core/session_spec.rb -spec/webrat/mechanize/mechanize_session_spec.rb -spec/webrat/merb/helper.rb -spec/webrat/merb/indifferent_access_spec.rb -spec/webrat/merb/session_spec.rb -spec/webrat/rails/attaches_file_spec.rb -spec/webrat/rails/helper.rb -spec/webrat/rails/rails_session_spec.rb -spec/webrat/rails/rails_spec.rb -webrat.gemspec diff --git a/Rakefile b/Rakefile index 36f382d..cc3e288 100644 --- a/Rakefile +++ b/Rakefile @@ -1,24 +1,45 @@ require 'rubygems' +require "rake/gempackagetask" +require "rake/clean" require 'spec' require 'spec/rake/spectask' require 'spec/rake/verify_rcov' require './lib/webrat.rb' -# Hoe.new('webrat', Webrat::VERSION) do |p| -# p.rubyforge_name = 'webrat' -# p.summary = 'Ruby Acceptance Testing for Web applications' -# -# p.developer "Bryan Helmkamp", "bryan@brynary.com" -# p.developer "Seth Fitzsimmons", "seth@mojodna.net" -# -# p.description = p.paragraphs_of('README.txt', 4..6).join("\n\n") -# p.url = p.paragraphs_of('README.txt', 1).first.split("\n").first.strip -# p.changes = p.paragraphs_of('History.txt', 0..3).join("\n\n") -# -# p.extra_deps << ["hpricot", ">= 0.6"] -# -# p.remote_rdoc_dir = '' # Release to root -# end +############################################################################## +# Package && release +############################################################################## +spec = Gem::Specification.new do |s| + s.name = "webrat" + s.version = Webrat::VERSION + s.platform = Gem::Platform::RUBY + s.author = "Bryan Helmkamp" + s.email = "bryan" + "@" + "brynary.com" + s.homepage = "http://github.com/brynary/webrat" + s.summary = "Webrat. Ruby Acceptance Testing for Web applications" + s.bindir = "bin" + s.description = s.summary + s.require_path = "lib" + s.files = %w(History.txt init.rb install.rb MIT-LICENSE.txt README.txt Rakefile TODO.txt) + Dir["lib/**/*"] + + # rdoc + s.has_rdoc = true + s.extra_rdoc_files = %w(README.txt MIT-LICENSE.txt) + + # Dependencies + s.add_dependency "hpricot", ">= 0.6" +end + +Rake::GemPackageTask.new(spec) do |package| + package.gem_spec = spec +end + +desc 'Show information about the gem.' +task :debug_gem do + puts spec.to_ruby +end + +CLEAN.include ["pkg", "*.gem", "doc", "ri", "coverage"] desc "Upload rdoc to brynary.com" task :publish_rdoc => :docs do diff --git a/webrat.gemspec b/webrat.gemspec deleted file mode 100644 index b246f57..0000000 --- a/webrat.gemspec +++ /dev/null @@ -1,35 +0,0 @@ -Gem::Specification.new do |s| - s.name = %q{webrat} - s.version = "0.2.1" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Bryan Helmkamp", "Seth Fitzsimmons"] - s.date = %q{2008-10-13} - s.description = %q{When comparing Webrat with an in-browser testing solution like Watir or Selenium, the primary consideration should be how much JavaScript the application uses. In-browser testing is currently the only way to test JS, and that may make it a requirement for your project. If JavaScript is not central to your application, Webrat is a simpler, effective solution that will let you run your tests much faster and more frequently. Initial development was sponsored by [EastMedia](http://www.eastmedia.com). Synopsis --------} - s.email = ["bryan@brynary.com", "seth@mojodna.net"] - s.extra_rdoc_files = ["History.txt", "MIT-LICENSE.txt", "Manifest.txt", "README.txt", "TODO.txt"] - s.files = ["History.txt", "MIT-LICENSE.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "init.rb", "install.rb", "lib/webrat.rb", "lib/webrat/core.rb", "lib/webrat/core/assertions.rb", "lib/webrat/core/field.rb", "lib/webrat/core/flunk.rb", "lib/webrat/core/form.rb", "lib/webrat/core/label.rb", "lib/webrat/core/link.rb", "lib/webrat/core/logging.rb", "lib/webrat/core/scope.rb", "lib/webrat/core/select_option.rb", "lib/webrat/core/session.rb", "lib/webrat/mechanize.rb", "lib/webrat/mechanize/mechanize_session.rb", "lib/webrat/rails.rb", "lib/webrat/rails/rails_session.rb", "lib/webrat/rails/redirect_actions.rb", "lib/webrat/rails/session.rb", "lib/webrat/selenium.rb", "lib/webrat/selenium/selenium_session.rb", "mechanize_spike.rb", "selenium_spike.rb", "spec/api/attaches_file_spec.rb", "spec/api/checks_spec.rb", "spec/api/chooses_spec.rb", "spec/api/clicks_button_spec.rb", "spec/api/clicks_link_spec.rb", "spec/api/fills_in_spec.rb", "spec/api/reloads_spec.rb", "spec/api/save_and_open_spec.rb", "spec/api/selects_spec.rb", "spec/api/should_not_see_spec.rb", "spec/api/should_see_spec.rb", "spec/api/visits_spec.rb", "spec/api/within_spec.rb", "spec/fakes/test_session.rb", "spec/integration/rails_spec.rb", "spec/rcov.opts", "spec/spec.opts", "spec/spec_helper.rb", "spec/webrat/core/logging_spec.rb", "spec/webrat/core/session_spec.rb", "spec/webrat/rails/rails_session_spec.rb", "webrat.gemspec"] - s.has_rdoc = true - s.homepage = %q{- [Code on GitHub](http://github.com/brynary/webrat)} - s.rdoc_options = ["--main", "README.txt"] - s.require_paths = ["lib"] - s.rubyforge_project = %q{webrat} - s.rubygems_version = %q{1.2.0} - s.summary = %q{Ruby Acceptance Testing for Web applications} - - if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION - s.specification_version = 2 - - if current_version >= 3 then - s.add_runtime_dependency(%q, [">= 0.6"]) - s.add_development_dependency(%q, [">= 1.7.0"]) - else - s.add_dependency(%q, [">= 0.6"]) - s.add_dependency(%q, [">= 1.7.0"]) - end - else - s.add_dependency(%q, [">= 0.6"]) - s.add_dependency(%q, [">= 1.7.0"]) - end -end