RubyInline 3.6.0 → 3.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.txt +9 -0
  2. data/README.txt +1 -0
  3. data/Rakefile +14 -86
  4. data/inline.rb +6 -3
  5. metadata +19 -11
data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
+ *** 3.6.1 / 2006-10-11
2
+
3
+ + 1 minor enhancement
4
+ + Hoe'd the Rakefile. :P
5
+ + 2 bug fixes
6
+ + Removed VALUE from @types because it is now in @@type_map.
7
+ + Tweak added for mingw32.
8
+
9
+
1
10
  *** 3.6.0 / 2005-11-30 (omg I suck: actual release: 2006-09-15)
2
11
 
3
12
  + 6 minor enhancements
data/README.txt CHANGED
@@ -39,6 +39,7 @@ compiler (read: windows)!
39
39
  while (i >= 2) { result *= i--; }
40
40
  return result;
41
41
  }"
42
+ end
42
43
  end
43
44
  t = MyTest.new()
44
45
  factorial_5 = t.factorial(5)
data/Rakefile CHANGED
@@ -1,19 +1,22 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'rake'
4
- require 'rake/contrib/sshpublisher'
5
- require 'rake/gempackagetask'
6
- require 'rake/rdoctask'
7
- require 'rake/testtask'
8
- require 'rbconfig'
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ require './inline.rb'
9
7
 
10
- PREFIX = ENV['PREFIX'] || Config::CONFIG['prefix']
11
- RUBYLIB = Config::CONFIG['sitelibdir']
8
+ Hoe.new("RubyInline", Inline::VERSION) do |p|
9
+ p.rubyforge_name = "rubyinline"
10
+ p.summary = "Multi-language extension coding within ruby."
11
+ p.description = p.paragraphs_of("README.txt", 3).join
12
+ p.clean_globs << File.expand_path("~/.ruby_inline")
12
13
 
13
- task :default => :test
14
+ p.spec_extras[:requirements] = "A POSIX environment and a compiler for your language."
15
+ p.spec_extras[:require_paths] = ["."]
14
16
 
15
- task :test do
16
- ruby %(-I. -w ./test_inline.rb)
17
+ p.lib_files = %w(inline.rb)
18
+ p.test_files = %w(test_inline.rb)
19
+ p.bin_files = %w(inline_package)
17
20
  end
18
21
 
19
22
  task :examples do
@@ -41,78 +44,3 @@ task :bench do
41
44
  end
42
45
  end
43
46
  end
44
-
45
- desc 'Generate RDoc'
46
- Rake::RDocTask.new :rdoc do |rd|
47
- rd.rdoc_dir = 'doc'
48
- rd.rdoc_files.add 'inline.rb', 'inline_package', 'README.txt', 'History.txt'
49
- rd.main = 'README.txt'
50
- rd.options << '-t RubyInline RDoc'
51
- end
52
-
53
- desc 'Upload RDoc to RubyForge'
54
- task :upload => :rdoc do
55
- config = YAML.load(File.read(File.expand_path("~/.rubyforge/config.yml")))
56
- user = "#{config["username"]}@rubyforge.org"
57
- project = '/var/www/gforge-projects/rubyinline'
58
- local_dir = 'doc'
59
- pub = Rake::SshDirPublisher.new user, project, local_dir
60
- pub.upload
61
- end
62
-
63
- require 'rubygems'
64
- require './inline.rb'
65
-
66
- spec = Gem::Specification.new do |s|
67
-
68
- s.name = 'RubyInline'
69
- s.version = Inline::VERSION
70
- s.summary = "Multi-language extension coding within ruby."
71
-
72
- paragraphs = File.read("README.txt").split(/\n\n+/)
73
- s.description = paragraphs[3]
74
- puts s.description
75
-
76
- s.requirements << "A POSIX environment and a compiler for your language."
77
- s.files = IO.readlines("Manifest.txt").map {|f| f.chomp }
78
-
79
- s.bindir = "."
80
- s.executables = ['inline_package']
81
- puts "Executables = #{s.executables.join(", ")}"
82
-
83
- s.require_path = '.'
84
- s.autorequire = 'inline'
85
-
86
- s.has_rdoc = false # I SUCK - TODO
87
- s.test_suite_file = "test_inline.rb"
88
-
89
- s.author = "Ryan Davis"
90
- s.email = "ryand-ruby@zenspider.com"
91
- s.homepage = "http://www.zenspider.com/ZSS/Products/RubyInline/"
92
- s.rubyforge_project = "rubyinline"
93
- end
94
-
95
- if $0 == __FILE__
96
- Gem.manage_gems
97
- Gem::Builder.new(spec).build
98
- end
99
-
100
- desc 'Build Gem'
101
- Rake::GemPackageTask.new spec do |pkg|
102
- pkg.need_tar = true
103
- end
104
-
105
- task :install do
106
- install 'inline.rb', RUBYLIB, :mode => 0444
107
- install 'inline_package', File.join(PREFIX, 'bin'), :mode => 0555
108
- end
109
-
110
- task :uninstall do
111
- rm File.join(RUBYLIB, 'inline.rb')
112
- rm File.join(PREFIX, 'bin', 'inline_package')
113
- end
114
-
115
- task :clean => [ :clobber_rdoc, :clobber_package ] do
116
- rm Dir["*~"]
117
- rm_rf %w(~/.ruby_inline)
118
- end
data/inline.rb CHANGED
@@ -51,7 +51,7 @@ class CompilationError < RuntimeError; end
51
51
  # the current namespace.
