Tweak various things to make bundler happy.

This commit is contained in:
Andy Brody 2014-03-31 21:49:24 -07:00
parent cba459f27e
commit 96aa4224c7
3 changed files with 6 additions and 11 deletions

View File

@ -3,7 +3,7 @@ source "https://rubygems.org"
if !!File::ALT_SEPARATOR if !!File::ALT_SEPARATOR
gemspec :name => 'rest-client.windows' gemspec :name => 'rest-client.windows'
else else
gemspec gemspec :name => 'rest-client'
end end
group :test do group :test do

View File

@ -1,8 +1,6 @@
begin # load `rake build/install/release tasks'
# optionally load `rake build/install/release tasks' require 'bundler/setup'
require 'bundler/gem_tasks' Bundler::GemHelper.install_tasks(:name => 'rest-client')
rescue LoadError
end
require "rspec/core/rake_task" require "rspec/core/rake_task"
@ -58,7 +56,7 @@ def built_gem_path
end end
namespace :windows do namespace :windows do
spec_path = File.join(File.dirname(__FILE__), 'rest-client.gemspec') spec_path = File.join(File.dirname(__FILE__), 'rest-client.windows.gemspec')
WindowsPlatforms.each do |platform| WindowsPlatforms.each do |platform|
namespace platform do namespace platform do
@ -68,7 +66,7 @@ namespace :windows do
begin begin
ENV['BUILD_PLATFORM'] = platform ENV['BUILD_PLATFORM'] = platform
sh("gem build -V #{spec_path + '.windows'}") do |ok, res| sh("gem build -V #{spec_path}") do |ok, res|
if !ok if !ok
puts "not OK: #{ok.inspect} #{res.inspect}" puts "not OK: #{ok.inspect} #{res.inspect}"
end end

View File

@ -5,7 +5,6 @@
# Set $BUILD_PLATFORM when calling gem build with this gemspec to build for # Set $BUILD_PLATFORM when calling gem build with this gemspec to build for
# Windows platforms like x86-mingw32. # Windows platforms like x86-mingw32.
# #
s = eval(File.read(File.join(File.dirname(__FILE__), 'rest-client.gemspec'))) s = eval(File.read(File.join(File.dirname(__FILE__), 'rest-client.gemspec')))
platform = ENV['BUILD_PLATFORM'] || RUBY_PLATFORM platform = ENV['BUILD_PLATFORM'] || RUBY_PLATFORM
@ -15,8 +14,6 @@ when /(mingw32|mswin32)/
# ffi is needed for RestClient::Windows::RootCerts # ffi is needed for RestClient::Windows::RootCerts
s.add_dependency('ffi', '~> 1.9.3') s.add_dependency('ffi', '~> 1.9.3')
s.platform = platform s.platform = platform
else
raise NotImplementedError.new("Must specify $BUILD_PLATFORM")
end end
s s