rake-compiler 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6dd362a5359584c1357105a1a52a1c9f61e9ade1
4
- data.tar.gz: 9aad285e7966ce43a1864587ca30a22bc920f020
3
+ metadata.gz: ec7ebae4f473ba999ae9dc16fb6773db029e2848
4
+ data.tar.gz: 160c988ceee5fc727a22575dd605a062b8087969
5
5
  SHA512:
6
- metadata.gz: 727bf4b2e9093ff64fe9aa6e7919860e204125986c6ff8d985e07664312f090f615385dff01594e192ace471d4250bf330e6e936ee453d809c0223826d6c28f8
7
- data.tar.gz: bac8af9cdf17911149adbca843562da8573ce7650335143d7954723fc782ac6053d2ab267f3f0f54cfaf460704b4a5f331d0dfe1dff07bc4ffb22c44993b0c1d
6
+ metadata.gz: 3c261f508c93e5bc0d9abfd7ce983041d4d813ff57882f00f4b84143a884d8c3f394da245f6428f6c6afb0bc36c13dcf7e30c03bae4afd60143baa882c2e8a12
7
+ data.tar.gz: c01257df3153ab2513df71a128f84067c15f8ebd3c30b2fdcab1fc49dab2d1f195a121cbc1a4332c7fd0ffecfdf3bcd2dac9e25d37c0af3c6d0914ca808f858e
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.9.8 / 2016-04-29
2
+
3
+ * Enhancements:
4
+ * Support extension in sub directory.
5
+ #128, #129 [Patch by Kenta Murata]
6
+
1
7
  === 0.9.7 / 2016-03-16
2
8
 
3
9
  * Bugfixes:
@@ -6,7 +12,7 @@
6
12
 
7
13
  === 0.9.6 / 2016-03-04
8
14
 
9
- * Enhancements
15
+ * Enhancements:
10
16
  * Add more descriptions into README.
11
17
  Closes #105 [Patch by Aaron Stone]
12
18
  * Remove needless executable bits.
@@ -32,7 +38,7 @@
32
38
 
33
39
  === 0.9.5 / 2015-01-03
34
40
 
35
- * Enhancements
41
+ * Enhancements:
36
42
  * Support adding bundled files in cross_compiling block.
37
43
  Closes #100 [Patch by Aaron Stone]
38
44
 
@@ -67,7 +67,7 @@ module Rake
67
67
  else
68
68
  RbConfig::CONFIG['DLEXT']
69
69
  end
70
- "#{@name}.#{ext}"
70
+ "#{File.basename(@name)}.#{ext}"
71
71
  end
72
72
 
73
73
  def source_files
@@ -112,6 +112,9 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
112
112
 
113
113
  # lib_path
114
114
  lib_path = lib_dir
115
+ if @name.include?('/')
116
+ lib_path += "/#{File.dirname(@name)}"
117
+ end
115
118
 
116
119
  # tmp_path
117
120
  tmp_path = "#{@tmp_dir}/#{platf}/#{@name}/#{ruby_ver}"
@@ -270,6 +270,64 @@ describe Rake::ExtensionTask do
270
270
  end
271
271
  end
272
272
 
273
+ context '(one extension whose name with directory prefixes)' do
274
+ before :each do
275
+ Rake::FileList.stub!(:[]).and_return(["ext/prefix1/prefix2/extension_one/source.c"], [])
276
+ @ext = Rake::ExtensionTask.new('prefix1/prefix2/extension_one')
277
+ @ext_bin = ext_bin('extension_one')
278
+ @platform = RUBY_PLATFORM
279
+ @ruby_ver = RUBY_VERSION
280
+ end
281
+
282
+ context 'compile' do
283
+ it 'should define as task' do
284
+ Rake::Task.task_defined?('compile').should be_true
285
+ end
286
+
287
+ it "should depend on 'compile:{platform}'" do
288
+ Rake::Task['compile'].prerequisites.should include("compile:#{@platform}")
289
+ end
290
+ end
291
+
292
+ context 'compile:prefix1/prefix2/extension_one' do
293
+ it 'should define as task' do
294
+ Rake::Task.task_defined?('compile:prefix1/prefix2/extension_one').should be_true
295
+ end
296
+
297
+ it "should depend on 'compile:prefix1/prefix2/extension_one:{platform}'" do
298
+ Rake::Task['compile:prefix1/prefix2/extension_one'].prerequisites.should include("compile:prefix1/prefix2/extension_one:#{@platform}")
299
+ end
300
+ end
301
+
302
+ context 'lib/prefix1/prefix2/extension_one.{so,bundle}' do
303
+ it 'should define as task' do
304
+ Rake::Task.task_defined?("lib/prefix1/prefix2/#{@ext_bin}").should be_true
305
+ end
306
+
307
+ it "should depend on 'copy:prefix1/prefix2/extension_one:{platform}:{ruby_ver}'" do
308
+ Rake::Task["lib/prefix1/prefix2/#{@ext_bin}"].prerequisites.should include("copy:prefix1/prefix2/extension_one:#{@platform}:#{@ruby_ver}")
309
+ end
310
+ end
311
+
312
+ context 'tmp/{platform}/prefix1/prefix2/extension_one/{ruby_ver}/extension_one.{so,bundle}' do
313
+ it 'should define as task' do
314
+ Rake::Task.task_defined?("tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/#{@ext_bin}").should be_true
315
+ end
316
+
317
+ it "should depend on 'tmp/{platform}/prefix1/prefix2/extension_one/{ruby_ver}/Makefile'" do
318
+ Rake::Task["tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/#{@ext_bin}"].prerequisites.should include("tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/Makefile")
319
+ end
320
+
321
+ it "should depend on 'ext/extension_one/source.c'" do
322
+ Rake::Task["tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/#{@ext_bin}"].prerequisites.should include("ext/prefix1/prefix2/extension_one/source.c")
323
+ end
324
+
325
+ it "should not depend on 'ext/extension_one/source.h'" do
326
+ Rake::Task["tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/#{@ext_bin}"].prerequisites.should_not include("ext/prefix1/prefix2/extension_one/source.h")
327
+ end
328
+ end
329
+ end
330
+
273
331
  context '(cross platform tasks)' do
274
332
  before :each do
275
333
  File.stub!(:exist?).and_return(true)
data/tasks/gem.rake CHANGED
@@ -3,7 +3,7 @@ require 'rubygems/package_task'
3
3
  GEM_SPEC = Gem::Specification.new do |s|
4
4
  # basic information
5
5
  s.name = "rake-compiler"
6
- s.version = "0.9.7"
6
+ s.version = "0.9.8"
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
9
9
  # description and details
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-16 00:00:00.000000000 Z
12
+ date: 2016-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake