sqlite3_ar_regexp 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +12 -3
- data/README.md +9 -2
- data/changelog.md +3 -0
- data/gemfiles/.gitignore +1 -0
- data/gemfiles/activemodel3.rb +7 -0
- data/lib/sqlite3_ar_regexp/extension.rb +2 -2
- data/lib/sqlite3_ar_regexp/version.rb +1 -1
- data/spec/regexp_spec.rb +1 -1
- data/sqlite3_ar_regexp.gemspec +3 -1
- metadata +35 -42
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b898174057d9d2f626cdfbd9aa429824ca8331d8
|
4
|
+
data.tar.gz: c5b822fd6320c1811ee90e423be00338e4b19f3d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6eb473630aa970aab49f50c96ee307b341092b01510c9cd70313f9dfa04b436dc3343512730724944ed1ca1e3ce73ddf7f0d135037d28a12422b46a862ade38a
|
7
|
+
data.tar.gz: 982d028caf99a8422f48a8bc89a537e7fe3df6e2dcbde59ac09281d11e0247dc2861e82ffa9ed4d72b0fb4a2deef072cfbe0d33b47d7f6178c344a8f218283b8
|
data/.travis.yml
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
+
before_install: gem update bundler
|
2
|
+
env: RAKE_TASK=spec
|
1
3
|
language: ruby
|
4
|
+
matrix:
|
5
|
+
include:
|
6
|
+
- gemfile: gemfiles/activemodel3.rb
|
7
|
+
rvm: 2.2
|
2
8
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
|
9
|
+
- 2.2
|
10
|
+
- 2.1
|
11
|
+
- 2.0
|
12
|
+
- 1.9
|
13
|
+
- rbx-2
|
14
|
+
script: bundle exec rake $RAKE_TASK
|
data/README.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# SQLite3 ActiveRecord REGEXP
|
2
2
|
|
3
|
+
<a href="https://rubygems.org/gems/sqlite3_ar_regexp">
|
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>
|
9
|
+
|
3
10
|
This adds REGEXP support to SQLite3 in ActiveRecord.
|
4
11
|
|
5
12
|
This project uses [Semantic Versioning](http://semver.org).
|
@@ -8,7 +15,7 @@ This project uses [Semantic Versioning](http://semver.org).
|
|
8
15
|
|
9
16
|
Add this line to your application's Gemfile:
|
10
17
|
|
11
|
-
gem 'sqlite3_ar_regexp', '~> 2.
|
18
|
+
gem 'sqlite3_ar_regexp', '~> 2.1'
|
12
19
|
|
13
20
|
And then execute:
|
14
21
|
|
@@ -24,4 +31,4 @@ Or install it yourself as:
|
|
24
31
|
Account.where('first_name REGEXP "^a"')
|
25
32
|
|
26
33
|
## Credits
|
27
|
-
The original code for this was done by Joe Yates
|
34
|
+
The original code for this was done by Joe Yates.
|
data/changelog.md
CHANGED
data/gemfiles/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.lock
|
@@ -8,8 +8,8 @@ module SQLite3ARRegexp
|
|
8
8
|
alias_method :old_initialize, :initialize
|
9
9
|
private :old_initialize
|
10
10
|
|
11
|
-
def initialize(connection,
|
12
|
-
old_initialize(connection,
|
11
|
+
def initialize(connection, *args)
|
12
|
+
old_initialize(connection, *args)
|
13
13
|
|
14
14
|
connection.create_function('regexp', 2) do |func, pattern, expression|
|
15
15
|
func.result = expression.to_s.match(Regexp.new(pattern.to_s, Regexp::IGNORECASE)) ? 1 : 0
|
data/spec/regexp_spec.rb
CHANGED
@@ -12,6 +12,6 @@ describe 'SQLite3ARRegexp::Extension' do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'adds "REGEXP" support for ActiveRecord::ConnectionAdapters::SQLite3Adapter' do
|
15
|
-
expect(NobelPrizeWinner.where('first_name REGEXP "al|ma"')).to
|
15
|
+
expect(NobelPrizeWinner.where('first_name REGEXP "al|ma"').count).to eq(3)
|
16
16
|
end
|
17
17
|
end
|
data/sqlite3_ar_regexp.gemspec
CHANGED
@@ -19,8 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^spec/})
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
+
spec.required_ruby_version = '>= 1.9.3'
|
23
|
+
|
22
24
|
spec.add_dependency 'sqlite3'
|
23
|
-
spec.add_dependency 'activerecord', '>= 3.2'
|
25
|
+
spec.add_dependency 'activerecord', '>= 3.2', '< 5'
|
24
26
|
|
25
27
|
spec.add_development_dependency 'rake'
|
26
28
|
spec.add_development_dependency 'rspec'
|
metadata
CHANGED
@@ -1,80 +1,77 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlite3_ar_regexp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 2.0.0
|
4
|
+
version: 2.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Aaron Lasseigne
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: sqlite3
|
16
|
-
type: :runtime
|
17
15
|
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
|
-
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
|
-
- -
|
24
|
+
- - ">="
|
26
25
|
- !ruby/object:Gem::Version
|
27
26
|
version: '0'
|
28
|
-
none: false
|
29
|
-
prerelease: false
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: activerecord
|
32
|
-
type: :runtime
|
33
29
|
requirement: !ruby/object:Gem::Requirement
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '3.2'
|
38
|
-
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '5'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '3.2'
|
44
|
-
|
45
|
-
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '5'
|
46
47
|
- !ruby/object:Gem::Dependency
|
47
48
|
name: rake
|
48
|
-
type: :development
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
|
-
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
55
56
|
version_requirements: !ruby/object:Gem::Requirement
|
56
57
|
requirements:
|
57
|
-
- -
|
58
|
+
- - ">="
|
58
59
|
- !ruby/object:Gem::Version
|
59
60
|
version: '0'
|
60
|
-
none: false
|
61
|
-
prerelease: false
|
62
61
|
- !ruby/object:Gem::Dependency
|
63
62
|
name: rspec
|
64
|
-
type: :development
|
65
63
|
requirement: !ruby/object:Gem::Requirement
|
66
64
|
requirements:
|
67
|
-
- -
|
65
|
+
- - ">="
|
68
66
|
- !ruby/object:Gem::Version
|
69
67
|
version: '0'
|
70
|
-
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
71
70
|
version_requirements: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
|
-
- -
|
72
|
+
- - ">="
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: '0'
|
76
|
-
none: false
|
77
|
-
prerelease: false
|
78
75
|
description: Adds REGEXP support for SQLite3 in ActiveRecord.
|
79
76
|
email:
|
80
77
|
- aaron.lasseigne@gmail.com
|
@@ -82,13 +79,15 @@ executables: []
|
|
82
79
|
extensions: []
|
83
80
|
extra_rdoc_files: []
|
84
81
|
files:
|
85
|
-
- .gitignore
|
86
|
-
- .travis.yml
|
82
|
+
- ".gitignore"
|
83
|
+
- ".travis.yml"
|
87
84
|
- Gemfile
|
88
85
|
- LICENSE
|
89
86
|
- README.md
|
90
87
|
- Rakefile
|
91
88
|
- changelog.md
|
89
|
+
- gemfiles/.gitignore
|
90
|
+
- gemfiles/activemodel3.rb
|
92
91
|
- lib/sqlite3_ar_regexp.rb
|
93
92
|
- lib/sqlite3_ar_regexp/extension.rb
|
94
93
|
- lib/sqlite3_ar_regexp/version.rb
|
@@ -98,34 +97,28 @@ files:
|
|
98
97
|
homepage: https://github.com/AaronLasseigne/sqlite3_ar_regexp
|
99
98
|
licenses:
|
100
99
|
- MIT
|
100
|
+
metadata: {}
|
101
101
|
post_install_message:
|
102
102
|
rdoc_options: []
|
103
103
|
require_paths:
|
104
104
|
- lib
|
105
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
- 0
|
111
|
-
hash: 4442112878736695253
|
112
|
-
version: '0'
|
113
|
-
none: false
|
109
|
+
version: 1.9.3
|
114
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
111
|
requirements:
|
116
|
-
- -
|
112
|
+
- - ">="
|
117
113
|
- !ruby/object:Gem::Version
|
118
|
-
segments:
|
119
|
-
- 0
|
120
|
-
hash: 4442112878736695253
|
121
114
|
version: '0'
|
122
|
-
none: false
|
123
115
|
requirements: []
|
124
116
|
rubyforge_project:
|
125
|
-
rubygems_version:
|
117
|
+
rubygems_version: 2.4.5
|
126
118
|
signing_key:
|
127
|
-
specification_version:
|
119
|
+
specification_version: 4
|
128
120
|
summary: Adds REGEXP support for SQLite3 in ActiveRecord.
|
129
121
|
test_files:
|
130
122
|
- spec/regexp_spec.rb
|
131
123
|
- spec/test.sqlite3
|
124
|
+
has_rdoc:
|