rake-compiler 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Isolate +2 -2
- data/features/support/env.rb +1 -1
- data/features/support/file_template_helpers.rb +3 -4
- data/lib/rake/baseextensiontask.rb +0 -2
- data/lib/rake/extensiontask.rb +8 -6
- data/lib/rake/javaextensiontask.rb +4 -3
- data/spec/spec_helper.rb +5 -10
- data/tasks/common.rake +1 -1
- data/tasks/gem.rake +3 -3
- data/tasks/release.rake +1 -1
- data/tasks/rspec.rake +5 -10
- metadata +14 -14
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 0.7.9 / 2011-06-08
|
2
|
+
|
3
|
+
* Enhancements:
|
4
|
+
* Consistently use RubyGems features available since version 1.3.2 and avoid
|
5
|
+
deprecation warnings with Rake > 0.8.7.
|
6
|
+
|
7
|
+
* Bugfixes:
|
8
|
+
* Use correct platform in fake.rb. Pull #39 [kou]
|
9
|
+
* Workaround Gem::Specification and Gem::PackageTask limitations. Closes #43
|
10
|
+
|
1
11
|
=== 0.7.8 / 2011-04-26
|
2
12
|
|
3
13
|
* Enhancements:
|
data/Isolate
CHANGED
data/features/support/env.rb
CHANGED
@@ -14,18 +14,17 @@ EOF
|
|
14
14
|
|
15
15
|
def template_rake_gemspec(gem_name)
|
16
16
|
<<-EOF
|
17
|
-
require '
|
17
|
+
require 'rubygems/package_task'
|
18
18
|
SPEC = Gem::Specification.new do |s|
|
19
19
|
s.name = "#{gem_name}"
|
20
20
|
s.version = "0.1.0"
|
21
21
|
s.summary = "#{gem_name} test gem for rake-compiler"
|
22
|
+
s.description = "#{gem_name} is a fake gem for testing under rake-compiler"
|
22
23
|
|
23
24
|
s.files = FileList["ext/**/*.{rb,c,h}", "Rakefile", "tasks/*.rake", "lib/**/*.rb"]
|
24
25
|
|
25
26
|
s.extensions = FileList["ext/**/extconf.rb"]
|
26
27
|
|
27
|
-
s.has_rdoc = true
|
28
|
-
|
29
28
|
s.homepage = 'http://github.com/luislavena/rake-compiler'
|
30
29
|
s.rubyforge_project = 'TODO'
|
31
30
|
|
@@ -33,7 +32,7 @@ SPEC = Gem::Specification.new do |s|
|
|
33
32
|
s.email = ["luislavena@gmail.com"]
|
34
33
|
end
|
35
34
|
|
36
|
-
|
35
|
+
Gem::PackageTask.new(SPEC) do |pkg|
|
37
36
|
pkg.need_zip = false
|
38
37
|
pkg.need_tar = false
|
39
38
|
end
|
data/lib/rake/extensiontask.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'rake/baseextensiontask'
|
4
|
+
require "rubygems/package_task"
|
4
5
|
|
5
6
|
# Define a series of tasks to aid in the compilation of C extensions for
|
6
7
|
# gem developer/creators.
|
@@ -186,9 +187,10 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
|
|
186
187
|
# create 'native:gem_name' and chain it to 'native' task
|
187
188
|
unless Rake::Task.task_defined?("native:#{@gem_spec.name}:#{platf}")
|
188
189
|
task "native:#{@gem_spec.name}:#{platf}" do |t|
|
189
|
-
# FIXME:
|
190
|
-
#
|
190
|
+
# FIXME: workaround Gem::Specification limitation around cache_file:
|
191
|
+
# http://github.com/rubygems/rubygems/issues/78
|
191
192
|
spec = gem_spec.dup
|
193
|
+
spec.instance_variable_set(:"@cache_file", nil) if spec.respond_to?(:cache_file)
|
192
194
|
|
193
195
|
# adjust to specified platform
|
194
196
|
spec.platform = Gem::Platform.new(platf)
|
@@ -213,7 +215,7 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
|
|
213
215
|
end
|
214
216
|
|
215
217
|
# Generate a package for this gem
|
216
|
-
|
218
|
+
Gem::PackageTask.new(spec) do |pkg|
|
217
219
|
pkg.need_zip = false
|
218
220
|
pkg.need_tar = false
|
219
221
|
end
|
@@ -311,7 +313,7 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
|
|
311
313
|
# genearte fake.rb for different ruby versions
|
312
314
|
file "#{tmp_path}/fake.rb" do |t|
|
313
315
|
File.open(t.name, 'w') do |f|
|
314
|
-
f.write fake_rb(ruby_ver)
|
316
|
+
f.write fake_rb(for_platform, ruby_ver)
|
315
317
|
end
|
316
318
|
end
|
317
319
|
|
@@ -381,13 +383,13 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
|
|
381
383
|
[*@cross_platform].map { |p| "native:#{p}" }
|
382
384
|
end
|
383
385
|
|
384
|
-
def fake_rb(version)
|
386
|
+
def fake_rb(platform, version)
|
385
387
|
<<-FAKE_RB
|
386
388
|
class Object
|
387
389
|
remove_const :RUBY_PLATFORM
|
388
390
|
remove_const :RUBY_VERSION
|
389
391
|
remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION)
|
390
|
-
RUBY_PLATFORM = "
|
392
|
+
RUBY_PLATFORM = "#{platform}"
|
391
393
|
RUBY_VERSION = "#{version}"
|
392
394
|
RUBY_DESCRIPTION = "ruby \#{RUBY_VERSION} (\#{RUBY_RELEASE_DATE}) [\#{RUBY_PLATFORM}]"
|
393
395
|
end
|
@@ -134,9 +134,10 @@ execute the Rake compilation task using the JRuby interpreter.
|
|
134
134
|
|
135
135
|
if @gem_spec && !Rake::Task.task_defined?("java:#{@gem_spec.name}")
|
136
136
|
task "java:#{@gem_spec.name}" do |t|
|
137
|
-
|
138
|
-
#
|
137
|
+
# FIXME: workaround Gem::Specification limitation around cache_file:
|
138
|
+
# http://github.com/rubygems/rubygems/issues/78
|
139
139
|
spec = gem_spec.dup
|
140
|
+
spec.instance_variable_set(:"@cache_file", nil) if spec.respond_to?(:cache_file)
|
140
141
|
|
141
142
|
# adjust to specified platform
|
142
143
|
spec.platform = Gem::Platform.new('java')
|
@@ -161,7 +162,7 @@ execute the Rake compilation task using the JRuby interpreter.
|
|
161
162
|
end
|
162
163
|
|
163
164
|
# Generate a package for this gem
|
164
|
-
|
165
|
+
Gem::PackageTask.new(spec) do |pkg|
|
165
166
|
pkg.need_zip = false
|
166
167
|
pkg.need_tar = false
|
167
168
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,19 +1,14 @@
|
|
1
|
-
|
2
|
-
libdir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
-
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
4
|
-
|
5
|
-
require 'rubygems'
|
6
|
-
require 'spec'
|
1
|
+
require 'rspec'
|
7
2
|
|
8
3
|
# Console redirection helper
|
9
|
-
require File.expand_path(
|
4
|
+
require File.expand_path('../support/capture_output_helper', __FILE__)
|
10
5
|
|
11
|
-
|
12
|
-
include CaptureOutputHelper
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.include CaptureOutputHelper
|
13
8
|
end
|
14
9
|
|
15
10
|
# Rake::Task matcher helper
|
16
|
-
|
11
|
+
RSpec::Matchers.define :have_defined do |task|
|
17
12
|
match do |tasks|
|
18
13
|
tasks.task_defined?(task)
|
19
14
|
end
|
data/tasks/common.rake
CHANGED
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.7.
|
6
|
+
s.version = "0.7.9"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
|
9
9
|
# description and details
|
@@ -18,8 +18,8 @@ GEM_SPEC = Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'rake'
|
19
19
|
|
20
20
|
# development dependencies
|
21
|
-
s.add_development_dependency 'rspec', '~>
|
22
|
-
s.add_development_dependency 'cucumber', '~> 0.
|
21
|
+
s.add_development_dependency 'rspec', '~> 2.6.0'
|
22
|
+
s.add_development_dependency 'cucumber', '~> 0.10.6'
|
23
23
|
#s.add_development_dependency 'rcov', '~> 0.9.9'
|
24
24
|
|
25
25
|
# components, files and paths
|
data/tasks/release.rake
CHANGED
data/tasks/rspec.rake
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
begin
|
2
|
-
require
|
2
|
+
require "rspec/core/rake_task"
|
3
3
|
|
4
4
|
begin
|
5
5
|
require 'rcov'
|
@@ -11,21 +11,16 @@ rescue LoadError
|
|
11
11
|
warn "RSpec gem is required, please install it (gem install rspec)."
|
12
12
|
end
|
13
13
|
|
14
|
-
if defined?(
|
15
|
-
|
16
|
-
t.spec_opts = ["--options", "spec/spec.opts"]
|
17
|
-
t.spec_files = FileList["spec/**/*_spec.rb"]
|
18
|
-
end
|
14
|
+
if defined?(RSpec::Core::RakeTask)
|
15
|
+
RSpec::Core::RakeTask.new(:spec)
|
19
16
|
|
20
17
|
if defined?(Rcov)
|
21
18
|
CLOBBER.include('coverage')
|
22
19
|
|
23
20
|
namespace :spec do
|
24
21
|
desc "Run all specs in spec directory with RCov"
|
25
|
-
|
26
|
-
t.
|
27
|
-
t.spec_files = FileList["spec/**/*_spec.rb"]
|
28
|
-
t.rcov = true
|
22
|
+
RSpec::Core::RakeTask.new(:rcov) do |t|
|
23
|
+
t.rcov = true
|
29
24
|
t.rcov_opts = ["--exclude", "spec/*,features/*,gems/*"]
|
30
25
|
end
|
31
26
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-compiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 9
|
10
|
+
version: 0.7.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luis Lavena
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-08 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -39,12 +39,12 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - ~>
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
hash:
|
42
|
+
hash: 23
|
43
43
|
segments:
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
version:
|
44
|
+
- 2
|
45
|
+
- 6
|
46
|
+
- 0
|
47
|
+
version: 2.6.0
|
48
48
|
type: :development
|
49
49
|
version_requirements: *id002
|
50
50
|
- !ruby/object:Gem::Dependency
|
@@ -55,12 +55,12 @@ dependencies:
|
|
55
55
|
requirements:
|
56
56
|
- - ~>
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
hash:
|
58
|
+
hash: 59
|
59
59
|
segments:
|
60
60
|
- 0
|
61
|
-
-
|
62
|
-
-
|
63
|
-
version: 0.
|
61
|
+
- 10
|
62
|
+
- 6
|
63
|
+
version: 0.10.6
|
64
64
|
type: :development
|
65
65
|
version_requirements: *id003
|
66
66
|
description: |-
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements: []
|
155
155
|
|
156
156
|
rubyforge_project: rake-compiler
|
157
|
-
rubygems_version: 1.
|
157
|
+
rubygems_version: 1.8.5
|
158
158
|
signing_key:
|
159
159
|
specification_version: 3
|
160
160
|
summary: Rake-based Ruby Extension (C, Java) task generator.
|