Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rbnacl-libsodium
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
rbnacl-libsodium
Commits
748b6f78
Commit
748b6f78
authored
Nov 21, 2017
by
Tomasz Pajor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make compatible with 64 bit
parent
39b52464
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
lib/rbnacl/libsodium.rb
lib/rbnacl/libsodium.rb
+16
-8
No files found.
lib/rbnacl/libsodium.rb
View file @
748b6f78
require
"rbnacl/libsodium/version"
require
'rbnacl/libsodium/version'
module
RbNaCl
module
Libsodium
sodiumlib_dir
=
File
.
expand_path
(
"../../../vendor/libsodium/dist/lib/"
,
__FILE__
)
class
<<
self
def
sodiumlib_dir
sodiumlib32_dir
=
File
.
expand_path
(
'../../../vendor/libsodium/dist/lib/'
,
__FILE__
)
sodiumlib64_dir
=
File
.
expand_path
(
'../../../vendor/libsodium/dist/lib64/'
,
__FILE__
)
[
sodiumlib32_dir
,
sodiumlib64_dir
].
select
{
|
dir
|
Dir
.
exist?
(
dir
)
}.
first
end
sodiumlib_glob
=
case
RUBY_DESCRIPTION
when
/darwin/
then
"libsodium*.dylib"
when
/Windows|(win|mingw)32/
then
"libsodium*.dll"
when
/openbsd/
then
"libsodium*.so.*"
else
"libsodium*.so"
def
sodiumlib_glob
case
RUBY_DESCRIPTION
when
/darwin/
then
'libsodium*.dylib'
when
/Windows|(win|mingw)32/
then
'libsodium*.dll'
when
/openbsd/
then
'libsodium*.so.*'
else
'libsodium*.so'
end
end
end
::
RBNACL_LIBSODIUM_GEM_LIB_PATH
=
Dir
.
glob
(
File
.
join
(
sodiumlib_dir
,
sodiumlib_glob
)).
first
end
end
require
"rbnacl"
require
'rbnacl'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment