declare_schema 1.3.5.colin.1 → 1.3.5
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/version.rb +1 -1
- data/lib/declare_schema.rb +2 -2
- data/spec/lib/declare_schema_spec.rb +4 -6
- 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: 9d11ade44eb67c0d2afaae73dc540ee10ed09ff62494fff9feb32dcea9bfefaa
|
4
|
+
data.tar.gz: 83ce51a81e9b2b11944e199972b41c4a3662323bb0ccdf5ddef08b8dec9b3480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43802ec088ddbd240c7ad04617cdd76753dc216d2cbac693bd6b6029f0809fc525545197c2ccb768a2b1e50c3d75c76ab612a9b16f1db63b0dc9b62f477325a8
|
7
|
+
data.tar.gz: dd323d88fbdbf493698710ebea366e8539f4b38e7a59a31c693553082a231264e99b7dde864f833fd8c92fd01ca6c5567958532a4833d0622d235ed20594f262
|
data/Gemfile.lock
CHANGED
data/lib/declare_schema.rb
CHANGED
@@ -86,7 +86,7 @@ module DeclareSchema
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def default_charset
|
89
|
-
@default_charset
|
89
|
+
@default_charset ||= normalize_charset(@default_charset_before_normalization)
|
90
90
|
end
|
91
91
|
|
92
92
|
def default_collation=(collation)
|
@@ -96,7 +96,7 @@ module DeclareSchema
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def default_collation
|
99
|
-
@default_collation
|
99
|
+
@default_collation ||= normalize_collation(@default_collation_before_normalization)
|
100
100
|
end
|
101
101
|
|
102
102
|
def default_text_limit=(text_limit)
|
@@ -46,15 +46,14 @@ RSpec.describe DeclareSchema do
|
|
46
46
|
let(:connection) { double("connection", select_value: "8.0.21") }
|
47
47
|
|
48
48
|
it "is lazy, so it doesn't use the database connection until read" do
|
49
|
-
@connection_called = false
|
50
49
|
expect(ActiveRecord::Base).to receive(:connection) do
|
51
50
|
@connection_called = true
|
52
51
|
connection
|
53
52
|
end
|
54
53
|
described_class.default_charset = "utf8"
|
55
|
-
expect(@connection_called).to
|
54
|
+
expect(@connection_called).to be_falsey
|
56
55
|
described_class.default_charset
|
57
|
-
expect(@connection_called).to
|
56
|
+
expect(@connection_called).to be_truthy
|
58
57
|
end
|
59
58
|
end
|
60
59
|
end
|
@@ -111,15 +110,14 @@ RSpec.describe DeclareSchema do
|
|
111
110
|
let(:connection) { double("connection", select_value: "8.0.21") }
|
112
111
|
|
113
112
|
it "is lazy, so it doesn't use the database connection until read" do
|
114
|
-
@connection_called = false
|
115
113
|
expect(ActiveRecord::Base).to receive(:connection) do
|
116
114
|
@connection_called = true
|
117
115
|
connection
|
118
116
|
end
|
119
117
|
described_class.default_collation = "utf8_general_ci"
|
120
|
-
expect(@connection_called).to
|
118
|
+
expect(@connection_called).to be_falsey
|
121
119
|
described_class.default_collation
|
122
|
-
expect(@connection_called).to
|
120
|
+
expect(@connection_called).to be_truthy
|
123
121
|
end
|
124
122
|
end
|
125
123
|
end
|