RubyInline 3.6.5 → 3.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -1
- data/lib/inline.rb +15 -7
- data/test/test_inline.rb +6 -2
- metadata +51 -44
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 3.6.6 / 2007-12-27
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
* Enhanced windows support thanks to Luis Lavena.
|
5
|
+
|
1
6
|
### 3.6.5 / 2007-11-08
|
2
7
|
|
3
8
|
* 1 minor enhancement:
|
@@ -36,7 +41,6 @@
|
|
36
41
|
* Removed VALUE from @types because it is now in @@type_map.
|
37
42
|
* Tweak added for mingw32.
|
38
43
|
|
39
|
-
|
40
44
|
### 3.6.0 / 2005-11-30 (omg I suck: actual release: 2006-09-15)
|
41
45
|
|
42
46
|
* 6 minor enhancements
|
data/lib/inline.rb
CHANGED
@@ -51,12 +51,12 @@ class CompilationError < RuntimeError; end
|
|
51
51
|
# the current namespace.
|
52
52
|
|
53
53
|
module Inline
|
54
|
-
VERSION = '3.6.
|
54
|
+
VERSION = '3.6.6'
|
55
55
|
|
56
|
-
WINDOZE = /
|
57
|
-
DEV_NULL = (WINDOZE ? 'nul'
|
58
|
-
RAKE = (WINDOZE ? 'rake.
|
59
|
-
GEM = (WINDOZE ? 'gem.
|
56
|
+
WINDOZE = /win(32|64)/ =~ RUBY_PLATFORM
|
57
|
+
DEV_NULL = (WINDOZE ? 'nul' : '/dev/null')
|
58
|
+
RAKE = (WINDOZE ? 'rake.bat' : 'rake')
|
59
|
+
GEM = (WINDOZE ? 'gem.bat' : 'gem')
|
60
60
|
|
61
61
|
$stderr.puts "RubyInline v #{VERSION}" if $DEBUG
|
62
62
|
|
@@ -65,6 +65,10 @@ module Inline
|
|
65
65
|
def self.rootdir
|
66
66
|
env = ENV['INLINEDIR'] || ENV['HOME']
|
67
67
|
|
68
|
+
# in case both INLINEDIR and HOME aren't defined, and under Windows
|
69
|
+
# default to HOMEDRIVE + HOMEPATH values
|
70
|
+
env = ENV['HOMEDRIVE'] + ENV['HOMEPATH'] if env.nil? and WINDOZE
|
71
|
+
|
68
72
|
if env.nil? then
|
69
73
|
$stderr.puts "Define INLINEDIR or HOME in your environment and try again"
|
70
74
|
exit 1
|
@@ -294,7 +298,7 @@ module Inline
|
|
294
298
|
file = File.join("inline", File.basename(so_name))
|
295
299
|
if require file then
|
296
300
|
dir = Inline.directory
|
297
|
-
warn "WAR\NING: #{dir} exists but is not being used" if test ?d, dir
|
301
|
+
warn "WAR\NING: #{dir} exists but is not being used" if test ?d, dir and $VERBOSE
|
298
302
|
return true
|
299
303
|
end
|
300
304
|
rescue LoadError
|
@@ -402,7 +406,11 @@ module Inline
|
|
402
406
|
raise CompilationError, "error executing #{cmd}: #{$?}\nRenamed #{src_name} to #{bad_src_name}"
|
403
407
|
end
|
404
408
|
|
405
|
-
|
409
|
+
# NOTE: manifest embedding is only required when using VC8 ruby
|
410
|
+
# build or compiler.
|
411
|
+
# Errors from this point should be ignored if Config::CONFIG['arch']
|
412
|
+
# (RUBY_PLATFORM) matches 'i386-mswin32_80'
|
413
|
+
if WINDOZE and RUBY_PLATFORM =~ /_80$/ then
|
406
414
|
Dir.chdir Inline.directory do
|
407
415
|
cmd = "mt /manifest lib.so.manifest /outputresource:so.dll;#2"
|
408
416
|
$stderr.puts "Embedding manifest with '#{cmd}'" if $DEBUG
|
data/test/test_inline.rb
CHANGED
@@ -6,6 +6,7 @@ require 'inline'
|
|
6
6
|
require 'tempfile'
|
7
7
|
require 'tmpdir'
|
8
8
|
require 'test/unit'
|
9
|
+
require 'fileutils' unless defined?(::FileUtils)
|
9
10
|
|
10
11
|
File.umask(0)
|
11
12
|
|
@@ -636,11 +637,14 @@ class TestModule < InlineTestCase
|
|
636
637
|
tempfile.write($test_module_code2)
|
637
638
|
tempfile.flush
|
638
639
|
tempfile.rewind
|
639
|
-
|
640
|
+
|
641
|
+
FileUtils.cp tempfile.path, "#{tempfile.path}.rb"
|
642
|
+
|
640
643
|
require "#{tempfile.path}.rb"
|
641
644
|
assert_equal(12, fb.twelve_instance)
|
642
645
|
assert_equal(12, Foo::Bar.twelve_class)
|
643
|
-
|
646
|
+
|
647
|
+
FileUtils.rm "#{tempfile.path}.rb"
|
644
648
|
end
|
645
649
|
|
646
650
|
def test_argument_check_good
|
metadata
CHANGED
@@ -1,33 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: RubyInline
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 3.6.
|
7
|
-
date: 2007-11-08 00:00:00 -08:00
|
8
|
-
summary: Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: ryand-ruby@zenspider.com
|
12
|
-
homepage: " http://rubyforge.org/projects/rubyinline/\n"
|
13
|
-
rubyforge_project: rubyinline
|
14
|
-
description: Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly. By writing simple builder classes, you can teach how to cope with new languages (fortran, perl, whatever). The code is compiled and run on the fly when needed.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 3.6.6
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Ryan Davis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2007-12-27 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hoe
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.4.0
|
23
|
+
version:
|
24
|
+
description: Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly. By writing simple builder classes, you can teach how to cope with new languages (fortran, perl, whatever). The code is compiled and run on the fly when needed.
|
25
|
+
email: ryand-ruby@zenspider.com
|
26
|
+
executables:
|
27
|
+
- inline_package
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- History.txt
|
32
|
+
- Manifest.txt
|
33
|
+
- README.txt
|
31
34
|
files:
|
32
35
|
- History.txt
|
33
36
|
- Manifest.txt
|
@@ -42,28 +45,32 @@ files:
|
|
42
45
|
- test/test_inline.rb
|
43
46
|
- tutorial/example1.rb
|
44
47
|
- tutorial/example2.rb
|
45
|
-
|
46
|
-
|
48
|
+
has_rdoc: true
|
49
|
+
homepage: " http://rubyforge.org/projects/rubyinline/\n"
|
50
|
+
post_install_message:
|
47
51
|
rdoc_options:
|
48
52
|
- --main
|
49
53
|
- README.txt
|
50
|
-
|
51
|
-
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
-
|
56
|
-
|
57
|
-
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: "0"
|
61
|
+
version:
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "0"
|
67
|
+
version:
|
58
68
|
requirements:
|
59
69
|
- A POSIX environment and a compiler for your language.
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 1.3.0
|
69
|
-
version:
|
70
|
+
rubyforge_project: rubyinline
|
71
|
+
rubygems_version: 1.0.1
|
72
|
+
signing_key:
|
73
|
+
specification_version: 2
|
74
|
+
summary: Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly.
|
75
|
+
test_files:
|
76
|
+
- test/test_inline.rb
|