banana 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7b29beb83d832fdef8b2bc369d6627e437c1df1
4
- data.tar.gz: 22822f1719a71aea00a52b06e359d73a44485765
3
+ metadata.gz: fc8a9c25b2f858a6f6eaa39d8f387cd00b69c676
4
+ data.tar.gz: 9cbaaf88833ec6e0e5cafeaba3f6451452b44f73
5
5
  SHA512:
6
- metadata.gz: ff158ea093963e4023b1b625be8c6e1c5eefcb9c2f65139c99b7c727c1b4e68633dafd313d5ce2d7f693db05ac4bafdaf522f3bdf4dcab0900eb14d2634e715e
7
- data.tar.gz: c6fa297cd462ffcc8477d89c514d901d57856936f417b1b15cc75064b44f67002d068c1656ea900478309700a13157594e4e232a29617d7c1a466c8798780115
6
+ metadata.gz: 92bf3e43de0949d4e4048b650f02ba81dd705acf2debfaa37adfd20166c739ff5b950216b8059339cf227e618d1190e3681af105ca66ec93a83eb1ca8f7cdcaa
7
+ data.tar.gz: fcee0eaa2964737bc6792e2030c26130f4536c159e1fa8bb5a996600a74c46d51f7f71b5575ba40c14b7870dfa9536e5caed2167b31507b3f4f2148f6f42ddfa
@@ -4,9 +4,9 @@ module ActiveRecord
4
4
  class Migration
5
5
  def migrate_with_multidb(direction)
6
6
  if defined? self.class::DATABASE_NAME
7
- ActiveRecord::Base.establish_connection(self.class::DATABASE_NAME)
7
+ ActiveRecord::Base.establish_connection(self.class::DATABASE_NAME.to_sym)
8
8
  migrate_without_multidb(direction)
9
- ActiveRecord::Base.establish_connection(Rails.env)
9
+ ActiveRecord::Base.establish_connection(Rails.env.to_sym)
10
10
  else
11
11
  migrate_without_multidb(direction)
12
12
  end
@@ -16,7 +16,7 @@ db_namespace = namespace :db do
16
16
 
17
17
  desc "Migrate the database (options: VERSION=x, VERBOSE=false)."
18
18
  task :migrate => [:environment, :load_config] do
19
- ActiveRecord::Base.establish_connection(Rails.env)
19
+ ActiveRecord::Base.establish_connection(Rails.env.to_sym)
20
20
 
21
21
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
22
22
  ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_paths, ENV["VERSION"] ? ENV["VERSION"].to_i : nil) do |migration|
@@ -42,7 +42,7 @@ db_namespace = namespace :db do
42
42
  require 'banana/multidb_schema_dumper'
43
43
  filename = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
44
44
  File.open(filename, "w:utf-8") do |file|
45
- environments = ActiveRecord::Base.configurations.keys.select { |x| x =~ /#{Rails.env}$/ }
45
+ environments = ActiveRecord::Base.configurations.keys.select { |x| x =~ /#{Rails.env}$/ }.map(&:to_sym)
46
46
  Banana::MultidbSchemaDumper.dump_multidb(environments, file)
47
47
  end
48
48
  db_namespace['schema:dump'].reenable
@@ -1,3 +1,3 @@
1
1
  module Banana
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: banana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sinsoku
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord