sqlite3 2.5.0.rc1-arm64-darwin → 2.7.0-arm64-darwin

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ee31dde12dc884ca916f652de22a11eb083b900a455236bcc35c2136a11de11
4
- data.tar.gz: a950cfa8020978eeeef85ab5d22ecff1b8cc4fa25920a75c4259c86093e37570
3
+ metadata.gz: 84ffc41eeccdb71ded304da83508fc88e2f849311d3302141471cf2a88e0d15b
4
+ data.tar.gz: 96339020d78cba4029495a4c68b41607e590def229f5122e1d12503d166bc664
5
5
  SHA512:
6
- metadata.gz: a41f5d191923da9a85f2008e0d2231be17d8ae09ab94be7aa08f6367c31acd288b323d3bcaa5ca7a05f1354936c5c31d84c1d64fbf63b52b8964ec191db069d2
7
- data.tar.gz: 0fd7a57a5ca8d9adce603f40fcae7e8e0e55f08800e8dd4097945de4375a58aad0ca8c373a784427737ea4e3c58a3aa9400396e9b8117c2bcfa29129a60be334
6
+ metadata.gz: 1900b1be6536b66e99b75d8d63a1958259e5928494e4b10c1c21a7da8cd47505f9529b53a710d77555bbb1c772481fc5cd34d2455979531c2eba6af2008d477d
7
+ data.tar.gz: 1251c97ed4153803aeec97d40c336face98d534c258e9ba27e97719bc62ef7bbd580df446c44d7c6ea63f6e7644ccc93984346b97408c088e55af2f3479116f1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,29 @@
1
1
  # sqlite3-ruby Changelog
2
2
 
