geordi 10.0.0 → 10.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7ba836f9a4c3651c05372c9a6f0f09cc86a4ed192020c7a0e9def2b5742b76b
4
- data.tar.gz: 2668192b49eb8c16bcac3cdc1563f77b7d09c0759fa51ef7ea80288732fcb4dc
3
+ metadata.gz: 2c7bc7a0b4c7982397b4da62d99cc4679c5f5d30fcf521597272bfb939416b7e
4
+ data.tar.gz: 6976e0f9466a4fe4b34c72e717886e0d3bb8474e9d363ff4df1fe2606e983337
5
5
  SHA512:
6
- metadata.gz: 68a50772d7eca079e66034805f87362dca94fa969ee7bd3095fa5c64236af99c1e28658742fa9ff151f5930e23fed1035f57f8c432d3528545498e6f7fb58a76
7
- data.tar.gz: e24dc966d01cef499829b00337bb221cc662bfe080421010c72791bb0954388fb4d2fd13a42ce689405133870b976349b42b995443b354d2c04d6239f9c4934b
6
+ metadata.gz: ca94d0a41906b50c342dbc5e8c6bef1e17368fe7ea2eea6b4ce7f0ef9441ab1c27754b1f38fe9a149445a93506a19a52f54b305164d62944e136f7ae81d5a96c
7
+ data.tar.gz: 276578dab3ca5e01acc336176c22454a0f990403daf884ecb2193aade3dff24f41ccdbc3d3a2945d0b1707ef102742adb057b3f5d8a683f6a3aab826781aba21
data/CHANGELOG.md CHANGED
@@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
 
10
10
  ### Breaking changes
11
11
 
12
+ # 10.0.1 2024-05-23
13
+
14
+ ### Compatible changes
15
+ * `dump`-command: The dropdb and createdb commands now also mind the configuration in the database.yml.
12
16
 
13
17
  # 10.0.0 2024-03-07
14
18
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geordi (10.0.0)
4
+ geordi (10.0.1)
5
5
  thor (~> 1)
6
6
 
7
7
  GEM
@@ -61,15 +61,17 @@ module Geordi
61
61
  alias_method :mysql2_command, :mysql_command
62
62
 
63
63
  def postgresql_command
64
+ shared_command_arguments = ''
65
+ shared_command_arguments << ' --username=' << config['username'].to_s if config['username']
66
+ shared_command_arguments << ' --port=' << config['port'].to_s if config['port']
67
+ shared_command_arguments << ' --host=' << config['host'].to_s if config['host']
68
+
64
69
  ENV['PGPASSWORD'] = config['password']
65
- drop_command = 'dropdb --if-exists ' << config['database'].to_s
66
- create_command = 'createdb ' << config['database'].to_s
67
- restore_command = 'pg_restore --no-owner --no-acl'
68
- restore_command << ' --username=' << config['username'].to_s if config['username']
69
- restore_command << ' --port=' << config['port'].to_s if config['port']
70
- restore_command << ' --host=' << config['host'].to_s if config['host']
71
- restore_command << ' --dbname=' << config['database'].to_s
72
- restore_command << ' ' << dump_file
70
+ database_name = config['database'].to_s
71
+
72
+ drop_command = "dropdb --if-exists#{shared_command_arguments} #{database_name}"
73
+ create_command = "createdb#{shared_command_arguments} #{database_name}"
74
+ restore_command = "pg_restore --no-owner --no-acl#{shared_command_arguments} --dbname=#{database_name} #{dump_file}"
73
75
 
74
76
  drop_command + ' && ' + create_command + ' && ' + restore_command
75
77
  end
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '10.0.0'.freeze
2
+ VERSION = '10.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geordi
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 10.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-07 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubygems_version: 3.0.3
120
+ rubygems_version: 3.5.11
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Collection of command line tools we use in our daily work with Ruby, Rails