Merge branch 'master' of https://github.com/sferik/faraday into sferik-master

This commit is contained in:
rick 2010-10-15 13:05:44 -07:00
commit 97bc3bc736
4 changed files with 16 additions and 12 deletions

View File

@ -1,17 +1,17 @@
PATH PATH
remote: . remote: .
specs: specs:
faraday (0.4.6) faraday (0.5.0)
addressable (~> 2.1.1) addressable (~> 2.2.2)
multipart-post (~> 1.0.1) multipart-post (~> 1.0.1)
rack (~> 1.0.1) rack (~> 1.2.1)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
addressable (2.1.2) addressable (2.2.2)
multipart-post (1.0.1) multipart-post (1.0.1)
rack (1.0.1) rack (1.2.1)
rake (0.8.7) rake (0.8.7)
sinatra (1.0) sinatra (1.0)
rack (>= 1.0) rack (>= 1.0)
@ -20,9 +20,9 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
addressable (~> 2.1.1) addressable (~> 2.2.2)
faraday! faraday!
multipart-post (~> 1.0.1) multipart-post (~> 1.0.1)
rack (~> 1.0.1) rack (~> 1.2.1)
rake (~> 0.8.7) rake (~> 0.8.7)
sinatra (~> 1.0.0) sinatra (~> 1.0.0)

View File

@ -22,7 +22,7 @@ This mess is gonna get raw, like sushi. So, haters to the left.
resp1 = conn.get '/nigiri/sake.json' resp1 = conn.get '/nigiri/sake.json'
resp2 = conn.post do |req| resp2 = conn.post do |req|
req.url "/nigiri.json", :page => 2 req.url "/nigiri.json", :page => 2
req[:content_type] = 'application/json' req["Content-Type"] = 'application/json'
req.body = {:name => 'Unagi'} req.body = {:name => 'Unagi'}
end end

View File

@ -71,6 +71,7 @@ end
# #
############################################################################# #############################################################################
desc "Create tag v#{version} and build and push #{gem_file} to Rubygems"
task :release => :build do task :release => :build do
unless `git branch` =~ /^\* master$/ unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!" puts "You must be on the master branch to release!"
@ -80,15 +81,17 @@ task :release => :build do
sh "git tag v#{version}" sh "git tag v#{version}"
sh "git push origin master" sh "git push origin master"
sh "git push origin v#{version}" sh "git push origin v#{version}"
sh "gem push pkg/#{name}-#{version}.gem" sh "gem push pkg/#{gem_file}"
end end
desc "Build #{gem_file} into the pkg directory"
task :build => :gemspec do task :build => :gemspec do
sh "mkdir -p pkg" sh "mkdir -p pkg"
sh "gem build #{gemspec_file}" sh "gem build #{gemspec_file}"
sh "mv #{gem_file} pkg" sh "mv #{gem_file} pkg"
end end
desc "Generate #{gemspec_file}"
task :gemspec => :validate do task :gemspec => :validate do
# read spec file and split out manifest section # read spec file and split out manifest section
spec = File.read(gemspec_file) spec = File.read(gemspec_file)
@ -117,6 +120,7 @@ task :gemspec => :validate do
puts "Updated #{gemspec_file}" puts "Updated #{gemspec_file}"
end end
desc "Validate #{gemspec_file}"
task :validate do task :validate do
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"] libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
unless libfiles.empty? unless libfiles.empty?
@ -127,4 +131,4 @@ task :validate do
puts "A `VERSION` file at root level violates Gem best practices." puts "A `VERSION` file at root level violates Gem best practices."
exit! exit!
end end
end end

View File

@ -35,7 +35,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('rake', ['~> 0.8.7']) s.add_development_dependency('rake', ['~> 0.8.7'])
s.add_development_dependency('sinatra', ['~> 1.0.0']) s.add_development_dependency('sinatra', ['~> 1.0.0'])
s.add_runtime_dependency('addressable', ['~> 2.1.1']) s.add_runtime_dependency('addressable', ['~> 2.2.2'])
s.add_runtime_dependency('multipart-post', ['~> 1.0.1']) s.add_runtime_dependency('multipart-post', ['~> 1.0.1'])
s.add_runtime_dependency('rack', ['~> 1.2.1']) s.add_runtime_dependency('rack', ['~> 1.2.1'])
@ -87,4 +87,4 @@ Gem::Specification.new do |s|
## Test files will be grabbed from the file list. Make sure the path glob ## Test files will be grabbed from the file list. Make sure the path glob
## matches what you actually use. ## matches what you actually use.
s.test_files = s.files.select { |path| path =~ /^test\/.*_test\.rb/ } s.test_files = s.files.select { |path| path =~ /^test\/.*_test\.rb/ }
end end