pgtk 0.9.1 → 0.9.2
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 +4 -4
- data/.rubocop.yml +1 -1
- data/lib/pgtk/liquibase_task.rb +4 -1
- data/lib/pgtk/version.rb +1 -1
- data/test/test_liquibase_task.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b201e77d472e16891cd9b86c0c403431319b14f651be6f4f8891f1d4373b346
|
4
|
+
data.tar.gz: 764f9a225a0025b0c88457bb1875e1b11c8c972a487482547427dbee0af02748
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e7225c5e2fb009a170df8bf047323e023751ec185c62aaa21479620020e1939f834b9358f417950aaf9bcc04469cdefd8c0e716401f66eaebf4fc56ae969b6
|
7
|
+
data.tar.gz: 20d725cf5522d2342b4ea894c4eb6b4177baa5906687a89e5d9b0ee827100bbd8594f6e9c2f996f0632717ccb6e4bccb370b861ab32d38b429791ebd2587b4fa
|
data/.rubocop.yml
CHANGED
data/lib/pgtk/liquibase_task.rb
CHANGED
@@ -72,6 +72,7 @@ More about this file you can find in Liquibase documentation: \
|
|
72
72
|
https://docs.liquibase.com/concepts/changelogs/xml-format.html"
|
73
73
|
end
|
74
74
|
pom = File.expand_path(File.join(__dir__, '../../resources/pom.xml'))
|
75
|
+
old = @liquibase_version.match?(/^[1-3]\..+$/)
|
75
76
|
Dir.chdir(File.dirname(@master)) do
|
76
77
|
system(
|
77
78
|
[
|
@@ -87,7 +88,9 @@ https://docs.liquibase.com/concepts/changelogs/xml-format.html"
|
|
87
88
|
'--define',
|
88
89
|
"postgresql.version=#{@postgresql_version}",
|
89
90
|
'--define',
|
90
|
-
"liquibase.
|
91
|
+
"liquibase.searchPath=#{File.dirname(@master)}",
|
92
|
+
'--define',
|
93
|
+
"liquibase.changeLogFile=#{old ? @master : File.basename(@master)}",
|
91
94
|
'--define',
|
92
95
|
"liquibase.url=#{Shellwords.escape(yml['pgsql']['url'])}",
|
93
96
|
'--define',
|
data/lib/pgtk/version.rb
CHANGED
data/test/test_liquibase_task.rb
CHANGED
@@ -54,6 +54,27 @@ class TestLiquibaseTask < Minitest::Test
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
def test_latest_version
|
58
|
+
Dir.mktmpdir 'test' do |dir|
|
59
|
+
Pgtk::PgsqlTask.new(:pgsql) do |t|
|
60
|
+
t.dir = File.join(dir, 'pgsql')
|
61
|
+
t.user = 'xxx'
|
62
|
+
t.password = 'xxx'
|
63
|
+
t.dbname = 'xxx'
|
64
|
+
t.yaml = File.join(dir, 'xxx.yml')
|
65
|
+
t.quiet = true
|
66
|
+
end
|
67
|
+
Rake::Task['pgsql'].invoke
|
68
|
+
Pgtk::LiquibaseTask.new(:liquibase) do |t|
|
69
|
+
t.master = File.join(__dir__, '../test-resources/master.xml')
|
70
|
+
t.yaml = File.join(dir, 'xxx.yml')
|
71
|
+
t.postgresql_version = '42.7.1'
|
72
|
+
t.liquibase_version = '4.25.1'
|
73
|
+
end
|
74
|
+
Rake::Task['liquibase'].invoke
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
57
78
|
def test_with_invalid_master_file
|
58
79
|
Pgtk::LiquibaseTask.new(:lb) do |t|
|
59
80
|
t.master = 'the-file-doesnt-exist.xml'
|