activerecord-aurora-serverless-adapter 1.0.0 → 5.2.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
2
  SHA256:
3
- metadata.gz: d55e3b914364d41374c560c6183e7def09de56c9d3e90a9cba15bac946c10353
4
- data.tar.gz: 5266a9a3be80080fbdfe5b24a85611251ac2724994f3883066e6b2c045845168
3
+ metadata.gz: 950bfbc2e99b2d06143103fec2bb27b2cdae055590968bde6565f1657836a006
4
+ data.tar.gz: 343a6884fcf77704666eb6c9d84d3d997c96246b77521765998342d238a484f0
5
5
  SHA512:
6
- metadata.gz: 347d5f9690887b426f7d290295c92ee402ed2a8d808097f2e796e46bcbf3bc201c133a531a1b7a20e8e3790fed4859d191fa1f1be6a25a7ca16a519ddb8dc34b
7
- data.tar.gz: 30192a0925ad931dd541da411a9817ac5c58d86c2f9d7c5c2ef70cf9117f3cb9cca39664946c03eafb2ea2fe03324bc56abad3c9cfa6882bec2b6b30a306e1d0
6
+ metadata.gz: be199583b61579e681124ed076e6f23951843a0badf6bbe046daa9ab1c450fab4d9aa8718af407e817f80245f6af78555e9d76f344f7e2e1254b38616c54ccbc
7
+ data.tar.gz: fc73d852e2ac1ff9722fb7e0ddb6cf27dff0be6e60da337a60a2e8cbf850f0b585f35af255961107fb3572c2a324ac833881d9bd04ed0f1cd4e0d06bdffb2e38
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
3
  gemspec
4
4
 
5
- ENV['RAILS_VERSION'] = '6.0.2.1'
5
+ ENV['RAILS_VERSION'] = '5.2.4.1'
6
6
 
7
7
  # This allows us to bundle to Rails via Git to get the ActiveRecord test files
8
8
  # which comes down to a git tag. We can also use the `RAILS_VERSION` env variable
@@ -28,3 +28,5 @@ version = ENV['RAILS_VERSION'] || begin
28
28
  end
29
29
  end
30
30
  gem 'rails', github: "rails/rails", tag: "v#{version}"
31
+ gem 'mocha', '1.9.0', require: false
32
+ gem 'bcrypt'
@@ -1,90 +1,74 @@
1
1
  GIT
2
2
  remote: https://github.com/rails/rails
3
- revision: 3a6e8a3ff94f8690dcd68d5184600eabc9e05664
4
- tag: v6.0.2.1
3
+ revision: 56f45bedd617a76e8e3596c84c872a37c8be9795
4
+ tag: v5.2.4.1
5
5
  specs:
6
- actioncable (6.0.2.1)
7
- actionpack (= 6.0.2.1)
6
+ actioncable (5.2.4.1)
7
+ actionpack (= 5.2.4.1)
8
8
  nio4r (~> 2.0)
9
9
  websocket-driver (>= 0.6.1)
10
- actionmailbox (6.0.2.1)
11
- actionpack (= 6.0.2.1)
12
- activejob (= 6.0.2.1)
13
- activerecord (= 6.0.2.1)
14
- activestorage (= 6.0.2.1)
15
- activesupport (= 6.0.2.1)
16
- mail (>= 2.7.1)
17
- actionmailer (6.0.2.1)
18
- actionpack (= 6.0.2.1)
19
- actionview (= 6.0.2.1)
20
- activejob (= 6.0.2.1)
10
+ actionmailer (5.2.4.1)
11
+ actionpack (= 5.2.4.1)
12
+ actionview (= 5.2.4.1)
13
+ activejob (= 5.2.4.1)
21
14
  mail (~> 2.5, >= 2.5.4)
22
15
  rails-dom-testing (~> 2.0)
23
- actionpack (6.0.2.1)
24
- actionview (= 6.0.2.1)
25
- activesupport (= 6.0.2.1)
16
+ actionpack (5.2.4.1)
17
+ actionview (= 5.2.4.1)
18
+ activesupport (= 5.2.4.1)
26
19
  rack (~> 2.0, >= 2.0.8)
27
20
  rack-test (>= 0.6.3)
28
21
  rails-dom-testing (~> 2.0)
29
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
30
- actiontext (6.0.2.1)
31
- actionpack (= 6.0.2.1)
32
- activerecord (= 6.0.2.1)
33
- activestorage (= 6.0.2.1)
34
- activesupport (= 6.0.2.1)
35
- nokogiri (>= 1.8.5)
36
- actionview (6.0.2.1)
37
- activesupport (= 6.0.2.1)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
+ actionview (5.2.4.1)
24
+ activesupport (= 5.2.4.1)
38
25
  builder (~> 3.1)
