active_record_shards 3.4.2 → 3.4.3

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
  SHA1:
3
- metadata.gz: b1ab09ed5feac88a2f06b2f8307153814cb4babb
4
- data.tar.gz: 350dbc24bdb71129fd1abe423e0e6bb3ff2ca1a4
3
+ metadata.gz: 560297ec2853470b0022c84d8dd57c15a40589cf
4
+ data.tar.gz: fd7b67c7d15b63d24d1c7f8d2cbebcaeaf5c7816
5
5
  SHA512:
6
- metadata.gz: 21db8b8e09fde54fb361ab0cdbba639294e08b0cac29c0caa75e6f474b08b3c81580e7453404c71cbab995df63ca07fa151da2409e48f7c6197d487b4de2715b
7
- data.tar.gz: a43efcdbb6674d6901593259a98279efade872f604c24870996d47a4584beed995dce965dd5c2f7ce7a6f9ca61b86d688849d0e45226dddba1796fa8b66ed68c
6
+ metadata.gz: 498854a4c1bcf28b74b9af9317c69d925bcc4aa1a3d00bec5ade25978e7203ed952c0a46ee402918160bb317a2c22ae5e40e1c1c3b47b6ac58823d8bc7892324
7
+ data.tar.gz: 43e2d7bd3a71a22941405370b6544b112e0cc0ea750912599a74c37338e802425dd81a654133330211171db88de3b79e0be71bf64ca8112c800dafdb1c69d7bb
@@ -29,7 +29,12 @@ namespace :db do
29
29
  if key.starts_with?(ActiveRecordShards.rails_env) && !key.ends_with?("_slave")
30
30
  if ActiveRecord::VERSION::MAJOR >= 4
31
31
  begin
32
- ActiveRecordShards::Tasks.root_connection(conf).create_database(conf['database'])
32
+ # MysqlAdapter takes charset instead of encoding in Rails 4
33
+ # https://github.com/rails/rails/commit/78b30fed9336336694fb2cb5d2825f95800b541c
34
+ symbolized_configuration = conf.symbolize_keys
35
+ symbolized_configuration[:charset] = symbolized_configuration[:encoding]
36
+
37
+ ActiveRecordShards::Tasks.root_connection(conf).create_database(conf['database'], symbolized_configuration)
33
38
  rescue ActiveRecord::StatementInvalid => ex
34
39
  if ex.message.include?('database exists')
35
40
  puts "#{conf['database']} already exists"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_shards
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.2
4
+ version: 3.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-03-20 00:00:00.000000000 Z
13
+ date: 2015-04-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord