sqlite3_ar_regexp 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
- - ree
5
- # - jruby-18mode
6
- - rbx-18mode
7
- - 1.9.2
8
3
  - 1.9.3
9
- # - jruby-19mode
10
4
  - rbx-19mode
5
+ - 2.0.0
data/README.md CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
  This adds REGEXP support to SQLite3 in ActiveRecord.
4
4
 
5
+ This project uses [Semantic Versioning](http://semver.org).
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
8
10
 
9
- gem 'sqlite3_ar_regexp'
11
+ gem 'sqlite3_ar_regexp', '~> 2.0'
10
12
 
11
13
  And then execute:
12
14
 
@@ -1,3 +1,7 @@
1
+ ## 2.0.0
2
+ * Add support for ActiveRecord 4.0
3
+ * Drop support for Ruby < 1.9.3
4
+
1
5
  ## 1.1.0
2
6
  * internal refactoring
3
7
 
@@ -5,10 +5,13 @@ module SQLite3ARRegexp
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- def initialize(db, logger, config)
9
- super
8
+ alias_method :old_initialize, :initialize
9
+ private :old_initialize
10
10
 
11
- db.create_function('regexp', 2) do |func, pattern, expression|
11
+ def initialize(connection, logger, config)
12
+ old_initialize(connection, logger, config)
13
+
14
+ connection.create_function('regexp', 2) do |func, pattern, expression|
12
15
  func.result = expression.to_s.match(Regexp.new(pattern.to_s, Regexp::IGNORECASE)) ? 1 : 0
13
16
  end
14
17
  end
@@ -1,3 +1,3 @@
1
1
  module SQLite3ARRegexp
2
- VERSION = '1.1.0'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -11,7 +11,7 @@ describe 'SQLite3ARRegexp::Extension' do
11
11
  end
12
12
  end
13
13
 
14
- it 'should give ActiveRecord::ConnectionAdapters::SQLite3Adapter "REGEXP" support' do
15
- NobelPrizeWinner.where('first_name REGEXP "al|ma"').count.should == 3
14
+ it 'adds "REGEXP" support for ActiveRecord::ConnectionAdapters::SQLite3Adapter' do
15
+ expect(NobelPrizeWinner.where('first_name REGEXP "al|ma"')).to have(3).records
16
16
  end
17
17
  end
@@ -1,24 +1,27 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/sqlite3_ar_regexp/version', __FILE__)
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'
3
5
 
4
- Gem::Specification.new do |gem|
5
- gem.name = 'sqlite3_ar_regexp'
6
- gem.version = SQLite3ARRegexp::VERSION
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'sqlite3_ar_regexp'
8
+ spec.version = SQLite3ARRegexp::VERSION
7
9
 
8
- gem.authors = ['Aaron Lasseigne']
9
- gem.email = ['aaron.lasseigne@gmail.com']
10
- gem.summary = %q{Adds REGEXP support for SQLite3 in ActiveRecord.}
11
- gem.description = %q{Adds REGEXP support for SQLite3 in ActiveRecord.}
12
- gem.homepage = 'https://github.com/AaronLasseigne/sqlite3_ar_regexp'
10
+ spec.authors = ['Aaron Lasseigne']
11
+ spec.email = ['aaron.lasseigne@gmail.com']
13
12
 
14
- gem.files = `git ls-files`.split("\n")
15
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
- gem.require_paths = ['lib']
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'
18
17
 
19
- gem.add_dependency 'sqlite3'
20
- gem.add_dependency 'activerecord', '~> 3.0'
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.test_files = spec.files.grep(%r{^spec/})
20
+ spec.require_paths = ['lib']
21
21
 
22
- gem.add_development_dependency 'rake'
23
- gem.add_development_dependency 'rspec'
22
+ spec.add_dependency 'sqlite3'
23
+ spec.add_dependency 'activerecord', '>= 3.2'
24
+
25
+ spec.add_development_dependency 'rake'
26
+ spec.add_development_dependency 'rspec'
24
27
  end
metadata CHANGED
@@ -1,89 +1,87 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sqlite3_ar_regexp
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
5
+ version: 2.0.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Aaron Lasseigne
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-03 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- requirement: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
30
- version_requirements: *id001
12
+ date: 2013-07-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
31
15
  name: sqlite3
32
16
  type: :runtime
33
- prerelease: false
34
- - !ruby/object:Gem::Dependency
35
- requirement: &id002 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
36
22
  none: false
37
- requirements:
38
- - - ~>
39
- - !ruby/object:Gem::Version
40
- hash: 7
41
- segments:
42
- - 3
43
- - 0
44
- version: "3.0"
45
- version_requirements: *id002
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ none: false
29
+ prerelease: false
30
+ - !ruby/object:Gem::Dependency
46
31
  name: activerecord
47
32
  type: :runtime
48
- prerelease: false
49
- - !ruby/object:Gem::Dependency
50
- requirement: &id003 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '3.2'
38
+ none: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '3.2'
51
44
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- hash: 3
56
- segments:
57
- - 0
58
- version: "0"
59
- version_requirements: *id003
45
+ prerelease: false
46
+ - !ruby/object:Gem::Dependency
60
47
  name: rake
61
48
  type: :development
62
- prerelease: false
63
- - !ruby/object:Gem::Dependency
64
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ none: false
55
+ version_requirements: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
65
60
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- hash: 3
70
- segments:
71
- - 0
72
- version: "0"
73
- version_requirements: *id004
61
+ prerelease: false
62
+ - !ruby/object:Gem::Dependency
74
63
  name: rspec
75
64
  type: :development
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ none: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ none: false
76
77
  prerelease: false
77
78
  description: Adds REGEXP support for SQLite3 in ActiveRecord.
78
- email:
79
+ email:
79
80
  - aaron.lasseigne@gmail.com
80
81
  executables: []
81
-
82
82
  extensions: []
83
-
84
83
  extra_rdoc_files: []
85
-
86
- files:
84
+ files:
87
85
  - .gitignore
88
86
  - .travis.yml
89
87
  - Gemfile
@@ -98,38 +96,36 @@ files:
98
96
  - spec/test.sqlite3
99
97
  - sqlite3_ar_regexp.gemspec
100
98
  homepage: https://github.com/AaronLasseigne/sqlite3_ar_regexp
101
- licenses: []
102
-
99
+ licenses:
100
+ - MIT
103
101
  post_install_message:
104
102
  rdoc_options: []
105
-
106
- require_paths:
103
+ require_paths:
107
104
  - lib
108
- required_ruby_version: !ruby/object:Gem::Requirement
109
- none: false
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- hash: 3
114
- segments:
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ segments:
115
110
  - 0
116
- version: "0"
117
- required_rubygems_version: !ruby/object:Gem::Requirement
111
+ hash: 4442112878736695253
112
+ version: '0'
118
113
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 3
123
- segments:
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ segments:
124
119
  - 0
125
- version: "0"
120
+ hash: 4442112878736695253
121
+ version: '0'
122
+ none: false
126
123
  requirements: []
127
-
128
124
  rubyforge_project:
129
- rubygems_version: 1.8.17
125
+ rubygems_version: 1.8.23
130
126
  signing_key:
131
127
  specification_version: 3
132
128
  summary: Adds REGEXP support for SQLite3 in ActiveRecord.
133
- test_files:
129
+ test_files:
134
130
  - spec/regexp_spec.rb
135
131
  - spec/test.sqlite3