sqlite3_ar_regexp 2.1.0 → 3.0.0

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
- SHA1:
3
- metadata.gz: b898174057d9d2f626cdfbd9aa429824ca8331d8
4
- data.tar.gz: c5b822fd6320c1811ee90e423be00338e4b19f3d
2
+ SHA256:
3
+ metadata.gz: c218f7defc5c9210fd8890ecf45cd5c4fa6cf1037c3175842a6aae65171de6c0
4
+ data.tar.gz: 6585b46599ce81f10e24f609ba2210109fbfc4713b84ef11e7e60881308d5ec9
5
5
  SHA512:
6
- metadata.gz: 6eb473630aa970aab49f50c96ee307b341092b01510c9cd70313f9dfa04b436dc3343512730724944ed1ca1e3ce73ddf7f0d135037d28a12422b46a862ade38a
7
- data.tar.gz: 982d028caf99a8422f48a8bc89a537e7fe3df6e2dcbde59ac09281d11e0247dc2861e82ffa9ed4d72b0fb4a2deef072cfbe0d33b47d7f6178c344a8f218283b8
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
- <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>
3
+ [![Version](https://img.shields.io/gem/v/sqlite3_ar_regexp.svg?style=flat-square)](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', '~> 2.1'
13
+ gem 'sqlite3_ar_regexp', '~> 3.0'
19
14
 
20
15
  And then execute:
21
16
 
@@ -1,5 +1,6 @@
1
- # borrowed from http://titusd.co.uk/2010/01/31/regular-expressions-in-sqlite/
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(connection, *args)
12
- old_initialize(connection, *args)
12
+ def initialize(*args)
13
+ old_initialize(*args)
13
14
 
14
- connection.create_function('regexp', 2) do |func, pattern, expression|
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SQLite3ARRegexp
2
- VERSION = '2.1.0'
4
+ VERSION = '3.0.0'
3
5
  end
@@ -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.send(:include, SQLite3ARRegexp::Extension)
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
- :adapter => 'sqlite3',
7
- :database => 'spec/test.sqlite3'
8
+ adapter: 'sqlite3',
9
+ database: 'spec/test.sqlite3'
8
10
  )
9
11
 
10
- class NobelPrizeWinner < ActiveRecord::Base
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 eq(3)
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: 2.1.0
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: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2024-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: sqlite3
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: activerecord
28
+ name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
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: '3.2'
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
- - ".gitignore"
83
- - ".travis.yml"
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
- post_install_message:
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: 1.9.3
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
- rubyforge_project:
117
- rubygems_version: 2.4.5
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
@@ -1,7 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
5
- *.swp
6
- .yardoc
7
- doc
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- before_install: gem update bundler
2
- env: RAKE_TASK=spec
3
- language: ruby
4
- matrix:
5
- include:
6
- - gemfile: gemfiles/activemodel3.rb
7
- rvm: 2.2
8
- rvm:
9
- - 2.2
10
- - 2.1
11
- - 2.0
12
- - 1.9
13
- - rbx-2
14
- script: bundle exec rake $RAKE_TASK
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in sqlite3_ar_regexp.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- task :default => :spec
5
-
6
- RSpec::Core::RakeTask.new
data/changelog.md DELETED
@@ -1,15 +0,0 @@
1
- ## 2.1.0
2
- * Add support for ActiveRecord >= 4.2
3
-
4
- ## 2.0.0
5
- * Add support for ActiveRecord 4.0
6
- * Drop support for Ruby < 1.9.3
7
-
8
- ## 1.1.0
9
- * internal refactoring
10
-
11
- ## 1.0.1
12
- * adding license
13
-
14
- ## 1.0.0
15
- * initial release
data/gemfiles/.gitignore DELETED
@@ -1 +0,0 @@
1
- *.lock
@@ -1,7 +0,0 @@
1
- # coding: utf-8
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec path: '..'
6
-
7
- gem 'activemodel', '~> 3.0'
data/spec/test.sqlite3 DELETED
Binary file
@@ -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
File without changes