sequel 5.83.0 → 5.83.1

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: 66956ac28806c0389a6c809b0aa70d2746a7aff47fd5b039d238c08f621cdbff
4
- data.tar.gz: d2b8d3f88b13432c60e6164fda3577725300e18a0dfa03682871405d074d7ba0
3
+ metadata.gz: 892c809f3a378e80b21c29cc1c7f95f4a9fd0b47621a10d314b6177641f1ed4b
4
+ data.tar.gz: be68a7d44ecd5af4e7d7d67484ea6fc200e663b8649c250fcfc4be11de9f4c3d
5
5
  SHA512:
6
- metadata.gz: 55d45f7c3cb7154f275ddf5ea3649d78a38f147abdb49f1286358d8dbec9f607e3bf43c9ebe1dc31276d28820f455fc82dcce7b4c9808b325288380acf90edf4
7
- data.tar.gz: b8301c7880dcb598ca027d225f5be791200ac1f13f4efe5351222d351b218019351a8efa1f485d499a0650cd4213ba0a148c3f10f0a67aa0b3c04f4ee611b074
6
+ metadata.gz: ac626e338969ddf7e99b554070b7383e3ce2e712ca2033b1c65dc2181c36636740a4e1858fa6cdb6bede1493a93aeac8299bbc26acfb2ed515a654a2957de7e4
7
+ data.tar.gz: 660dc4b4bded4eb08e357d92f093be43ac8613e62f1a8a693d1c6d81b64ddec3081147303ac10cd9153f8d62d2ce3459d8fd871412156fd5342c325ca654371c
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 5.83.1 (2024-08-08)
2
+
3
+ * Restore unescaping of database file paths in the sqlite and amalgalite adapters (jeremyevans) (#2201)
4
+
1
5
  === 5.83.0 (2024-08-01)
2
6
 
3
7
  * Make optimistic_locking plugin not keep lock column in changed_columns after updating instance (jeremyevans) (#2196)
@@ -45,7 +45,7 @@
45
45
 
46
46
  * The Database.uri_to_options private class method now handles
47
47
  conversion of URI parameters to options. Previously, this was
48
- handled by callers of this method.
48
+ handled by callers of this method (change reverted in 5.83.1).
49
49
 
50
50
  * The _merge_matched_sql and _merge_not_matched_sql private Dataset
51
51
  methods in PostgreSQL have been replaced with
@@ -34,7 +34,7 @@ module Sequel
34
34
  uri = URI.parse(conn_string)
35
35
  scheme = uri.scheme
36
36
  c = adapter_class(scheme)
37
- opts = c.send(:uri_to_options, uri).merge!(opts).merge!(:orig_opts=>opts.dup, :uri=>conn_string, :adapter=>scheme)
37
+ opts = c.send(:options_from_uri, uri).merge!(opts).merge!(:orig_opts=>opts.dup, :uri=>conn_string, :adapter=>scheme)
38
38
  end
39
39
  when Hash
40
40
  opts = conn_string.merge(opts)
@@ -72,18 +72,23 @@ module Sequel
72
72
  # Converts a uri to an options hash. These options are then passed
73
73
  # to a newly created database object.
74
74
  def self.uri_to_options(uri)
75
- uri_options = {
75
+ {
76
76
  :user => uri.user,
77
77
  :password => uri.password,
78
78
  :port => uri.port,
79
79
  :host => uri.hostname,
80
80
  :database => (m = /\/(.*)/.match(uri.path)) && (m[1])
81
81
  }
82
+ end
83
+ private_class_method :uri_to_options
84
+
85
+ def self.options_from_uri(uri)
86
+ uri_options = uri_to_options(uri)
82
87
  uri.query.split('&').map{|s| s.split('=')}.each{|k,v| uri_options[k.to_sym] = v if k && !k.empty?} unless uri.query.to_s.strip.empty?
83
88
  uri_options.to_a.each{|k,v| uri_options[k] = URI::DEFAULT_PARSER.unescape(v) if v.is_a?(String)}
84
89
  uri_options
85
90
  end
86
- private_class_method :uri_to_options
91
+ private_class_method :options_from_uri
87
92
 
88
93
  # The options hash for this database
89
94
  attr_reader :opts
@@ -266,7 +271,7 @@ module Sequel
266
271
  keys = [:host, :database, :user]
267
272
  opts = self.opts
268
273
  if !keys.any?{|k| opts[k]} && opts[:uri]
269
- opts = self.class.send(:uri_to_options, URI.parse(opts[:uri]))
274
+ opts = self.class.send(:options_from_uri, URI.parse(opts[:uri]))
270
275
  end
271
276
 
272
277
  keys.each do |key|
@@ -10,7 +10,7 @@ module Sequel
10
10
 
11
11
  # The tiny version of Sequel. Usually 0, only bumped for bugfix
12
12
  # releases that fix regressions from previous versions.
13
- TINY = 0
13
+ TINY = 1
14
14
 
15
15
  # The version of Sequel you are using, as a string (e.g. "2.11.0")
16
16
  VERSION = [MAJOR, MINOR, TINY].join('.').freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.83.0
4
+ version: 5.83.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-01 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal