libspecinfra 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/libspecinfra.rb +31 -0
- data/lib/libspecinfra/backend.rb +1 -0
- data/lib/libspecinfra/backend/direct.rb +17 -0
- data/lib/libspecinfra/version.rb +3 -0
- data/libspecinfra.dylib +0 -0
- data/libspecinfra.gemspec +24 -0
- metadata +97 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0f955ca5d2335de08dfd8a215ca00b392f4e2a30
|
4
|
+
data.tar.gz: 0e902cde30289dccfe27e95b3d7bcf258604882b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 17599ef532208c2dad11fef089bf3158a9a720fcf2f47d191f3e6ddba62546cf8b7ac013533bd97de5bfc9f1ccfba30621315521d8723e268b1f90094b1ac62b
|
7
|
+
data.tar.gz: 4916496e8318022d76b3d8e6dfd0e1227a3d645e63760c801e3fc1666f1904e518231cf22cc63a77b55492c5cecfea3ed6a4dad4bbf2907cadf7abee35a75a59
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Libspecinfra
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/libspecinfra`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'libspecinfra'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install libspecinfra
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/libspecinfra.
|
36
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "libspecinfra"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/libspecinfra.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'libspecinfra/version'
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
require 'libspecinfra/backend'
|
5
|
+
require 'libspecinfra/backend/direct'
|
6
|
+
|
7
|
+
module Libspecinfra
|
8
|
+
def self.new(backend)
|
9
|
+
Specinfra::Binding.new(backend)
|
10
|
+
end
|
11
|
+
|
12
|
+
class Specinfra < FFI::AutoPointer
|
13
|
+
def self.release(ptr)
|
14
|
+
Binding.free(ptr)
|
15
|
+
end
|
16
|
+
|
17
|
+
def echo
|
18
|
+
Binding.echo(self)
|
19
|
+
end
|
20
|
+
|
21
|
+
module Binding
|
22
|
+
extend FFI::Library
|
23
|
+
ffi_lib ['../specinfra/target/debug/libspecinfra.dylib', 'libspecinfra']
|
24
|
+
|
25
|
+
attach_function :new, :specinfra_new,
|
26
|
+
[:pointer], Specinfra
|
27
|
+
attach_function :free, :backend_direct_free,
|
28
|
+
[Libspecinfra::Backend::Direct], :void
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
module Libspecinfra::Backend;end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class Libspecinfra::Backend::Direct < FFI::AutoPointer
|
2
|
+
def self.release(ptr)
|
3
|
+
Binding.free(ptr)
|
4
|
+
end
|
5
|
+
|
6
|
+
module Binding
|
7
|
+
extend FFI::Library
|
8
|
+
ffi_lib ['../specinfra/target/debug/libspecinfra.dylib', 'libspecinfra']
|
9
|
+
|
10
|
+
attach_function :new, :backend_direct_new,
|
11
|
+
[], Libspecinfra::Backend::Direct
|
12
|
+
|
13
|
+
attach_function :free, :backend_direct_free,
|
14
|
+
[Libspecinfra::Backend::Direct], :void
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
data/libspecinfra.dylib
ADDED
Binary file
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'libspecinfra/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "libspecinfra"
|
8
|
+
spec.version = Libspecinfra::VERSION
|
9
|
+
spec.authors = ["Gosuke Miyashita"]
|
10
|
+
spec.email = ["gosukenator@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "Ruby binding for libspecinfra."
|
13
|
+
spec.description = "Ruby binding for libspecinfra."
|
14
|
+
spec.homepage = "https://github.com/libspecinfra/libspecinfra-ruby"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_runtime_dependency "ffi"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: libspecinfra
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Gosuke Miyashita
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-21 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.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
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: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Ruby binding for libspecinfra.
|
56
|
+
email:
|
57
|
+
- gosukenator@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- README.md
|
65
|
+
- Rakefile
|
66
|
+
- bin/console
|
67
|
+
- bin/setup
|
68
|
+
- lib/libspecinfra.rb
|
69
|
+
- lib/libspecinfra/backend.rb
|
70
|
+
- lib/libspecinfra/backend/direct.rb
|
71
|
+
- lib/libspecinfra/version.rb
|
72
|
+
- libspecinfra.dylib
|
73
|
+
- libspecinfra.gemspec
|
74
|
+
homepage: https://github.com/libspecinfra/libspecinfra-ruby
|
75
|
+
licenses: []
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options: []
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 2.2.2
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Ruby binding for libspecinfra.
|
97
|
+
test_files: []
|