mysql_db_tool 0.4.0 → 0.4.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: fdecb06617c9937d6c99c95a6f3dc167dff3398a05d7cdfd1c7d27e072204222
4
- data.tar.gz: cb1bbc19b30dd0f1208f470254c4737eff569f641d4df76c94a3f0e5340b71d6
3
+ metadata.gz: 7b51856f5b5dc1e95daf56bfb215edef9a3a4ced392cad7fdcb99f83f5956e09
4
+ data.tar.gz: 60eae7d024f7d9fa6457b929f47c3ce5e890a6de6bb9ca7e300033250a7c1145
5
5
  SHA512:
6
- metadata.gz: a4b72b0ae34adf46c5dd689e3192d85b25d3d11607d96c2eb4bab7e192d518c30f049593ddadba81e2cede2fa028c3d8f8cefc2ce0379154b4ba7fb60f7e489e
7
- data.tar.gz: 4b941a0eb4851b49405dc6bfbbcbfc78c46f13b659903654e37212dac7eda213e52b2815fc7e4839fd40af66d24faa4eba133935c0fceef1dfc26814a0c4e4cc
6
+ metadata.gz: 88b5e23657d090a1c3327da8a9e1ad189192e37451df741ab4da451daf881c5cdeaa2635431b0ef4046cb1c6093a80619065ba9b04ca14735d21a06b14226502
7
+ data.tar.gz: 95a1efb08ead4a9e772fa4a32058395b5b51772101f7f544e84f23d7fc93c4e7cb4b66c8a52da7706f56f3f62eb0ca5375962edf440d5fb2caf9522f966aca8a
data/README.md CHANGED
@@ -39,6 +39,8 @@ Create a config-<env>.json file under the current directory according to the dat
39
39
  gem install mysql_db_tool
40
40
  ```
41
41
 
42
+ [Example script](docs/examples.md)
43
+
42
44
  ## Data backup
43
45
 
44
46
  ```shell
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  def run(is_run, command)
4
2
  if not is_run
5
3
  puts "[dryRun] #{command}"
@@ -14,7 +12,12 @@ def backup_dir_name(id, db_name = "")
14
12
  end
15
13
 
16
14
  def mysql_default_options(db_info, database)
17
- " --ssl-mode=disabled -h #{db_info[:host]} -u #{db_info[:user]} #{db_info[:password].to_s.empty? ? '' : " -p'#{db_info[:password]}'"} #{db_info[:port].to_s.empty? ? '' : " -P'#{db_info[:port]}'"} #{database} "
15
+ dump_options = ENV['DUMP_OPTIONS'] || ''
16
+ ssl_mode_disabled = '--ssl-mode=disabled'
17
+ # Remove default --ssl-mode=disabled if any --ssl-mode is present in DUMP_OPTIONS
18
+ ssl_mode = dump_options.include?('--ssl-mode')
19
+ ssl_mode_disabled = '' if ssl_mode
20
+ " #{ssl_mode_disabled} -h #{db_info[:host]} -u #{db_info[:user]} #{db_info[:password].to_s.empty? ? '' : " -p'#{db_info[:password]}'"} #{db_info[:port].to_s.empty? ? '' : " -P'#{db_info[:port]}'"} #{database} "
18
21
  end
19
22
 
20
23
  def verify_tools_exist
@@ -1,5 +1,5 @@
1
1
  # lib/mysql_db_tool/version.rb
2
2
 
3
3
  module MySQLDBTool
4
- VERSION = "0.4.0"
5
- end
4
+ VERSION = "0.4.1"
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_db_tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soonoh Jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-17 00:00:00.000000000 Z
11
+ date: 2025-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler