wordmove 6.0.0.alpha.2 → 6.0.0.alpha.3

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: 6a182f54bea0a027d35316cdf368c0c3c98a706bdc3bfbc176190fb7928a98df
4
- data.tar.gz: 21ad918da1375bff9004661fcc6f2a3a951fe075b2d9baa722230137d0df7648
3
+ metadata.gz: 940d75a3bdf8e78dfff726d64c99c2a303ed0d0323c596df8617a1dc7d3e23ee
4
+ data.tar.gz: 5b1c355dc1bfd4111f9f1f3cabdfae9f248dd1c4437b3111d4555b70bf6ec02f
5
5
  SHA512:
6
- metadata.gz: 566f88fff0e931d3c9df3cb3a5f121be2e9f43ab8ba6ed7e5f33db3168e84f5b92b8c8b34cee36ef2304d4c478ee1fffbbcf64b3d6864fe6b0cddd2017e64bab
7
- data.tar.gz: a2ccc8a72bfb597a600acfdffe0e1df4800e5bf34c0dc66d21fbf6d12c9c0f4163585a025cb37ea67f0d79adcfeef6ab901a18be5dddc099d17b0848c3bb7f60
6
+ metadata.gz: 6627537b7592ba9453612c3eea7cce646ab54e8c8383c0b76fa19f6f68dd6f66a5ddb6e82739606e5a8cf5972bff566f7d5a454e9f61b46289f6a43bf543f5c0
7
+ data.tar.gz: d12311a3fdd3d48e1fe041a7c58f90337364b281e9c63bda4299fcf23e50712489949860a690c803927b77d721325f962ce9fd2de8e7934ad8217ee33559272e
@@ -20,7 +20,7 @@ module Wordmove
20
20
  # @param logger [Wordmove::Logger]
21
21
  # @!scope class
22
22
  # @return [LightService::Context] Action's context
23
- executed do |context|
23
+ executed do |context| # rubocop:disable Metrics/BlockLength
24
24
  next context if context.database_task == false
25
25
 
26
26
  context.logger.task 'Backup local DB'
@@ -16,7 +16,7 @@ module Wordmove
16
16
  # @param logger [Wordmove::Logger]
17
17
  # @!scope class
18
18
  # @return [LightService::Context] Action's context
19
- executed do |context|
19
+ executed do |context| # rubocop:disable Metrics/BlockLength
20
20
  next context if context.database_task == false
21
21
 
22
22
  context.logger.task 'Cleanup'
@@ -66,7 +66,12 @@ module Wordmove
66
66
  cli_options: context.cli_options,
67
67
  remote_file: context.db_paths.remote.gzipped_path
68
68
  )
69
- context.fail_and_return!(result.message) if result.failure?
69
+ if result.failure?
70
+ context.logger.warning 'Failed to delete remote file ' \
71
+ "#{context.db_paths.remote.gzipped_path} because: " \
72
+ "#{result.message}" \
73
+ '. Manual intervention required'
74
+ end
70
75
 
71
76
  context.logger.success(
72
77
  "Remote DB dump downloaded in #{context.db_paths.local.gzipped_path}"
@@ -36,7 +36,7 @@ module Wordmove
36
36
  end
37
37
 
38
38
  def up_to_date?
39
- `wp cli check-update --format=json`.empty?
39
+ `wp cli check-update --format=json --allow-root`.empty?
40
40
  end
41
41
  end
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module Wordmove
2
- VERSION = '6.0.0.alpha.2'.freeze
2
+ VERSION = '6.0.0.alpha.3'.freeze
3
3
  end
@@ -75,7 +75,10 @@ module Wordmove
75
75
  # @!scope class
76
76
  # @!visibility private
77
77
  def load_from_wpcli
78
- wpcli_config = JSON.parse(`wp cli param-dump --with-values`, symbolize_names: true)
78
+ wpcli_config = JSON.parse(
79
+ `wp cli param-dump --with-values --allow-root`,
80
+ symbolize_names: true
81
+ )
79
82
  wpcli_config.dig(:path, :current)
80
83
  rescue JSON::ParserError => _e
81
84
  nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordmove
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.alpha.2
4
+ version: 6.0.0.alpha.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna