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 +4 -4
- data/History.txt +8 -2
- data/lib/rake/baseextensiontask.rb +1 -1
- data/lib/rake/extensiontask.rb +3 -0
- data/spec/lib/rake/extensiontask_spec.rb +58 -0
- data/tasks/gem.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7ebae4f473ba999ae9dc16fb6773db029e2848
|
4
|
+
data.tar.gz: 160c988ceee5fc727a22575dd605a062b8087969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/rake/extensiontask.rb
CHANGED
@@ -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
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.
|
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-
|
12
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|