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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81d75c5def8b53125f8505b1cde22775cb4cbcbd
4
- data.tar.gz: fa4c888a50ce9aacdaa58c628890319b35ea01bc
3
+ metadata.gz: a936204a697130ba6be50b69f69a53f33a91bce7
4
+ data.tar.gz: 7b72a4a62dcbceb164fdd6abeed448d2671e46cd
5
5
  SHA512:
6
- metadata.gz: 9cc5c7db63a7bb752dfcd962d939887bf985a4d0b41fe017ad2310535b0b6747d776ff29976508da9b2f83271c31d1fc77bc4d7a2d9897b8909af3148e13abd5
7
- data.tar.gz: ef64f1a39cc7a96d1a5ea2efc1641a4f1019e23ecd5092bd6b100fafbc7eeac0c43c8716fc759cf00e270177d6dabbbfbf22ede67797e871a6ccb4bcfc1bedd6
6
+ metadata.gz: 9247780b056dc9429814aca02b1340d910b012fa11a749a666faacd3537162356932d5cae20d1a1fee33f55923ffb69011f175de2bf887a995f05c6c1b74dfef
7
+ data.tar.gz: 17ee0213ab9a305b612486558f0a6db1e32be0f699b3ca87c36a39490776d40dc663acb6f1e3f2ef22b03f7b238a78649bdab927e9a4fa6f7447ec398fa36861
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.3.8 (2018-02-06)
2
+ -----------
3
+ - Adds support for ActiveRecord Edge (6.0)
4
+
1
5
  0.3.7 (2017-06-04)
2
6
  -----------
3
7
  - Adds support for ActiveRecord 5.1/5.2.
data/Gemfile CHANGED
@@ -6,6 +6,7 @@ group :development, :test do
6
6
  gem 'spec'
7
7
  gem 'rspec', '>= 1.2.9'
8
8
  gem 'rake'
9
+ gem 'rdoc'
9
10
  end
10
11
 
11
12
  group :development do
@@ -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 = "0.3.7"
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'
@@ -6,6 +6,8 @@ git 'https://github.com/rails/rails.git' do
6
6
  gem 'activerecord'
7
7
  end
8
8
 
9
+ gem 'arel', github: 'rails/arel', branch: 'master'
10
+
9
11
  group :development, :test do
10
12
  gem "spec"
11
13
  gem "rspec", ">= 1.2.9"
@@ -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
- ActiveRecord::ConnectionAdapters::NullDBAdapter::Column.new(*new_column_arguments(col_def))
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 == 5
300
+ if ActiveRecord::VERSION::MAJOR >= 5
300
301
  [
301
302
  col_def.name.to_s,
302
303
  col_def.default,
@@ -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 == 5 ? Migration.public_send(:[], "#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}".to_f) : Migration
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)
@@ -0,0 +1,3 @@
1
+ module NullDB
2
+ VERSION = "0.3.8"
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.7
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: 2017-06-04 00:00:00.000000000 Z
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.2
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