ffi-inline 0.0.4.1 → 0.0.4.2
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Version 2, December 2004
|
4
4
|
#
|
5
5
|
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
6
|
-
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
6
|
+
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
7
7
|
#
|
8
8
|
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
9
9
|
#++
|
@@ -40,17 +40,17 @@ private
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def input
|
43
|
-
File.join(
|
43
|
+
File.join(Inline.directory, "#{digest}.c").tap {|path|
|
44
44
|
File.open(path, 'w') { |f| f.write(@code) } unless File.exists?(path)
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
48
48
|
def output
|
49
|
-
File.join(
|
49
|
+
File.join(Inline.directory, "#{digest}.#{Compiler::Extension}")
|
50
50
|
end
|
51
51
|
|
52
52
|
def log
|
53
|
-
File.join(
|
53
|
+
File.join(Inline.directory, "#{digest}.log")
|
54
54
|
end
|
55
55
|
|
56
56
|
def ldshared
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# Version 2, December 2004
|
4
4
|
#
|
5
5
|
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
6
|
-
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
6
|
+
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
7
7
|
#
|
8
8
|
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
9
9
|
#++
|
@@ -40,17 +40,17 @@ private
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def input
|
43
|
-
File.join(
|
43
|
+
File.join(Inline.directory, "#{digest}.c").tap {|path|
|
44
44
|
File.open(path, 'w') { |f| f.write(@code) } unless File.exists?(path)
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
48
48
|
def output
|
49
|
-
File.join(
|
49
|
+
File.join(Inline.directory, "#{digest}.#{Compiler::Extension}")
|
50
50
|
end
|
51
51
|
|
52
52
|
def log
|
53
|
-
File.join(
|
53
|
+
File.join(Inline.directory, "#{digest}.log")
|
54
54
|
end
|
55
55
|
|
56
56
|
def ldshared
|
data/lib/ffi/inline/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
require 'ffi/
|
1
|
+
require 'ffi/inline'
|
2
2
|
|
3
|
-
describe FFI::
|
3
|
+
describe FFI::Inline do
|
4
4
|
before do
|
5
5
|
module Foo
|
6
|
-
extend FFI::
|
6
|
+
extend FFI::Inline
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
@@ -193,7 +193,7 @@ describe FFI::Inliner do
|
|
193
193
|
:c, :pointer
|
194
194
|
end
|
195
195
|
module Foo
|
196
|
-
extend FFI::
|
196
|
+
extend FFI::Inline
|
197
197
|
inline do |builder|
|
198
198
|
builder.struct MyStruct
|
199
199
|
builder.code.should == <<EOC
|
@@ -213,7 +213,7 @@ EOC
|
|
213
213
|
it 'should return the current compiler' do
|
214
214
|
module Foo
|
215
215
|
inline do |builder|
|
216
|
-
builder.compiler.should == FFI::
|
216
|
+
builder.compiler.should == FFI::Inline::Compiler[:gcc]
|
217
217
|
end
|
218
218
|
end
|
219
219
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-inline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4.
|
4
|
+
version: 0.0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -79,7 +79,7 @@ files:
|
|
79
79
|
- lib/ffi/inline/error.rb
|
80
80
|
- lib/ffi/inline/inline.rb
|
81
81
|
- lib/ffi/inline/version.rb
|
82
|
-
- spec/
|
82
|
+
- spec/inline_spec.rb
|
83
83
|
homepage: http://github.com/meh/ruby-ffi-inline
|
84
84
|
licenses: []
|
85
85
|
post_install_message:
|
@@ -105,4 +105,4 @@ signing_key:
|
|
105
105
|
specification_version: 3
|
106
106
|
summary: Inline C/C++ in Ruby easily and cleanly.
|
107
107
|
test_files:
|
108
|
-
- spec/
|
108
|
+
- spec/inline_spec.rb
|