toss-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 015c51f338d42c5654c542a2a37d47ffd5f48c10
4
+ data.tar.gz: 02af081e99071edf6c1a6d9479afbacb627ee792
5
+ SHA512:
6
+ metadata.gz: 9ce373f85caad1e3796fdbde51e787a10acd091f508eae866521d558984d67fa9e2564f285fffc6c0d85f18ac3b4980e68915b069b7e78b855a47dac67bc5438
7
+ data.tar.gz: 5a4f758f6dfbf28a84385491672472a0d451ac125b7d2f91cb412e4967fbe400fa7e228b9ab28d8e90a3f5b43c3cd8da1367459f463c624769039adbdbcec658
@@ -0,0 +1,4 @@
1
+ require 'mkmf'
2
+
3
+ have_library("toss")
4
+ create_makefile 'toss-ruby/toss'
@@ -0,0 +1,43 @@
1
+ #include <ruby.h>
2
+ #include <Toss/Toss.h>
3
+
4
+ extern "C" void Init_toss();
5
+
6
+ static VALUE mToss = Qnil;
7
+ static VALUE cGenerator = Qnil;
8
+
9
+ static VALUE
10
+ gen_new(VALUE klass)
11
+ {
12
+ return Data_Wrap_Struct(klass, NULL, NULL, new toss::Generator);
13
+ }
14
+
15
+ static VALUE
16
+ gen_parse_file(VALUE self, VALUE file)
17
+ {
18
+ toss::Generator* s;
19
+
20
+ Data_Get_Struct(self, toss::Generator, s);
21
+ s->parseFile(StringValueCStr(file));
22
+ return Qnil;
23
+ }
24
+
25
+ static VALUE
26
+ gen_generate(VALUE self)
27
+ {
28
+ toss::Generator* s;
29
+
30
+ Data_Get_Struct(self, toss::Generator, s);
31
+ s->generate();
32
+ return Qnil;
33
+ }
34
+
35
+ void
36
+ Init_toss()
37
+ {
38
+ mToss = rb_define_module("Toss");
39
+ cGenerator = rb_define_class_under(mToss, "Generator", rb_cObject);
40
+ rb_define_alloc_func(cGenerator, gen_new);
41
+ rb_define_method(cGenerator, "parse_file", (VALUE(*)(...))gen_parse_file, 1);
42
+ rb_define_method(cGenerator, "generate", (VALUE(*)(...))gen_generate, 0);
43
+ }
data/lib/toss-ruby.rb ADDED
@@ -0,0 +1 @@
1
+ require 'toss-ruby/toss'
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: toss-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Nax
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake-compiler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Toss-ruby is a ruby binding of the toss library.
42
+ email: max.bacoux@gmail.com
43
+ executables: []
44
+ extensions:
45
+ - ext/toss-ruby/toss/extconf.rb
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ext/toss-ruby/toss/extconf.rb
49
+ - ext/toss-ruby/toss/toss.cpp
50
+ - lib/toss-ruby.rb
51
+ homepage: https://rubygems.org/gems/toss-ruby
52
+ licenses:
53
+ - MIT
54
+ metadata: {}
55
+ post_install_message:
56
+ rdoc_options: []
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ requirements: []
70
+ rubyforge_project:
71
+ rubygems_version: 2.4.3
72
+ signing_key:
73
+ specification_version: 4
74
+ summary: A ruby binding of the toss library.
75
+ test_files: []