rufus-lua 1.1.4 → 1.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66f3203af5eae5bcd81de0fdd24ebd96141dcc8b
4
- data.tar.gz: dcb726a58e39d165741144c3537d3c15375f2f00
3
+ metadata.gz: 6b6380bbe4600f5987c4969d92612ef78d6fa7ae
4
+ data.tar.gz: 322ed326de3fafba81653d933f73648cd27b2945
5
5
  SHA512:
6
- metadata.gz: 3c33733dc605b81902cde9796dd9260ea0a524f2a0eba4c7459c097b0495166cd9837ef1140478b532d4b4089afc0e2476c2e18108beef7445720a0f50711b5d
7
- data.tar.gz: a216e7fea81a9819644467556e1c5a7aa99b29a01c7375f16e17b1dd542fbd0d2d8a370abc13e29c944f8051e1892896cecd4a67a3c0b75c390195b9fa2abe22
6
+ metadata.gz: 0ee45faf89f1e5f973d7586fa74ac3396556a9ed55d3b097a36cab0d7c50b29711e0d14c329c31dc7a8daa818011badea0cbf38ca788d418b1e789c99bbf79d2
7
+ data.tar.gz: 555fe2fa37f1d5e53be891468048615930e20416a331eb9265f66051269503eff4901a5c82075828d808d85340616b0f4df0dd79921af088a1190abe0eff6088
@@ -2,6 +2,12 @@
2
2
  = rufus-lua CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-lua - 1.1.5 released 2019/10/19
6
+
7
+ - trust LUA_LIB or FFI.ffi_libs to find 'liblua5.1' else
8
+ glob only /usr/lib/*/liblua5.1.*so* (Andri Möll)
9
+
10
+
5
11
  == rufus-lua - 1.1.4 released 2018/03/15
6
12
 
7
13
  - Replace deprecated Fixnum by Integer, gh-40
data/README.md CHANGED
@@ -34,6 +34,8 @@ http://www.lua.org/
34
34
 
35
35
  ## getting Lua on your system
36
36
 
37
+ ### Debian GNU/Linux
38
+
37
39
  On Debian GNU/Linux, I do
38
40
 
39
41
  ```
@@ -56,6 +58,16 @@ export LUA_LIB=~/mystuff/lualib.5.1.4.so
56
58
  ruby myluacode.rb
57
59
  ```
58
60
 
61
+ ### OSX
62
+
63
+ As of 2018-10-19, this [Homebrew](https://brew.sh/) command will install Lua and its .dylib on OSX:
64
+
65
+ ```bash
66
+ brew install lua@5.1
67
+ ```
68
+
69
+ ### Windows
70
+
59
71
  On Windows try using [rufus-lua-win](https://github.com/ukoloff/rufus-lua-win) gem.
60
72
 
61
73
  ## using rufus-lua
@@ -271,7 +283,7 @@ Modify the file `src/Makefile` as per http://lua-users.org/lists/lua-l/2006-09/m
271
283
 
272
284
  It's mostly about adding that rule to the `src/Makefile`:
273
285
  ```make
274
- liblua.dylib: $(CORE_O) $(LIB_O)
286
+ liblua51.dylib: $(CORE_O) $(LIB_O)
275
287
  $(CC) -dynamiclib -o $@ $^ $(LIBS)
276
288
  ```
277
289
 
@@ -279,8 +291,8 @@ Here's how to build the library file and deploy it:
279
291
  ```
280
292
  make
281
293
  make macosx
282
- make -C src liblua.dylib
283
- sudo cp src/liblua.dylib /usr/local/lib/
294
+ make -C src liblua51.dylib
295
+ sudo cp src/liblua51.dylib /usr/local/lib/
284
296
 
285
297
  sudo make macosx install
286
298
  ```
@@ -11,34 +11,34 @@ module Lua
11
11
  #
12
12
  # locate the dynamic library
13
13
 
14
- paths =
15
- ENV['LUA_LIB'] ||
16
- # developer points to the right lib
17
- (
18
- Dir.glob('/usr/lib/liblua*.so') +
19
- Dir.glob('/usr/lib/*/liblua*.so') +
20
- Dir.glob('/usr/local/lib/liblua*.so') +
21
- Dir.glob('/opt/local/lib/liblua*.so') +
22
- Dir.glob('/usr/lib/liblua*.dylib') +
23
- Dir.glob('/usr/local/lib/liblua*.dylib') +
24
- Dir.glob('/opt/local/lib/liblua*.dylib')
25
- )
26
- # or else we attempt to find it from potential locations
14
+ ffi_lib_flags(:lazy, :global)
27
15
 
28
16
  begin
29
17
 
30
- ffi_lib_flags(:lazy, :global)
18
+ # first attempt
31
19
 
32
- ffi_lib(paths)
20
+ ffi_lib(ENV['LUA_LIB'] || 'liblua5.1')
33
21
 
34
- rescue LoadError => le
22
+ rescue LoadError => le0
35
23
 
36
- fail RuntimeError.new(
37
- "Didn't find the Lua dynamic library on your system. " +
38
- "Set LUA_LIB in your environment if have that library or " +
39
- "go to https://github.com/jmettraux/rufus-lua to learn how to " +
40
- "get it. (paths: #{paths.inspect})"
41
- )
24
+ paths =
25
+ %w[ /usr/lib/*/liblua5.1.*so* ]
26
+ .inject([]) { |a, e| a.concat(Dir.glob(e)) }
27
+
28
+ begin
29
+
30
+ # second attempt
31
+
32
+ ffi_lib(paths)
33
+
34
+ rescue LoadError => le1
35
+
36
+ fail RuntimeError.new(
37
+ "Didn't find the Lua dynamic library (liblua5.1.*) on your system. " +
38
+ "Set LUA_LIB in your environment if have that library or " +
39
+ "go to https://github.com/jmettraux/rufus-lua to learn how to " +
40
+ "get it.")
41
+ end
42
42
  end
43
43
 
44
44
  # Rufus::Lua::Lib.path returns the path to the library used.
@@ -2,7 +2,7 @@
2
2
  module Rufus
3
3
  module Lua
4
4
 
5
- VERSION = '1.1.4'
5
+ VERSION = '1.1.5'
6
6
  end
7
7
  end
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-lua
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-14 00:00:00.000000000 Z
13
+ date: 2018-10-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ffi
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project: rufus
84
- rubygems_version: 2.6.13
84
+ rubygems_version: 2.6.14.1
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: ruby-ffi based bridge from Ruby to Lua