mysql_to_pg_dump 0.2.5 → 0.2.6

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: 5acd5ed19362efef222f8318314e2c188a808a10
4
- data.tar.gz: 2bb835504ec023ca2959c76a8fbe370b33bd332f
3
+ metadata.gz: d41270a1a741e8d0e5259deaf1fcbfc5a7d1742a
4
+ data.tar.gz: 201b082f724821dc69cdc3ace48c34b21d20fa19
5
5
  SHA512:
6
- metadata.gz: e6f42515310b89fe6b57603445e784bd10562c1c083f6f56fdecfc8c81d6afe5be4a39066f07130946fff174c6d04d5f287f5a48d5f255739b2ef4adf6d267b9
7
- data.tar.gz: 64fa2dacc7ad04a8d46d0e84503e2e2aa264a7437635b34c3a428d5ffa8f090bce53f30578206cf29e13160958389fddd282b6c1f6170fb1f881b9dd18ba1219
6
+ metadata.gz: 42d5e40c6c6fa64f889f14dbeaab8a5ebbd191b2e6bc0e911506c718d9c83524bc5f305eaaee01370146db91bb8b9f7658b32a4eefddb29f4f7ca3c4d82dcb92
7
+ data.tar.gz: f842d163123ac18baca339d4c6e4cc8a36804c84cb0a36885bd1a5d098aaff3cb0cc65638b53026428b36a0c8749f720e90356ea0d05d877c9e1a452fef23c70
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MysqlToPgDump
2
2
  This gem allows pull content from mysql db (on the remote server) and
3
3
  load it into your local postgres database.
4
- Technically, it is not a dump - but result is almost the same.
4
+ Technically, dump is not using - but result is almost the same.
5
5
 
6
6
  ## Usage
7
7
  Copy content of remote mysql db to tmp/db_server_data as .csv files.
@@ -55,9 +55,9 @@ module MysqlToPgDump
55
55
  end
56
56
 
57
57
  def uniq_string
58
- s = ""
59
- 20.times { s << ('0'..'9').to_a.sample }
60
- s
58
+ result = ""; numbers = ('0'..'9').to_a
59
+ 20.times { result << numbers.sample }
60
+ result
61
61
  end
62
62
 
63
63
  def show_db_info env
@@ -1,3 +1,3 @@
1
1
  module MysqlToPgDump
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
data/lib/tasks/db.rake CHANGED
@@ -40,14 +40,15 @@ namespace :db do
40
40
  task load: :environment do
41
41
  printf "Current env db data will be destroyed.\n".red
42
42
  printf "Are you sure? (y/n)\n"
43
- input = STDIN.gets.strip
43
+ confirm_input = STDIN.gets.strip
44
44
 
45
- if input == 'y'
45
+ if confirm_input == 'y'
46
46
  if data_already_pulled?
47
47
  clean_database
48
48
  db_tables.each do |t|
49
49
  system %(psql -d #{dev['database']} -c "#{psql_import_query(t)} #{psql_set_sequence(t)}")
50
50
  end
51
+ system 'clear'
51
52
  printf "Your db data now is equal to production\n".green
52
53
  else
53
54
  printf "No pulled data. Run 'rake db:pull' first\n".yellow
@@ -64,11 +65,11 @@ namespace :db do
64
65
  "deleted from /tmp successfully\n".green
65
66
  end
66
67
 
67
- desc "Pulls remote mysql db data, then loads it to " \
68
- "local postgres and cleans junk"
69
- task force: ['db:pull', 'db:pull:load', 'db:pull:clean']
70
-
71
68
  desc "Pulls remote mysql db data and loads it to local psql"
72
69
  task reload: ['db:pull', 'db:pull:load']
70
+
71
+ desc "Pulls remote mysql db data, then loads it to " \
72
+ "local postgres and cleans junk"
73
+ task force: ['db:pull:reload', 'db:pull:clean']
73
74
  end
74
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_to_pg_dump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimkarodinz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2016-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails