From 96aa4224c77cee4348a597f426e8e007bdca12a6 Mon Sep 17 00:00:00 2001 From: Andy Brody Date: Mon, 31 Mar 2014 21:49:24 -0700 Subject: [PATCH] Tweak various things to make bundler happy. --- Gemfile | 2 +- Rakefile | 12 +++++------- rest-client.windows.gemspec | 3 --- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 2cb5d77..b59dac9 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" if !!File::ALT_SEPARATOR gemspec :name => 'rest-client.windows' else - gemspec + gemspec :name => 'rest-client' end group :test do diff --git a/Rakefile b/Rakefile index 849597f..ae3fe0b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1,6 @@ -begin - # optionally load `rake build/install/release tasks' - require 'bundler/gem_tasks' -rescue LoadError -end +# load `rake build/install/release tasks' +require 'bundler/setup' +Bundler::GemHelper.install_tasks(:name => 'rest-client') require "rspec/core/rake_task" @@ -58,7 +56,7 @@ def built_gem_path end 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| namespace platform do @@ -68,7 +66,7 @@ namespace :windows do begin 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 puts "not OK: #{ok.inspect} #{res.inspect}" end diff --git a/rest-client.windows.gemspec b/rest-client.windows.gemspec index d593041..0ce727e 100644 --- a/rest-client.windows.gemspec +++ b/rest-client.windows.gemspec @@ -5,7 +5,6 @@ # Set $BUILD_PLATFORM when calling gem build with this gemspec to build for # Windows platforms like x86-mingw32. # - s = eval(File.read(File.join(File.dirname(__FILE__), 'rest-client.gemspec'))) platform = ENV['BUILD_PLATFORM'] || RUBY_PLATFORM @@ -15,8 +14,6 @@ when /(mingw32|mswin32)/ # ffi is needed for RestClient::Windows::RootCerts s.add_dependency('ffi', '~> 1.9.3') s.platform = platform -else - raise NotImplementedError.new("Must specify $BUILD_PLATFORM") end s