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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63c52c12c292be619b08901eb088c9957e8bfbc9708d087faa9d418704524175
4
- data.tar.gz: 5a12e3d6cc67914e6b8c8739c17d89e2ea7886212f2abd90bd372f57fab808af
3
+ metadata.gz: 32f8ca5dee3bd43f6fc2250904ba539cdeee30f0bb10a6f5f69f5782c282a5a4
4
+ data.tar.gz: 4326ccc969837a6e74979a4b1fe60dff834e32afea2406c417b4ac18d4cdc582
5
5
  SHA512:
6
- metadata.gz: e33ae65cdfcb5fc56c24b4d62804ba28c77b29efc0a7659b45660c953f6310ae90b8b42a8d51f9f5331592e511ec33d56ff0f7b691dcb7aa8f299a5f7d523f22
7
- data.tar.gz: 688ca01165e655ab6ff309f82ba336530bb44d695ac90de049cabc730850c7059c8789ef95bafbc02059b6329b4212d0e2ab726034b9c71d814a51fdaca02501
6
+ metadata.gz: 9548f216b1992826bad36409a370678483743e10270cf35f56447e2873cb64bf48b3ad1c695585bbcc52c37d0327c0a340e0cf8f73ebf6fe09c4af739de0e2fe
7
+ data.tar.gz: b7b9cad07de9fe0d54db96359c3f97a5c7150d12728dfe189dc66ab8574f6b19ff378826a09ef3ed233e439e6034b487e05b656537b147215e459a07621cc727
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (0.8.0.pre.1)
4
+ declare_schema (0.8.0.pre.2)
5
5
  rails (>= 4.2)
6
6
 
7
7
  GEM
@@ -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]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "0.8.0.pre.1"
4
+ VERSION = "0.8.0.pre.2"
5
5
  end
@@ -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.1
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-17 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails