Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-sqlite3 for openSUSE:Factory
checked in at 2022-08-09 15:26:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sqlite3 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-sqlite3.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sqlite3"
Tue Aug 9 15:26:54 2022 rev:31 rq:993523 version:1.4.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sqlite3/rubygem-sqlite3.changes
2020-03-07 21:40:19.632356767 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-sqlite3.new.1521/rubygem-sqlite3.changes
2022-08-09 15:27:11.229425425 +0200
@@ -1,0 +2,7 @@
+Thu Aug 4 13:30:56 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.4.4
+ see installed CHANGELOG.rdoc
+
+
+-------------------------------------------------------------------
Old:
----
sqlite3-1.4.2.gem
New:
----
sqlite3-1.4.4.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-sqlite3.spec ++++++
--- /var/tmp/diff_new_pack.3Wm1Ss/_old 2022-08-09 15:27:12.217428249 +0200
+++ /var/tmp/diff_new_pack.3Wm1Ss/_new 2022-08-09 15:27:12.225428271 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-sqlite3
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-sqlite3
-Version: 1.4.2
+Version: 1.4.4
Release: 0
%define mod_name sqlite3
%define mod_full_name %{mod_name}-%{version}
++++++ sqlite3-1.4.2.gem -> sqlite3-1.4.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2019-12-18 21:19:31.000000000 +0100
+++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-language: ruby
-cache: bundler
-before_install:
- - gem update --system 2.7.7
- - gem install bundler -v 1.16.2
-addons:
- apt:
- packages:
- - libgmp-dev
-
-after_failure:
- - "find . -name mkmf.log -exec cat {} \\;"
-
-after_success:
- - "find . -name mkmf.log -exec cat {} \\;"
-
-env:
- - USE_MINI_PORTILE=true
- - USE_MINI_PORTILE=false
-rvm:
- - 1.9.3
- - 2.0.0
- - 2.1
- - 2.2
- - 2.3
- - 2.4
- - 2.5
- - 2.6
- - 2.7
- - ruby-head
-matrix:
- allow_failures:
- - env: USE_MINI_PORTILE=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.rdoc new/CHANGELOG.rdoc
--- old/CHANGELOG.rdoc 2019-12-18 21:19:31.000000000 +0100
+++ new/CHANGELOG.rdoc 2022-06-14 19:20:43.000000000 +0200
@@ -1,4 +1,19 @@
-=== 1.4.2
+=== 1.4.4 (2022-06-14)
+
+* Fixes
+ * Compilation no longer fails against SQLite3 versions < 3.29.0. This issue
was introduced in v1.4.3. [#324] (Thank you, @r6e!)
+
+
+=== 1.4.3 (2022-05-25)
+
+* Enhancements
+ * Disable non-standard support for double-quoted string literals via the
`:strict` option. [#317] (Thank you, @casperisfine!)
+ * Column type names are now explicitly downcased on platforms where they may
have been in shoutcaps. [#315] (Thank you, @petergoldstein!)
+ * Support File or Pathname arguments to `Database.new`. [#283] (Thank you,
@yb66!)
+ * Support building on MSVC. [#285] (Thank you, @jmarrec!)
+
+
+=== 1.4.2 (2019-12-18)
* Travis: Drop unused setting "sudo: false"
* The taint mechanism will be deprecated in Ruby 2.7
@@ -134,7 +149,7 @@
installed anymore
* Bugfixes
- * Backup API is conditionaly required so that older libsqlite3 can be used.
+ * Backup API is conditionally required so that older libsqlite3 can be used.
Thanks Hongli Lai.
* Fixed segmentation fault when nil is passed to SQLite3::Statement.new
* Fix extconf's hardcoded path that affected installation on certain systems.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2019-12-18 21:19:31.000000000 +0100
+++ new/Gemfile 2022-06-14 19:20:43.000000000 +0200
@@ -8,10 +8,13 @@
gem "minitest", "~>5.11", :group => [:development, :test]
gem "rake-compiler", "~>1.0", :group => [:development, :test]
gem "rake-compiler-dock", "~>0.6.0", :group => [:development, :test]
-gem "mini_portile", "~>0.6.2", :group => [:development, :test]
+gem "mini_portile2", "~>2.0", :group => [:development, :test]
gem "hoe-bundler", "~>1.0", :group => [:development, :test]
gem "hoe-gemspec", "~>1.0", :group => [:development, :test]
gem "rdoc", ">=4.0", "<6", :group => [:development, :test]
-gem "hoe", "~>3.17", :group => [:development, :test]
+
+# hoe versions >= 3.19.0 are incompatible with Ruby 2.0 and earlier,
+# but the gemspec does not indicate so...
+gem "hoe", (RUBY_VERSION < "2.1" ? "3.18.1" : "~>3.20"), :group =>
[:development, :test]
# vim: syntax=ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Manifest.txt new/Manifest.txt
--- old/Manifest.txt 2019-12-18 21:19:31.000000000 +0100
+++ new/Manifest.txt 2022-06-14 19:20:43.000000000 +0200
@@ -1,5 +1,4 @@
.gemtest
-.travis.yml
API_CHANGES.rdoc
CHANGELOG.rdoc
ChangeLog.cvs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc 2019-12-18 21:19:31.000000000 +0100
+++ new/README.rdoc 2022-06-14 19:20:43.000000000 +0200
@@ -5,7 +5,7 @@
* http://rubygems.org/gems/sqlite3
* http://www.rubydoc.info/gems/sqlite3/frames
-{<img src="https://travis-ci.org/sparklemotion/sqlite3-ruby.svg?branch=master"
alt="Build Status" />}[https://travis-ci.org/sparklemotion/sqlite3-ruby]
+{<img
src="https://github.com/sparklemotion/sqlite3-ruby/actions/workflows/sqlite3-ruby.yml/badge.svg"
alt="Build Status"
/>}[https://github.com/sparklemotion/sqlite3-ruby/actions/workflows/sqlite3-ruby.yml]
== DESCRIPTION
@@ -66,7 +66,7 @@
== Compilation and Installation
Install SQLite3, enabling the option SQLITE_ENABLE_COLUMN_METADATA (see
-www.sqlite.org/compile.html for details).
+{www.sqlite.org/compile.html}[https://www.sqlite.org/compile.html] for
details).
Then do the following:
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/sqlite3/aggregator.c new/ext/sqlite3/aggregator.c
--- old/ext/sqlite3/aggregator.c 2019-12-18 21:19:31.000000000 +0100
+++ new/ext/sqlite3/aggregator.c 2022-06-14 19:20:43.000000000 +0200
@@ -10,13 +10,13 @@
* in-flight for this aggregator. */
static VALUE cAggregatorWrapper;
-/* wraps a intance of the "handler" class. Loses its reference at the end of
+/* wraps a instance of the "handler" class. Loses its reference at the end of
* the xFinal callback.
*
- * An AggregatorInstance holds the following instnace variables:
+ * An AggregatorInstance holds the following instance variables:
* -handler_instance: the instance to call `step` and `finalize` on.
* -exc_status: status returned by rb_protect.
- * != 0 if an exception occurred. If an exception occured
+ * != 0 if an exception occurred. If an exception occurred
* `step` and `finalize` won't be called any more. */
static VALUE cAggregatorInstance;
@@ -48,7 +48,7 @@
}
/* called in rb_sqlite3_aggregator_step and rb_sqlite3_aggregator_final. It
- * checks if the exection context already has an associated instance. If it
+ * checks if the execution context already has an associated instance. If it
* has one, it returns it. If there is no instance yet, it creates one and
* associates it with the context. */
static VALUE
@@ -165,8 +165,8 @@
if (exc_status) {
/* the user should never see this, as Statement.step() will pick up the
* outstanding exception and raise it instead of generating a new one
- * for SQLITE_ERROR with message "Ruby Exception occured" */
- sqlite3_result_error(ctx, "Ruby Exception occured", -1);
+ * for SQLITE_ERROR with message "Ruby Exception occurred" */
+ sqlite3_result_error(ctx, "Ruby Exception occurred", -1);
}
rb_sqlite3_aggregate_instance_destroy(ctx);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/sqlite3/database.c new/ext/sqlite3/database.c
--- old/ext/sqlite3/database.c 2019-12-18 21:19:31.000000000 +0100
+++ new/ext/sqlite3/database.c 2022-06-14 19:20:43.000000000 +0200
@@ -1,6 +1,11 @@
#include <sqlite3_ruby.h>
#include <aggregator.h>
+#if _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4028 )
+#endif
+
#define REQUIRE_OPEN_DB(_ctxt) \
if(!_ctxt->db) \
rb_raise(rb_path2class("SQLite3::Exception"), "cannot use a closed
database");
@@ -61,6 +66,23 @@
return self;
}
+static VALUE rb_sqlite3_disable_quirk_mode(VALUE self)
+{
+#if defined SQLITE_DBCONFIG_DQS_DDL
+ sqlite3RubyPtr ctx;
+ Data_Get_Struct(self, sqlite3Ruby, ctx);
+
+ if(!ctx->db) return Qfalse;
+
+ sqlite3_db_config(ctx->db, SQLITE_DBCONFIG_DQS_DDL, 0, (void*)0);
+ sqlite3_db_config(ctx->db, SQLITE_DBCONFIG_DQS_DML, 0, (void*)0);
+
+ return Qtrue;
+#else
+ return Qfalse;
+#endif
+}
+
/* call-seq: db.close
*
* Closes this database.
@@ -705,7 +727,7 @@
/* Is invoked by calling db.execute_batch2(sql, &block)
*
- * Executes all statments in a given string separated by semicolons.
+ * Executes all statements in a given string separated by semicolons.
* If a query is made, all values returned are strings
* (except for 'NULL' values which return nil),
* so the user may parse values with a block.
@@ -800,6 +822,7 @@
/* public "define_aggregator" is now a shim around define_aggregator2
* implemented in Ruby */
rb_define_private_method(cSqlite3Database, "define_aggregator2",
rb_sqlite3_define_aggregator2, 2);
+ rb_define_private_method(cSqlite3Database, "disable_quirk_mode",
rb_sqlite3_disable_quirk_mode, 0);
rb_define_method(cSqlite3Database, "interrupt", interrupt, 0);
rb_define_method(cSqlite3Database, "errmsg", errmsg, 0);
rb_define_method(cSqlite3Database, "errcode", errcode_, 0);
@@ -825,3 +848,7 @@
rb_sqlite3_aggregator_init();
}
+
+#if _MSC_VER
+#pragma warning( pop )
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/sqlite3/statement.c new/ext/sqlite3/statement.c
--- old/ext/sqlite3/statement.c 2019-12-18 21:19:31.000000000 +0100
+++ new/ext/sqlite3/statement.c 2022-06-14 19:20:43.000000000 +0200
@@ -290,7 +290,7 @@
/* call-seq: stmt.reset!
*
* Resets the statement. This is typically done internally, though it might
- * occassionally be necessary to manually reset the statement.
+ * occasionally be necessary to manually reset the statement.
*/
static VALUE reset_bang(VALUE self)
{
@@ -309,7 +309,7 @@
/* call-seq: stmt.clear_bindings!
*
* Resets the statement. This is typically done internally, though it might
- * occassionally be necessary to manually reset the statement.
+ * occasionally be necessary to manually reset the statement.
*/
static VALUE clear_bindings_bang(VALUE self)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/faq/faq.yml new/faq/faq.yml
--- old/faq/faq.yml 2019-12-18 21:19:31.000000000 +0100
+++ new/faq/faq.yml 2022-06-14 19:20:43.000000000 +0200
@@ -128,7 +128,7 @@
Where _n_ is an integer, and _word_ is an alpha-numeric identifier (or
number). When the placeholder is associated with a number, that number
identifies the index of the bind variable to replace it with. When it
- is an identifier, it identifies the name of the correponding bind
+ is an identifier, it identifies the name of the corresponding bind
variable. (In the instance of the first format--a single question
mark--the placeholder is assigned a number one greater than the last
index used, or 1 if it is the first.)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sqlite3/constants.rb new/lib/sqlite3/constants.rb
--- old/lib/sqlite3/constants.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/lib/sqlite3/constants.rb 2022-06-14 19:20:43.000000000 +0200
@@ -37,7 +37,7 @@
EMPTY = 16 # (Internal Only) Database table is empty
SCHEMA = 17 # The database schema changed
TOOBIG = 18 # Too much data for one row of a table
- CONSTRAINT = 19 # Abort due to contraint violation
+ CONSTRAINT = 19 # Abort due to constraint violation
MISMATCH = 20 # Data type mismatch
MISUSE = 21 # Library used incorrectly
NOLFS = 22 # Uses OS features not supported on host
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sqlite3/database.rb new/lib/sqlite3/database.rb
--- old/lib/sqlite3/database.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/lib/sqlite3/database.rb 2022-06-14 19:20:43.000000000 +0200
@@ -65,6 +65,7 @@
def initialize file, options = {}, zvfs = nil
mode = Constants::Open::READWRITE | Constants::Open::CREATE
+ file = file.to_path if file.respond_to? :to_path
if file.encoding == ::Encoding::UTF_16LE || file.encoding ==
::Encoding::UTF_16BE || options[:utf16]
open16 file
else
@@ -87,6 +88,10 @@
end
open_v2 file.encode("utf-8"), mode, zvfs
+
+ if options[:strict]
+ disable_quirk_mode
+ end
end
@tracefunc = nil
@@ -237,7 +242,7 @@
# rows.
#
# See also #execute_batch2 for additional ways of
- # executing statments.
+ # executing statements.
def execute_batch( sql, bind_vars = [], *args )
# FIXME: remove this stuff later
unless [Array, Hash].include?(bind_vars.class)
@@ -294,7 +299,7 @@
# a block can be passed to parse the values accordingly.
#
# See also #execute_batch for additional ways of
- # executing statments.
+ # executing statements.
def execute_batch2(sql, &block)
if block_given?
result = exec_batch(sql, @results_as_hash)
@@ -307,7 +312,7 @@
end
# This is a convenience method for creating a statement, binding
- # paramters to it, and calling execute:
+ # parameters to it, and calling execute:
#
# result = db.query( "select * from foo where a=?", [5])
# # is the same as
@@ -536,10 +541,10 @@
# db.create_aggregate_handler( LengthsAggregateHandler )
# puts db.get_first_value( "select lengths(name) from A" )
def create_aggregate_handler( handler )
- # This is a compatiblity shim so the (basically pointless) FunctionProxy
+ # This is a compatibility shim so the (basically pointless) FunctionProxy
# "ctx" object is passed as first argument to both step() and finalize().
# Now its up to the library user whether he prefers to store his
- # temporaries as instance varibales or fields in the FunctionProxy.
+ # temporaries as instance variables or fields in the FunctionProxy.
# The library user still must set the result value with
# FunctionProxy.result= as there is no backwards compatible way to
# change this.
@@ -574,7 +579,7 @@
# The functions arity is the arity of the +step+ method.
def define_aggregator( name, aggregator )
# Previously, this has been implemented in C. Now this is just yet
- # another compatiblity shim
+ # another compatibility shim
proxy = Class.new do
@template = aggregator
@name = name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sqlite3/pragmas.rb new/lib/sqlite3/pragmas.rb
--- old/lib/sqlite3/pragmas.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/lib/sqlite3/pragmas.rb 2022-06-14 19:20:43.000000000 +0200
@@ -42,11 +42,11 @@
# Requests the given pragma (and parameters), and if the block is given,
# each row of the result set will be yielded to it. Otherwise, the results
# are returned as an array.
- def get_query_pragma( name, *parms, &block ) # :yields: row
- if parms.empty?
+ def get_query_pragma( name, *params, &block ) # :yields: row
+ if params.empty?
execute( "PRAGMA #{name}", &block )
else
- args = "'" + parms.join("','") + "'"
+ args = "'" + params.join("','") + "'"
execute( "PRAGMA #{name}( #{args} )", &block )
end
end
@@ -543,6 +543,13 @@
tweak_default(new_row) if needs_tweak_default
+ # Ensure the type value is downcased. On Mac and Windows
+ # platforms this value is now being returned as all upper
+ # case.
+ if new_row['type']
+ new_row['type'] = new_row['type'].downcase
+ end
+
if block_given?
yield new_row
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sqlite3/statement.rb new/lib/sqlite3/statement.rb
--- old/lib/sqlite3/statement.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/lib/sqlite3/statement.rb 2022-06-14 19:20:43.000000000 +0200
@@ -137,7 +137,8 @@
column_name column
end
@types = Array.new(column_count) do |column|
- column_decltype column
+ val = column_decltype(column)
+ val.nil? ? nil : val.downcase
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sqlite3/translator.rb
new/lib/sqlite3/translator.rb
--- old/lib/sqlite3/translator.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/lib/sqlite3/translator.rb 2022-06-14 19:20:43.000000000 +0200
@@ -43,7 +43,7 @@
end
# Translate the given string value to a value of the given type. In the
- # absense of an installed translator block for the given type, the value
+ # absence of an installed translator block for the given type, the value
# itself is always returned. Further, +nil+ values are never translated,
# and are always passed straight through regardless of the type parameter.
def translate( type, value )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/sqlite3/version.rb new/lib/sqlite3/version.rb
--- old/lib/sqlite3/version.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/lib/sqlite3/version.rb 2022-06-14 19:20:43.000000000 +0200
@@ -1,12 +1,12 @@
module SQLite3
- VERSION = '1.4.2'
+ VERSION = '1.4.4'
module VersionProxy
MAJOR = 1
MINOR = 4
- TINY = 2
+ TINY = 4
BUILD = nil
STRING = [ MAJOR, MINOR, TINY, BUILD ].compact.join( "." )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-12-18 21:19:31.000000000 +0100
+++ new/metadata 2022-06-14 19:20:43.000000000 +0200
@@ -1,16 +1,16 @@
--- !ruby/object:Gem::Specification
name: sqlite3
version: !ruby/object:Gem::Version
- version: 1.4.2
+ version: 1.4.4
platform: ruby
authors:
- Jamis Buck
- Luis Lavena
- Aaron Patterson
-autorequire:
+autorequire:
bindir: bin
cert_chain: []
-date: 2019-12-18 00:00:00.000000000 Z
+date: 2022-06-14 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: minitest
@@ -18,14 +18,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '5.13'
+ version: '5.15'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '5.13'
+ version: '5.15'
- !ruby/object:Gem::Dependency
name: rake-compiler
requirement: !ruby/object:Gem::Requirement
@@ -55,19 +55,19 @@
- !ruby/object:Gem::Version
version: 0.6.0
- !ruby/object:Gem::Dependency
- name: mini_portile
+ name: mini_portile2
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 0.6.2
+ version: '2.0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 0.6.2
+ version: '2.0'
- !ruby/object:Gem::Dependency
name: hoe-bundler
requirement: !ruby/object:Gem::Requirement
@@ -122,14 +122,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '3.20'
+ version: '3.23'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: '3.20'
+ version: '3.23'
description: |-
This module allows Ruby programs to interface with the SQLite3
database engine (http://www.sqlite.org). You must have the
@@ -156,7 +156,6 @@
- ext/sqlite3/statement.c
files:
- ".gemtest"
-- ".travis.yml"
- API_CHANGES.rdoc
- CHANGELOG.rdoc
- ChangeLog.cvs
@@ -220,7 +219,7 @@
- BSD-3-Clause
metadata:
msys2_mingw_dependencies: sqlite3
-post_install_message:
+post_install_message:
rdoc_options:
- "--main"
- README.rdoc
@@ -237,8 +236,8 @@
- !ruby/object:Gem::Version
version: 1.3.5
requirements: []
-rubygems_version: 3.0.3
-signing_key:
+rubygems_version: 3.4.0.dev
+signing_key:
specification_version: 4
summary: This module allows Ruby programs to interface with the SQLite3
database engine
(http://www.sqlite.org)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/rakelib/gem.rake new/rakelib/gem.rake
--- old/rakelib/gem.rake 2019-12-18 21:19:31.000000000 +0100
+++ new/rakelib/gem.rake 2022-06-14 19:20:43.000000000 +0200
@@ -27,7 +27,7 @@
extra_dev_deps << ['rake-compiler', "~> 1.0"]
extra_dev_deps << ['rake-compiler-dock', "~> 0.6.0"]
- extra_dev_deps << ["mini_portile", "~> 0.6.2"]
+ extra_dev_deps << ["mini_portile2", "~> 2.0"]
extra_dev_deps << ["minitest", "~> 5.0"]
extra_dev_deps << ["hoe-bundler", "~> 1.0"]
extra_dev_deps << ["hoe-gemspec", "~> 1.0"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/rakelib/native.rake new/rakelib/native.rake
--- old/rakelib/native.rake 2019-12-18 21:19:31.000000000 +0100
+++ new/rakelib/native.rake 2022-06-14 19:20:43.000000000 +0200
@@ -51,6 +51,9 @@
end
# ensure things are compiled prior testing
-task :test => [:compile]
-
+if RUBY_PLATFORM =~ /mingw/ then
+ task :test => ["compile:msys2"]
+else
+ task :test => [:compile]
+end
# vim: syntax=ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/rakelib/vendor_sqlite3.rake
new/rakelib/vendor_sqlite3.rake
--- old/rakelib/vendor_sqlite3.rake 2019-12-18 21:19:31.000000000 +0100
+++ new/rakelib/vendor_sqlite3.rake 2022-06-14 19:20:43.000000000 +0200
@@ -1,6 +1,6 @@
require "rake/clean"
require "rake/extensioncompiler"
-require "mini_portile"
+require "mini_portile2"
CLOBBER.include("ports")
@@ -8,7 +8,7 @@
def define_sqlite_task(platform, host)
recipe = MiniPortile.new "sqlite3", BINARY_VERSION
- recipe.files <<
"http://sqlite.org#{URL_PATH}/sqlite-autoconf-#{URL_VERSION}.tar.gz"
+ recipe.files =
["http://sqlite.org#{URL_PATH}/sqlite-autoconf-#{URL_VERSION}.tar.gz"]
recipe.host = host
desc "Compile sqlite3 for #{platform} (#{host})"
@@ -37,6 +37,17 @@
# also prepend DevKit into compilation phase
Rake::Task["compile"].prerequisites.unshift "devkit",
"ports:sqlite3:#{RUBY_PLATFORM}"
Rake::Task["native"].prerequisites.unshift "devkit",
"ports:sqlite3:#{RUBY_PLATFORM}"
+
+ namespace "compile" do
+ desc "Build using MSYS2 sqlite package"
+ task :msys2 do
+ RUBY_EXTENSION.config_options.pop
+ t = Rake::Task["compile"]
+ t.prerequisites.clear
+ t.prerequisites << "devkit" << "compile:#{RUBY_PLATFORM}"
+ t.invoke
+ end
+ end
end
# trick to test local compilation of sqlite3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/helper.rb new/test/helper.rb
--- old/test/helper.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/test/helper.rb 2022-06-14 19:20:43.000000000 +0200
@@ -1,6 +1,13 @@
require 'sqlite3'
require 'minitest/autorun'
+if ENV['GITHUB_ACTIONS'] == 'true' || ENV['CI']
+ $VERBOSE = nil
+ puts "\nSQLite3 Version: #{SQLite3::SQLITE_VERSION} $VERBOSE = nil", ""
+else
+ puts "\nSQLite3 Version: #{SQLite3::SQLITE_VERSION}", ""
+end
+
unless RUBY_VERSION >= "1.9"
require 'iconv'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/test_database.rb new/test/test_database.rb
--- old/test/test_database.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/test/test_database.rb 2022-06-14 19:20:43.000000000 +0200
@@ -45,6 +45,17 @@
tf.unlink if tf
end
+
+ def test_filename_to_path
+ tf = Tempfile.new 'thing'
+ pn = Pathname tf.path
+ db = SQLite3::Database.new pn
+ assert_equal pn.expand_path.to_s, File.expand_path(db.filename)
+ ensure
+ tf.close! if tf
+ end
+
+
def test_error_code
begin
db.execute 'SELECT'
@@ -499,5 +510,22 @@
def test_execute_with_named_bind_params
assert_equal [['foo']], @db.execute("select :n", {'n' => 'foo'})
end
+
+ def test_strict_mode
+ unless Gem::Requirement.new(">=
3.29.0").satisfied_by?(Gem::Version.new(SQLite3::SQLITE_VERSION))
+ skip("strict mode feature not available in #{SQLite3::SQLITE_VERSION}")
+ end
+
+ db = SQLite3::Database.new(':memory:')
+ db.execute('create table numbers (val int);')
+ db.execute('create index index_numbers_nope ON numbers ("nope");') #
nothing raised
+
+ db = SQLite3::Database.new(':memory:', :strict => true)
+ db.execute('create table numbers (val int);')
+ error = assert_raises SQLite3::SQLException do
+ db.execute('create index index_numbers_nope ON numbers ("nope");')
+ end
+ assert_includes error.message, "no such column: nope"
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/test_statement.rb new/test/test_statement.rb
--- old/test/test_statement.rb 2019-12-18 21:19:31.000000000 +0100
+++ new/test/test_statement.rb 2022-06-14 19:20:43.000000000 +0200
@@ -127,7 +127,7 @@
row = @db.execute('select * from foo')
assert_equal ['hello'], row.first
- assert_equal row.first.types, ['BLOB']
+ assert_equal ['blob'], row.first.types
end
def test_bind_64