extralite 1.24 → 1.26

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: bbe4f33eced375588c90c6f0e2c3dd5b25ca19e44e3a9b4a20f21e43d7a833ff
4
- data.tar.gz: 709a92b6edd0b54531652d3c572b5dcac21e8db09b6c516c8f07332bb4daa6ee
3
+ metadata.gz: 459a362b27b2061131a291b8e8b7f73fbc226847f17973de29771af1b3ff694c
4
+ data.tar.gz: 0774ca30f4107711a9fe79ffde59e606073bf5f95c0de1f12bc0e1c14876560a
5
5
  SHA512:
6
- metadata.gz: b1c8f1cfc27bfe888f6c92be36f00631dda67471f937c7d94d5b731c94b90fd3b83f322891186f1cc9baf792dafe2df02cd1dc09f8cef7e4030bce79c048f9c1
7
- data.tar.gz: 6e4de82d209255d623bc090b29b5d71da1922a6d70d5b3879a475ace8acb77de8b75ee688c51b45b71c9e9b66c56e71bc341da6377366baf66388cbc261f65b5
6
+ metadata.gz: 6b7ca365d43357ebbdaed90d18299bdae324fc2526c5206c5810c447bf59aecd56202991a5d46290da3097d6a73605297cb6ed769b53e402b6e1d18099c054d0
7
+ data.tar.gz: b6f2b2a578896df9154e3db60a0f84a6afc5c0fee6d4a650b259d3f757dda94c763ad37a6d9c6e428cc92db8311acb0861072b63cfd841d3eb6fca2e84dd3d60
data/.github/FUNDING.yml CHANGED
@@ -1 +1 @@
1
- github: ciconia
1
+ github: noteflakes
@@ -8,7 +8,7 @@ jobs:
8
8
  fail-fast: false
9
9
  matrix:
10
10
  os: [ubuntu-latest, macos-latest]
11
- ruby: ['3.0', '3.1', '3.2', truffleruby]
11
+ ruby: ['2.7', '3.0', '3.1', '3.2', truffleruby]
12
12
 
13
13
  name: >-
14
14
  ${{matrix.os}}, ${{matrix.ruby}}
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ -o ./_yardoc
2
+ -m markdown -M redcarpet
3
+ --verbose
4
+ --protected
5
+ --no-private
6
+ --exclude sqlite3_constants.rb
7
+ ./lib
8
+ ./ext/extralite
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 1.26 2023-05-17
2
+
3
+ - Improve documentation
4
+
5
+ # 1.25 2023-03-10
6
+
7
+ - Remove bundled sqlite3 source files from extralite.gemspec
8
+ - Restore testing on Ruby 2.7
9
+
1
10
  # 1.24 2023-02-02
2
11
 
3
12
  - Fix closing database with open statements
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- extralite (1.24)
4
+ extralite (1.26)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -56,6 +56,7 @@ else
56
56
  $CFLAGS << ' -DTAINTING_SUPPORT'
57
57
  end
58
58
 
59
+ # @!visibility private
59
60
  def asplode missing
60
61
  if RUBY_PLATFORM =~ /mingw|mswin/
61
62
  abort "#{missing} is missing. Install SQLite3 from " +
@@ -1,6 +1,12 @@
1
1
  #include <stdio.h>
2
2
  #include "extralite.h"
3
3
 
4
+ /*
5
+ * Document-class: Extralite::PreparedStatement
6
+ *
7
+ * This class represents a prepared statement.
8
+ */
9
+
4
10
  VALUE cPreparedStatement;
5
11
 
