summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradamedx <adamed@getchef.com>2014-06-17 15:55:27 -0700
committeradamedx <adamed@getchef.com>2014-06-19 22:09:00 -0700
commit5708b513dcd3cdfa865652a0d84f139cb08e9889 (patch)
tree8f6db93db7e5c5923c74fc59deff5b0ae9c9bc05
parent2f91b4d3687d2975e9c221127cab86bf98f5f496 (diff)
downloadohai-5708b513dcd3cdfa865652a0d84f139cb08e9889.tar.gz
Use platform-specific gemspec to conform to static evaluation of gemspecs
-rw-r--r--Gemfile2
-rw-r--r--ohai-x86-mingw32.gemspec8
-rw-r--r--ohai.gemspec1
3 files changed, 9 insertions, 2 deletions
diff --git a/Gemfile b/Gemfile
index a0982b6a..ed29db50 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source "https://rubygems.org"
-gemspec
+gemspec :name => "ohai"
# https://github.com/sj26/rspec_junit_formatter/pull/14
# rspec_junit_formatter isn't compatible with RSpec3 yet, but is fixed in
diff --git a/ohai-x86-mingw32.gemspec b/ohai-x86-mingw32.gemspec
new file mode 100644
index 00000000..3a6625b5
--- /dev/null
+++ b/ohai-x86-mingw32.gemspec
@@ -0,0 +1,8 @@
+# x86-mingw32 Gemspec #
+gemspec = eval(IO.read(File.expand_path("../ohai.gemspec", __FILE__)))
+
+gemspec.platform = "x86-mingw32"
+
+gemspec.add_dependency "ffi", "1.5.0"
+
+gemspec
diff --git a/ohai.gemspec b/ohai.gemspec
index 00d30da4..dbc0eae0 100644
--- a/ohai.gemspec
+++ b/ohai.gemspec
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
s.add_dependency "mixlib-shellout", "~> 1.2"
s.add_dependency "ipaddress"
s.add_dependency "wmi-lite", "~> 1.0"
- s.add_dependency "ffi", "1.5.0" if RUBY_PLATFORM =~ /mswin|mingw|windows/
# Rake 10.2 drops Ruby 1.8 support, so stick to 10.1.x until chef also drops
# 1.8.