ruby-FFI-utilities 0.1.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 +7 -0
- data/.codeclimate.yml +14 -0
- data/.gitignore +54 -0
- data/.rspec +2 -0
- data/.rubocop.yml +1171 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +29 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +48 -0
- data/LICENSE +340 -0
- data/README.md +90 -0
- data/Rakefile +21 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/FFI/utilities.rb +17 -0
- data/lib/FFI/utilities/deprecated.rb +15 -0
- data/lib/FFI/utilities/set_argv.rb +28 -0
- data/lib/FFI/utilities/set_string.rb +21 -0
- data/lib/FFI/utilities/struct.rb +30 -0
- data/lib/FFI/utilities/struct_extensions.rb +156 -0
- data/lib/FFI/utilities/suffixes.rb +38 -0
- data/lib/FFI/utilities/version.rb +5 -0
- data/lib/tasks/fixtures.rake +29 -0
- data/lib/tasks/rdoc.rake +6 -0
- data/ruby-FFI-utilities.gemspec +33 -0
- metadata +111 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
namespace :fixtures do
|
2
|
+
namespace :C do
|
3
|
+
|
4
|
+
C_FIXTURE_PATH = File.expand_path(File.join(['..'] * 3, 'spec', 'fixtures', 'C'), __FILE__)
|
5
|
+
|
6
|
+
desc 'build the C library fixture'
|
7
|
+
task :build do
|
8
|
+
cd(C_FIXTURE_PATH) { sh "make OS_NAME=#{guess_platform}" }
|
9
|
+
end
|
10
|
+
|
11
|
+
desc 'cleanup the C library fixture'
|
12
|
+
task :clean do
|
13
|
+
cd(C_FIXTURE_PATH) { sh "make OS_NAME=\"#{guess_platform}\" clean" }
|
14
|
+
end
|
15
|
+
|
16
|
+
def guess_platform
|
17
|
+
res = ENV['TRAVIS_OS_NAME']
|
18
|
+
unless res
|
19
|
+
res = case RUBY_PLATFORM
|
20
|
+
when /linux/ then 'linux'
|
21
|
+
when /darwin/ then 'osx'
|
22
|
+
else raise StandardError, "unknown platform #{RUBY_PLATFORM}: you can add one at #{__FILE__}:#{__LINE__-1}"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
res
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
data/lib/tasks/rdoc.rake
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'FFI/utilities/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'ruby-FFI-utilities'
|
8
|
+
spec.version = FFI::Utilities::VERSION
|
9
|
+
spec.authors = ['Nicola Bernardini']
|
10
|
+
spec.email = ['n.bernardini@conservatoriosantacecilia.it']
|
11
|
+
|
12
|
+
spec.summary = %q{Ruby FFI Utilities}
|
13
|
+
spec.description = %q{Utilities for the FFI (Foreign Function Interface) library for Ruby}
|
14
|
+
spec.homepage = 'https://github.com/nicb/ruby-FFI-utilities'
|
15
|
+
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
31
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
32
|
+
spec.add_development_dependency 'ffi'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-FFI-utilities
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nicola Bernardini
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ffi
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Utilities for the FFI (Foreign Function Interface) library for Ruby
|
56
|
+
email:
|
57
|
+
- n.bernardini@conservatoriosantacecilia.it
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".codeclimate.yml"
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".rubocop.yml"
|
66
|
+
- ".ruby-gemset"
|
67
|
+
- ".ruby-version"
|
68
|
+
- ".travis.yml"
|
69
|
+
- CODE_OF_CONDUCT.md
|
70
|
+
- Gemfile
|
71
|
+
- Gemfile.lock
|
72
|
+
- LICENSE
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- bin/console
|
76
|
+
- bin/setup
|
77
|
+
- lib/FFI/utilities.rb
|
78
|
+
- lib/FFI/utilities/deprecated.rb
|
79
|
+
- lib/FFI/utilities/set_argv.rb
|
80
|
+
- lib/FFI/utilities/set_string.rb
|
81
|
+
- lib/FFI/utilities/struct.rb
|
82
|
+
- lib/FFI/utilities/struct_extensions.rb
|
83
|
+
- lib/FFI/utilities/suffixes.rb
|
84
|
+
- lib/FFI/utilities/version.rb
|
85
|
+
- lib/tasks/fixtures.rake
|
86
|
+
- lib/tasks/rdoc.rake
|
87
|
+
- ruby-FFI-utilities.gemspec
|
88
|
+
homepage: https://github.com/nicb/ruby-FFI-utilities
|
89
|
+
licenses: []
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.4.5
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: Ruby FFI Utilities
|
111
|
+
test_files: []
|