rdf-smart 0.0.160 → 0.0.161

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78ede09b53e8ab4ee847a46ae53668ab4aae6c18
4
- data.tar.gz: 93637364de62f557c0bfddbabbf338f7321e0be5
3
+ metadata.gz: 82079602d9f4965078e93a8db345ec93deb34a4e
4
+ data.tar.gz: 85ee106a5a2bbb68d9250517352a195f15f6a07d
5
5
  SHA512:
6
- metadata.gz: 9ecd91d8fc820d0b4a326a3cfcf6f48350579b04ed2e358bada4362580aa9b1688bc818da1a336898f27ad1a3ca412f7de1c3aa05934b5ce04be228eac7e4f74
7
- data.tar.gz: 13a3a5c2724d2efecf2c0027a1ed0e327d741787f681f6b3aa5812bdb1ef8c56b1a43d4d955e38ce1eb8669634df801b977db85da2891f485f8b9d792fb7e88a
6
+ metadata.gz: 3809df4f7997796b7dfce79b68f0ccac2c0e431e7a145160d078ae3a3b1106cb467f135418d90f6bd445f74f353b1ae5ee512bbe02c7ae221cf5777bb26c9412
7
+ data.tar.gz: 14d9dc5fd67e9bd86f863dd856690bc1eefbcbcba4c19ac8f1436e866671bdace110ce62b1f463e77edac9efa2790c06a2a9aeab4f53a1d5c6acfa671fdb9652
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
1
  rdf-smart
2
2
  ================
3
3
  Will be great.
4
+ For the examples to work, just run +rake+ once.
data/ext/Makefile CHANGED
@@ -78,7 +78,7 @@ optflags = -O3 -fno-fast-math
78
78
  debugflags = -ggdb3
79
79
  warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
80
80
  CCDLFLAGS = -fPIC
81
- CFLAGS = $(CCDLFLAGS) -DRSM_VERSION=\"0.0.160\" -std=c99 -I/usr/include/rasqal -I/usr/include/raptor2 -g -Wall -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC $(ARCH_FLAG)
81
+ CFLAGS = $(CCDLFLAGS) -DRSM_VERSION=\"0.0.161\" -std=c99 -I/usr/include/rasqal -I/usr/include/raptor2 -g -Wall -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC $(ARCH_FLAG)
82
82
  INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
83
83
  DEFS =
84
84
  CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
data/ext/rsm.c CHANGED
@@ -1,5 +1,6 @@
1
1
  #include "rsm.h"
2
2
 
3
+ /* -- */
3
4
  // ************************************************************************************
4
5
  // GC
5
6
  // ************************************************************************************
@@ -321,8 +322,6 @@ VALUE rsm_execute(VALUE self, VALUE query) {
321
322
  }
322
323
 
323
324
  /*
324
- * [Document-method: +data_sources+]
325
- *
326
325
  * Method description here.
327
326
  */
328
327
  VALUE rsm_data_sources(VALUE self) {
@@ -331,31 +330,50 @@ VALUE rsm_data_sources(VALUE self) {
331
330
  return(prsm_obj->data_sources);
332
331
  }
333
332
 
334
- VALUE rsm_new(int argc, VALUE *argv, VALUE class) {
335
- int i;
333
+ VALUE allocate(VALUE class) {
336
334
  rsm_obj *prsm_obj = (rsm_obj *)malloc(sizeof(rsm_obj));
335
+ return(Data_Wrap_Struct(class, rsm_mark, rsm_free, prsm_obj));
336
+ }
337
+
338
+ /*
339
+ * Method description here.
340
+ */
341
+ VALUE rsm_initialize(int argc, VALUE *argv, VALUE self) {
342
+ int i;
343
+ rsm_obj *prsm_obj;
344
+ Data_Get_Struct(self, rsm_obj, prsm_obj);
337
345
  prsm_obj->data_sources = rb_ary_new();
338
346
  for (i=0; i<argc; i++) {
339
347
  if (TYPE(argv[i]) == T_STRING)
340
348
  rb_ary_push(prsm_obj->data_sources,argv[i]);
341
349
  }
342
- return(Data_Wrap_Struct(rsm_Smart, rsm_mark, rsm_free, prsm_obj));
350
+
351
+ return self;
343
352
  }
344
353
 
345
354
  VALUE rsm_RDF;
346
355
  VALUE rsm_Smart;
347
356
 
348
- void Init_smart( void ) {
357
+ void Init_smart(void) {
358
+ /*
359
+ * Our module
360
+ */
349
361
  rsm_RDF = rb_define_module( "RDF" );
362
+ /*
363
+ * Our class
364
+ */
350
365
  rsm_Smart = rb_define_class_under( rsm_RDF, "Smart", rb_cObject);
351
- rb_define_singleton_method(rsm_Smart, "new", (VALUE(*)(ANYARGS))rsm_new, -1);
352
- rb_define_method(rsm_Smart, "data_sources", (VALUE(*)(ANYARGS))rsm_data_sources, 0);
353
- rb_define_method(rsm_Smart, "namespaces", (VALUE(*)(ANYARGS))rsm_namespaces, 0);
354
- rb_define_private_method(rsm_Smart, "__execute", (VALUE(*)(ANYARGS))rsm_execute, 1);
366
+ rsm_RDF = rsm_RDF;
367
+ rsm_Smart = rsm_Smart;
355
368
  /*
356
369
  * Equals the current version number
357
370
  */
358
371
  rb_define_const(rsm_Smart, "VERSION", rb_str_new2(RSM_VERSION));
372
+ rb_define_alloc_func( rsm_Smart, allocate);
373
+ rb_define_method( rsm_Smart, "initialize", rsm_initialize, -1);
374
+ rb_define_method( rsm_Smart, "data_sources", rsm_data_sources, 0);
375
+ rb_define_method( rsm_Smart, "namespaces", rsm_namespaces, 0);
376
+ rb_define_private_method( rsm_Smart, "__execute", rsm_execute, 1);
359
377
 
360
378
  }
361
379
 
data/ext/rsm.h CHANGED
@@ -37,8 +37,8 @@
37
37
  #define RB_IO_T_FD(o) fileno(o->f)
38
38
  #endif
39
39
 
40
- RUBY_EXTERN VALUE rsm_RDF;
41
- RUBY_EXTERN VALUE rsm_Smart;
40
+ extern VALUE rsm_RDF;
41
+ extern VALUE rsm_Smart;
42
42
 
43
43
  typedef struct rsm_obj {
44
44
  VALUE data_sources;
data/ext/rsm.o CHANGED
Binary file
data/ext/smart.so CHANGED
Binary file
data/rdf-smart.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rdf-smart'
3
- s.version = '0.0.160'
3
+ s.version = '0.0.161'
4
4
  s.date = '2014-06-17'
5
5
  s.summary ="RDF.rb segfaults. A lot. We don't. RDF.rb has lots of features. We don't."
6
6
  s.description ="Minimal sparql support for ruby. Basically the roqet tool from http://librdf.org, with always guessing input type, and always json output."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-smart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.160
4
+ version: 0.0.161
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Stertz