52
52
 
53
53
  module Inline
54
- VERSION = '3.6.0'
54
+ VERSION = '3.6.1'
55
55
 
56
56
  WINDOZE = /win32/ =~ RUBY_PLATFORM
57
57
  DEV_NULL = (WINDOZE ? 'nul' : '/dev/null')
@@ -148,7 +148,7 @@ module Inline
148
148
  sig.gsub!(/\s+/, ' ')
149
149
 
150
150
  unless defined? @types then
151
- @types = 'void|VALUE|' + @@type_map.keys.map{|x| Regexp.escape(x)}.join('|')
151
+ @types = 'void|' + @@type_map.keys.map{|x| Regexp.escape(x)}.join('|')
152
152
  end
153
153
 
154
154
  if /(#{@types})\s*(\w+)\s*\(([^)]*)\)/ =~ sig then
@@ -386,9 +386,12 @@ module Inline
386
386
 
387
387
  cmd = "#{Config::CONFIG['LDSHARED']} #{flags} #{Config::CONFIG['CFLAGS']} -I #{hdrdir} -o \"#{so_name}\" \"#{File.expand_path(src_name)}\" #{libs}"
388
388
 
389
+ # gawd windoze land sucks
389
390
  case RUBY_PLATFORM
390
391
  when /mswin32/ then
391
392
  cmd += " -link /LIBPATH:\"#{Config::CONFIG['libdir']}\" /DEFAULTLIB:\"#{Config::CONFIG['LIBRUBY']}\" /INCREMENTAL:no /EXPORT:Init_#{module_name}"
393
+ when /mingw32/ then
394
+ cmd += " -Wl,--enable-auto-import -L#{Config::CONFIG['libdir']} -lmsvcrt-ruby18"
392
395
  when /i386-cygwin/ then
393
396
  cmd += ' -L/usr/local/lib -lruby.dll'
394
397
  end
@@ -452,7 +455,7 @@ module Inline
452
455
  # Registers C type-casts +r2c+ and +c2r+ for +type+.
453
456
 
454
457
  def add_type_converter(type, r2c, c2r)
455
- $stderr.puts "WARNING: overridding #{type}" if @@type_map.has_key? type
458
+ $stderr.puts "WARNING: overridding #{type} on #{caller[0]}" if @@type_map.has_key? type
456
459
  @@type_map[type] = [r2c, c2r]
457
460
  end
458
461
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: RubyInline
5
5
  version: !ruby/object:Gem::Version
6
- version: 3.6.0
7
- date: 2006-09-15 00:00:00 -07:00
6
+ version: 3.6.1
7
+ date: 2006-10-11 00:00:00 -07:00
8
8
  summary: Multi-language extension coding within ruby.
9
9
  require_paths:
10
10
  - .
@@ -12,10 +12,10 @@ email: ryand-ruby@zenspider.com
12
12
  homepage: http://www.zenspider.com/ZSS/Products/RubyInline/
13
13
  rubyforge_project: rubyinline
14
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: inline
15
+ autorequire:
16
16
  default_executable:
17
- bindir: .
18
- has_rdoc: false
17
+ bindir: bin
18
+ has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
21
  - - ">"
@@ -42,17 +42,25 @@ files:
42
42
  - test_inline.rb
43
43
  - tutorial/example1.rb
44
44
  - tutorial/example2.rb
45
- test_files:
46
- - test_inline.rb
45
+ test_files: []
46
+
47
47
  rdoc_options: []
48
48
 
49
49
  extra_rdoc_files: []
50
50
 
51
- executables:
52
- - inline_package
51
+ executables: []
52
+
53
53
  extensions: []
54
54
 
55
55
  requirements:
56
56
  - A POSIX environment and a compiler for your language.
57
- dependencies: []
58
-
57
+ dependencies:
58
+ - !ruby/object:Gem::Dependency
59
+ name: hoe
60
+ version_requirement:
61
+ version_requirements: !ruby/object:Gem::Version::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 1.1.1
66
+ version: