utf8mb4rails 0.1.0 → 0.1.1

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: fc9eaa8412f0244ac69818e4cbdc16c3377c270f
4
- data.tar.gz: 7a709d08a0b45673c9361b4cdc29460195d4c30b
3
+ metadata.gz: 4954a15b606370a431abdefc253289c341e2d647
4
+ data.tar.gz: b9a7e416ec58b170053c8e6eccd03ff83730222c
5
5
  SHA512:
6
- metadata.gz: 353b22f722ddc2bd6952a738f20fe363e8bd694127e00d09cd3de0d021189930e058619722951db699cd2f5f500b8f072e73f0316f49312a0dcdb75dd62feb10
7
- data.tar.gz: 3e46c8ed9491b05e916177a717d1dd4a350f895f9e6a9102a180ccce211636efa5e406c10d5442b8b1604921b96e9b4bf2e83d30c0ea4d61101ab9b112231b8d
6
+ metadata.gz: 25fae3f7ffadec257d586c7ffa29d5d9a6c744a8743065a4acdfddc6277455283da8f3707d80c52ab2f6424c5356ebb064c3120c008150331c10628ba9ef834f
7
+ data.tar.gz: 8753f0d26b1b4974c7a4c2bd88d0f3748ed0fa2aac832281d30df941827c0531abc3dae92ab34c86ae893bde23ef6e5a8419cb99e1d6fbc6bebe06474021365a
data/README.md CHANGED
@@ -18,6 +18,10 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install utf8mb4rails
20
20
 
21
+ This gem uses [departure](https://github.com/departurerb/departure) a Percona's pt-online-schema-change runner for ActiveRecord migrations.
22
+
23
+ You need to have percona tools installed prior to using this gem. See instructions [here](https://github.com/departurerb/departure).
24
+
21
25
  ## Usage
22
26
 
23
27
  This gem will add in your rails project a new task called utf8mb4. This tast is aimed to easily convert tables in utf8 into
@@ -1,8 +1,6 @@
1
1
  require 'utf8mb4rails/version'
2
2
  require 'utf8mb4rails/migrator'
3
- require 'departure'
4
3
 
5
- Departure.configure do |_config|; end
6
4
  def usage
7
5
  puts
8
6
  puts 'Usage: '
@@ -22,6 +20,9 @@ module Utf8mb4rails
22
20
  namespace :db do
23
21
  desc 'migrates a table[/column] (TABLE, COLUMN env vars) to utf8mb encoding'
24
22
  task utf8mb4: :environment do
23
+ require 'departure'
24
+ Departure.configure do |_config|; end
25
+
25
26
  table = ENV['TABLE']
26
27
  unless table
27
28
  puts 'Please specify a table with TABLE='
@@ -32,7 +33,7 @@ module Utf8mb4rails
32
33
  column = ENV['COLUMN']
33
34
  runner = Migrator::Runner.new
34
35
  if column
35
- puts 'Migrating #{table}.#{column}'
36
+ puts "Migrating #{table}.#{column}"
36
37
  runner.migrate_column!(table, column)
37
38
  else
38
39
  puts 'No column specified, will migrate the entire table'
@@ -1,3 +1,3 @@
1
1
  module Utf8mb4rails
2
- VERSION = "0.1.0"
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utf8mb4rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Fernandez (magec)