6
12
  static size_t PreparedStatement_size(const void *ptr) {
@@ -2,6 +2,7 @@ require_relative './gemspec'
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  common_spec(s)
5
+
5
6
  s.name = 'extralite-bundle'
6
7
  s.summary = 'Extra-lightweight SQLite3 wrapper for Ruby with bundled SQLite3'
7
8
  s.extensions = ["ext/extralite/extconf-bundle.rb"]
data/extralite.gemspec CHANGED
@@ -2,6 +2,8 @@ require_relative './gemspec'
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  common_spec(s)
5
+
6
+ s.files.reject! { |fn| fn =~ /^ext\/sqlite3/ }
5
7
  s.name = 'extralite'
6
8
  s.summary = 'Extra-lightweight SQLite3 wrapper for Ruby'
7
9
  s.extensions = ["ext/extralite/extconf.rb"]
@@ -1,5 +1,4 @@
1
1
  module Extralite
2
-
3
2
  SQLITE_STATUS_MEMORY_USED = 0
4
3
  SQLITE_STATUS_PAGECACHE_USED = 1
5
4
  SQLITE_STATUS_PAGECACHE_OVERFLOW = 2
@@ -1,3 +1,4 @@
1
1
  module Extralite
2
- VERSION = '1.24'
2
+ # Extralite version
3
+ VERSION = '1.26'
3
4
  end
data/lib/extralite.rb CHANGED
@@ -29,6 +29,7 @@ module Extralite
29
29
  class Database
30
30
  alias_method :execute, :query
31
31
 
32
+ # @!visibility private
32
33
  TABLES_SQL = <<~SQL
33
34
  SELECT name FROM sqlite_master
34
35
  WHERE type ='table'
@@ -7,22 +7,28 @@
7
7
  require 'extralite'
8
8
  require 'sequel/adapters/shared/sqlite'
9
9
 
10
+ # @!visibility private
10
11
  module Sequel
12
+ # Extralite Sequel adapter
11
13
  module Extralite
14
+ # @!visibility private
12
15
  FALSE_VALUES = (%w'0 false f no n'.each(&:freeze) + [0]).freeze
13
16
 
14
17
  blob = Object.new
18
+ # @!visibility private
15
19
  def blob.call(s)
16
20
  Sequel::SQL::Blob.new(s.to_s)
17
21
  end
18
22
 
19
23
  boolean = Object.new
24
+ # @!visibility private
20
25
  def boolean.call(s)
21
26
  s = s.downcase if s.is_a?(String)
22
27
  !FALSE_VALUES.include?(s)
23
28
  end
24
29
 
25
30
  date = Object.new
31
+ # @!visibility private
26
32
  def date.call(s)
27
33
  case s
28
34
  when String
@@ -37,22 +43,26 @@ module Sequel
37
43
  end
38
44
 
39
45
  integer = Object.new
46
+ # @!visibility private
40
47
  def integer.call(s)
41
48
  s.to_i
42
49
  end
43
50
 
44
51
  float = Object.new
52
+ # @!visibility private
45
53
  def float.call(s)
46
54
  s.to_f
47
55
  end
48
56
 
49
57
  numeric = Object.new
58
+ # @!visibility private
50
59
  def numeric.call(s)
51
60
  s = s.to_s unless s.is_a?(String)
52
61
  BigDecimal(s) rescue s
53
62
  end
54
63
 
55
64
  time = Object.new
65
+ # @!visibility private
56
66
  def time.call(s)
57
67
  case s
58
68
  when String
@@ -82,8 +92,10 @@ module Sequel
82
92
  end
83
93
  SQLITE_TYPES.freeze
84
94
 
95
+ # @!visibility private
85
96
  USE_EXTENDED_RESULT_CODES = false
86
97
 
98
+ # Database adapter for Sequel
87
99
  class Database < Sequel::Database
88
100
  include ::Sequel::SQLite::DatabaseMethods
89
101
 
@@ -157,10 +169,12 @@ module Sequel
157
169
  end
158
170
  end
159
171
 
172
+ # @!visibility private
160
173
  def execute_insert(sql, opts=OPTS)
161
174
  _execute(:insert, sql, opts)
162
175
  end
163
176
 
177
+ # @!visibility private
164
178
  def freeze
165
179
  @conversion_procs.freeze
166
180
  super
@@ -298,9 +312,11 @@ module Sequel
298
312
  end
299
313
  end
300
314
 
315
+ # Dataset adapter for Sequel
301
316
  class Dataset < Sequel::Dataset
302
317
  include ::Sequel::SQLite::DatasetMethods
303
318
 
319
+ # @!visibility private
304
320
  module ArgumentMapper
305
321
  include Sequel::Dataset::ArgumentMapper
306
322
 
@@ -323,9 +339,12 @@ module Sequel
323
339
  end
324
340
  end
325
341
 
342
+ # @!visibility private
326
343
  BindArgumentMethods = prepared_statements_module(:bind, ArgumentMapper)
344
+ # @!visibility private
327
345
  PreparedStatementMethods = prepared_statements_module(:prepare, BindArgumentMethods)
328
346
 
347
+ # @!visibility private
329
348
  def fetch_rows(sql, &block)
330
349
  execute(sql, &block)
331
350
  # execute(sql) do |result|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extralite
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.24'
4
+ version: '1.26'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-02 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -91,6 +91,7 @@ files:
91
91
  - ".github/FUNDING.yml"
92
92
  - ".github/workflows/test.yml"
93
93
  - ".gitignore"
94
+ - ".yardopts"
94
95
  - CHANGELOG.md
95
96
  - Gemfile
96
97
  - Gemfile.lock
@@ -107,8 +108,6 @@ files:
107
108
  - ext/extralite/extralite_ext.c
108
109
  - ext/extralite/extralite_sqlite3.c
109
110
  - ext/extralite/prepared_statement.c
110
- - ext/sqlite3/sqlite3.c
111
- - ext/sqlite3/sqlite3.h
112
111
  - extralite-bundle.gemspec
113
112
  - extralite.gemspec
114
113
  - gemspec.rb