activerecord-nulldb-adapter 0.3.9 → 0.4.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: d5cd5ca699c63224bf641cf3e358137e6ded9a4c
4
- data.tar.gz: 04e46ea2bf9ce3bca28cf96e94e6c8b73321e447
2
+ SHA256:
3
+ metadata.gz: e0977e58aadc5717c6303c46fa071b05f9d3f4551d20faa1cf820389363ea1b4
4
+ data.tar.gz: 9a89250a169be9d67b40a2235a6c22a9015886cd94f2639b3ce05da7a5f206b1
5
5
  SHA512:
6
- metadata.gz: b39b59c2cfaefa4874fa2072b1eb128042c526690e12beb211f477b3fdf35ea78a0a838e1f98e43f46fba6ffd3d286e71e0ea855695a8c1b0acd14a7bb95fe3e
7
- data.tar.gz: e33abeaa78ef7d331c02eac7f2538bc3c0837b388f2cbb4e20cdabb7b04fa2f7bcad0ef4e2991d5c4fcd0810138f958a47436d95a54aea6e25a866caa51ed843
6
+ metadata.gz: ea8a0ca7eccc255134383140d4cfc7e74c959108536abfbf56c5da3649b3e024721193df8e7791fcd3fc43b4c1f4bffb4306aae869d571c53209d761aa11cfd5
7
+ data.tar.gz: 3ffa933914659c3f945bd66c82a19afd1e60ed76a14f467b474a622a85fa23e1eea7e56a20b3c2c25fef751288e347039b911d4bda2a0f10fef3d78c1f8b43ac
@@ -4,48 +4,72 @@ bundler_args: --without development
4
4
  sudo: false
5
5
 
6
6
  rvm:
7
- - 1.9.3
8
- - 2.2.5
9
- - 2.3.1
7
+ - 2.2
8
+ - 2.3
10
9
  - 2.4
10
+ - 2.5
11
+ - 2.6
11
12
  - jruby
12
13
  - rbx
13
14
 
15
+ gemfile:
16
+ - gemfiles/activerecord_2.3.gemfile
17
+ - gemfiles/activerecord_3.2.gemfile
18
+ - gemfiles/activerecord_4.0.gemfile
19
+ - gemfiles/activerecord_4.1.gemfile
20
+ - gemfiles/activerecord_4.2.gemfile
21
+ - gemfiles/activerecord_5.0.gemfile
22
+ - gemfiles/activerecord_5.1.gemfile
23
+ - gemfiles/activerecord_6.0.gemfile
24
+ - gemfiles/activerecord_master.gemfile
25
+
14
26
  matrix:
15
27
  fast_finish: true
16
28
  allow_failures:
17
29
  - rvm: jruby
18
30
  - rvm: rbx
31
+ - gemfile: gemfiles/activerecord_master.gemfile
19
32
  exclude:
20
- - rvm: 1.9.3
21
- gemfile: gemfiles/activerecord_master.gemfile
22
- - rvm: 2.2.5
33
+ - rvm: 2.2
34
+ gemfile: gemfiles/activerecord_2.3.gemfile
35
+ - rvm: 2.2
36
+ gemfile: gemfiles/activerecord_6.0.gemfile
37
+ - rvm: 2.2
23
38
  gemfile: gemfiles/activerecord_master.gemfile
24
- - rvm: 2.3.1
39
+ - rvm: 2.3
40
+ gemfile: gemfiles/activerecord_2.3.gemfile
41
+ - rvm: 2.3
42
+ gemfile: gemfiles/activerecord_6.0.gemfile
43
+ - rvm: 2.3
25
44
  gemfile: gemfiles/activerecord_master.gemfile
26
- - rvm: 1.9.3
27
- gemfile: gemfiles/activerecord_5.1.gemfile
28
- - rvm: 1.9.3
29
- gemfile: gemfiles/activerecord_5.0.gemfile
30
45
  - rvm: 2.4
31
- gemfile: gemfiles/activerecord_4.1.gemfile
46
+ gemfile: gemfiles/activerecord_2.3.gemfile
47
+ - rvm: 2.4
48
+ gemfile: gemfiles/activerecord_3.2.gemfile
32
49
  - rvm: 2.4
33
50
  gemfile: gemfiles/activerecord_4.0.gemfile
34
51
  - rvm: 2.4
35
- gemfile: gemfiles/activerecord_3.2.gemfile
36
- - rvm: 2.2.5
37
- gemfile: gemfiles/activerecord_2.3.gemfile
38
- - rvm: 2.3.1
39
- gemfile: gemfiles/activerecord_2.3.gemfile
52
+ gemfile: gemfiles/activerecord_4.1.gemfile
40
53
  - rvm: 2.4
54
+ gemfile: gemfiles/activerecord_6.0.gemfile
55
+ - rvm: 2.4
56
+ gemfile: gemfiles/activerecord_master.gemfile
57
+ - rvm: 2.5
58
+ gemfile: gemfiles/activerecord_2.3.gemfile
59
+ - rvm: 2.5
60
+ gemfile: gemfiles/activerecord_3.2.gemfile
61
+ - rvm: 2.5
62
+ gemfile: gemfiles/activerecord_4.0.gemfile
63
+ - rvm: 2.5
64
+ gemfile: gemfiles/activerecord_4.1.gemfile
65
+ - rvm: 2.6
41
66
  gemfile: gemfiles/activerecord_2.3.gemfile
67
+ - rvm: 2.6
68
+ gemfile: gemfiles/activerecord_3.2.gemfile
69
+ - rvm: 2.6
70
+ gemfile: gemfiles/activerecord_4.0.gemfile
71
+ - rvm: 2.6
72
+ gemfile: gemfiles/activerecord_4.1.gemfile
73
+
74
+
42
75
 
43
- gemfile:
44
- - gemfiles/activerecord_2.3.gemfile
45
- - gemfiles/activerecord_3.2.gemfile
46
- - gemfiles/activerecord_4.0.gemfile
47
- - gemfiles/activerecord_4.1.gemfile
48
- - gemfiles/activerecord_4.2.gemfile
49
- - gemfiles/activerecord_5.0.gemfile
50
- - gemfiles/activerecord_5.1.gemfile
51
- - gemfiles/activerecord_master.gemfile
data/Appraisals CHANGED
@@ -34,3 +34,7 @@ end
34
34
  appraise "activerecord-5.1" do
35
35
  gem "activerecord", "~> 5.1.0"
36
36
  end
37
+
38
+ appraise "activerecord-6.0" do
39
+ gem "activerecord", "~> 6.0.0.rc1"
40
+ end
data/CHANGES.md CHANGED
@@ -1,3 +1,13 @@
1
+ Unreleased
2
+ ----------
3
+
4
+ 0.4.0 (2019-07-22)
5
+ -----------
6
+
7
+ - *Breaking* Drop support to Ruby 1.9
8
+ - Add support for ActiveRecord 6.0 #90
9
+ - Prevent ActiveRecord::Tasks::DatabaseNotSupported #88
10
+
1
11
  0.3.9 (2018-07-07)
2
12
  -----------
3
13
  - Fix broken count
@@ -16,9 +16,9 @@ a real database.
16
16
  == Compatibility
17
17
 
18
18
  === Ruby
19
- Currently supported Ruby versions: MRI 1.9.3, 2.0.0, 2.1.x, 2.2.x, 2.3.x
19
+ Currently supported Ruby versions: MRI 2.2.x, 2.3.x, 2.4.x, 2.5.x, 2.6.x
20
20
 
21
- Experimental support provided for: JRuby, Rubinius (both in 1.9 mode)
21
+ Experimental support provided for: JRuby, Rubinius
22
22
 
23
23
  === ActiveRecord
24
24
  Any version of ActiveRecord since 2.0, including ActiveRecord 5.0
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.0.0.rc1"
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
@@ -19,3 +19,4 @@ require 'active_record/connection_adapters/nulldb_adapter/index_definition'
19
19
  require 'active_record/connection_adapters/nulldb_adapter/null_object'
20
20
  require 'active_record/connection_adapters/nulldb_adapter/table_definition'
21
21
 
22
+ require 'active_record/tasks/nulldb_database_tasks' if defined?(ActiveRecord::Tasks)
@@ -273,9 +273,15 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::Connection
273
273
  end
274
274
  end
275
275
 
276
+ def includes_column?
277
+ false
278
+ end
279
+
276
280
  def new_table_definition(adapter = nil, table_name = nil, is_temporary = nil, options = {})
277
281
  case ::ActiveRecord::VERSION::MAJOR
278
- when 5, 6
282
+ when 6
283
+ TableDefinition.new(self, table_name, temporary: is_temporary, options: options.except(:id))
284
+ when 5
279
285
  TableDefinition.new(table_name, is_temporary, options.except(:id), nil)
280
286
  when 4
281
287
  TableDefinition.new(native_database_types, table_name, is_temporary, options)
@@ -33,6 +33,9 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter
33
33
  rows.size > num
34
34
  end
35
35
 
36
+ def includes_column?(name)
37
+ false
38
+ end
36
39
  end
37
40
 
38
41
  end
@@ -0,0 +1,29 @@
1
+ class ActiveRecord::Tasks::NullDBDatabaseTasks
2
+ def initialize(configuration)
3
+ @configuration = configuration
4
+ end
5
+
6
+ def create(master_established = false)
7
+ # NO-OP
8
+ end
9
+
10
+ def drop
11
+ # NO-OP
12
+ end
13
+
14
+ def purge
15
+ # NO-OP
16
+ end
17
+
18
+ def structure_dump(filename, extra_flags)
19
+ # NO-OP
20
+ end
21
+
22
+ def structure_load(filename, extra_flags)
23
+ # NO-OP
24
+ end
25
+
26
+ def clear_active_connections!
27
+ # NO-OP
28
+ end
29
+ end
@@ -2,3 +2,5 @@ require 'nulldb/core'
2
2
 
3
3
  # Need to defer calling Rails.root because when bundler loads, Rails.root is nil
4
4
  NullDB.configure {|ndb| def ndb.project_root;Rails.root;end}
5
+
6
+ ActiveRecord::Tasks::DatabaseTasks.register_task(/nulldb/, ActiveRecord::Tasks::NullDBDatabaseTasks) if defined?(ActiveRecord::Tasks)
@@ -1,3 +1,3 @@
1
1
  module NullDB
2
- VERSION = "0.3.9"
2
+ VERSION = "0.4.0"
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.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avdi Grimm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-07 00:00:00.000000000 Z
12
+ date: 2019-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -135,6 +135,7 @@ files:
135
135
  - gemfiles/activerecord_4.2.gemfile
136
136
  - gemfiles/activerecord_5.0.gemfile
137
137
  - gemfiles/activerecord_5.1.gemfile
138
+ - gemfiles/activerecord_6.0.gemfile
138
139
  - gemfiles/activerecord_master.gemfile
139
140
  - lib/active_record/connection_adapters/nulldb_adapter.rb
140
141
  - lib/active_record/connection_adapters/nulldb_adapter/checkpoint.rb
@@ -146,6 +147,7 @@ files:
146
147
  - lib/active_record/connection_adapters/nulldb_adapter/null_object.rb
147
148
  - lib/active_record/connection_adapters/nulldb_adapter/statement.rb
148
149
  - lib/active_record/connection_adapters/nulldb_adapter/table_definition.rb
150
+ - lib/active_record/tasks/nulldb_database_tasks.rb
149
151
  - lib/activerecord-nulldb-adapter.rb
150
152
  - lib/nulldb.rb
151
153
  - lib/nulldb/arel_compiler.rb
@@ -176,8 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
178
  - !ruby/object:Gem::Version
177
179
  version: '0'
178
180
  requirements: []
179
- rubyforge_project:
180
- rubygems_version: 2.5.1
181
+ rubygems_version: 3.0.3
181
182
  signing_key:
182
183
  specification_version: 4
183
184
  summary: The Null Object pattern as applied to ActiveRecord database adapters