ilios 0.4.11 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0def2f85dbab76062cb552bdf5263988913ea5e7bd7ecafd2681e81d91dcf5f6
4
- data.tar.gz: 9c6b8696ae30614e09709ab2ba7706964c11b382d4b09361e9518d7a25d4891d
3
+ metadata.gz: 77733851acee687dec34d008c22f855c1e8630952f3989850a6cf99000b2e5ff
4
+ data.tar.gz: 4b2dd035a5212ad4da4d561b5669dd6bd6017e1a667588b01d4156a6353c7621
5
5
  SHA512:
6
- metadata.gz: 68e58cdf0fb8c656428438f7b772cd9bced047f17aa711b593db533ea6a13393d831b1370b63bec6a7b5801f90ada694f10a553d3744cc05dbb9dd1695c46913
7
- data.tar.gz: 5c483e7ef9ec943f7782fe20b8aa452255a21f18bd925fdcf5be9b8c1605443bf408351dac220376bfc2aa44d43fa377abcca2c173d72a77272bc30de30bf145
6
+ metadata.gz: ec6a735ad9981a59760daa6b1916acf362e4032ece3c1dd4fcf4fabca80b8ac1cd4137bb0481a2f9955c9852fb99899071c0d199492b232c9370c547ad61f377
7
+ data.tar.gz: 597c69a77e126e358821c65d394ec95e7198b5554498ad25a7bf695f6eb6d4ab4f58bd66bd023a6d8044db398d4d78836cb2385c7b68be3988ba34e4e6716c77
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Change Log
2
+
3
+ ## 1.0.0
4
+
5
+ - Support for
6
+ - Ruby 3.1 or later
7
+ - Cassandra 3.0 or later
8
+ - Used libraries
9
+ - DataStax C/C++ Driver 2.17.1
10
+ - libuv 1.48.0
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.0'
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.0 or later
45
+ - Ruby 3.1 or later
44
46
  - Cassandra 3.0 or later
45
47
  - Linux and macOS platform
46
48
 
data/Rakefile CHANGED
@@ -4,7 +4,9 @@ require 'bundler/gem_tasks'
4
4
  require 'rake/extensiontask'
5
5
  require 'rake/testtask'
6
6
 
7
+ desc 'Run tests'
7
8
  task test: :compile
9
+
8
10
  task default: :test
9
11
 
10
12
  Rake::ExtensionTask.new('ilios') do |ext|
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
- MAX_CORES = 8
12
-
13
- def num_cpu_cores
14
- cores =
15
- begin
16
- if RUBY_PLATFORM.include?('darwin')
17
- Integer(`sysctl -n hw.ncpu`, 10)
18
- else
19
- Integer(`nproc`, 10)
20
- end
21
- rescue StandardError
22
- 2
23
- end
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 #{num_cpu_cores}")
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(name, version, **kwargs)
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 #{num_cpu_cores}")
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
@@ -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.0.0'
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.add_runtime_dependency('mini_portile2', '~> 2.8')
37
+ spec.add_dependency('mini_portile2', '~> 2.8')
38
38
  end
data/lib/ilios/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ilios
4
- VERSION = '0.4.11'
4
+ VERSION = '1.0.0'
5
5
  public_constant :VERSION
6
6
 
7
7
  CASSANDRA_CPP_DRIVER_VERSION = '2.17.1'
data/sig/ilios.rbs CHANGED
@@ -43,7 +43,7 @@ module Ilios
43
43
  class Statement
44
44
  def bind: (Hash[Symbol | String, untyped]) -> self
45
45
  def page_size=: (Integer) -> self
46
- def idempotent=: (true | false) -> self
46
+ def idempotent=: (bool) -> self
47
47
  end
48
48
 
49
49
  class Future
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.11
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-03-07 00:00:00.000000000 Z
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.4.11
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.0.0
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.3
80
+ rubygems_version: 3.5.9
80
81
  signing_key:
81
82
  specification_version: 4
82
83
  summary: Cassandra driver written by C language