rbind 0.0.20 → 0.0.21

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.
@@ -194,6 +194,10 @@ module Rbind
194
194
  Kernel.binding
195
195
  end
196
196
 
197
+ def doc?
198
+ !!doc
199
+ end
200
+
197
201
  def doc(&block)
198
202
  if block
199
203
  @doc = block
@@ -234,6 +234,10 @@ module Rbind
234
234
  end
235
235
  end
236
236
 
237
+ def add_doc
238
+ GeneratorRuby.normalize_doc(@root.root.doc) if @root.root.doc?
239
+ end
240
+
237
241
  def normalize_bt(name)
238
242
  GeneratorRuby.normalize_basic_type_name_ffi name
239
243
  end
@@ -678,7 +682,7 @@ module Rbind
678
682
 
679
683
  def initialize(root,module_name ="Rbind",library_name="rbind_lib")
680
684
  @root = root
681
- @rbind_wrapper = ERB.new(File.open(File.join(File.dirname(__FILE__),"templates","ruby","rbind.rb")).read)
685
+ @rbind_wrapper = ERB.new(File.open(File.join(File.dirname(__FILE__),"templates","ruby","rbind.rb")).read,nil,"-")
682
686
  @module_name = module_name
683
687
  @library_name = library_name
684
688
  @compact_namespace = true
@@ -36,9 +36,9 @@ else()
36
36
  FIND_PACKAGE(Ruby)
37
37
  IF(NOT RUBY_INCLUDE_PATH)
38
38
  MESSAGE(STATUS "Ruby library not found. Cannot install ruby extensions")
39
- ELSEIF(RUBY_EXTENSIONS_AVAILABLE)
39
+ ELSE(NOT RUBY_INCLUDE_PATH)
40
40
  STRING(REGEX REPLACE ".*lib(32|64)?/?" "lib/" RUBY_LIBRARY_INSTALL_DIR ${RUBY_RUBY_LIB_PATH})
41
- INSTALL(DIRECTORY ${ROOT_FOLDER}/lib/ruby/ DESTINATION ${RUBY_LIBRARY_INSTALL_DIR}
41
+ INSTALL(DIRECTORY ${ROOT_FOLDER}/lib/ DESTINATION ${RUBY_LIBRARY_INSTALL_DIR}
42
42
  FILES_MATCHING PATTERN "*.rb")
43
43
  ENDIF(NOT RUBY_INCLUDE_PATH)
44
44
  endif()
@@ -2,6 +2,7 @@ require 'ffi'
2
2
  require File.join(File.dirname(__FILE__),'<%= file_prefix %>_types.rb')
3
3
  <%= required_module_names %>
4
4
 
5
+ <%= add_doc -%>
5
6
  module <%= name %>
6
7
  # low level accessors the wrapped library
7
8
  module Rbind
data/rbind.gemspec CHANGED
@@ -1,17 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rbind'
3
- s.version = '0.0.20'
4
- s.date = '2013-08-16'
3
+ s.version = '0.0.21'
4
+ s.date = '2013-08-21'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Alexander Duda']
7
7
  s.email = ['Alexander.Duda@dfki.de']
8
8
  s.homepage = 'http://github.com/D-Alex/rbind'
9
9
  s.summary = 'Library for genereating automated ffi-bindings for c/c++ libraries'
10
10
  s.description = 'Rbind is developed to automatically generate ruby bindings for OpenCV '\
11
- 'but is not tight to this library. It allows to import already wrapped types '\
12
- 'from other gems/libraries using rbind to share the same types across '\
13
- 'multiple gems/libraries. For now rbind uses a copy of the OpenCV python hdr_parser '\
14
- 'to parse c/c++ header files.'\
11
+ 'but is not tight to this library.'\
15
12
  'This gem is still under heavy development and the API might change in the future.'
16
13
  s.files = `git ls-files`.split("\n")
17
14
  s.require_path = 'lib'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rbind
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.20
5
+ version: 0.0.21
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alexander Duda
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-08-16 00:00:00 Z
13
+ date: 2013-08-21 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hooks
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: 1.9.0
35
35
  type: :runtime
36
36
  version_requirements: *id002
37
- description: Rbind is developed to automatically generate ruby bindings for OpenCV but is not tight to this library. It allows to import already wrapped types from other gems/libraries using rbind to share the same types across multiple gems/libraries. For now rbind uses a copy of the OpenCV python hdr_parser to parse c/c++ header files.This gem is still under heavy development and the API might change in the future.
37
+ description: Rbind is developed to automatically generate ruby bindings for OpenCV but is not tight to this library.This gem is still under heavy development and the API might change in the future.
38
38
  email:
39
39
  - Alexander.Duda@dfki.de
40
40
  executables: []