rlua 1.0 → 1.1.beta1

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.
Files changed (8) hide show
  1. data/.gitignore +21 -0
  2. data/Gemfile +5 -0
  3. data/README.rdoc +4 -4
  4. data/Rakefile +33 -0
  5. data/ext/extconf.rb +1 -1
  6. data/ext/rlua.c +3 -3
  7. data/rlua.gemspec +25 -0
  8. metadata +92 -44
@@ -0,0 +1,21 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ Makefile
19
+ *.o
20
+ *.so
21
+ gh-pages/
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in furnace.gemspec
4
+ gemspec
5
+ gem 'hanna-nouveau'
@@ -1,9 +1,9 @@
1
1
  = Description
2
- RLua is Ruby to Lua bindings library that features almost full coverage of Lua
2
+ RLua is Ruby to Lua bindings library that features nearly complete coverage of Lua
3
3
  C API, seamless translation of Lua and Ruby objects into each other, calling Lua
4
4
  functions from Ruby and vice versa.
5
5
 
6
- RLua currently uses Lua 5.1, and is Ruby 1.8, 1.9 and 1.9.1 compatible.
6
+ RLua currently uses Lua 5.1, and is Ruby 1.8.7 and 1.9.x compatible.
7
7
 
8
8
  = Installation
9
9
  RLua is distributed as gem package through rubygems.org, so the procedure is
@@ -20,7 +20,7 @@ this (and so cannot provide a detailed description), it should work fine.
20
20
  = Example code
21
21
 
22
22
  require 'rlua'
23
-
23
+
24
24
  state = Lua::State.new # create Lua interpreter
25
25
  state.__load_stdlib :all # load some standard libraries in it
26
26
  state.__eval "print('hello, world')" # launch some Lua code
@@ -63,7 +63,7 @@ Hash:: table
63
63
  Array:: table (with numeric keys)
64
64
 
65
65
  Hashes and Arrays are translated recursively: all keys and values are translated too.
66
- Getting any Lua function to Ruby code (even the Ruby proc that was translated
66
+ Getting any Lua function to Ruby code (even the Ruby proc that was translated
67
67
  before) results in Lua::Function created, and tables behave the same creating
68
68
  Lua::Table object.
69
69
 
@@ -0,0 +1,33 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rdoc/task'
3
+
4
+ Rake::RDocTask.new do |rd|
5
+ rd.main = 'README.rdoc'
6
+ rd.title = 'RLua Documentation'
7
+ rd.rdoc_files = Dir['*.rdoc', 'lib/*.rb', 'ext/*.c'].to_a
8
+ rd.rdoc_dir = 'doc'
9
+ rd.options += ['--format=hanna']
10
+ end
11
+
12
+ namespace :github do
13
+ task :publish => [:clobber_rdoc, :rdoc] do
14
+ commit = `git rev-parse HEAD`[0..8]
15
+ system <<-END
16
+ set -e
17
+
18
+ git clone git@github.com:whitequark/rlua gh-pages
19
+ cd gh-pages
20
+
21
+ git checkout gh-pages
22
+ rm * -rf
23
+ cp -r ../doc/* .
24
+ git add -A
25
+ git commit -m "Update pages to match commit #{commit}."
26
+
27
+ git push origin gh-pages
28
+
29
+ cd ..
30
+ rm gh-pages/ -rf
31
+ END
32
+ end
33
+ end
@@ -2,7 +2,7 @@ require "mkmf"
2
2
 
3
3
  dir_config('lua5.1')
4
4
 
5
- unless have_library('lua5.1', 'luaL_newstate')
5
+ unless have_library('lua5.1', 'luaL_newstate') or have_library('lua.5.1', 'luaL_newstate')
6
6
  puts ' extconf failure: need liblua5.1'
7
7
  exit 1
8
8
  end
data/ext/rlua.c CHANGED
@@ -16,9 +16,9 @@
16
16
  */
17
17
 
18
18
  #include <ruby.h>
19
- #include <lua5.1/lua.h>
20
- #include <lua5.1/lauxlib.h>
21
- #include <lua5.1/lualib.h>
19
+ #include <lua.h>
20
+ #include <lauxlib.h>
21
+ #include <lualib.h>
22
22
  #include <ctype.h>
23
23
 
24
24
  VALUE mLua, cLuaState, cLuaMultret, cLuaFunction, cLuaTable;
@@ -0,0 +1,25 @@
1
+ Gem::Specification.new do |gem|
2
+ gem.name = "rlua"
3
+ gem.version = '1.1.beta1'
4
+ gem.authors = ["Peter Zotov"]
5
+ gem.email = ["whitequark@whitequark.org"]
6
+ gem.description = %q{Ruby to Lua bindings}
7
+ gem.summary = <<-EOD
8
+ Fully functional, almost complete Ruby to Lua binding library that
9
+ features seamless translation of most Lua and Ruby objects and calling
10
+ code of each language from other one.
11
+ EOD
12
+ gem.homepage = "http://whitequark.github.com/rlua/"
13
+
14
+ gem.files = `git ls-files`.split($/)
15
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
+ gem.require_paths = ["lib"]
18
+
19
+ gem.add_development_dependency 'rdoc'
20
+ gem.add_development_dependency 'rake'
21
+ gem.add_development_dependency 'hanna-nouveau'
22
+
23
+ gem.extra_rdoc_files = Dir['*.rdoc', 'ext/*.c'].to_a
24
+ gem.rdoc_options = ['--main=README.rdoc', '--title=RLua Documentation']
25
+ end
metadata CHANGED
@@ -1,66 +1,114 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rlua
3
- version: !ruby/object:Gem::Version
4
- version: "1.0"
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.beta1
5
+ prerelease: 4
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Peter Zotov
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2010-08-03 00:00:00 +04:00
13
- default_executable:
14
- dependencies: []
15
-
16
- description: " Fully functional, almost complete Ruby to Lua binding library that\n features seamless translation of most Lua and Ruby objects and calling\n code of each language from other one.\n"
17
- email: whitequark@whitequark.ru
12
+ date: 2012-09-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rdoc
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: hanna-nouveau
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: Ruby to Lua bindings
63
+ email:
64
+ - whitequark@whitequark.org
18
65
  executables: []
19
-
20
- extensions:
21
- - ext/extconf.rb
22
- extra_rdoc_files:
23
- - LICENSE.rdoc
66
+ extensions: []
67
+ extra_rdoc_files:
24
68
  - README.rdoc
69
+ - LICENSE.rdoc
25
70
  - TODO.rdoc
26
- - lib/rlua.rb
27
- - ext/rlua.c
28
- files:
29
71
  - ext/rlua.c
30
- - lib/rlua.rb
72
+ files:
73
+ - .gitignore
74
+ - Gemfile
31
75
  - LICENSE.rdoc
32
76
  - README.rdoc
77
+ - Rakefile
33
78
  - TODO.rdoc
34
- has_rdoc: true
35
- homepage: http://rlua.rubyforge.org
79
+ - ext/extconf.rb
80
+ - ext/rlua.c
81
+ - lib/rlua.rb
82
+ - rlua.gemspec
83
+ homepage: http://whitequark.github.com/rlua/
36
84
  licenses: []
37
-
38
85
  post_install_message:
39
- rdoc_options:
40
- - -S
41
- - -N
86
+ rdoc_options:
42
87
  - --main=README.rdoc
43
88
  - --title=RLua Documentation
44
- require_paths:
89
+ require_paths:
45
90
  - lib
46
- required_ruby_version: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: "0"
51
- version:
52
- required_rubygems_version: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
57
- version:
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ segments:
98
+ - 0
99
+ hash: 3158014571004423485
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>'
104
+ - !ruby/object:Gem::Version
105
+ version: 1.3.1
58
106
  requirements: []
59
-
60
- rubyforge_project: rlua
61
- rubygems_version: 1.3.5
107
+ rubyforge_project:
108
+ rubygems_version: 1.8.24
62
109
  signing_key:
63
110
  specification_version: 3
64
- summary: Ruby to Lua bindings.
111
+ summary: Fully functional, almost complete Ruby to Lua binding library that features
112
+ seamless translation of most Lua and Ruby objects and calling code of each language
113
+ from other one.
65
114
  test_files: []
66
-