nanoid_ext 0.1.0-x86_64-darwin-18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 59f5e35b7bee520ddf412f71f090fb345ef20452c13ee68c3bb1afb64189a747
4
+ data.tar.gz: 3f06379ecd6856a5ab6019f7b6063eef832ae4e8a0212f73683a4bc0e233e26d
5
+ SHA512:
6
+ metadata.gz: 69170d02df5dfb718bbbb28168d98d68b2b937bf554bdfada338a2a62924ebe2927e24ecac623266049f060dffa510fa1f959234f06a7ff0a1ab7965bdbf6ca8
7
+ data.tar.gz: 51f6a9c5f0afece5efa35070e5243c63b2a5d27139832f2e79f54aaef7c5dd0f6ba1eb24745e02da96ea192ae446f5eb481d40e03a801626d5a65ea87a0936b0
@@ -0,0 +1,43 @@
1
+ require 'mkmf'
2
+
3
+ $CXXFLAGS << ' -std=c++11 -fPIC '
4
+
5
+ MAKE =
6
+ if Gem.win_platform?
7
+ find_executable('make')
8
+ else
9
+ find_executable('gmake') || find_executable('make')
10
+ end
11
+
12
+ LIBNANOID_DIR = File.join(__dir__, './../../vendor/nanoid_cpp')
13
+
14
+ def sys(cmd)
15
+ puts " -- #{cmd}"
16
+ unless ret = xsystem(cmd)
17
+ raise "ERROR: '#{cmd}' failed"
18
+ end
19
+ ret
20
+ end
21
+
22
+ def install_deps
23
+ sys 'git submodule update --init --recursive'
24
+ end
25
+
26
+ def build_libnanoid
27
+ Dir.chdir LIBNANOID_DIR do
28
+ FileUtils.mkdir_p 'build'
29
+
30
+ Dir.chdir 'build' do
31
+ sys 'cmake -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo ..'
32
+ sys MAKE
33
+ end
34
+ end
35
+
36
+ dir_config('nanoid', "#{LIBNANOID_DIR}/inc", "#{LIBNANOID_DIR}/build")
37
+
38
+ abort 'ERROR: Failed to build libnanoid' unless have_library 'nanoid'
39
+ end
40
+
41
+ install_deps
42
+ build_libnanoid
43
+ create_makefile('nanoid/ext')
data/lib/ext.bundle ADDED
Binary file
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nanoid_ext
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: x86_64-darwin-18
6
+ authors:
7
+ - Ian Ker-Seymer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: 'C++ extension for nanoid gem: A tiny, secure URL-friendly unique string
14
+ ID generator.'
15
+ email:
16
+ - i.kerseymer@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ext/nanoid_ext/extconf.rb
22
+ - lib/ext.bundle
23
+ homepage:
24
+ licenses: []
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '2.7'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: 2.8.dev
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubygems_version: 3.1.2
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: C++ extension for nanoid gem
48
+ test_files: []