sqlite3 1.5.4 → 1.6.0.rc2

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: 2b90b6b29818fed972c55598d50dd2e395e4c7b9f3c0709d34cb99a462ea8ec5
4
- data.tar.gz: e28aa12b3bac56cb43f8935bd654274cc79464cbef355a07aab3f0a19321b656
3
+ metadata.gz: c8d1f4a6fc62ef46dcf04d60fbc1de782988ca770b5c71dcd14072e9017eb43d
4
+ data.tar.gz: 9873600eb5fe2d880ed1faf3fa3e9e3c9002135ac773a7e11c25ce50e312bd29
5
5
  SHA512:
6
- metadata.gz: 1b8eb37dbf8097870eec21db848c51494834790d547896f1769da7ad7a40d5f2857dc3c09271ab4ec2e242527b993d105fe813f0e13efbc4b0977570cb45aedd
7
- data.tar.gz: a0a2b779e97adb130490734a5b0699aa63064681fea662f61a8a5dc03b75664c0da929cd8f8be8a7f74ddc1925b0192ed9447e6f47bc3161151df4759a91ca8b
6
+ metadata.gz: abc8e35c2dd4462846bcdc2c7210b9f607af0a6c710cae8570e1d588e07f7ff31e18a3cd57781b70bd8f579811ea221e140dc69615a8cd61fa344b122045cac3
7
+ data.tar.gz: 96e8ba48a6e3ada102c9a8352cf4789f377d3be4c21de95cff618ac7f5e316be87c1cedd05046db74846557e7805c0ab46101744e37074dc8e6565d9aab89c03
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
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
+
3
22
  ## 1.5.4 / 2022-11-18
4
23
 
5
24
  ### Dependencies
data/CONTRIBUTING.md CHANGED
@@ -17,8 +17,8 @@ Run `bin/build-gems` which will package gems for all supported platforms, and ru
17
17
  A quick checklist:
18
18
 
19
19
  - [ ] make sure CI is green!
20
- - [x] update `CHANGELOG.md` and `lib/sqlite3/version.rb` including `VersionProxy::{MINOR,TINY}`
21
- - [x] create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
20
+ - [ ] update `CHANGELOG.md` and `lib/sqlite3/version.rb` including `VersionProxy::{MINOR,TINY}`
21
+ - [ ] create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
22
22
  - [ ] run `bin/build-gems` and make sure it completes and all the tests pass
23
23
  - [ ] `for g in gems/*.gem ; do gem push $g ; done`
24
24
  - [ ] create a release at https://github.com/sparklemotion/sqlite3-ruby/releases and include sha2 checksums
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-3400000.tar.gz
6
- # 7ee8f02b21edb4489df5082b5cf5b7ef47bcebcdb0e209bf14240db69633c878 ports/archives/sqlite-autoconf-3400000.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-3400000.tar.gz
9
- # 0333552076d2700c75352256e91c78bf5cd62491589ba0c69aed0a81868980e7 ports/archives/sqlite-autoconf-3400000.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.40.0"
12
+ :version: "3.40.1"
12
13
  :files:
13
- - :url: "https://sqlite.org/2022/sqlite-autoconf-3400000.tar.gz"
14
- :sha256: "0333552076d2700c75352256e91c78bf5cd62491589ba0c69aed0a81868980e7"
14
+ - :url: "https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz"
15
+ :sha256: "2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9"
@@ -55,6 +55,7 @@ module Sqlite3
55
55
  additional_cflags = [
56
56
  "-fPIC", # needed for linking the static library into a shared library
57
57
  "-O2", # see https://github.com/sparklemotion/sqlite3-ruby/issues/335 for some benchmarks
58
+ "-fvisibility=hidden", # see https://github.com/rake-compiler/rake-compiler-dock/issues/87
58
59
  ]
59
60
  env["CFLAGS"] = [env["CFLAGS"], additional_cflags].flatten.join(" ")
60
61
  recipe.configure_options += env.select { |k,v| ENV_ALLOWLIST.include?(k) }
@@ -69,21 +70,24 @@ module Sqlite3
69
70
  # on macos, pkg-config will not return --cflags without this
70
71
  ENV["PKG_CONFIG_ALLOW_SYSTEM_CFLAGS"] = "t"
71
72
 
73
+ # only needed for Ruby 3.1.3, see https://bugs.ruby-lang.org/issues/19233
74
+ RbConfig::CONFIG["PKG_CONFIG"] = config_string("PKG_CONFIG") || "pkg-config"
75
+
72
76
  lib_path = File.join(recipe.path, "lib")
73
77
  pcfile = File.join(lib_path, "pkgconfig", "sqlite3.pc")
74
78
  abort_pkg_config("pkg_config") unless pkg_config(pcfile)
75
79
 
76
80
  # see https://bugs.ruby-lang.org/issues/18490
77
- flags = xpopen(["pkg-config", "--libs", "--static", pcfile], err: [:child, :out], &:read)
81
+ ldflags = xpopen(["pkg-config", "--libs", "--static", pcfile], err: [:child, :out], &:read)
78
82
  abort_pkg_config("xpopen") unless $?.success?
79
- flags = flags.split
83
+ ldflags = ldflags.split
80
84
 
81
85
  # see https://github.com/flavorjones/mini_portile/issues/118
82
86
  "-L#{lib_path}".tap do |lib_path_flag|
83
- flags.prepend(lib_path_flag) unless flags.include?(lib_path_flag)
87
+ ldflags.prepend(lib_path_flag) unless ldflags.include?(lib_path_flag)
84
88
  end
85
89
 
86
- flags.each { |flag| append_ldflags(flag) }
90
+ ldflags.each { |ldflag| append_ldflags(ldflag) }
87
91
  end
88
92
  end
89
93
 
@@ -92,6 +96,8 @@ module Sqlite3
92
96
  append_cppflags("-DTAINTING_SUPPORT")
93
97
  end
94
98
 
99
+ append_cflags("-fvisibility=hidden") # see https://github.com/rake-compiler/rake-compiler-dock/issues/87
100
+
95
101
  if find_header("sqlite3.h")
96
102
  # noop
97
103
  elsif sqlcipher? && find_header("sqlcipher/sqlite3.h")
@@ -169,6 +175,10 @@ module Sqlite3
169
175
  minimal_recipe.download
170
176
  end
171
177
 
178
+ def darwin?
179
+ RbConfig::CONFIG["target_os"].include?("darwin")
180
+ end
181
+
172
182
  def print_help
173
183
  print(<<~TEXT)
174
184
  USAGE: ruby #{$PROGRAM_NAME} [options]
@@ -127,6 +127,7 @@ void init_sqlite3_constants()
127
127
  #endif
128
128
  }
129
129
 
130
+ RUBY_FUNC_EXPORTED
130
131
  void Init_sqlite3_native()
131
132
  {
132
133
  /*
@@ -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.4"
3
+ VERSION = "1.6.0.rc2"
4
4
 
5
5
  module VersionProxy
6
6
  MAJOR = 1
7
- MINOR = 5
8
- TINY = 4
9
- BUILD = nil
7
+ MINOR = 6
8
+ TINY = 0
9
+ BUILD = "rc2"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.6.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-11-18 00:00:00.000000000 Z
13
+ date: 2023-01-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -26,6 +26,7 @@ dependencies:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: 2.8.0
29
+ force_ruby_platform: false
29
30
  - !ruby/object:Gem::Dependency
30
31
  name: minitest
31
32
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +89,20 @@ dependencies:
88
89
  - - "<"
89
90
  - !ruby/object:Gem::Version
90
91
  version: '7'
92
+ - !ruby/object:Gem::Dependency
93
+ name: psych
94
+ requirement: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '4.0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '4.0'
91
106
  description: |-
92
107
  This module allows Ruby programs to interface with the SQLite3
93
108
  database engine (http://www.sqlite.org). You must have the
@@ -145,7 +160,7 @@ files:
145
160
  - lib/sqlite3/translator.rb
146
161
  - lib/sqlite3/value.rb
147
162
  - lib/sqlite3/version.rb
148
- - ports/archives/sqlite-autoconf-3400000.tar.gz
163
+ - ports/archives/sqlite-autoconf-3400100.tar.gz
149
164
  - test/helper.rb
150
165
  - test/test_backup.rb
151
166
  - test/test_collation.rb
@@ -161,6 +176,7 @@ files:
161
176
  - test/test_integration_pending.rb
162
177
  - test/test_integration_resultset.rb
163
178
  - test/test_integration_statement.rb
179
+ - test/test_pragmas.rb
164
180
  - test/test_result_set.rb
165
181
  - test/test_sqlite3.rb
166
182
  - test/test_statement.rb
@@ -189,11 +205,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
205
  version: 1.9.2
190
206
  required_rubygems_version: !ruby/object:Gem::Requirement
191
207
  requirements:
192
- - - ">="
208
+ - - ">"
193
209
  - !ruby/object:Gem::Version
194
- version: '0'
210
+ version: 1.3.1
195
211
  requirements: []
196
- rubygems_version: 3.3.7
212
+ rubygems_version: 3.4.2
197
213
  signing_key:
198
214
  specification_version: 4
199
215
  summary: This module allows Ruby programs to interface with the SQLite3 database engine