pgtk 0.9.1 → 0.9.2

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
  SHA256:
3
- metadata.gz: 0cdeccc0e450065c83781128c70c55fb51a7ea539b0825f2489d17a73f4d130c
4
- data.tar.gz: 3e0e70bbf2fe76c2f355691b91d6a537a96e2a75d4826ff223ecd51daf209b24
3
+ metadata.gz: 5b201e77d472e16891cd9b86c0c403431319b14f651be6f4f8891f1d4373b346
4
+ data.tar.gz: 764f9a225a0025b0c88457bb1875e1b11c8c972a487482547427dbee0af02748
5
5
  SHA512:
6
- metadata.gz: 0ace41790bf37bf7319ef64c3ab4265aa12acd32d278f1eef52e828d2e1ea2a93913f0f5cd6be91cd63531b3ecdafcbeac74a7bebca53e2c1f04cd9fc4995adc
7
- data.tar.gz: 4c9794a675196ca1d15aff36f7534f12764425bae8e24dc1e6e781712cc9cce00bfd51499e6e06c9785312d76a03ee7e992c353e6d2cd06447f3ddbcce477c3b
6
+ metadata.gz: 73e7225c5e2fb009a170df8bf047323e023751ec185c62aaa21479620020e1939f834b9358f417950aaf9bcc04469cdefd8c0e716401f66eaebf4fc56ae969b6
7
+ data.tar.gz: 20d725cf5522d2342b4ea894c4eb6b4177baa5906687a89e5d9b0ee827100bbd8594f6e9c2f996f0632717ccb6e4bccb370b861ab32d38b429791ebd2587b4fa
data/.rubocop.yml CHANGED
@@ -24,6 +24,6 @@ Metrics/ClassLength:
24
24
  Metrics/MethodLength:
25
25
  Max: 100
26
26
  Metrics/PerceivedComplexity:
27
- Max: 12
27
+ Max: 15
28
28
  Metrics/ParameterLists:
29
29
  Max: 6
@@ -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.changeLogFile=#{@master}",
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
@@ -28,5 +28,5 @@ require_relative '../pgtk'
28
28
  # License:: MIT
29
29
  module Pgtk
30
30
  # Current version of the library.
31
- VERSION = '0.9.1'
31
+ VERSION = '0.9.2'
32
32
  end
@@ -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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgtk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko