activerecord-nulldb-adapter 0.9.0 → 1.0.1

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: 0da8a5f679279b76c36a80995783db057cf0bbc680d4006209619d068c55fbf3
4
- data.tar.gz: eb7c91fe3bd86f1d8787cd2dc394aeecc1b8c0950e7133fb4a21f74f6e596a8d
3
+ metadata.gz: 7850d9dc9902b347863dd9a2709e81570029aa6ed7a205249c3c85ddc352c2f9
4
+ data.tar.gz: dd61adf8796a726d042b020937ef34d2389774e079ce6fb21ef48d01aec099c3
5
5
  SHA512:
6
- metadata.gz: 87e4cb3496818735480c034bb2444bec7cdd60eb6032332d78875d3f1cd8bb769f256d70d8a80b254cc11d9c91564b76f32fe8f863d65dba5d13427a4d6f74d1
7
- data.tar.gz: ae332ef581de6f46f46940d2f4c6a0011606abbe2432e258a88b7ab9b5c0be50af03a9b140b630c4e79228c3ed65d4569ae50f9e828ad37d3b64dc031de9bcbf
6
+ metadata.gz: d080b5426ccbd9094e4b3a72294050be0afe8660d8e6d34fba29c231aca24afa317c7920592e12db9b852f68d88c155c87dd639022ec490348b0c528a18bab39
7
+ data.tar.gz: fddb22b3e21e86e26c91d7545a3c619fc0693b62ffdab790278eb5458aedaa58ed9c914af3a5660cbf4cf8fc43cfbb7883969320f1e133e4d1a2bd5e830bf16c
@@ -11,13 +11,20 @@ jobs:
11
11
  activerecord_6.0,
12
12
  activerecord_6.1,
13
13
  activerecord_7.0,
14
+ activerecord_7.1,
14
15
  activerecord_master,
15
16
  ]
16
- ruby: ["2.5", "2.6", "2.7", "3.0", "jruby-9.3.1.0"]
17
+ ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "jruby-9.3.1.0"]
17
18
  exclude:
18
19
  - ruby: "3.0"
19
20
  gemfile: activerecord_5.2
20
21
 
22
+ - ruby: "3.1"
23
+ gemfile: activerecord_5.2
24
+
25
+ - ruby: "3.2"
26
+ gemfile: activerecord_5.2
27
+
21
28
  - ruby: "2.5"
22
29
  gemfile: "activerecord_master"
23
30
 
@@ -30,9 +37,18 @@ jobs:
30
37
  - ruby: "2.6"
31
38
  gemfile: "activerecord_7.0"
32
39
 
40
+ - ruby: "2.5"
41
+ gemfile: "activerecord_7.1"
42
+
43
+ - ruby: "2.6"
44
+ gemfile: "activerecord_7.1"
45
+
33
46
  - ruby: "jruby-9.3.1.0"
34
47
  gemfile: "activerecord_7.0"
35
48
 
49
+ - ruby: "jruby-9.3.1.0"
50
+ gemfile: "activerecord_7.1"
51
+
36
52
  - ruby: "jruby-9.3.1.0"
37
53
  gemfile: "activerecord_master"
38
54
 
data/CHANGES.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased
2
2
  ----------
3
3
 
4
+ 1.0.1 (2023-10-16)
5
+ -----------
6
+
7
+ - Alias enum field #122
8
+
9
+ 1.0.0 (2023-10-16)
10
+ -----------
11
+
12
+ - Add support to Rails 7.1 #124
13
+
4
14
  0.9.0 (2023-03-10)
5
15
  -----------
6
16
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.homepage = "https://github.com/nulldb/nulldb"
21
21
  s.licenses = ["MIT"]
22
22
 
23
- s.add_runtime_dependency 'activerecord', '>= 5.2.0', '< 7.1'
23
+ s.add_runtime_dependency 'activerecord', '>= 5.2.0', '< 7.2'
24
24
  s.add_development_dependency 'spec'
25
25
  s.add_development_dependency 'rdoc'
26
26
  s.add_development_dependency 'rspec'
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.1.0"
6
+
7
+ group :development, :test do
8
+ gem "spec"
9
+ gem "rspec", ">= 1.2.9"
10
+ gem "rake"
11
+ gem "rdoc"
12
+ end
13
+
14
+ group :development do
15
+ gem "appraisal"
16
+ gem "simplecov", require: false
17
+ end
@@ -164,22 +164,28 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::Connection
164
164
  end
165
165
 
166
166
  def exec_query(statement, name = 'SQL', binds = [], options = {})
167
+ internal_exec_query(statement, name, binds, **options)
168
+ end
169
+
170
+ def internal_exec_query(statement, name = 'SQL', binds = [], prepare: false, async: false)
167
171
  self.execution_log << Statement.new(entry_point, statement)
168
172
  EmptyResult.new
169
173
  end
170
174
 
171
- def select_rows(statement, name = nil, binds = [])
175
+ def select_rows(statement, name = nil, binds = [], async: false)
172
176
  [].tap do
173
177
  self.execution_log << Statement.new(entry_point, statement)
174
178
  end
175
179
  end
176
180
 
177
- def insert(statement, name = nil, primary_key = nil, object_id = nil, sequence_name = nil, binds = [])
178
- (object_id || next_unique_id).tap do
179
- with_entry_point(:insert) do
180
- super(statement, name, primary_key, object_id, sequence_name)
181
- end
181
+ def insert(statement, name = nil, primary_key = nil, object_id = nil, sequence_name = nil, binds = [], returning: nil)
182
+ with_entry_point(:insert) do
183
+ super(statement, name, primary_key, object_id, sequence_name)
182
184
  end
185
+
186
+ result = object_id || next_unique_id
187
+
188
+ returning ? [result] : result
183
189
  end
184
190
  alias :create :insert
185
191
 
@@ -2,6 +2,7 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter
2
2
 
3
3
  class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
4
4
  attr_accessor :name
5
+ alias_method :enum, :string
5
6
  alias_method :uuid, :string
6
7
  alias_method :citext, :text
7
8
  alias_method :interval, :text
@@ -11,5 +12,12 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter
11
12
  alias_method :inet, :string
12
13
  alias_method :jsonb, :json if method_defined? :json
13
14
  alias_method :hstore, :json
15
+
16
+ if ::ActiveRecord::VERSION::MAJOR == 7 && ::ActiveRecord::VERSION::MINOR >= 1
17
+ # Avoid check for option validity
18
+ def create_column_definition(name, type, options)
19
+ ActiveRecord::ConnectionAdapters::ColumnDefinition.new(name, type, options)
20
+ end
21
+ end
14
22
  end
15
23
  end
@@ -1,3 +1,3 @@
1
1
  module NullDB
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-nulldb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avdi Grimm
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-03-10 00:00:00.000000000 Z
13
+ date: 2023-10-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 5.2.0
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '7.1'
24
+ version: '7.2'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: 5.2.0
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '7.1'
34
+ version: '7.2'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: spec
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -153,6 +153,7 @@ files:
153
153
  - gemfiles/activerecord_6.0.gemfile
154
154
  - gemfiles/activerecord_6.1.gemfile
155
155
  - gemfiles/activerecord_7.0.gemfile
156
+ - gemfiles/activerecord_7.1.gemfile
156
157
  - gemfiles/activerecord_master.gemfile
157
158
  - lib/active_record/connection_adapters/nulldb_adapter.rb
158
159
  - lib/active_record/connection_adapters/nulldb_adapter/checkpoint.rb