diff --git a/Rakefile b/Rakefile index bb52c98..6b4dbf1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,24 @@ require 'rake' + +require 'jeweler' + +Jeweler::Tasks.new do |s| + s.name = "rest-client" + s.description = "A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete." + s.summary = "Simple REST client for Ruby, inspired by microframework syntax for specifying actions." + s.author = "Adam Wiggins" + s.email = "adam@heroku.com" + s.homepage = "http://rest-client.heroku.com/" + s.rubyforge_project = "rest-client" + s.has_rdoc = true + s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"] + s.executables = %w(restclient) +end + +Jeweler::RubyforgeTasks.new + +############################ + require 'spec/rake/spectask' desc "Run all specs" @@ -22,54 +42,9 @@ end task :default => :spec -###################################################### +############################ -require 'rake' -require 'rake/testtask' -require 'rake/clean' -require 'rake/gempackagetask' require 'rake/rdoctask' -require 'fileutils' - -version = "1.0.1" -name = "rest-client" - -spec = Gem::Specification.new do |s| - s.name = name - s.version = version - s.summary = "Simple REST client for Ruby, inspired by microframework syntax for specifying actions." - s.description = "A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete." - s.author = "Adam Wiggins" - s.email = "adam@heroku.com" - s.homepage = "http://rest-client.heroku.com/" - s.rubyforge_project = "rest-client" - - s.platform = Gem::Platform::RUBY - s.has_rdoc = true - - s.files = %w(Rakefile README.rdoc) + Dir.glob("{lib,spec}/**/*") - s.executables = ['restclient'] - - s.require_path = "lib" -end - -Rake::GemPackageTask.new(spec) do |p| - p.need_tar = true if RUBY_PLATFORM !~ /mswin/ -end - -task :install => [ :package ] do - sh %{sudo gem install pkg/#{name}-#{version}.gem} -end - -task :uninstall => [ :clean ] do - sh %{sudo gem uninstall #{name}} -end - -Rake::TestTask.new do |t| - t.libs << "spec" - t.test_files = FileList['spec/*_spec.rb'] - t.verbose = true -end Rake::RDocTask.new do |t| t.rdoc_dir = 'rdoc' @@ -81,5 +56,3 @@ Rake::RDocTask.new do |t| t.rdoc_files.include('lib/restclient/*.rb') end -CLEAN.include [ 'pkg', '*.gem', '.config' ] - diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..6d7de6e --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.2 diff --git a/rest-client.gemspec b/rest-client.gemspec index 41f8a05..6938046 100644 --- a/rest-client.gemspec +++ b/rest-client.gemspec @@ -1,22 +1,66 @@ +# -*- encoding: utf-8 -*- + Gem::Specification.new do |s| - s.name = "rest-client" - s.version = "1.0.1" - s.summary = "Simple REST client for Ruby, inspired by microframework syntax for specifying actions." - s.description = "A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete." - s.author = "Adam Wiggins" - s.email = "adam@heroku.com" - s.rubyforge_project = "rest-client" - s.homepage = "http://rest-client.heroku.com/" - s.has_rdoc = true - s.platform = Gem::Platform::RUBY - s.files = %w(Rakefile README.rdoc rest-client.gemspec - lib/rest_client.rb lib/restclient.rb - lib/restclient/request.rb lib/restclient/response.rb - lib/restclient/exceptions.rb lib/restclient/resource.rb - lib/restclient/mixin/response.rb - spec/base.rb spec/request_spec.rb spec/response_spec.rb - spec/exceptions_spec.rb spec/resource_spec.rb spec/restclient_spec.rb - bin/restclient) - s.executables = ['restclient'] - s.require_path = "lib" + s.name = %q{rest-client} + s.version = "1.0.2" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Adam Wiggins"] + s.date = %q{2009-06-20} + s.default_executable = %q{restclient} + s.description = %q{A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete.} + s.email = %q{adam@heroku.com} + s.executables = ["restclient"] + s.extra_rdoc_files = [ + "README.rdoc" + ] + s.files = [ + "README.rdoc", + "Rakefile", + "VERSION", + "bin/restclient", + "lib/rest_client.rb", + "lib/restclient.rb", + "lib/restclient/exceptions.rb", + "lib/restclient/mixin/response.rb", + "lib/restclient/raw_response.rb", + "lib/restclient/request.rb", + "lib/restclient/resource.rb", + "lib/restclient/response.rb", + "spec/base.rb", + "spec/exceptions_spec.rb", + "spec/mixin/response_spec.rb", + "spec/raw_response_spec.rb", + "spec/request_spec.rb", + "spec/resource_spec.rb", + "spec/response_spec.rb", + "spec/restclient_spec.rb" + ] + s.has_rdoc = true + s.homepage = %q{http://rest-client.heroku.com/} + s.rdoc_options = ["--charset=UTF-8"] + s.require_paths = ["lib"] + s.rubyforge_project = %q{rest-client} + s.rubygems_version = %q{1.3.1} + s.summary = %q{Simple REST client for Ruby, inspired by microframework syntax for specifying actions.} + s.test_files = [ + "spec/base.rb", + "spec/exceptions_spec.rb", + "spec/mixin/response_spec.rb", + "spec/raw_response_spec.rb", + "spec/request_spec.rb", + "spec/resource_spec.rb", + "spec/response_spec.rb", + "spec/restclient_spec.rb" + ] + + if s.respond_to? :specification_version then + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION + s.specification_version = 2 + + if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + else + end + else + end end