]>
gitweb.michael.orlitzky.com - mailshears.git/blob - lib/mv/mv_dummy_runner.rb
1 require 'common/runner'
6 def run(plugin
, src
, dst
)
8 if src
.is_a
?(Domain
) or dst
.is_a
?(Domain
) then
9 msg
= 'only users can be moved'
10 raise NotImplementedError
.new(msg
)
13 # Since we're not actually moving anything, the destination
14 # description is really only useful for seeing whether or not we'd
15 # be trying to move in on top of an existing account.
16 src_description
= plugin
.describe(src
)
17 dst_description
= plugin
.describe(dst
)
19 msg
= "Would move user #{src} "
21 # Only append the extra description if it's useful.
22 if not src_description
.nil? and
23 not src_description
.empty
? and
24 not src_description
== src
.to_s() then
25 msg +
= "(#{src_description}) "
30 # Only append the extra description if it's useful.
31 if not dst_description
.nil? and
32 not dst_description
.empty
? and
33 not dst_description
== dst
.to_s() then
34 msg +
= " (#{dst_description})"