activerecord-nulldb-adapter 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/Gemfile +1 -0
- data/activerecord-nulldb-adapter.gemspec +5 -1
- data/gemfiles/activerecord_master.gemfile +2 -0
- data/lib/active_record/connection_adapters/nulldb_adapter/core.rb +4 -3
- data/lib/nulldb/extensions.rb +1 -1
- data/lib/nulldb/version.rb +3 -0
- metadata +18 -4
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a936204a697130ba6be50b69f69a53f33a91bce7
|
4
|
+
data.tar.gz: 7b72a4a62dcbceb164fdd6abeed448d2671e46cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9247780b056dc9429814aca02b1340d910b012fa11a749a666faacd3537162356932d5cae20d1a1fee33f55923ffb69011f175de2bf887a995f05c6c1b74dfef
|
7
|
+
data.tar.gz: 17ee0213ab9a305b612486558f0a6db1e32be0f699b3ca87c36a39490776d40dc663acb6f1e3f2ef22b03f7b238a78649bdab927e9a4fa6f7447ec398fa36861
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'nulldb/version'
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = "activerecord-nulldb-adapter"
|
5
|
-
s.version =
|
8
|
+
s.version = NullDB::VERSION
|
6
9
|
|
7
10
|
s.require_paths = ["lib"]
|
8
11
|
s.authors = ["Avdi Grimm", "Myron Marston"]
|
@@ -19,6 +22,7 @@ Gem::Specification.new do |s|
|
|
19
22
|
|
20
23
|
s.add_runtime_dependency 'activerecord', '>= 2.0.0'
|
21
24
|
s.add_development_dependency 'spec'
|
25
|
+
s.add_development_dependency 'rdoc'
|
22
26
|
s.add_development_dependency 'rspec'
|
23
27
|
s.add_development_dependency 'rake'
|
24
28
|
s.add_development_dependency 'appraisal'
|
@@ -139,7 +139,8 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::Connection
|
|
139
139
|
|
140
140
|
if table = @tables[table_name]
|
141
141
|
table.columns.map do |col_def|
|
142
|
-
|
142
|
+
col_args = new_column_arguments(col_def)
|
143
|
+
ActiveRecord::ConnectionAdapters::NullDBAdapter::Column.new(*col_args)
|
143
144
|
end
|
144
145
|
else
|
145
146
|
[]
|
@@ -262,7 +263,7 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::Connection
|
|
262
263
|
|
263
264
|
def new_table_definition(adapter = nil, table_name = nil, is_temporary = nil, options = {})
|
264
265
|
case ::ActiveRecord::VERSION::MAJOR
|
265
|
-
when 5
|
266
|
+
when 5, 6
|
266
267
|
TableDefinition.new(table_name, is_temporary, options.except(:id), nil)
|
267
268
|
when 4
|
268
269
|
TableDefinition.new(native_database_types, table_name, is_temporary, options)
|
@@ -296,7 +297,7 @@ class ActiveRecord::ConnectionAdapters::NullDBAdapter < ActiveRecord::Connection
|
|
296
297
|
end
|
297
298
|
|
298
299
|
def default_column_arguments(col_def)
|
299
|
-
if ActiveRecord::VERSION::MAJOR
|
300
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
300
301
|
[
|
301
302
|
col_def.name.to_s,
|
302
303
|
col_def.default,
|
data/lib/nulldb/extensions.rb
CHANGED
@@ -33,7 +33,7 @@ end
|
|
33
33
|
|
34
34
|
module ActiveRecord
|
35
35
|
# Just make sure you have the latest version of your schema
|
36
|
-
superclass = ActiveRecord::VERSION::MAJOR
|
36
|
+
superclass = ActiveRecord::VERSION::MAJOR >= 5 ? Migration.public_send(:[], "#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}".to_f) : Migration
|
37
37
|
class Schema < superclass
|
38
38
|
def self.define(info={}, &block)
|
39
39
|
instance_eval(&block)
|
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.
|
4
|
+
version: 0.3.8
|
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:
|
12
|
+
date: 2018-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -39,6 +39,20 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rdoc
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: rspec
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +127,6 @@ files:
|
|
113
127
|
- LICENSE
|
114
128
|
- README.rdoc
|
115
129
|
- Rakefile
|
116
|
-
- VERSION
|
117
130
|
- activerecord-nulldb-adapter.gemspec
|
118
131
|
- gemfiles/activerecord_2.3.gemfile
|
119
132
|
- gemfiles/activerecord_3.0.gemfile
|
@@ -141,6 +154,7 @@ files:
|
|
141
154
|
- lib/nulldb/core.rb
|
142
155
|
- lib/nulldb/extensions.rb
|
143
156
|
- lib/nulldb/rails.rb
|
157
|
+
- lib/nulldb/version.rb
|
144
158
|
- lib/nulldb_rspec.rb
|
145
159
|
- lib/tasks/database.rake
|
146
160
|
- spec/nulldb_spec.rb
|
@@ -165,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
179
|
version: '0'
|
166
180
|
requirements: []
|
167
181
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.5.
|
182
|
+
rubygems_version: 2.5.1
|
169
183
|
signing_key:
|
170
184
|
specification_version: 4
|
171
185
|
summary: The Null Object pattern as applied to ActiveRecord database adapters
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.5
|