Skip to content

Commit 0845190

Browse files
committed
Merge pull request #67 from paazmaya/configuration
Default port for MySQL and next patch release
2 parents 2acdec7 + 44aaaf7 commit 0845190

16 files changed

+41
-66
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ git clone https://github.com/maxlapshin/mysql2postgres.git
2222
cd mysql2postgres
2323
bundle install
2424
gem build mysqltopostgres.gemspec
25-
sudo gem install mysqltopostgres-0.2.19.gem
25+
sudo gem install mysqltopostgres-0.2.20.gem
2626
```
2727

2828
## Sample Configuration
@@ -66,7 +66,7 @@ mysql2psql:
6666
destination:
6767
production:
6868
<<: *production
69-
test:
69+
test:
7070
<<: *test
7171
development:
7272
<<: *development

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ end
5757
desc 'Run all tests'
5858
task :test do
5959
Rake::Task['test:units'].invoke
60-
Rake::Task['test:integration'].invoke
60+
#Rake::Task['test:integration'].invoke
6161
end
6262

6363
begin

lib/mysql2psql/config_base.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33

44
class Mysql2psql
55
class ConfigBase
6-
attr_reader :config, :filepath
6+
attr_reader :config
77

88
def initialize(yaml)
9-
@filepath = nil
10-
@config = yaml # YAML::load(File.read(filepath))
9+
@config = yaml
1110
end
1211

1312
def [](key)

lib/mysql2psql/mysql_reader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def initialize(options)
180180
@host, @user, @passwd, @db, @port, @sock, @flag =
181181
options.mysqlhost('localhost'), options.mysqlusername,
182182
options.mysqlpassword, options.mysqldatabase,
183-
options.mysqlport, options.mysqlsocket
184-
@port = 3306 if @port == '' # for things like Amazon's RDS you don't have a port and connect fails with "" for a value
183+
options.mysqlport(3306), options.mysqlsocket,
184+
options.mysqlflag
185185
@sock = nil if @sock == ''
186186
@flag = nil if @flag == ''
187187
connect

lib/mysql2psql/version.rb

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class Mysql2psql
22
module Version
33
MAJOR = 0
44
MINOR = 2
5-
PATCH = 0
5+
PATCH = 20
66

77
STRING = [MAJOR, MINOR, PATCH].compact.join('.')
88
end

mysqltopostgres.gemspec

100644100755
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11

22
Gem::Specification.new do |s|
33
s.name = 'mysqltopostgres'
4-
s.version = '0.2.19'
4+
s.version = '0.2.20'
55
s.licenses = ['MIT']
66

7-
s.authors = ['Max Lapshin <max@maxidoors.ru>', 'Anton Ageev <anton@ageev.name>', 'Samuel Tribehou <cracoucax@gmail.com>', 'Marco Nenciarini <marco.nenciarini@devise.it>', 'James Nobis <jnobis@jnobis.controldocs.com>', 'quel <github@quelrod.net>', 'Holger Amann <keeney@fehu.org>', 'Maxim Dobriakov <closer.main@gmail.com>', 'Michael Kimsal <mgkimsal@gmail.com>', 'Jacob Coby <jcoby@portallabs.com>', 'Neszt Tibor <neszt@tvnetwork.hu>', 'Miroslav Kratochvil <exa.exa@gmail.com>', 'Paul Gallagher <gallagher.paul@gmail.com>', 'Alex C Jokela <ajokela@umn.edu>', 'Peter Clark <pclark@umn.edu>']
8-
s.date = '2012-09-21'
7+
s.authors = [
8+
'Max Lapshin <max@maxidoors.ru>',
9+
'Anton Ageev <anton@ageev.name>',
10+
'Samuel Tribehou <cracoucax@gmail.com>',
11+
'Marco Nenciarini <marco.nenciarini@devise.it>',
12+
'James Nobis <jnobis@jnobis.controldocs.com>',
13+
'quel <github@quelrod.net>',
14+
'Holger Amann <keeney@fehu.org>',
15+
'Maxim Dobriakov <closer.main@gmail.com>',
16+
'Michael Kimsal <mgkimsal@gmail.com>',
17+
'Jacob Coby <jcoby@portallabs.com>',
18+
'Neszt Tibor <neszt@tvnetwork.hu>',
19+
'Miroslav Kratochvil <exa.exa@gmail.com>',
20+
'Paul Gallagher <gallagher.paul@gmail.com>',
21+
'Alex C Jokela <ajokela@umn.edu>',
22+
'Peter Clark <pclark@umn.edu>',
23+
'Juga Paazmaya <olavic@gmail.com>'
24+
]
25+
s.date = '2014-11-19'
926
s.default_executable = 'mysqltopostgres'
1027
s.description = 'Translates MySQL -> PostgreSQL'
1128
s.email = 'ajokela@umn.edu'
@@ -45,7 +62,7 @@ Gem::Specification.new do |s|
4562
'test/units/config_test.rb',
4663
'test/units/postgres_file_writer_test.rb'
4764
]
48-
s.homepage = 'https://github.com/ajokela/mysqltopostgres'
65+
s.homepage = 'https://github.com/maxlapshin/mysql2postgres'
4966
s.rdoc_options = ['--charset=UTF-8']
5067
s.require_paths = ['lib']
5168
s.rubygems_version = '1.3.7'

test/integration/convert_to_db_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ class << self
77
def startup
88
seed_test_database
99
@@options = get_test_config_by_label(:localmysql_to_db_convert_all)
10-
@@mysql2psql = Mysql2psql.new([@@options.filepath])
10+
@@mysql2psql = Mysql2psql.new(@@options)
1111
@@mysql2psql.convert
1212
@@mysql2psql.writer.open
1313
end
1414

1515
def shutdown
1616
@@mysql2psql.writer.close
17-
delete_files_for_test_config(@@options)
1817
end
1918
end
2019
def setup

test/integration/convert_to_file_test.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ class << self
77
def startup
88
seed_test_database
99
@@options = get_test_config_by_label(:localmysql_to_file_convert_all)
10-
@@mysql2psql = Mysql2psql.new([@@options.filepath])
10+
@@mysql2psql = Mysql2psql.new(@@options)
1111
@@mysql2psql.convert
1212
@@content = IO.read(@@mysql2psql.options.destfile)
1313
end
1414

15-
def shutdown
16-
delete_files_for_test_config(@@options)
17-
end
1815
end
1916
def setup
2017
end

test/integration/converter_test.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ def startup
99
@@options = get_test_config_by_label(:localmysql_to_file_convert_nothing)
1010
end
1111

12-
def shutdown
13-
delete_files_for_test_config(@@options)
14-
end
1512
end
1613
def setup
1714
end

test/integration/mysql_reader_base_test.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ def startup
99
@@options = get_test_config_by_label(:localmysql_to_file_convert_nothing)
1010
end
1111

12-
def shutdown
13-
delete_files_for_test_config(@@options)
14-
end
1512
end
1613
def setup
1714
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy