Sha256: f99d41e7c8d384c48ce07bd6a4bcb353ce5220376ccecb4985435dd1e1220136

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rake/clean"
require "rake/extensiontask"

require "rubygems"
require "rubygems/package_task"

require "rubocop/rake_task"

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

task default: :spec
task spec: :compile

spec = Gem::Specification.load("extract_ttc.gemspec")

# add your default gem packing task
Gem::PackageTask.new(spec) do |pkg|
end

# HACK: Prevent rake-compiler from overriding required_ruby_version,
# because the shared library here is Ruby-agnostic.
# See https://github.com/rake-compiler/rake-compiler/issues/153
module FixRequiredRubyVersion
  def required_ruby_version=(*); end
end
Gem::Specification.prepend(FixRequiredRubyVersion)

Rake::ExtensionTask.new("stripttc", spec) do |ext|
  ext.lib_dir = "lib"
  ext.cross_compile = true
  ext.cross_platform = %w[x64-mingw32 x64-mingw-ucrt x86_64-linux x86_64-darwin]
  ext.cross_compiling do |s|
    s.files.reject! { |path| File.fnmatch?("ext/*", path) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
extract_ttc-0.2.0-x64-mingw32 Rakefile
extract_ttc-0.2.0-x64-mingw-ucrt Rakefile