sqlite3_ar_regexp 2.1.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 +32 -0
- 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 -33
- data/.gitignore +0 -7
- data/.travis.yml +0 -14
- data/Gemfile +0 -4
- data/Rakefile +0 -6
- data/changelog.md +0 -15
- data/gemfiles/.gitignore +0 -1
- data/gemfiles/activemodel3.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
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,32 @@
|
|
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
|
12
|
+
* Add support for ActiveRecord >= 5
|
13
|
+
|
14
|
+
## 2.1.0
|
15
|
+
## Added
|
16
|
+
* Add support for ActiveRecord >= 4.2
|
17
|
+
|
18
|
+
## 2.0.0
|
19
|
+
## Added
|
20
|
+
* Add support for ActiveRecord 4.0
|
21
|
+
* Drop support for Ruby < 1.9.3
|
22
|
+
|
23
|
+
## 1.1.0
|
24
|
+
## Added
|
25
|
+
* internal refactoring
|
26
|
+
|
27
|
+
## 1.0.1
|
28
|
+
## Added
|
29
|
+
* adding license
|
30
|
+
|
31
|
+
## 1.0.0
|
32
|
+
* initial release
|
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,49 +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: '
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '5'
|
33
|
+
version: '1.4'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '5'
|
40
|
+
version: '1.4'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rake
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,26 +73,22 @@ executables: []
|
|
79
73
|
extensions: []
|
80
74
|
extra_rdoc_files: []
|
81
75
|
files:
|
82
|
-
-
|
83
|
-
-
|
84
|
-
- Gemfile
|
85
|
-
- LICENSE
|
76
|
+
- CHANGELOG.md
|
77
|
+
- LICENSE.md
|
86
78
|
- README.md
|
87
|
-
- Rakefile
|
88
|
-
- changelog.md
|
89
|
-
- gemfiles/.gitignore
|
90
|
-
- gemfiles/activemodel3.rb
|
91
79
|
- lib/sqlite3_ar_regexp.rb
|
92
80
|
- lib/sqlite3_ar_regexp/extension.rb
|
93
81
|
- lib/sqlite3_ar_regexp/version.rb
|
94
82
|
- spec/regexp_spec.rb
|
95
|
-
- spec/test.sqlite3
|
96
|
-
- sqlite3_ar_regexp.gemspec
|
97
83
|
homepage: https://github.com/AaronLasseigne/sqlite3_ar_regexp
|
98
84
|
licenses:
|
99
85
|
- MIT
|
100
|
-
metadata:
|
101
|
-
|
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:
|
102
92
|
rdoc_options: []
|
103
93
|
require_paths:
|
104
94
|
- lib
|
@@ -106,19 +96,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
96
|
requirements:
|
107
97
|
- - ">="
|
108
98
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
99
|
+
version: '3.0'
|
110
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
101
|
requirements:
|
112
102
|
- - ">="
|
113
103
|
- !ruby/object:Gem::Version
|
114
104
|
version: '0'
|
115
105
|
requirements: []
|
116
|
-
|
117
|
-
|
118
|
-
signing_key:
|
106
|
+
rubygems_version: 3.5.3
|
107
|
+
signing_key:
|
119
108
|
specification_version: 4
|
120
109
|
summary: Adds REGEXP support for SQLite3 in ActiveRecord.
|
121
110
|
test_files:
|
122
111
|
- spec/regexp_spec.rb
|
123
|
-
- spec/test.sqlite3
|
124
|
-
has_rdoc:
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/changelog.md
DELETED
data/gemfiles/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
*.lock
|
data/gemfiles/activemodel3.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', '< 5'
|
26
|
-
|
27
|
-
spec.add_development_dependency 'rake'
|
28
|
-
spec.add_development_dependency 'rspec'
|
29
|
-
end
|
/data/{LICENSE → LICENSE.md}
RENAMED
File without changes
|