remogatto-ffi-swig-generator 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,8 +1,3 @@
1
- == 0.2.1 / 2009-03-06
2
-
3
- * 1 minor enhancement
4
- * Removed old lib/ffi-generator.rb file.
5
-
6
1
  == 0.2.0 / 2009-03-05
7
2
 
8
3
  * 1 major enhancement
@@ -0,0 +1,48 @@
1
+ module FFI
2
+ module Generator
3
+ # :stopdoc:
4
+ VERSION = '0.2.0'
5
+ LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
6
+ PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
7
+ # :startdoc:
8
+
9
+ # Returns the version string for the library.
10
+ #
11
+ def self.version
12
+ VERSION
13
+ end
14
+
15
+ # Returns the library path for the module. If any arguments are given,
16
+ # they will be joined to the end of the libray path using
17
+ # <tt>File.join</tt>.
18
+ #
19
+ def self.libpath( *args )
20
+ args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
21
+ end
22
+
23
+ # Returns the lpath for the module. If any arguments are given,
24
+ # they will be joined to the end of the path using
25
+ # <tt>File.join</tt>.
26
+ #
27
+ def self.path( *args )
28
+ args.empty? ? PATH : ::File.join(PATH, args.flatten)
29
+ end
30
+
31
+ # Utility method used to require all files ending in .rb that lie in the
32
+ # directory below this file that has the same name as the filename passed
33
+ # in. Optionally, a specific _directory_ name can be passed in such that
34
+ # the _filename_ does not have to be equivalent to the directory.
35
+ #
36
+ def self.require_all_libs_relative_to( fname, dir = nil )
37
+ dir ||= ::File.basename(fname, '.*')
38
+ search_me = ::File.expand_path(
39
+ ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
40
+
41
+ Dir.glob(search_me).sort.each {|rb| require rb}
42
+ end
43
+ end
44
+ end
45
+
46
+ FFI::Generator.require_all_libs_relative_to(__FILE__, 'generator')
47
+
48
+ # EOF
@@ -1,7 +1,8 @@
1
+
1
2
  module FFI
2
3
  module Generator
3
4
  # :stopdoc:
4
- VERSION = '0.2.1'
5
+ VERSION = '0.2.0'
5
6
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
6
7
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
7
8
  # :startdoc:
@@ -36,7 +36,7 @@ EOU
36
36
  help
37
37
  exit
38
38
  when '--version'
39
- puts "ffi-swig-generator, version #{Generator::VERSION}\n"
39
+ puts "ffi-generator, version #{Generator::VERSION}\n"
40
40
  exit
41
41
  end
42
42
  end
data/spec/spec_helper.rb CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'spec'
3
3
 
4
4
  require File.expand_path(
5
- File.join(File.dirname(__FILE__), %w[.. lib ffi-swig-generator]))
5
+ File.join(File.dirname(__FILE__), %w[.. lib ffi-generator]))
6
6
 
7
7
  Spec::Runner.configure do |config|
8
8
  # == Mock Framework
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remogatto-ffi-swig-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Fazzi
@@ -49,8 +49,13 @@ files:
49
49
  - Rakefile
50
50
  - bin/ffi-gen
51
51
  - examples/Rakefile
52
+ - examples/generated/libc_wrap.rb
53
+ - examples/generated/libc_wrap.xml
54
+ - examples/generated/wiiuse_wrap.rb
55
+ - examples/generated/wiiuse_wrap.xml
52
56
  - examples/interfaces/libc.i
53
57
  - examples/interfaces/wiiuse.i
58
+ - lib/ffi-generator.rb
54
59
  - lib/ffi-swig-generator.rb
55
60
  - lib/generator/application.rb
56
61
  - lib/generator/generator.rb