gd2-ffij 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/COPYRIGHT +1 -3
- data/Gemfile +10 -5
- data/README.rdoc +0 -2
- data/Rakefile +1 -1
- data/lib/gd2-ffij.rb +18 -10
- data/lib/gd2/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa7d138e9bc1811d93f29940223d4ef351cb386e
|
4
|
+
data.tar.gz: d5d2045cd120680ca95fb4b0fe45f5faab48145b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9874c2866d83776849d4208176df0f0068505cc50b226eea321ace4ae9cfbc06ca0b7f75184e14a3ea332a7dbdf013a069bf9b8439305e061c89e694ece8acf8
|
7
|
+
data.tar.gz: 792e63569a789cf97722e116b1c65907c7ffee7fa332abe0481d2db952a7297ad5b0c57aab2b0036a1e047527c4c019fb28acac3cb76fcf7260a343dcf858555
|
data/COPYRIGHT
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
|
2
|
-
THIS BRANCH CONTAINS A PROPOSAL FOR A LICENSE CHANGE AND IS NOT MEANT FOR RELEASE
|
3
|
-
|
4
2
|
Original Ruby/GD2 library placed in public domain by Robert Leslie:
|
5
3
|
|
6
4
|
"I hereby relinquish my copyright claim and place the library
|
@@ -18,7 +16,7 @@ See https://github.com/dark-panda/gd2-ffij/issues/10 ("Consider moving back to
|
|
18
16
|
BSD now that FFI is back to BSD?") for details.
|
19
17
|
|
20
18
|
|
21
|
-
Subsequent code added and modified to create gd2-ffij copyright (C) 2010-
|
19
|
+
Subsequent code added and modified to create gd2-ffij copyright (C) 2010-2015
|
22
20
|
J Smith <dark.panda@gmail.com> and published under the MIT license as follows:
|
23
21
|
|
24
22
|
Permission is hereby granted, free of charge, to any person
|
data/Gemfile
CHANGED
@@ -6,12 +6,17 @@ gem "rdoc", "~> 3.12"
|
|
6
6
|
gem "rake", "~> 10.0"
|
7
7
|
gem "minitest"
|
8
8
|
gem "minitest-reporters"
|
9
|
-
gem "guard-minitest"
|
10
|
-
gem "simplecov"
|
11
9
|
|
12
|
-
|
13
|
-
gem
|
14
|
-
gem
|
10
|
+
platforms :rbx do
|
11
|
+
gem 'rubysl', '~> 2.0'
|
12
|
+
gem 'rubinius-developer_tools'
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
if RUBY_VERSION >= '1.9'
|
17
|
+
gem "simplecov"
|
18
|
+
gem "guard"
|
19
|
+
gem 'guard-minitest'
|
15
20
|
end
|
16
21
|
|
17
22
|
if File.exists?('Gemfile.local')
|
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
data/lib/gd2-ffij.rb
CHANGED
@@ -40,13 +40,7 @@ module GD2
|
|
40
40
|
|
41
41
|
extend FFI::Library
|
42
42
|
|
43
|
-
|
44
|
-
ffi_lib(*gd_library_name)
|
45
|
-
rescue LoadError, NoMethodError
|
46
|
-
raise LoadError.new("Couldn't load the gd2 library.")
|
47
|
-
end
|
48
|
-
|
49
|
-
{
|
43
|
+
FFI_LAYOUT = {
|
50
44
|
:gdImageCreate => [ :pointer, :int, :int ],
|
51
45
|
:gdImageCreateTrueColor => [ :pointer, :int, :int ],
|
52
46
|
:gdImageCreatePaletteFromTrueColor => [ :pointer, :pointer, :int, :int ],
|
@@ -137,9 +131,23 @@ module GD2
|
|
137
131
|
:gdFontCacheShutdown => [ :void ],
|
138
132
|
:gdFTUseFontConfig => [ :int, :int ],
|
139
133
|
:gdFree => [ :void, :pointer ]
|
140
|
-
}
|
141
|
-
|
142
|
-
|
134
|
+
}
|
135
|
+
|
136
|
+
begin
|
137
|
+
ffi_lib(gd_library_name)
|
138
|
+
|
139
|
+
FFI_LAYOUT.each do |fun, ary|
|
140
|
+
ret = ary.shift
|
141
|
+
begin
|
142
|
+
self.class_eval do
|
143
|
+
attach_function(fun, ary, ret)
|
144
|
+
end
|
145
|
+
rescue FFI::NotFoundError
|
146
|
+
# that's okay
|
147
|
+
end
|
148
|
+
end
|
149
|
+
rescue LoadError, NoMethodError
|
150
|
+
raise LoadError.new("Couldn't load the gd2 library.")
|
143
151
|
end
|
144
152
|
end
|
145
153
|
|
data/lib/gd2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gd2-ffij
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.4.6
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: gd2-ffij is a refactoring of the Ruby/GD2 library implemented with FFI
|