39
26
  erubi (~> 1.4)
40
27
  rails-dom-testing (~> 2.0)
41
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
42
- activejob (6.0.2.1)
43
- activesupport (= 6.0.2.1)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
29
+ activejob (5.2.4.1)
30
+ activesupport (= 5.2.4.1)
44
31
  globalid (>= 0.3.6)
45
- activemodel (6.0.2.1)
46
- activesupport (= 6.0.2.1)
47
- activerecord (6.0.2.1)
48
- activemodel (= 6.0.2.1)
49
- activesupport (= 6.0.2.1)
50
- activestorage (6.0.2.1)
51
- actionpack (= 6.0.2.1)
52
- activejob (= 6.0.2.1)
53
- activerecord (= 6.0.2.1)
32
+ activemodel (5.2.4.1)
33
+ activesupport (= 5.2.4.1)
34
+ activerecord (5.2.4.1)
35
+ activemodel (= 5.2.4.1)
36
+ activesupport (= 5.2.4.1)
37
+ arel (>= 9.0)
38
+ activestorage (5.2.4.1)
39
+ actionpack (= 5.2.4.1)
40
+ activerecord (= 5.2.4.1)
54
41
  marcel (~> 0.3.1)
55
- activesupport (6.0.2.1)
42
+ activesupport (5.2.4.1)
56
43
  concurrent-ruby (~> 1.0, >= 1.0.2)
57
44
  i18n (>= 0.7, < 2)
58
45
  minitest (~> 5.1)
59
46
  tzinfo (~> 1.1)
60
- zeitwerk (~> 2.2)
61
- rails (6.0.2.1)
62
- actioncable (= 6.0.2.1)
63
- actionmailbox (= 6.0.2.1)
64
- actionmailer (= 6.0.2.1)
65
- actionpack (= 6.0.2.1)
66
- actiontext (= 6.0.2.1)
67
- actionview (= 6.0.2.1)
68
- activejob (= 6.0.2.1)
69
- activemodel (= 6.0.2.1)
70
- activerecord (= 6.0.2.1)
71
- activestorage (= 6.0.2.1)
72
- activesupport (= 6.0.2.1)
47
+ rails (5.2.4.1)
48
+ actioncable (= 5.2.4.1)
49
+ actionmailer (= 5.2.4.1)
50
+ actionpack (= 5.2.4.1)
51
+ actionview (= 5.2.4.1)
52
+ activejob (= 5.2.4.1)
53
+ activemodel (= 5.2.4.1)
54
+ activerecord (= 5.2.4.1)
55
+ activestorage (= 5.2.4.1)
56
+ activesupport (= 5.2.4.1)
73
57
  bundler (>= 1.3.0)
74
- railties (= 6.0.2.1)
58
+ railties (= 5.2.4.1)
75
59
  sprockets-rails (>= 2.0.0)
76
- railties (6.0.2.1)
77
- actionpack (= 6.0.2.1)
78
- activesupport (= 6.0.2.1)
60
+ railties (5.2.4.1)
61
+ actionpack (= 5.2.4.1)
62
+ activesupport (= 5.2.4.1)
79
63
  method_source
80
64
  rake (>= 0.8.7)
81
- thor (>= 0.20.3, < 2.0)
65
+ thor (>= 0.19.0, < 2.0)
82
66
 
83
67
  PATH
84
68
  remote: .
85
69
  specs:
86
- activerecord-aurora-serverless-adapter (1.0.0)
87
- activerecord (>= 6.0)
70
+ activerecord-aurora-serverless-adapter (5.2.0)
71
+ activerecord (>= 5.2)
88
72
  aws-sdk-rdsdataservice
89
73
 
90
74
  GEM
@@ -95,6 +79,7 @@ GEM
95
79
  bundler
96
80
  rake
97
81
  thor (>= 0.14.0)
82
+ arel (9.0.0)
98
83
  aws-eventstream (1.0.3)
99
84
  aws-partitions (1.260.0)
100
85
  aws-sdk-core (3.86.0)
@@ -107,6 +92,7 @@ GEM
107
92
  aws-sigv4 (~> 1.1)
108
93
  aws-sigv4 (1.1.0)
109
94
  aws-eventstream (~> 1.0, >= 1.0.2)
95
+ bcrypt (3.1.13)
110
96
  builder (3.2.4)
111
97
  coderay (1.1.2)
112
98
  concurrent-ruby (1.1.5)
@@ -125,6 +111,7 @@ GEM
125
111
  mini_mime (>= 0.1.1)
126
112
  marcel (0.3.3)
127
113
  mimemagic (~> 0.3.2)
114
+ metaclass (0.0.4)
128
115
  method_source (0.9.2)
129
116
  mimemagic (0.3.3)
130
117
  mini_mime (1.0.2)
@@ -137,6 +124,8 @@ GEM
137
124
  ruby-progressbar
138
125
  minitest-retry (0.1.9)
139
126
  minitest (>= 5.0)
127
+ mocha (1.9.0)
128
+ metaclass (~> 0.0.1)
140
129
  nio4r (2.5.2)
141
130
  nokogiri (1.10.7)
142
131
  mini_portile2 (~> 2.4.0)
@@ -168,7 +157,6 @@ GEM
168
157
  websocket-driver (0.7.1)
169
158
  websocket-extensions (>= 0.1.0)
170
159
  websocket-extensions (0.1.4)
171
- zeitwerk (2.2.2)
172
160
 
173
161
  PLATFORMS
174
162
  ruby
@@ -176,10 +164,12 @@ PLATFORMS
176
164
  DEPENDENCIES
177
165
  activerecord-aurora-serverless-adapter!
178
166
  appraisal
167
+ bcrypt
179
168
  dotenv
180
169
  minitest
181
170
  minitest-reporters
182
171
  minitest-retry
172
+ mocha (= 1.9.0)
183
173
  pry
184
174
  rails!
185
175
  rake
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.bindir = 'exe'
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ['lib']
20
- spec.add_runtime_dependency 'activerecord', '>= 6.0'
20
+ spec.add_runtime_dependency 'activerecord', '>= 5.2'
21
21
  spec.add_runtime_dependency 'aws-sdk-rdsdataservice'
22
22
  spec.add_development_dependency 'appraisal'
23
23
  spec.add_development_dependency 'dotenv'
@@ -33,33 +33,32 @@ module ActiveRecord
33
33
 
34
34
  # Abstract Mysql Adapter
35
35
 
36
- def translate_exception(exception, message:, sql:, binds:)
37
- msg = exception.message
38
- case msg
36
+ def translate_exception(exception, message)
37
+ case message
39
38
  when /Duplicate entry/
40
- RecordNotUnique.new(msg, sql: sql, binds: binds)
39
+ RecordNotUnique.new(message)
41
40
  when /foreign key constraint fails/
42
- InvalidForeignKey.new(msg, sql: sql, binds: binds)
41
+ InvalidForeignKey.new(message)
43
42
  when /Cannot add foreign key constraint/,
44
43
  /referenced column .* in foreign key constraint .* are incompatible/
45
- mismatched_foreign_key(msg, sql: sql, binds: binds)
44
+ mismatched_foreign_key(message)
46
45
  when /Data too long for column/
47
- ValueTooLong.new(msg, sql: sql, binds: binds)
46
+ ValueTooLong.new(message)
48
47
  when /Out of range value for column/
49
- RangeError.new(msg, sql: sql, binds: binds)
48
+ RangeError.new(message)
50
49
  when /Column .* cannot be null/,
51
50
  /Field .* doesn't have a default value/
52
- NotNullViolation.new(msg, sql: sql, binds: binds)
51
+ NotNullViolation.new(message)
53
52
  when /Deadlock found when trying to get lock/
54
- Deadlocked.new(msg, sql: sql, binds: binds)
53
+ Deadlocked.new(message)
55
54
  when /Lock wait timeout exceeded/
56
- LockWaitTimeout.new(msg, sql: sql, binds: binds)
55
+ LockWaitTimeout.new(message)
57
56
  when /max_statement_time exceeded/, /Sort aborted/
58
- StatementTimeout.new(msg, sql: sql, binds: binds)
57
+ StatementTimeout.new(message)
59
58
  when /Query execution was interrupted/
60
- QueryCanceled.new(msg, sql: sql, binds: binds)
59
+ QueryCanceled.new(message)
61
60
  else
62
- ActiveRecord::StatementInvalid.new(msg, sql: sql, binds: binds)
61
+ ActiveRecord::StatementInvalid.new(message)
63
62
  end
64
63
  end
65
64
 
@@ -63,6 +63,10 @@ module ActiveRecord
63
63
  nil
64
64
  end
65
65
 
66
+ def more_results?
67
+ false
68
+ end
69
+
66
70
  end
67
71
  end
68
72
  AuroraServerless::Client.include AuroraServerless::Mysql2::Client
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module ConnectionAdapters
3
3
  module AuroraServerless
4
- VERSION = "1.0.0"
4
+ VERSION = "5.2.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-aurora-serverless-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: '5.2'
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: '6.0'
26
+ version: '5.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk-rdsdataservice
29
29
  requirement: !ruby/object:Gem::Requirement