declare_schema 0.5.0.pre.1 → 0.5.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: 3f3b9aed36bcc541fb7d929a97e3650358be4da05c33a5d27e8db732633eb8f8
4
- data.tar.gz: 800c945108be2e29301afc2badce461a1302dadad7c393bd39c939368311e874
3
+ metadata.gz: 2ccbc2eaebebe0d0282fa06e0ccbcd72f4a9ae412dccf893216d8620ebfa1213
4
+ data.tar.gz: 5af4528dda73c033236ca7c6ef63edd5d16d48854c429e4e937f06c84a9412a0
5
5
  SHA512:
6
- metadata.gz: 821e56fe2ba4e7c9913f630a47cf685a565c19d40fdf282305c3bf0db6f0783b3174aa4e1ca535732e64cc7514cd87a598eaf743fbca0b21fa7041ec62ce82a0
7
- data.tar.gz: c2522286a389e559fda6b635b0d85b1025bdf918a98a5eb27e40946d5eee1e079efca53a0e2ad6f24649a8b05f59d652869cee924dcca7491ff7575d8292519c
6
+ metadata.gz: bb2ac5caa9b72a92d91027a339aedde5ea52102f4670e82fc62a45575a3044ac587c77c0132cc8d4b650db228c2a90be34fb8faa617a13b1333157a69914bdfe
7
+ data.tar.gz: 2f48111f9fcc5c4a6774f82acfb4731cb19f702891b218b19db8247330bd1a64428b25c761bf42e2810ca1719419eb466aa9706f4cead194c453680353ea2c1f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (0.5.0.pre.1)
4
+ declare_schema (0.5.0.pre.2)
5
5
  rails (>= 4.2)
6
6
 
7
7
  GEM
@@ -179,9 +179,9 @@ module DeclareSchema
179
179
  defaults = connection.select_one(<<~EOS)
180
180
  SELECT C.character_set_name, C.collation_name
181
181
  FROM information_schema.`COLUMNS` C
182
- WHERE C.table_schema = #{connection.quote_string(database_name)} AND
183
- C.table_name = #{connection.quote_string(table_name)} AND
184
- C.column_name = #{connection.quote_string(column_name)};
182
+ WHERE C.table_schema = '#{connection.quote_string(database_name)}' AND
183
+ C.table_name = '#{connection.quote_string(table_name)}' AND
184
+ C.column_name = '#{connection.quote_string(column_name)}';
185
185
  EOS
186
186
 
187
187
  defaults["character_set_name"] or raise "character_set_name missing from #{defaults.inspect}"
@@ -30,8 +30,8 @@ module DeclareSchema
30
30
  SELECT CCSA.character_set_name, CCSA.collation_name
31
31
  FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
32
32
  WHERE CCSA.collation_name = T.table_collation AND
33
- T.table_schema = #{connection.quote_string(database)} AND
34
- T.table_name = #{connection.quote_string(table_name)};
33
+ T.table_schema = '#{connection.quote_string(database)}' AND
34
+ T.table_name = '#{connection.quote_string(table_name)}';
35
35
  EOS
36
36
 
37
37
  defaults["character_set_name"] or raise "character_set_name missing from #{defaults.inspect}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "0.5.0.pre.1"
4
+ VERSION = "0.5.0.pre.2"
5
5
  end
@@ -60,15 +60,15 @@ RSpec.describe DeclareSchema::Model::TableOptionsDefinition do
60
60
  double(ActiveRecord::ConnectionAdapters::Mysql2Adapter).tap do |stub_connection|
61
61
  expect(stub_connection).to receive(:class).and_return(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
62
62
  expect(stub_connection).to receive(:current_database).and_return('test_database')
63
- expect(stub_connection).to receive(:quote_string).with('test_database').and_return('"test_database"')
64
- expect(stub_connection).to receive(:quote_string).with(model_class.table_name).and_return("\"#{model_class.table_name}\"")
63
+ expect(stub_connection).to receive(:quote_string).with('test_database').and_return('test_database')
64
+ expect(stub_connection).to receive(:quote_string).with(model_class.table_name).and_return(model_class.table_name)
65
65
  expect(stub_connection).to(
66
66
  receive(:select_one).with(<<~EOS)
67
67
  SELECT CCSA.character_set_name, CCSA.collation_name
68
68
  FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
69
69
  WHERE CCSA.collation_name = T.table_collation AND
70
- T.table_schema = "test_database" AND
71
- T.table_name = "#{model_class.table_name}";
70
+ T.table_schema = 'test_database' AND
71
+ T.table_name = '#{model_class.table_name}';
72
72
  EOS
73
73
  .and_return({ "character_set_name" => "utf8", "collation_name" => "utf8_general" })
74
74
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declare_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre.1
4
+ version: 0.5.0.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development adapted from hobo_fields by Tom Locke