schema_plus 1.8.5 → 1.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/gemfiles/Gemfile.base +2 -0
- data/lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb +1 -8
- data/lib/schema_plus/version.rb +1 -1
- data/spec/column_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed2c43411e4ae250a4e15339b46e0e176194ec62
|
4
|
+
data.tar.gz: ec456a93a6e83999e083f7f2f0c4525d429516dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f1a7064f366f8bd02bb1399b913928f0f4644ad48a89412d87a0847deb7d76eed6690e6c20f88d31c53651a21bfe101331a136b66994ab0c6e5fb2a26166cf5
|
7
|
+
data.tar.gz: 96f64a7d81ade052b0ca70fc1c3cda652c9de42cebb20fef3b80094807c5c543c30b95b98b0aa5dc8d3481958fbd274476a8a71df91d86db6e95c72df8eb804b
|
data/CHANGELOG.md
CHANGED
data/gemfiles/Gemfile.base
CHANGED
@@ -31,14 +31,7 @@ module SchemaPlus
|
|
31
31
|
end
|
32
32
|
else
|
33
33
|
def initialize(name, default, cast_type, sql_type = nil, null = true, default_function = nil)
|
34
|
-
|
35
|
-
@array = true
|
36
|
-
super(name, default, cast_type, sql_type[0..sql_type.length - 3], null)
|
37
|
-
else
|
38
|
-
@array = false
|
39
|
-
super(name, default, cast_type, sql_type, null)
|
40
|
-
end
|
41
|
-
|
34
|
+
super(name, default, cast_type, sql_type, null)
|
42
35
|
@default_function = @default_expr = default_function
|
43
36
|
end
|
44
37
|
end
|
data/lib/schema_plus/version.rb
CHANGED
data/spec/column_spec.rb
CHANGED
@@ -138,6 +138,18 @@ describe "Column" do
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
141
|
+
context "Postgresql array", :postgresql => :only do
|
142
|
+
|
143
|
+
before(:each) do
|
144
|
+
create_table(User, :alpha => { :default => [], :array => true })
|
145
|
+
end
|
146
|
+
|
147
|
+
it "respects array: true" do
|
148
|
+
column = User.columns.find(&its.name == "alpha")
|
149
|
+
expect(column.array).to be_truthy
|
150
|
+
end
|
151
|
+
end if "#{::ActiveRecord::VERSION::MAJOR}.#{::ActiveRecord::VERSION::MINOR}".to_r >= "4.0".to_r
|
152
|
+
|
141
153
|
protected
|
142
154
|
|
143
155
|
def create_table(model, columns_with_options)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronen Barzel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|