ilios 0.4.2 → 0.4.4
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 +4 -4
- data/README.md +2 -1
- data/docker-compose.yml +1 -1
- data/ext/ilios/extconf.rb +15 -19
- data/lib/ilios/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e28970c92e0e274f14457318e1ab9ddd17dcdb197cc89084d2d58fe9b51afb14
|
4
|
+
data.tar.gz: 9dab2538fd742cc4f85ae9a864348a97ba6d9655ababbd633c1477781be5274d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe695966bf3b1dacf3825ceb73d689b7b38f4488fb11d3bdea777942aa0c7e5b653d2a3be2eff4cc5cc897af489583deb6ae383874a0c814e4270452091dc4b1
|
7
|
+
data.tar.gz: 310d435e083b862b4e890edd4195ff58363494fd7b4c47612d7cc1fbd794f80faab7da6e2fdb333b26df49326641ab87803805f39e7ff14cab0c915d8d539015
|
data/README.md
CHANGED
@@ -20,6 +20,7 @@ This gem's installer will install the DataStax C/C++ Driver to the appropriate l
|
|
20
20
|
However, if you prefer to install the DataStax C/C++ Driver manually, you can do so by executing:
|
21
21
|
|
22
22
|
```sh
|
23
|
+
$ bundle config set --local build.ilios --with-libuv-dir=/path/to/libuv-installed-dir
|
23
24
|
$ bundle config set --local build.ilios --with-cassandra-driver-dir=/path/to/cassandra-cpp-driver-installed-dir
|
24
25
|
$ bundle add ilios
|
25
26
|
```
|
@@ -27,7 +28,7 @@ $ bundle add ilios
|
|
27
28
|
or
|
28
29
|
|
29
30
|
```sh
|
30
|
-
$ gem install ilios -- --with-cassandra-driver-dir=/path/to/cassandra-cpp-driver-installed-dir
|
31
|
+
$ gem install ilios -- --with-libuv-dir=/path/to/libuv-installed-dir --with-cassandra-driver-dir=/path/to/cassandra-cpp-driver-installed-dir
|
31
32
|
```
|
32
33
|
|
33
34
|
## Requirements
|
data/docker-compose.yml
CHANGED
data/ext/ilios/extconf.rb
CHANGED
@@ -9,18 +9,22 @@ require 'native-package-installer'
|
|
9
9
|
have_func('malloc_usable_size')
|
10
10
|
have_func('malloc_size')
|
11
11
|
|
12
|
+
MAX_CORES = 8
|
13
|
+
|
12
14
|
def num_cpu_cores
|
13
15
|
cores =
|
14
16
|
begin
|
15
17
|
if RUBY_PLATFORM.include?('darwin')
|
16
|
-
Integer(`sysctl -n hw.ncpu`, 10)
|
18
|
+
Integer(`sysctl -n hw.ncpu`, 10)
|
17
19
|
else
|
18
|
-
Integer(`nproc`, 10)
|
20
|
+
Integer(`nproc`, 10)
|
19
21
|
end
|
20
22
|
rescue StandardError
|
21
23
|
2
|
22
24
|
end
|
23
|
-
|
25
|
+
|
26
|
+
return 1 if cores <= 0
|
27
|
+
cores >= 7 ? MAX_CORES : cores
|
24
28
|
end
|
25
29
|
|
26
30
|
module LibuvInstaller
|
@@ -88,7 +92,7 @@ module CassandraDriverInstaller
|
|
88
92
|
|
89
93
|
class CassandraRecipe < MiniPortileCMake
|
90
94
|
def initialize(name, version, **kwargs)
|
91
|
-
ENV['LIBUV_ROOT_DIR']
|
95
|
+
ENV['LIBUV_ROOT_DIR'] ||= LibuvInstaller.special_install_path
|
92
96
|
|
93
97
|
super(name, version, **kwargs)
|
94
98
|
end
|
@@ -99,23 +103,9 @@ module CassandraDriverInstaller
|
|
99
103
|
end
|
100
104
|
|
101
105
|
def self.install
|
102
|
-
return if install_from_package
|
103
|
-
|
104
106
|
install_from_source
|
105
107
|
end
|
106
108
|
|
107
|
-
def self.install_from_package
|
108
|
-
# Install Cassandra C/C++ driver via MiniPortile2.
|
109
|
-
# It doesn't provide pre-built package in some official repository.
|
110
|
-
return unless NativePackageInstaller.install(homebrew: 'cassandra-cpp-driver')
|
111
|
-
|
112
|
-
path = `brew --prefix cassandra-cpp-driver`.strip
|
113
|
-
$CPPFLAGS += " -I#{path}/include"
|
114
|
-
$LDFLAGS += " -L#{path}/lib -Wl,-rpath,#{path}/lib -lcassandra"
|
115
|
-
|
116
|
-
true
|
117
|
-
end
|
118
|
-
|
119
109
|
def self.install_from_source
|
120
110
|
unless File.exist?(CASSANDRA_CPP_DRIVER_INSTALL_PATH)
|
121
111
|
cassandra_recipe = CassandraRecipe.new('cpp-driver', Ilios::CASSANDRA_CPP_DRIVER_VERSION, make_command: "make -j #{num_cpu_cores}")
|
@@ -158,7 +148,13 @@ else
|
|
158
148
|
raise
|
159
149
|
end
|
160
150
|
|
161
|
-
|
151
|
+
if (dir = with_config('--with-libuv-dir'))
|
152
|
+
$CPPFLAGS += " -I#{dir}/include"
|
153
|
+
$LDFLAGS += " -L#{dir}/lib -Wl,-rpath,#{dir}/lib -luv"
|
154
|
+
ENV['LIBUV_ROOT_DIR'] = dir
|
155
|
+
else
|
156
|
+
LibuvInstaller.install
|
157
|
+
end
|
162
158
|
CassandraDriverInstaller.install
|
163
159
|
end
|
164
160
|
|
data/lib/ilios/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ilios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_portile2
|
@@ -77,7 +77,7 @@ metadata:
|
|
77
77
|
homepage_uri: https://github.com/Watson1978/ilios
|
78
78
|
source_code_uri: https://github.com/Watson1978/ilios
|
79
79
|
bug_tracker_uri: https://github.com/Watson1978/ilios/issues
|
80
|
-
documentation_uri: https://www.rubydoc.info/gems/ilios/0.4.
|
80
|
+
documentation_uri: https://www.rubydoc.info/gems/ilios/0.4.4
|
81
81
|
rubygems_mfa_required: 'true'
|
82
82
|
post_install_message:
|
83
83
|
rdoc_options: []
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements:
|
97
97
|
- cmake
|
98
|
-
rubygems_version: 3.
|
98
|
+
rubygems_version: 3.5.3
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Cassandra driver written by C language
|