Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to jeweler. yay!

  • Loading branch information...
commit ad7978f0a8f28d3da84d5ecaa474ddbfd0375a85 1 parent 1231694
John Nunemaker authored
Showing with 56 additions and 36 deletions.
  1. +55 −35 Rakefile
  2. +1 −1  VERSION
90 Rakefile
View
@@ -1,48 +1,68 @@
-ProjectName = 'httparty'
-WebsitePath = "jnunemaker@rubyforge.org:/var/www/gforge-projects/#{ProjectName}"
-
require 'rubygems'
require 'rake'
-require 'echoe'
-require 'spec/rake/spectask'
-require "lib/#{ProjectName}/version"
-require 'cucumber/rake/task'
-
-Echoe.new(ProjectName, HTTParty::Version) do |p|
- p.description = "Makes http fun! Also, makes consuming restful web services dead easy."
- p.install_message = "When you HTTParty, you must party hard!"
- p.url = "http://#{ProjectName}.rubyforge.org"
- p.author = "John Nunemaker"
- p.email = "nunemaker@gmail.com"
- p.extra_deps = [['crack', '>= 0.1.1']]
- p.need_tar_gz = false
- p.docs_host = WebsitePath
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "httparty"
+ gem.description = %Q{Makes http fun! Also, makes consuming restful web services dead easy.}
+ gem.email = "nunemaker@gmail.com"
+ gem.homepage = "http://httparty.rubyforge.org"
+ gem.authors = ["John Nunemaker"]
+ gem.add_dependency 'crack', '>= 0.1.1'
+ gem.add_development_dependency "rspec"
+ gem.post_install_message = "When you HTTParty, you must party hard!"
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ end
+ Jeweler::RubyforgeTasks.new do |rubyforge|
+ rubyforge.doc_task = "rdoc"
+ end
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
-desc 'Upload website files to rubyforge'
-task :website do
- sh %{rsync -av website/ #{WebsitePath}}
- Rake::Task['website_docs'].invoke
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
end
-task :website_docs do
- Rake::Task['redocs'].invoke
- sh %{rsync -av doc/ #{WebsitePath}/docs}
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
-desc 'Preps the gem for a new release'
-task :prepare do
- %w[manifest build_gemspec].each do |task|
- Rake::Task[task].invoke
+task :spec => :check_dependencies
+
+begin
+ require 'cucumber/rake/task'
+ Cucumber::Rake::Task.new(:features)
+
+ task :features => :check_dependencies
+rescue LoadError
+ task :features do
+ abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
end
end
-Rake::Task[:default].prerequisites.clear
-task :default => :spec
-Spec::Rake::SpecTask.new do |t|
- t.spec_files = FileList["spec/**/*_spec.rb"]
-end
+task :default => [:spec, :features]
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ if File.exist?('VERSION')
+ version = File.read('VERSION')
+ else
+ version = ""
+ end
-Cucumber::Rake::Task.new(:features) do |t|
- t.cucumber_opts = "--format pretty"
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "httparty #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
end
+
+desc 'Upload website files to rubyforge'
+task :website do
+ sh %{rsync -av website/ jnunemaker@rubyforge.org:/var/www/gforge-projects/httparty}
+end
2  VERSION
View
@@ -1 +1 @@
-0.0.0
+0.4.4
Please sign in to comment.
Something went wrong with that request. Please try again.