Skip to content
Browse files

Use jeweler, so I can get my gem from github easily

  • Loading branch information...
1 parent 11791de commit 9ce16827796bd0d05a89dd3c664e4ff13fd00aaa @pd committed
Showing with 20 additions and 20 deletions.
  1. +20 −20 Rakefile
View
40 Rakefile
@@ -1,27 +1,27 @@
-require 'rake/gempackagetask'
require 'spec/rake/spectask'
task :default => :spec
Spec::Rake::SpecTask.new
-gemspec = Gem::Specification.new do |spec|
- spec.name = 'rspec_hpricot_matchers'
- spec.summary = "Implementation of have_tag() rspec matcher using Hpricot"
- spec.version = '1.0'
- spec.author = 'Kyle Hargraves'
- spec.email = 'philodespotos@gmail.com'
- spec.description = <<-END
- rspec_hpricot_matchers provides an implementation of rspec_on_rails'
- have_tag() matcher which does not depend on Rails' assert_select.
- Using Hpricot instead, the matcher is available to non-Rails projects,
- and enjoys the full flexibility of Hpricot's advanced CSS and XPath
- selector support.
- END
- spec.files = FileList['lib/**/*', 'spec/**/*', 'README', 'MIT-LICENSE', 'Rakefile']
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gemspec|
+ gemspec.name = 'rspec_hpricot_matchers'
+ gemspec.author = 'Kyle Hargraves'
+ gemspec.email = 'pd@krh.me'
+ gemspec.summary = "Implementation of have_tag() rspec matcher using Hpricot"
+ gemspec.description = <<-END
+ rspec_hpricot_matchers provides an implementation of rspec_on_rails'
+ have_tag() matcher which does not depend on Rails' assert_select.
+ Using Hpricot instead, the matcher is available to non-Rails projects,
+ and enjoys the full flexibility of Hpricot's advanced CSS and XPath
+ selector support.
+ END
- spec.rubyforge_project = 'rspec-hpricot'
- spec.homepage = 'http://rspec-hpricot.rubyforge.org'
-end
-
-Rake::GemPackageTask.new(gemspec) do |spec|
+ # Really, I don't care about rubyforge. Maybe I'll get this
+ # working some day.
+ # gemspec.rubyforge_project = 'rspec-hpricot'
+ end
+rescue LoadError
+ puts "Jeweler unavailable, packaging tasks can not be run. Install it, thanks."
end

0 comments on commit 9ce1682

Please sign in to comment.
Something went wrong with that request. Please try again.