sqlite3 1.5.3-x64-mingw-ucrt → 1.6.0.rc1-x64-mingw-ucrt

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: 9197f486c0a3d3949268b2b03a57ebf4c9acbbe3e3e27b57f9c69d4ab40b7dc9
4
- data.tar.gz: 0ad7c16aed964073939bd2e6b0f22731c179c4ee4a5eb19159b3b6b7dec8d6cc
3
+ metadata.gz: 4d5d113dc41fef94d416601e2de7f0b09f327bb136536ca852c14dbec21b52a5
4
+ data.tar.gz: 6fe78735bfc654bf23d17d682c50daa4de12a79b67155d131c16a04e1c4f4fd0
5
5
  SHA512:
6
- metadata.gz: b7810ad77be0243261403acc981e41316ce2a07c6ce9d20838995edf94d9bb3f6d8039c2726379e18497fa338ee3ef59de8ec817184d1c5f9df9cd21ed7ba9b3
7
- data.tar.gz: 77885561f3c84c9f3fd55306198b424e4b59fb1c57fbb16682f0ccb01c8f181d7a0160409205b8d03565b20b62389b3da96098bcb54ab718b48fd7249125deba
6
+ metadata.gz: 184bc8ed5754a733fdc0709ef72ef0adb71f4877cb170748da1103d43cafb2b9c4e30444cc1d0b2478b5b7b6563e31cb963cedda1086c20d2d45853279378f30
7
+ data.tar.gz: 64e8a7979ef75bd7893253e1be250972fb53f5ad370588a422600f6a308a84a579aa77d3f514d8a0003544d502e696fcbfeb3898a5a2806f862b52fe230e762d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # sqlite3-ruby Changelog
2
2
 
3
+ ## 1.6.0 / unreleased
4
+
5
+ ### Ruby
6
+
7
+ This release introduces native gem support for Ruby 3.2.
8
+
9
+ This release ends native gem support for Ruby 2.6, for which [upstream support ended 2022-04-12](https://www.ruby-lang.org/en/downloads/branches/).
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * Vendored sqlite3 is updated to [v3.40.1](https://sqlite.org/releaselog/3_40_1.html).
15
+
16
+
17
+ ### Fixes
18
+
19
+ * `get_boolean_pragma` now returns the correct value. Previously, it always returned true. [#275] (Thank you, @Edouard-chin!)
20
+
21
+
22
+ ## 1.5.4 / 2022-11-18
23
+
24
+ ### Dependencies
25
+
26
+ * Vendored sqlite is updated to [v3.40.0](https://sqlite.org/releaselog/3_40_0.html).
27
+
28
+
3
29
  ## 1.5.3 / 2022-10-11
4
30
 
5
31
  ### Fixed
data/README.md CHANGED
@@ -71,7 +71,7 @@ end
71
71
 
72
72
  ### Native Gems (recommended)
73
73
 
74
- As of v1.5.0 of this library, native (precompiled) gems are available for Ruby 2.6, 2.7, 3.0, and 3.1 on all these platforms:
74
+ In v1.5.0 and later, native (precompiled) gems are available for recent Ruby versions on these platforms:
75
75
 
76
76
  - `aarch64-linux`
77
77
  - `arm-linux`
data/dependencies.yml CHANGED
@@ -2,13 +2,14 @@
2
2
  :sqlite3:
3
3
  # checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
4
4
  #
5
- # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3390400.tar.gz
6
- # 431328e30d12c551da9ba7ef2122b269076058512014afa799caaf62ca567090 ports/archives/sqlite-autoconf-3390400.tar.gz
5
+ # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3400100.tar.gz
6
+ # 3136db4bcd9e9e1e485c291380a3d86f0f21cae0eff9f714c0ef4821e2e5cdf7 ports/archives/sqlite-autoconf-3400100.tar.gz
7
7
  #
8
- # $ sha256sum ports/archives/sqlite-autoconf-3390400.tar.gz
9
- # f31d445b48e67e284cf206717cc170ab63cbe4fd7f79a82793b772285e78fdbb ports/archives/sqlite-autoconf-3390400.tar.gz
8
+ # juno in sqlite3-ruby on  flavorjones-update-sqlite-3.40.1 [$!?] via 💎 v3.1.2
9
+ # $ sha256sum ports/archives/sqlite-autoconf-3400100.tar.gz
10
+ # 2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9 ports/archives/sqlite-autoconf-3400100.tar.gz
10
11
  #
11
- :version: "3.39.4"
12
+ :version: "3.40.1"
12
13
  :files:
13
- - :url: "https://sqlite.org/2022/sqlite-autoconf-3390400.tar.gz"
14
- :sha256: "f31d445b48e67e284cf206717cc170ab63cbe4fd7f79a82793b772285e78fdbb"
14
+ - :url: "https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz"
15
+ :sha256: "2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9"
@@ -69,21 +69,29 @@ module Sqlite3
69
69
  # on macos, pkg-config will not return --cflags without this
70
70
  ENV["PKG_CONFIG_ALLOW_SYSTEM_CFLAGS"] = "t"
71
71
 
72
+ # only needed for Ruby 3.1.3, see https://bugs.ruby-lang.org/issues/19233
73
+ RbConfig::CONFIG["PKG_CONFIG"] = config_string("PKG_CONFIG") || "pkg-config"
74
+
72
75
  lib_path = File.join(recipe.path, "lib")
73
76
  pcfile = File.join(lib_path, "pkgconfig", "sqlite3.pc")
74
77
  abort_pkg_config("pkg_config") unless pkg_config(pcfile)
75
78
 
76
79
  # see https://bugs.ruby-lang.org/issues/18490
77
- flags = xpopen(["pkg-config", "--libs", "--static", pcfile], err: [:child, :out], &:read)
80
+ ldflags = xpopen(["pkg-config", "--libs", "--static", pcfile], err: [:child, :out], &:read)
78
81
  abort_pkg_config("xpopen") unless $?.success?
79
- flags = flags.split
80
-
81
- # see https://github.com/flavorjones/mini_portile/issues/118
82
- "-L#{lib_path}".tap do |lib_path_flag|
83
- flags.prepend(lib_path_flag) unless flags.include?(lib_path_flag)
82
+ ldflags = ldflags.split
83
+
84
+ if needs_darwin_linker_hack
85
+ ldflags.delete("-lsqlite3")
86
+ ldflags.prepend("-Wl,-flat_namespace", "-Wl,-hidden-lsqlite3")
87
+ else
88
+ # see https://github.com/flavorjones/mini_portile/issues/118
89
+ "-L#{lib_path}".tap do |lib_path_flag|
90
+ ldflags.prepend(lib_path_flag) unless ldflags.include?(lib_path_flag)
91
+ end
84
92
  end
85
93
 
86
- flags.each { |flag| append_ldflags(flag) }
94
+ ldflags.each { |ldflag| append_ldflags(ldflag) }
87
95
  end
88
96
  end
89
97
 
@@ -126,9 +134,13 @@ module Sqlite3
126
134
 
127
135
  def minimal_recipe
128
136
  MiniPortile.new(libname, sqlite3_config[:version]).tap do |recipe|
129
- recipe.files = sqlite3_config[:files]
130
- recipe.target = File.join(package_root_dir, "ports")
131
- recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
137
+ if sqlite_source_dir
138
+ recipe.source_directory = sqlite_source_dir
139
+ else
140
+ recipe.files = sqlite3_config[:files]
141
+ recipe.target = File.join(package_root_dir, "ports")
142
+ recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
143
+ end
132
144
  end
133
145
  end
134
146
 
@@ -157,10 +169,25 @@ module Sqlite3
157
169
  enable_config("cross-build")
158
170
  end
159
171
 
172
+ def sqlite_source_dir
173
+ arg_config("--with-sqlite-source-dir")
174
+ end
175
+
160
176
  def download
161
177
  minimal_recipe.download
162
178
  end
163
179
 
180
+ def needs_darwin_linker_hack
181
+ # See https://github.com/rake-compiler/rake-compiler-dock/issues/87 for more info.
182
+ cross_build? &&
183
+ darwin? &&
184
+ RbConfig::CONFIG["ruby_version"] >= "3.2"
185
+ end
186
+
187
+ def darwin?
188
+ RbConfig::CONFIG["target_os"].include?("darwin")
189
+ end
190
+
164
191
  def print_help
165
192
  print(<<~TEXT)
166
193
  USAGE: ruby #{$PROGRAM_NAME} [options]
@@ -178,6 +205,9 @@ module Sqlite3
178
205
  Use libsqlcipher instead of libsqlite3.
179
206
  (Implies `--enable-system-libraries`.)
180
207
 
208
+ --with-sqlite-source-dir=DIRECTORY
209
+ (dev only) Build sqlite from the source code in DIRECTORY
210
+
181
211
  --help
182
212
  Display this message.
183
213
 
Binary file
Binary file
@@ -11,7 +11,7 @@ module SQLite3
11
11
 
12
12
  # Returns +true+ or +false+ depending on the value of the named pragma.
13
13
  def get_boolean_pragma( name )
14
- get_first_value( "PRAGMA #{name}" ) != "0"
14
+ get_first_value( "PRAGMA #{name}" ) != 0
15
15
  end
16
16
 
17
17
  # Sets the given pragma to the given boolean value. The value itself
@@ -260,7 +260,7 @@ module SQLite3
260
260
  def full_column_names=( mode )
261
261
  set_boolean_pragma "full_column_names", mode
262
262
  end
263
-
263
+
264
264
  def fullfsync
265
265
  get_boolean_pragma "fullfsync"
266
266
  end
@@ -356,7 +356,7 @@ module SQLite3
356
356
  def parser_trace=( mode )
357
357
  set_boolean_pragma "parser_trace", mode
358
358
  end
359
-
359
+
360
360
  def query_only
361
361
  get_boolean_pragma "query_only"
362
362
  end
@@ -1,12 +1,12 @@
1
1
  module SQLite3
2
2
 
3
- VERSION = "1.5.3"
3
+ VERSION = "1.6.0.rc1"
4
4
 
5
5
  module VersionProxy
6
6
  MAJOR = 1
7
- MINOR = 5
8
- TINY = 3
9
- BUILD = nil
7
+ MINOR = 6
8
+ TINY = 0
9
+ BUILD = "rc1"
10
10
 
11
11
  STRING = [ MAJOR, MINOR, TINY, BUILD ].compact.join( "." )
12
12
 
@@ -0,0 +1,22 @@
1
+ require 'helper'
2
+
3
+ module SQLite3
4
+ class TestPragmas < SQLite3::TestCase
5
+ def setup
6
+ super
7
+ @db = SQLite3::Database.new(":memory:")
8
+ end
9
+
10
+ def test_get_boolean_pragma
11
+ refute(@db.get_boolean_pragma("read_uncommitted"))
12
+ end
13
+
14
+ def test_set_boolean_pragma
15
+ @db.set_boolean_pragma("read_uncommitted", 1)
16
+
17
+ assert(@db.get_boolean_pragma("read_uncommitted"))
18
+ ensure
19
+ @db.set_boolean_pragma("read_uncommitted", 0)
20
+ end
21
+ end
22
+ end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.6.0.rc1
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Jamis Buck
8
8
  - Luis Lavena
9
9
  - Aaron Patterson
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-10-11 00:00:00.000000000 Z
13
+ date: 2023-01-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -74,13 +74,27 @@ dependencies:
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '7'
77
+ - !ruby/object:Gem::Dependency
78
+ name: psych
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '4.0'
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '4.0'
77
91
  description: |-
78
92
  This module allows Ruby programs to interface with the SQLite3
79
93
  database engine (http://www.sqlite.org). You must have the
80
94
  SQLite engine installed in order to build this module.
81
95
 
82
96
  Note that this module is only compatible with SQLite 3.6.16 or newer.
83
- email:
97
+ email:
84
98
  executables: []
85
99
  extensions: []
86
100
  extra_rdoc_files:
@@ -122,6 +136,7 @@ files:
122
136
  - faq/faq.yml
123
137
  - lib/sqlite3.rb
124
138
  - lib/sqlite3/3.1/sqlite3_native.so
139
+ - lib/sqlite3/3.2/sqlite3_native.so
125
140
  - lib/sqlite3/constants.rb
126
141
  - lib/sqlite3/database.rb
127
142
  - lib/sqlite3/errors.rb
@@ -146,6 +161,7 @@ files:
146
161
  - test/test_integration_pending.rb
147
162
  - test/test_integration_resultset.rb
148
163
  - test/test_integration_statement.rb
164
+ - test/test_pragmas.rb
149
165
  - test/test_result_set.rb
150
166
  - test/test_sqlite3.rb
151
167
  - test/test_statement.rb
@@ -160,7 +176,7 @@ metadata:
160
176
  changelog_uri: https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md
161
177
  source_code_uri: https://github.com/sparklemotion/sqlite3-ruby
162
178
  rubygems_mfa_required: 'true'
163
- post_install_message:
179
+ post_install_message:
164
180
  rdoc_options:
165
181
  - "--main"
166
182
  - README.md
@@ -173,15 +189,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
189
  version: '3.1'
174
190
  - - "<"
175
191
  - !ruby/object:Gem::Version
176
- version: 3.2.dev
192
+ version: 3.3.dev
177
193
  required_rubygems_version: !ruby/object:Gem::Requirement
178
194
  requirements:
179
- - - ">="
195
+ - - ">"
180
196
  - !ruby/object:Gem::Version
181
- version: '0'
197
+ version: 1.3.1
182
198
  requirements: []
183
- rubygems_version: 3.3.4
184
- signing_key:
199
+ rubygems_version: 3.3.26
200
+ signing_key:
185
201
  specification_version: 4
186
202
  summary: This module allows Ruby programs to interface with the SQLite3 database engine
187
203
  (http://www.sqlite.org)