3
- ## 2.5.0.rc1 / 2024-12-14
3
+ ## 2.7.0 / 2025-06-09
4
+
5
+ - Vendored sqlite is updated to [v3.50.1](https://sqlite.org/releaselog/3_50_1.html) (from v3.49.1). #630 @flavorjones
6
+
7
+
8
+ ## 2.6.0 / 2025-02-20
9
+
10
+ ### Dependencies
11
+
12
+ - Vendored sqlite is updated to [v3.49.1](https://sqlite.org/releaselog/3_49_1.html) (from v3.47.2). #605 @flavorjones
13
+ - Updated to rake-compiler-dock v1.9.1. #610 @flavorjones
14
+
15
+ ### Important note for Window users
16
+
17
+ Loading extensions is not available on Windows when using the precompiled native gems or compiling the vendored sqlite library from source, starting with sqlite3-ruby v2.6.0.
18
+
19
+ Sqlite 3.48.0 and later have dramatically changed the "autoconf amalgamation" that is vendored in this gem. Specifically, the configuration is no longer actually autoconf, but some scripts that emulate autoconf's interface and behavior.
20
+
21
+ Although this _mostly_ "just worked", we're having a problem resolving the libraries necessary for loading extensions. As a result, starting with sqlite3-ruby v2.6.0, extensions cannot be loaded on Windows when using precompiled native gems or when compiling the vendored sqlite library.
22
+
23
+ If you are willing and able to help fix this, let us know at https://github.com/sparklemotion/sqlite3-ruby/issues/618.
24
+
25
+
26
+ ## 2.5.0 / 2024-12-25
4
27
 
5
28
  ### Ruby
6
29
 
data/dependencies.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  sqlite3:
2
2
  # checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
3
- # 52cd4a2304b627abbabe1a438ba853d0f6edb8e2774fcb5773c7af11077afe94
3
+ # c12e84ba9772391d41644a0a9be37bad25791fc2a9b9395962e5f83f805e877f
4
4
  #
5
- # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3470200.tar.gz
6
- # 52cd4a2304b627abbabe1a438ba853d0f6edb8e2774fcb5773c7af11077afe94 ports/archives/sqlite-autoconf-3470200.tar.gz
5
+ # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3500100.tar.gz
6
+ # c12e84ba9772391d41644a0a9be37bad25791fc2a9b9395962e5f83f805e877f ports/archives/sqlite-autoconf-3500100.tar.gz
7
7
  #
8
- # $ sha256sum ports/archives/sqlite-autoconf-3470200.tar.gz
9
- # f1b2ee412c28d7472bc95ba996368d6f0cdcf00362affdadb27ed286c179540b ports/archives/sqlite-autoconf-3470200.tar.gz
10
- version: "3.47.2"
8
+ # $ sha256sum ports/archives/sqlite-autoconf-3500100.tar.gz
9
+ # 00a65114d697cfaa8fe0630281d76fd1b77afcd95cd5e40ec6a02cbbadbfea71 ports/archives/sqlite-autoconf-3500100.tar.gz
10
+ version: "3.50.1"
11
11
  files:
12
- - url: "https://sqlite.org/2024/sqlite-autoconf-3470200.tar.gz"
13
- sha256: "f1b2ee412c28d7472bc95ba996368d6f0cdcf00362affdadb27ed286c179540b"
12
+ - url: "https://sqlite.org/2025/sqlite-autoconf-3500100.tar.gz"
13
+ sha256: "00a65114d697cfaa8fe0630281d76fd1b77afcd95cd5e40ec6a02cbbadbfea71"
@@ -789,7 +789,7 @@ load_extension_internal(VALUE self, VALUE file)
789
789
  }
790
790
  #endif
791
791
 
792
- #ifdef HAVE_SQLITE3_ENABLE_LOAD_EXTENSION
792
+ #if defined(HAVE_SQLITE3_ENABLE_LOAD_EXTENSION) && defined(HAVE_SQLITE3_LOAD_EXTENSION)
793
793
  /* call-seq: db.enable_load_extension(onoff)
794
794
  *
795
795
  * Enable or disable extension loading.
@@ -992,11 +992,11 @@ init_sqlite3_database(void)
992
992
 
993
993
  #ifdef HAVE_SQLITE3_LOAD_EXTENSION
994
994
  rb_define_private_method(cSqlite3Database, "load_extension_internal", load_extension_internal, 1);
995
- #endif
996
-
997
995
  #ifdef HAVE_SQLITE3_ENABLE_LOAD_EXTENSION
998
996
  rb_define_method(cSqlite3Database, "enable_load_extension", enable_load_extension, 1);
999
997
  #endif
998
+ #endif
999
+
1000
1000
 
1001
1001
  rb_sqlite3_aggregator_init();
1002
1002
  }
@@ -52,7 +52,6 @@ module Sqlite3
52
52
  recipe.configure_options += [
53
53
  "--disable-shared",
54
54
  "--enable-static",
55
- "--disable-tcl",
56
55
  "--enable-fts5"
57
56
  ]
58
57
  ENV.to_h.tap do |env|
Binary file
Binary file
Binary file
Binary file
@@ -82,6 +82,7 @@ module SQLite3
82
82
  # extensions:
83
83
  # - .sqlpkg/nalgeon/crypto/crypto.so # a filesystem path
84
84
  # - <%= SQLean::UUID.to_path %> # or ruby code returning a path
85
+ # - SQLean::Crypto # Rails 8.1+ accepts the name of a constant that responds to `to_path`
85
86
  #
86
87
  class Database
87
88
  attr_reader :collations
@@ -196,7 +197,7 @@ module SQLite3
196
197
  #
197
198
  # Fetch the encoding set on this database
198
199
  def encoding
199
- prepare("PRAGMA encoding") { |stmt| Encoding.find(stmt.first.first) }
200
+ Encoding.find super
200
201
  end
201
202
 
202
203
  # Installs (or removes) a block that will be invoked for every access
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "sqlite3/errors"
2
4
 
3
5
  module SQLite3
@@ -58,11 +60,20 @@ module SQLite3
58
60
  # have duplicate values. See #synchronous, #default_synchronous,
59
61
  # #temp_store, and #default_temp_store for usage examples.
60
62
  def set_enum_pragma(name, mode, enums)
61
- match = enums.find { |p| p.find { |i| i.to_s.downcase == mode.to_s.downcase } }
63
+ match = if enums.is_a?(Array)
64
+ # maybe deprecate this?
65
+ enums.find { |p| p.find { |i| i.to_s.downcase == mode.to_s.downcase } }
66
+ elsif mode.is_a?(String)
67
+ enums.fetch(mode.downcase)
68
+ else
69
+ mode
70
+ end
71
+
62
72
  unless match
63
73
  raise SQLite3::Exception, "unrecognized #{name} #{mode.inspect}"
64
74
  end
65
- execute("PRAGMA #{name}='#{match.first.upcase}'")
75
+
76
+ execute("PRAGMA #{name}='#{match}'")
66
77
  end
67
78
 
68
79
  # Returns the value of the given pragma as an integer.
@@ -77,26 +88,57 @@ module SQLite3
77
88
  end
78
89
 
79
90
  # The enumeration of valid synchronous modes.
80
- SYNCHRONOUS_MODES = [["full", 2], ["normal", 1], ["off", 0]]
91
+ SYNCHRONOUS_MODES = {
92
+ "full" => 2,
93
+ "normal" => 1,
94
+ "off" => 0
95
+ }.freeze
81
96
 
82
97
  # The enumeration of valid temp store modes.
83
- TEMP_STORE_MODES = [["default", 0], ["file", 1], ["memory", 2]]
98
+ TEMP_STORE_MODES = {
99
+ "default" => 0,
100
+ "file" => 1,
101
+ "memory" => 2
102
+ }.freeze
84
103
 
85
104
  # The enumeration of valid auto vacuum modes.
86
- AUTO_VACUUM_MODES = [["none", 0], ["full", 1], ["incremental", 2]]
105
+ AUTO_VACUUM_MODES = {
106
+ "none" => 0,
107
+ "full" => 1,
108
+ "incremental" => 2
109
+ }.freeze
87
110
 
88
111
  # The list of valid journaling modes.
89
- JOURNAL_MODES = [["delete"], ["truncate"], ["persist"], ["memory"],
90
- ["wal"], ["off"]]
112
+ JOURNAL_MODES = {
113
+ "delete" => "delete",
114
+ "truncate" => "truncate",
115
+ "persist" => "persist",
116
+ "memory" => "memory",
117
+ "wal" => "wal",
118
+ "off" => "off"
119
+ }.freeze
91
120
 
92
121
  # The list of valid locking modes.
93
- LOCKING_MODES = [["normal"], ["exclusive"]]
122
+ LOCKING_MODES = {
123
+ "normal" => "normal",
124
+ "exclusive" => "exclusive"
125
+ }.freeze
94
126
 
95
127
  # The list of valid encodings.
96
- ENCODINGS = [["utf-8"], ["utf-16"], ["utf-16le"], ["utf-16be"]]
128
+ ENCODINGS = {
129
+ "utf-8" => "utf-8",
130
+ "utf-16" => "utf-16",
131
+ "utf-16le" => "utf-16le",
132
+ "utf-16be" => "utf-16be"
133
+ }.freeze
97
134
 
98
135
  # The list of valid WAL checkpoints.
99
- WAL_CHECKPOINTS = [["passive"], ["full"], ["restart"], ["truncate"]]
136
+ WAL_CHECKPOINTS = {
137
+ "passive" => "passive",
138
+ "full" => "full",
139
+ "restart" => "restart",
140
+ "truncate" => "truncate"
141
+ }.freeze
100
142
 
101
143
  def application_id
102
144
  get_int_pragma "application_id"
@@ -227,7 +269,7 @@ module SQLite3
227
269
  end
228
270
 
229
271
  def encoding=(mode)
230
- set_enum_pragma "encoding", mode, ENCODINGS
272
+ set_string_pragma "encoding", mode, ENCODINGS
231
273
  end
232
274
 
233
275
  def foreign_key_check(*table, &block) # :yields: row
@@ -295,7 +337,7 @@ module SQLite3
295
337
  end
296
338
 
297
339
  def journal_mode=(mode)
298
- set_enum_pragma "journal_mode", mode, JOURNAL_MODES
340
+ set_string_pragma "journal_mode", mode, JOURNAL_MODES
299
341
  end
300
342
 
301
343
  def journal_size_limit
@@ -319,7 +361,7 @@ module SQLite3
319
361
  end
320
362
 
321
363
  def locking_mode=(mode)
322
- set_enum_pragma "locking_mode", mode, LOCKING_MODES
364
+ set_string_pragma "locking_mode", mode, LOCKING_MODES
323
365
  end
324
366
 
325
367
  def max_page_count
@@ -525,7 +567,7 @@ module SQLite3
525
567
  end
526
568
 
527
569
  def wal_checkpoint=(mode)
528
- set_enum_pragma "wal_checkpoint", mode, WAL_CHECKPOINTS
570
+ set_string_pragma "wal_checkpoint", mode, WAL_CHECKPOINTS
529
571
  end
530
572
 
531
573
  def writable_schema=(mode)
@@ -568,6 +610,13 @@ module SQLite3
568
610
 
569
611
  private
570
612
 
613
+ def set_string_pragma(pragma_name, value, valid_values)
614
+ valid_values.fetch(value.to_s.downcase) {
615
+ raise SQLite3::Exception, "unrecognized #{pragma_name} #{value.inspect}"
616
+ }
617
+ set_enum_pragma(pragma_name, value, valid_values)
618
+ end
619
+
571
620
  # Compares two version strings
572
621
  def version_compare(v1, v2)
573
622
  v1 = v1.split(".").map { |i| i.to_i }
@@ -1,4 +1,4 @@
1
1
  module SQLite3
2
2
  # (String) the version of the sqlite3 gem, e.g. "2.1.1"
3
- VERSION = "2.5.0.rc1"
3
+ VERSION = "2.7.0"
4
4
  end
metadata CHANGED
@@ -1,22 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0.rc1
4
+ version: 2.7.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Jamis Buck
8
8
  - Luis Lavena
9
9
  - Aaron Patterson
10
10
  - Mike Dalessio
11
- autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2024-12-14 00:00:00.000000000 Z
13
+ date: 2025-06-09 00:00:00.000000000 Z
15
14
  dependencies: []
16
15
  description: |
17
16
  Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org). Precompiled
18
17
  binaries are available for common platforms for recent versions of Ruby.
19
- email:
20
18
  executables: []
21
19
  extensions: []
22
20
  extra_rdoc_files:
@@ -76,7 +74,6 @@ metadata:
76
74
  changelog_uri: https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md
77
75
  source_code_uri: https://github.com/sparklemotion/sqlite3-ruby
78
76
  rubygems_mfa_required: 'true'
79
- post_install_message:
80
77
  rdoc_options:
81
78
  - "--main"
82
79
  - README.md
@@ -92,12 +89,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
89
  version: 3.5.dev
93
90
  required_rubygems_version: !ruby/object:Gem::Requirement
94
91
  requirements:
95
- - - ">"
92
+ - - ">="
96
93
  - !ruby/object:Gem::Version
97
- version: 1.3.1
94
+ version: '0'
98
95
  requirements: []
99
- rubygems_version: 3.3.26
100
- signing_key:
96
+ rubygems_version: 3.6.2
101
97
  specification_version: 4
102
98
  summary: Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org).
103
99
  test_files: []