wordmove 3.2.3 → 4.0.0
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/lib/wordmove/exceptions.rb +2 -0
- data/lib/wordmove/hook.rb +8 -4
- data/lib/wordmove/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74eafcd0b3d4f911c3bc2f3513141b76aa071d5f
|
4
|
+
data.tar.gz: b98925e2826b67a0fbf94e4f3c3225d3a38ec148
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f61ef5c479a7cdd71d5891e6b43eb2a3d1643b3c83e3aa40a96e001f1df6a38fd099424f10207e157ebd31f699ee10ff9c89251c645e98d59e750f8e59067198
|
7
|
+
data.tar.gz: f3a8b4331b963e3d40a6f240ea62b380c8925f6b54fd3f99403e4512d5dbb5c29814feec8de5a9f044e2ae21a1e33b4749c3d669a01d1d4461da5cb09faddb47
|
data/lib/wordmove/exceptions.rb
CHANGED
@@ -5,4 +5,6 @@ module Wordmove
|
|
5
5
|
class ShellCommandError < StandardError; end
|
6
6
|
class ImplementInSubclassError < StandardError; end
|
7
7
|
class UnmetPeerDependencyError < StandardError; end
|
8
|
+
class RemoteHookException < StandardError; end
|
9
|
+
class LocalHookException < StandardError; end
|
8
10
|
end
|
data/lib/wordmove/hook.rb
CHANGED
@@ -16,14 +16,14 @@ module Wordmove
|
|
16
16
|
)
|
17
17
|
|
18
18
|
unless hooks.local_hooks.empty?
|
19
|
-
Wordmove::Hook::Local.run(hooks.local_hooks, cli_options[:simulate])
|
19
|
+
Wordmove::Hook::Local.run(hooks.local_hooks, options[:local], cli_options[:simulate])
|
20
20
|
end
|
21
21
|
|
22
22
|
return if hooks.remote_hooks.empty?
|
23
23
|
|
24
24
|
if options[environment][:ftp]
|
25
25
|
logger.debug "You have configured remote hooks to run over "\
|
26
|
-
"an FTP
|
26
|
+
"an FTP connection, but this is not possible. Skipping."
|
27
27
|
|
28
28
|
return
|
29
29
|
end
|
@@ -66,20 +66,23 @@ module Wordmove
|
|
66
66
|
parent.logger
|
67
67
|
end
|
68
68
|
|
69
|
-
def self.run(commands, simulate = false)
|
69
|
+
def self.run(commands, options, simulate = false)
|
70
70
|
logger.task "Running local hooks"
|
71
71
|
|
72
|
+
wordpress_path = options[:wordpress_path]
|
73
|
+
|
72
74
|
commands.each do |command|
|
73
75
|
logger.task_step true, "Exec command: #{command}"
|
74
76
|
return true if simulate
|
75
77
|
|
76
|
-
stdout_return =
|
78
|
+
stdout_return = `cd #{wordpress_path} && #{command} 2>&1`
|
77
79
|
logger.task_step true, "Output: #{stdout_return}"
|
78
80
|
|
79
81
|
if $CHILD_STATUS.exitstatus.zero?
|
80
82
|
logger.success ""
|
81
83
|
else
|
82
84
|
logger.error "Error code: #{$CHILD_STATUS.exitstatus}"
|
85
|
+
raise Wordmove::LocalHookException
|
83
86
|
end
|
84
87
|
end
|
85
88
|
end
|
@@ -110,6 +113,7 @@ module Wordmove
|
|
110
113
|
else
|
111
114
|
logger.task_step false, "Output: #{stderr}"
|
112
115
|
logger.error "Error code #{exit_code}"
|
116
|
+
raise Wordmove::RemoteHookException
|
113
117
|
end
|
114
118
|
end
|
115
119
|
end
|
data/lib/wordmove/version.rb
CHANGED
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:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2019-01-
|
15
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
313
|
version: '0'
|
314
314
|
requirements: []
|
315
315
|
rubyforge_project:
|
316
|
-
rubygems_version: 2.6.
|
316
|
+
rubygems_version: 2.6.11
|
317
317
|
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: Wordmove, Capistrano for Wordpress
|