declare_schema 0.8.0.pre.1 → 0.8.0.pre.2
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/field_spec.rb +1 -1
- data/lib/declare_schema/version.rb +1 -1
- data/spec/lib/declare_schema/field_spec_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32f8ca5dee3bd43f6fc2250904ba539cdeee30f0bb10a6f5f69f5782c282a5a4
|
4
|
+
data.tar.gz: 4326ccc969837a6e74979a4b1fe60dff834e32afea2406c417b4ac18d4cdc582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9548f216b1992826bad36409a370678483743e10270cf35f56447e2873cb64bf48b3ad1c695585bbcc52c37d0327c0a340e0cf8f73ebf6fe09c4af739de0e2fe
|
7
|
+
data.tar.gz: b7b9cad07de9fe0d54db96359c3f97a5c7150d12728dfe189dc66ab8574f6b19ff378826a09ef3ed233e439e6034b487e05b656537b147215e459a07621cc727
|
data/Gemfile.lock
CHANGED
@@ -77,7 +77,7 @@ module DeclareSchema
|
|
77
77
|
@options[:limit] = 8
|
78
78
|
end
|
79
79
|
|
80
|
-
Column.native_type?(@type) or raise UnknownTypeError, "#{@type.inspect}"
|
80
|
+
Column.native_type?(@type) or raise UnknownTypeError, "#{@type.inspect} not found in #{Column.native_types.inspect} for adapter #{ActiveRecord::Base.connection.class.name}"
|
81
81
|
|
82
82
|
if @type.in?([:string, :text, :binary, :varbinary, :integer, :enum])
|
83
83
|
@options[:limit] ||= Column.native_types[@type][:limit]
|
@@ -22,6 +22,12 @@ RSpec.describe DeclareSchema::Model::FieldSpec do
|
|
22
22
|
subject = described_class.new(model, :price, :integer, anonymize_using: 'x', null: false, position: 0, limit: 4)
|
23
23
|
expect(subject.options.keys).to eq([:limit, :null, :anonymize_using])
|
24
24
|
end
|
25
|
+
|
26
|
+
it 'raises exception on unknown field type' do
|
27
|
+
expect do
|
28
|
+
described_class.new(model, :location, :lat_long, position: 0)
|
29
|
+
end.to raise_exception(::DeclareSchema::UnknownTypeError, /:lat_long not found in /)
|
30
|
+
end
|
25
31
|
end
|
26
32
|
|
27
33
|
describe '#schema_attributes' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: declare_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0.pre.
|
4
|
+
version: 0.8.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca Development adapted from hobo_fields by Tom Locke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|