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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/declare_schema/model/column.rb +1 -1
- data/lib/declare_schema/version.rb +1 -1
- data/spec/lib/declare_schema/model/column_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd8228bfafad807a853f8abea954459b3ac209b7041b27699fc5691184c86b80
|
4
|
+
data.tar.gz: 01a278f8d7bbc83a9309a3c8908b546c509f5b2d14e28fe11bca2fa4fcc7bbed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 632350f71bb95b99fd7f25f0dd9a71c84d544e1e5d26cafcf3ae671e994c9719be3c7f4f297a096ffdca3ec63c5179aea1c159f600bbb061fa86b99a3d92fc6c
|
7
|
+
data.tar.gz: 757876168af2c046c63332fadc22ce26b63e7697ae5d6c9091b46a4c5d7d349eefc2899052e6e0f2d7df13a200c18f029d881937436e95a17283f1ce709f19f5
|
data/Gemfile.lock
CHANGED
@@ -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:
|
@@ -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
|