Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rake-compiler/rake-compiler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.5
Choose a base ref
...
head repository: rake-compiler/rake-compiler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.6
Choose a head ref
  • 5 commits
  • 4 files changed
  • 1 contributor

Commits on Dec 11, 2021

  1. Bump version

    kou committed Dec 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    05bd2bc View commit details
  2. Accept Symbol as name

    kou committed Dec 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d666e49 View commit details
  3. Copy the full SHA
    270362a View commit details
  4. Fix extension path

    kou committed Dec 11, 2021
    Copy the full SHA
    cd9daf3 View commit details
  5. Add 1.1.6 entry

    kou committed Dec 11, 2021
    Copy the full SHA
    b09f334 View commit details
Showing with 12 additions and 10 deletions.
  1. +5 −0 History.md
  2. +2 −2 lib/rake/baseextensiontask.rb
  3. +4 −7 lib/rake/extensiontask.rb
  4. +1 −1 rake-compiler.gemspec
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 1.1.6 / 2021-12-12

* Fixes:
* Fix a regression bug that `Symbol` can't be used for `name` of `Rake::ExtensionTask.new`.

### 1.1.5 / 2021-12-12

* Fixes:
4 changes: 2 additions & 2 deletions lib/rake/baseextensiontask.rb
Original file line number Diff line number Diff line change
@@ -40,8 +40,8 @@ def init(name = nil, gem_spec = nil)
@tmp_dir = 'tmp'
@ext_dir = "ext/#{@name}"
@lib_dir = 'lib'
if @name and File.dirname(@name) != "."
@lib_dir += "/#{File.dirname(@name)}"
if @name and File.dirname(@name.to_s) != "."
@lib_dir += "/#{File.dirname(@name.to_s)}"
end
@config_options = []
@extra_options = ARGV.select { |i| i =~ /\A--?/ }
11 changes: 4 additions & 7 deletions lib/rake/extensiontask.rb
Original file line number Diff line number Diff line change
@@ -109,9 +109,6 @@ def define_compile_tasks(for_platform = nil, ruby_ver = RUBY_VERSION)
# lib_path
lib_path = lib_dir

lib_binary_path = "#{lib_path}/#{binary_path}"
lib_binary_dir_path = File.dirname(lib_binary_path)

# tmp_path
tmp_path = "#{@tmp_dir}/#{platf}/#{@name}/#{ruby_ver}"
stage_path = "#{@tmp_dir}/#{platf}/stage"
@@ -131,7 +128,7 @@ def define_compile_tasks(for_platform = nil, ruby_ver = RUBY_VERSION)
# directories we need
directory tmp_path
directory tmp_binary_dir_path
directory lib_binary_dir_path
directory lib_path
directory stage_binary_dir_path

directory File.dirname(siteconf_path)
@@ -150,7 +147,7 @@ def define_compile_tasks(for_platform = nil, ruby_ver = RUBY_VERSION)

# copy binary from temporary location to final lib
# tmp/extension_name/extension_name.{so,bundle} => lib/
task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_binary_dir_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
# install in lib for native platform only
unless for_platform
sh "#{make} install target_prefix=", chdir: tmp_path
@@ -237,7 +234,7 @@ def define_compile_tasks(for_platform = nil, ruby_ver = RUBY_VERSION)
# platform matches the indicated one.
if platf == RUBY_PLATFORM then
# ensure file is always copied
file "#{lib_path}/#{binary_path}" => ["copy:#{name}:#{platf}:#{ruby_ver}"]
file "#{lib_path}/#{File.basename(binary_path)}" => ["copy:#{name}:#{platf}:#{ruby_ver}"]

task "compile:#{@name}" => ["compile:#{@name}:#{platf}"]
task "compile" => ["compile:#{platf}"]
@@ -468,7 +465,7 @@ def define_cross_platform_tasks_with_version(for_platform, ruby_ver)
end

# FIXME: targeting multiple platforms copies the file twice
file "#{lib_path}/#{binary(for_platform)}" => ["copy:#{@name}:#{for_platform}:#{ruby_ver}"]
file "#{lib_path}/#{File.basename(binary(for_platform))}" => ["copy:#{@name}:#{for_platform}:#{ruby_ver}"]

# if everything for native task is in place
if @gem_spec && @gem_spec.platform == 'ruby' then
2 changes: 1 addition & 1 deletion rake-compiler.gemspec
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
Gem::Specification.new do |s|
# basic information
s.name = "rake-compiler"
s.version = "1.1.5"
s.version = "1.1.6"
s.platform = Gem::Platform::RUBY

# description and details