ilios 0.4.10 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile +4 -1
- data/README.md +3 -1
- data/Rakefile +2 -0
- data/ext/ilios/extconf.rb +18 -20
- data/ext/ilios/future.c +2 -1
- data/ext/ilios/ilios.c +2 -2
- data/ext/ilios/ilios.h +1 -1
- data/ext/ilios/statement.c +1 -1
- data/ilios.gemspec +2 -2
- data/lib/ilios/version.rb +1 -1
- data/sig/ilios.rbs +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77733851acee687dec34d008c22f855c1e8630952f3989850a6cf99000b2e5ff
|
4
|
+
data.tar.gz: 4b2dd035a5212ad4da4d561b5669dd6bd6017e1a667588b01d4156a6353c7621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec6a735ad9981a59760daa6b1916acf362e4032ece3c1dd4fcf4fabca80b8ac1cd4137bb0481a2f9955c9852fb99899071c0d199492b232c9370c547ad61f377
|
7
|
+
data.tar.gz: 597c69a77e126e358821c65d394ec95e7198b5554498ad25a7bf695f6eb6d4ab4f58bd66bd023a6d8044db398d4d78836cb2385c7b68be3988ba34e4e6716c77
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
@@ -10,5 +10,8 @@ gem 'rake', '~> 13.0'
|
|
10
10
|
gem 'rake-compiler', '~> 1.2'
|
11
11
|
gem 'rbs', '~> 3.4'
|
12
12
|
gem 'rubocop', '~> 1.57'
|
13
|
-
gem 'rubocop-minitest', '~> 0.33
|
13
|
+
gem 'rubocop-minitest', '~> 0.33'
|
14
14
|
gem 'rubocop-performance', '~> 1.19'
|
15
|
+
gem 'rubocop-rake', '~> 0.6'
|
16
|
+
|
17
|
+
gem 'rubocop-on-rbs', '~> 0.2'
|
data/README.md
CHANGED
@@ -37,10 +37,12 @@ $ gem install ilios -- --with-libuv-dir=/path/to/libuv-installed-dir --with-cass
|
|
37
37
|
## Requirements
|
38
38
|
|
39
39
|
- cmake (in order to build the DataStax C/C++ Driver and libuv)
|
40
|
+
- C/C++ compiler
|
41
|
+
- install_name_tool (macOS only)
|
40
42
|
|
41
43
|
## Supported
|
42
44
|
|
43
|
-
- Ruby 3.
|
45
|
+
- Ruby 3.1 or later
|
44
46
|
- Cassandra 3.0 or later
|
45
47
|
- Linux and macOS platform
|
46
48
|
|
data/Rakefile
CHANGED
data/ext/ilios/extconf.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require File.expand_path('../../lib/ilios/version', __dir__)
|
4
|
+
require 'etc'
|
4
5
|
require 'fileutils'
|
5
6
|
require 'mini_portile2'
|
6
7
|
require 'mkmf'
|
@@ -8,23 +9,19 @@ require 'mkmf'
|
|
8
9
|
have_func('malloc_usable_size')
|
9
10
|
have_func('malloc_size')
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return 1 if cores <= 0
|
26
|
-
|
27
|
-
cores >= 7 ? MAX_CORES : cores
|
12
|
+
def create_compile_flags_txt
|
13
|
+
cppflags = $CPPFLAGS.split
|
14
|
+
include_flags = cppflags.select { |flag| flag.start_with?('-I') }
|
15
|
+
define_flags = cppflags.select { |flag| flag.start_with?('-D') } + $defs
|
16
|
+
|
17
|
+
File.open('compile_flags.txt', 'w') do |f|
|
18
|
+
include_flags.each { |flag| f.puts(flag) }
|
19
|
+
f.puts("-I#{Dir.pwd}")
|
20
|
+
f.puts("-I#{RbConfig::CONFIG['rubyhdrdir']}")
|
21
|
+
f.puts("-I#{RbConfig::CONFIG['rubyhdrdir']}/ruby/backward")
|
22
|
+
f.puts("-I#{RbConfig::CONFIG['rubyarchhdrdir']}")
|
23
|
+
define_flags.each { |flag| f.puts(flag) }
|
24
|
+
end
|
28
25
|
end
|
29
26
|
|
30
27
|
module LibuvInstaller
|
@@ -45,7 +42,7 @@ module LibuvInstaller
|
|
45
42
|
|
46
43
|
def self.install_from_source
|
47
44
|
unless File.exist?(LIBUV_INSTALL_PATH)
|
48
|
-
libuv_recipe = LibuvRecipe.new('libuv', Ilios::LIBUV_VERSION, make_command: "make -j #{
|
45
|
+
libuv_recipe = LibuvRecipe.new('libuv', Ilios::LIBUV_VERSION, make_command: "make -j #{Etc.nprocessors}")
|
49
46
|
libuv_recipe.files << {
|
50
47
|
url: "https://github.com/libuv/libuv/archive/v#{Ilios::LIBUV_VERSION}.tar.gz"
|
51
48
|
}
|
@@ -78,7 +75,7 @@ module CassandraDriverInstaller
|
|
78
75
|
def initialize(name, version, **kwargs)
|
79
76
|
ENV['LIBUV_ROOT_DIR'] ||= LibuvInstaller.special_install_path
|
80
77
|
|
81
|
-
super
|
78
|
+
super
|
82
79
|
end
|
83
80
|
|
84
81
|
def configure_prefix
|
@@ -92,7 +89,7 @@ module CassandraDriverInstaller
|
|
92
89
|
|
93
90
|
def self.install_from_source
|
94
91
|
unless File.exist?(CASSANDRA_CPP_DRIVER_INSTALL_PATH)
|
95
|
-
cassandra_recipe = CassandraRecipe.new('cpp-driver', Ilios::CASSANDRA_CPP_DRIVER_VERSION, make_command: "make -j #{
|
92
|
+
cassandra_recipe = CassandraRecipe.new('cpp-driver', Ilios::CASSANDRA_CPP_DRIVER_VERSION, make_command: "make -j #{Etc.nprocessors}")
|
96
93
|
cassandra_recipe.files << {
|
97
94
|
url: "https://github.com/datastax/cpp-driver/archive/#{Ilios::CASSANDRA_CPP_DRIVER_VERSION}.tar.gz"
|
98
95
|
}
|
@@ -146,3 +143,4 @@ $CPPFLAGS += " #{ENV['CPPFLAGS']}"
|
|
146
143
|
$LDFLAGS += " #{ENV['LDFLAGS']}"
|
147
144
|
|
148
145
|
create_makefile('ilios')
|
146
|
+
create_compile_flags_txt
|
data/ext/ilios/future.c
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#include "ilios.h"
|
2
2
|
|
3
3
|
#define THREAD_MAX 5
|
4
|
+
#define QUEUE_MAX 100
|
4
5
|
|
5
6
|
typedef struct
|
6
7
|
{
|
@@ -31,7 +32,7 @@ const rb_data_type_t cassandra_future_data_type = {
|
|
31
32
|
|
32
33
|
static void future_thread_pool_init(future_thread_pool *pool)
|
33
34
|
{
|
34
|
-
pool->queue = rb_funcall(
|
35
|
+
pool->queue = rb_funcall(cSizedQueue, id_new, 1, INT2NUM(QUEUE_MAX));
|
35
36
|
rb_gc_register_mark_object(pool->queue);
|
36
37
|
}
|
37
38
|
|
data/ext/ilios/ilios.c
CHANGED
@@ -11,7 +11,7 @@ VALUE eConnectError;
|
|
11
11
|
VALUE eExecutionError;
|
12
12
|
VALUE eStatementError;
|
13
13
|
|
14
|
-
VALUE
|
14
|
+
VALUE cSizedQueue;
|
15
15
|
|
16
16
|
VALUE id_to_time;
|
17
17
|
VALUE id_new;
|
@@ -85,7 +85,7 @@ void Init_ilios(void)
|
|
85
85
|
eExecutionError = rb_define_class_under(mCassandra, "ExecutionError", rb_eStandardError);
|
86
86
|
eStatementError = rb_define_class_under(mCassandra, "StatementError", rb_eStandardError);
|
87
87
|
|
88
|
-
|
88
|
+
cSizedQueue = rb_const_get(rb_cThread, rb_intern("SizedQueue"));
|
89
89
|
|
90
90
|
id_to_time = rb_intern("to_time");
|
91
91
|
id_new = rb_intern("new");
|
data/ext/ilios/ilios.h
CHANGED
data/ext/ilios/statement.c
CHANGED
@@ -170,7 +170,7 @@ static VALUE statement_bind(VALUE self, VALUE hash)
|
|
170
170
|
}
|
171
171
|
|
172
172
|
/**
|
173
|
-
* Sets the statement's page size.
|
173
|
+
* Sets the statement's page size. The default is +10000+.
|
174
174
|
*
|
175
175
|
* @param page_size [Integer] A page size.
|
176
176
|
* @return [Cassandra::Statement] self.
|
data/ilios.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Cassandra driver written by C language'
|
13
13
|
spec.homepage = 'https://github.com/Watson1978/ilios'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = '>= 3.
|
15
|
+
spec.required_ruby_version = '>= 3.1.0'
|
16
16
|
|
17
17
|
spec.requirements << 'cmake'
|
18
18
|
|
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.require_paths = ['lib']
|
35
35
|
spec.extensions << 'ext/ilios/extconf.rb'
|
36
36
|
|
37
|
-
spec.
|
37
|
+
spec.add_dependency('mini_portile2', '~> 2.8')
|
38
38
|
end
|
data/lib/ilios/version.rb
CHANGED
data/sig/ilios.rbs
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
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_portile2
|
@@ -33,6 +33,7 @@ extensions:
|
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
35
|
- ".yardopts"
|
36
|
+
- CHANGELOG.md
|
36
37
|
- Gemfile
|
37
38
|
- LICENSE
|
38
39
|
- README.md
|
@@ -58,7 +59,7 @@ metadata:
|
|
58
59
|
homepage_uri: https://github.com/Watson1978/ilios
|
59
60
|
source_code_uri: https://github.com/Watson1978/ilios
|
60
61
|
bug_tracker_uri: https://github.com/Watson1978/ilios/issues
|
61
|
-
documentation_uri: https://www.rubydoc.info/gems/ilios/0.
|
62
|
+
documentation_uri: https://www.rubydoc.info/gems/ilios/1.0.0
|
62
63
|
rubygems_mfa_required: 'true'
|
63
64
|
post_install_message:
|
64
65
|
rdoc_options: []
|
@@ -68,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
69
|
requirements:
|
69
70
|
- - ">="
|
70
71
|
- !ruby/object:Gem::Version
|
71
|
-
version: 3.
|
72
|
+
version: 3.1.0
|
72
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
74
|
requirements:
|
74
75
|
- - ">="
|
@@ -76,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
77
|
version: '0'
|
77
78
|
requirements:
|
78
79
|
- cmake
|
79
|
-
rubygems_version: 3.5.
|
80
|
+
rubygems_version: 3.5.9
|
80
81
|
signing_key:
|
81
82
|
specification_version: 4
|
82
83
|
summary: Cassandra driver written by C language
|