mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Tweak various things to make bundler happy.
This commit is contained in:
parent
cba459f27e
commit
96aa4224c7
3 changed files with 6 additions and 11 deletions
2
Gemfile
2
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
|
||||
|
|
12
Rakefile
12
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue