declare_schema 0.8.0.pre.2 → 0.8.0.pre.3

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: 32f8ca5dee3bd43f6fc2250904ba539cdeee30f0bb10a6f5f69f5782c282a5a4
4
- data.tar.gz: 4326ccc969837a6e74979a4b1fe60dff834e32afea2406c417b4ac18d4cdc582
3
+ metadata.gz: cd8228bfafad807a853f8abea954459b3ac209b7041b27699fc5691184c86b80
4
+ data.tar.gz: 01a278f8d7bbc83a9309a3c8908b546c509f5b2d14e28fe11bca2fa4fcc7bbed
5
5
  SHA512:
6
- metadata.gz: 9548f216b1992826bad36409a370678483743e10270cf35f56447e2873cb64bf48b3ad1c695585bbcc52c37d0327c0a340e0cf8f73ebf6fe09c4af739de0e2fe
7
- data.tar.gz: b7b9cad07de9fe0d54db96359c3f97a5c7150d12728dfe189dc66ab8574f6b19ff378826a09ef3ed233e439e6034b487e05b656537b147215e459a07621cc727
6
+ metadata.gz: 632350f71bb95b99fd7f25f0dd9a71c84d544e1e5d26cafcf3ae671e994c9719be3c7f4f297a096ffdca3ec63c5179aea1c159f600bbb061fa86b99a3d92fc6c
7
+ data.tar.gz: 757876168af2c046c63332fadc22ce26b63e7697ae5d6c9091b46a4c5d7d349eefc2899052e6e0f2d7df13a200c18f029d881937436e95a17283f1ce709f19f5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (0.8.0.pre.2)
4
+ declare_schema (0.8.0.pre.3)
5
5
  rails (>= 4.2)
6
6
 
7
7
  GEM
@@ -8,7 +8,7 @@ module DeclareSchema
8
8
  class Column
9
9
  class << self
10
10
  def native_type?(type)
11
- type != :primary_key && native_types[type]
11
+ type != :primary_key && (native_types.empty? || native_types[type]) # empty will happen with NullDBAdapter used in assets:precompile
12
12
  end
13
13
 
14
14
  # MySQL example:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "0.8.0.pre.2"
4
+ VERSION = "0.8.0.pre.3"
5
5
  end
@@ -37,6 +37,11 @@ RSpec.describe DeclareSchema::Model::Column do
37
37
  expect(described_class.native_type?(type)).to be_falsey
38
38
  end
39
39
  end
40
+
41
+ it "is truthy when there's a NullDbAdapter (like for assets:precompile) that doesn't have any native types" do
42
+ allow(described_class).to receive(:native_types).and_return({})
43
+ expect(described_class.native_type?(:integer)).to be_truthy
44
+ end
40
45
  end
41
46
 
42
47
  describe '.native_types' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declare_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre.2
4
+ version: 0.8.0.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development adapted from hobo_fields by Tom Locke