mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Use the Windows gemspec in the Gemfile on Windows.
This commit is contained in:
parent
6b706194b2
commit
cba459f27e
2 changed files with 6 additions and 2 deletions
24
rest-client.windows.gemspec
Normal file
24
rest-client.windows.gemspec
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Gemspec for Windows platforms. We can't put these in the main gemspec because
|
||||
# it results in bundler platform hell when trying to build the gem.
|
||||
#
|
||||
# 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
|
||||
|
||||
case platform
|
||||
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
|
||||
|
||||
# vim: ft=ruby :
|
||||
Loading…
Add table
Add a link
Reference in a new issue