sqlite3_ar_regexp 2.2.0 → 3.0.0
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 +5 -5
- data/{changelog.md → CHANGELOG.md} +15 -1
- data/README.md +2 -7
- data/lib/sqlite3_ar_regexp/extension.rb +7 -6
- data/lib/sqlite3_ar_regexp/version.rb +3 -1
- data/lib/sqlite3_ar_regexp.rb +3 -1
- data/spec/regexp_spec.rb +6 -5
- metadata +20 -27
- data/.gitignore +0 -7
- data/.travis.yml +0 -23
- data/Gemfile +0 -4
- data/Rakefile +0 -6
- data/gemfiles/.gitignore +0 -1
- data/gemfiles/activerecord3.rb +0 -7
- data/gemfiles/activerecord4.rb +0 -7
- data/spec/test.sqlite3 +0 -0
- data/sqlite3_ar_regexp.gemspec +0 -29
- /data/{LICENSE → LICENSE.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c218f7defc5c9210fd8890ecf45cd5c4fa6cf1037c3175842a6aae65171de6c0
|
4
|
+
data.tar.gz: 6585b46599ce81f10e24f609ba2210109fbfc4713b84ef11e7e60881308d5ec9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f49238f63e4417561445f183bd68a0e3a300f26c491659811bf2a36e59e13818b0b41b577fbbb8c39589a0fc7a44bc2cd15b40f6a0877b2c6276ae5c98ad32d
|
7
|
+
data.tar.gz: efa93f8e5e74a2aa18d5e836927c555cf8095f41e6700484d22c8f3c6ec9136b617b5b54a96e7cea908557abd2b9458aba3b82924417e626e2c18ebeb9d7ed71
|
@@ -1,17 +1,31 @@
|
|
1
|
-
|
1
|
+
# 3.0.0
|
2
|
+
## Changed
|
3
|
+
* Drop support for Ruby < 3.0
|
4
|
+
* Drop support for ActiveRecord < 6.0
|
5
|
+
* Drop support for sqlite3 < 2.0
|
6
|
+
|
7
|
+
## Added
|
8
|
+
* Add support for ActiveRecord 7.1
|
9
|
+
|
10
|
+
# 2.2.0
|
11
|
+
## Added
|
2
12
|
* Add support for ActiveRecord >= 5
|
3
13
|
|
4
14
|
## 2.1.0
|
15
|
+
## Added
|
5
16
|
* Add support for ActiveRecord >= 4.2
|
6
17
|
|
7
18
|
## 2.0.0
|
19
|
+
## Added
|
8
20
|
* Add support for ActiveRecord 4.0
|
9
21
|
* Drop support for Ruby < 1.9.3
|
10
22
|
|
11
23
|
## 1.1.0
|
24
|
+
## Added
|
12
25
|
* internal refactoring
|
13
26
|
|
14
27
|
## 1.0.1
|
28
|
+
## Added
|
15
29
|
* adding license
|
16
30
|
|
17
31
|
## 1.0.0
|
data/README.md
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
# SQLite3 ActiveRecord REGEXP
|
2
2
|
|
3
|
-
|
4
|
-
<img alt="" src="https://img.shields.io/gem/v/sqlite3_ar_regexp.svg">
|
5
|
-
</a>
|
6
|
-
<a href="https://travis-ci.org/AaronLasseigne/sqlite3_ar_regexp">
|
7
|
-
<img alt="" src="https://img.shields.io/travis/AaronLasseigne/sqlite3_ar_regexp/master.svg">
|
8
|
-
</a>
|
3
|
+
[](https://rubygems.org/gems/sqlite3_ar_regexp)
|
9
4
|
|
10
5
|
This adds REGEXP support to SQLite3 in ActiveRecord.
|
11
6
|
|
@@ -15,7 +10,7 @@ This project uses [Semantic Versioning](http://semver.org).
|
|
15
10
|
|
16
11
|
Add this line to your application's Gemfile:
|
17
12
|
|
18
|
-
gem 'sqlite3_ar_regexp', '~>
|
13
|
+
gem 'sqlite3_ar_regexp', '~> 3.0'
|
19
14
|
|
20
15
|
And then execute:
|
21
16
|
|
@@ -1,5 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# borrowed from http://titusd.co.uk/2010/01/31/regular-expressions-in-sqlite/
|
3
4
|
module SQLite3ARRegexp
|
4
5
|
module Extension
|
5
6
|
extend ActiveSupport::Concern
|
@@ -8,13 +9,13 @@ module SQLite3ARRegexp
|
|
8
9
|
alias_method :old_initialize, :initialize
|
9
10
|
private :old_initialize
|
10
11
|
|
11
|
-
def initialize(
|
12
|
-
old_initialize(
|
12
|
+
def initialize(*args)
|
13
|
+
old_initialize(*args)
|
13
14
|
|
14
|
-
|
15
|
+
raw_connection.create_function('regexp', 2) do |func, pattern, expression|
|
15
16
|
func.result = expression.to_s.match(Regexp.new(pattern.to_s, Regexp::IGNORECASE)) ? 1 : 0
|
16
17
|
end
|
17
|
-
end
|
18
|
-
end
|
18
|
+
end
|
19
|
+
end
|
19
20
|
end
|
20
21
|
end
|
data/lib/sqlite3_ar_regexp.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'active_record'
|
2
4
|
require 'active_record/connection_adapters/sqlite3_adapter'
|
3
5
|
require 'sqlite3_ar_regexp/extension'
|
4
6
|
require 'sqlite3_ar_regexp/version'
|
5
7
|
|
6
|
-
ActiveRecord::ConnectionAdapters::SQLite3Adapter.
|
8
|
+
ActiveRecord::ConnectionAdapters::SQLite3Adapter.include(SQLite3ARRegexp::Extension)
|
data/spec/regexp_spec.rb
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'sqlite3_ar_regexp'
|
2
4
|
|
3
5
|
describe 'SQLite3ARRegexp::Extension' do
|
4
6
|
before(:all) do
|
5
7
|
ActiveRecord::Base.establish_connection(
|
6
|
-
:
|
7
|
-
:
|
8
|
+
adapter: 'sqlite3',
|
9
|
+
database: 'spec/test.sqlite3'
|
8
10
|
)
|
9
11
|
|
10
|
-
|
11
|
-
end
|
12
|
+
NobelPrizeWinner = Class.new(ActiveRecord::Base)
|
12
13
|
end
|
13
14
|
|
14
15
|
it 'adds "REGEXP" support for ActiveRecord::ConnectionAdapters::SQLite3Adapter' do
|
15
|
-
expect(NobelPrizeWinner.where('first_name REGEXP "al|ma"').count).to
|
16
|
+
expect(NobelPrizeWinner.where('first_name REGEXP "al|ma"').count).to eql 3
|
16
17
|
end
|
17
18
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlite3_ar_regexp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Lasseigne
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '6.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '6.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,27 +73,22 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
-
|
77
|
-
-
|
78
|
-
- Gemfile
|
79
|
-
- LICENSE
|
76
|
+
- CHANGELOG.md
|
77
|
+
- LICENSE.md
|
80
78
|
- README.md
|
81
|
-
- Rakefile
|
82
|
-
- changelog.md
|
83
|
-
- gemfiles/.gitignore
|
84
|
-
- gemfiles/activerecord3.rb
|
85
|
-
- gemfiles/activerecord4.rb
|
86
79
|
- lib/sqlite3_ar_regexp.rb
|
87
80
|
- lib/sqlite3_ar_regexp/extension.rb
|
88
81
|
- lib/sqlite3_ar_regexp/version.rb
|
89
82
|
- spec/regexp_spec.rb
|
90
|
-
- spec/test.sqlite3
|
91
|
-
- sqlite3_ar_regexp.gemspec
|
92
83
|
homepage: https://github.com/AaronLasseigne/sqlite3_ar_regexp
|
93
84
|
licenses:
|
94
85
|
- MIT
|
95
|
-
metadata:
|
96
|
-
|
86
|
+
metadata:
|
87
|
+
homepage_uri: https://github.com/AaronLasseigne/sqlite3_ar_regexp
|
88
|
+
source_code_uri: https://github.com/AaronLasseigne/sqlite3_ar_regexp
|
89
|
+
changelog_uri: https://github.com/AaronLasseigne/sqlite3_ar_regexp/blob/main/CHANGELOG.md
|
90
|
+
rubygems_mfa_required: 'true'
|
91
|
+
post_install_message:
|
97
92
|
rdoc_options: []
|
98
93
|
require_paths:
|
99
94
|
- lib
|
@@ -101,18 +96,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
96
|
requirements:
|
102
97
|
- - ">="
|
103
98
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
99
|
+
version: '3.0'
|
105
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
101
|
requirements:
|
107
102
|
- - ">="
|
108
103
|
- !ruby/object:Gem::Version
|
109
104
|
version: '0'
|
110
105
|
requirements: []
|
111
|
-
|
112
|
-
|
113
|
-
signing_key:
|
106
|
+
rubygems_version: 3.5.3
|
107
|
+
signing_key:
|
114
108
|
specification_version: 4
|
115
109
|
summary: Adds REGEXP support for SQLite3 in ActiveRecord.
|
116
110
|
test_files:
|
117
111
|
- spec/regexp_spec.rb
|
118
|
-
- spec/test.sqlite3
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
before_install: gem update bundler
|
2
|
-
language: ruby
|
3
|
-
matrix:
|
4
|
-
include:
|
5
|
-
# test lastest config
|
6
|
-
- rvm: 2.3
|
7
|
-
|
8
|
-
# test versions of ActiveRecord
|
9
|
-
- gemfile: gemfiles/activerecord4.rb
|
10
|
-
rvm: 2.3
|
11
|
-
- gemfile: gemfiles/activerecord3.rb
|
12
|
-
rvm: 2.3
|
13
|
-
|
14
|
-
# test versions of MRI
|
15
|
-
- gemfile: gemfiles/activerecord4.rb
|
16
|
-
rvm: 2.2
|
17
|
-
- gemfile: gemfiles/activerecord4.rb
|
18
|
-
rvm: 2.1
|
19
|
-
- gemfile: gemfiles/activerecord4.rb
|
20
|
-
rvm: 2.0
|
21
|
-
- gemfile: gemfiles/activerecord4.rb
|
22
|
-
rvm: 1.9
|
23
|
-
script: bundle exec rake spec
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/gemfiles/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
*.lock
|
data/gemfiles/activerecord3.rb
DELETED
data/gemfiles/activerecord4.rb
DELETED
data/spec/test.sqlite3
DELETED
Binary file
|
data/sqlite3_ar_regexp.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'sqlite3_ar_regexp/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'sqlite3_ar_regexp'
|
8
|
-
spec.version = SQLite3ARRegexp::VERSION
|
9
|
-
|
10
|
-
spec.authors = ['Aaron Lasseigne']
|
11
|
-
spec.email = ['aaron.lasseigne@gmail.com']
|
12
|
-
|
13
|
-
spec.summary = %q{Adds REGEXP support for SQLite3 in ActiveRecord.}
|
14
|
-
spec.description = spec.summary
|
15
|
-
spec.homepage = 'https://github.com/AaronLasseigne/sqlite3_ar_regexp'
|
16
|
-
spec.license = 'MIT'
|
17
|
-
|
18
|
-
spec.files = `git ls-files`.split($/)
|
19
|
-
spec.test_files = spec.files.grep(%r{^spec/})
|
20
|
-
spec.require_paths = ['lib']
|
21
|
-
|
22
|
-
spec.required_ruby_version = '>= 1.9.3'
|
23
|
-
|
24
|
-
spec.add_dependency 'sqlite3'
|
25
|
-
spec.add_dependency 'activerecord', '>= 3.2'
|
26
|
-
|
27
|
-
spec.add_development_dependency 'rake'
|
28
|
-
spec.add_development_dependency 'rspec'
|
29
|
-
end
|
/data/{LICENSE → LICENSE.md}
RENAMED
File without changes
|