Skip to content

Commit

Permalink
Merge pull request #21 from skateman/mac-gem-install
Browse files Browse the repository at this point in the history
 Do not expose the compilation rake task if the platform is not Linux
  • Loading branch information
skateman authored Dec 7, 2018
2 parents 6cb3f18 + 6098e7a commit 7a54a4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ require 'surro-gate/version'

RSpec::Core::RakeTask.new(:spec)

Rake::ExtensionTask.new('surro-gate') do |ext|
ext.name = 'surro-gate/selector_ext'
end
if SurroGate::HAVE_EXT
Rake::ExtensionTask.new('surro-gate') do |ext|
ext.name = 'surro-gate/selector_ext'
end

task :default => SurroGate::HAVE_EXT ? %i[compile spec] : %i[clean spec]
task :default => %i[compile spec]
else
task :default => %i[clean spec]
end

CLEAN.include '**/*.o', '**/*.so', 'pkg', 'tmp'
2 changes: 1 addition & 1 deletion lib/surro-gate/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module SurroGate
VERSION = '1.0.2'.freeze
VERSION = '1.0.3'.freeze
HAVE_EXT = RUBY_PLATFORM =~ /linux/ && !defined?(JRUBY_VERSION) && !ENV['SURRO_GATE_NOEXT']
end

0 comments on commit 7a54a4c

Please sign in to comment.