kdeploy 1.2.28 → 1.2.29

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: 6e6d5731024f6c6038b668226945d6360dcd2e6abab1e68a54872b0e815bacd0
4
- data.tar.gz: 9c8505220dfb4999a9fa62a8607428b880b7bd954c7ecc9707b6dd5a72c65e25
3
+ metadata.gz: acbdbfe3b19c57b25f4de9b50dfe12f2bb63866bcd56fc81ef6e1906f136f75c
4
+ data.tar.gz: d6f9f8efc10329a9ff2f1ea9d7828a9d1000d53cc1b7413d776471a75ef42b82
5
5
  SHA512:
6
- metadata.gz: aa53413eb0414244474a7f1e838074ecdefa34ae7e146a7711abb04317babdeb1ae6b1492a5f33c2357fb311ab58657f19e4155eace3ad045e338f2b3891938b
7
- data.tar.gz: 26d4cd0add001ff1877f8fdc013f6ee89b9eb0d1fe6951cc197d202167613c9f69e85d8af10512cce08d7c76cdec1de5b208e2f595b4bb15a7a9754ecd680e4d
6
+ metadata.gz: 869e6f7e77bbda0e645384063eac441ee81ed4629f5bb1102240b455eda6bde5a3fb4e6b2afdcb249dfc2cb78819fec490ab12ca75e694ffabcfdfc05d9ade9e
7
+ data.tar.gz: 8a2c3c6c1ad3f8b9e2287c6d1cc942ef858b346c7652f8d475d74304ed62b81a4dde0f251af466339c10ea8a1decc2e69b19a80e4d9e98a37623d940b8bc74e3
@@ -56,24 +56,31 @@ module Kdeploy
56
56
  def execute_sync(command, host_name)
57
57
  source = command[:source]
58
58
  destination = command[:destination]
59
- ignore = command[:ignore] || []
60
- exclude = command[:exclude] || []
61
- delete = command[:delete] || false
62
-
63
- description = "sync: #{source} -> #{destination}"
64
- description += " (delete: #{delete})" if delete
59
+ description = build_sync_description(source, destination, command[:delete])
65
60
  show_command_header(host_name, :sync, description)
66
61
 
67
62
  result, duration = measure_time do
68
63
  @executor.sync_directory(
69
64
  source,
70
65
  destination,
71
- ignore: ignore,
72
- exclude: exclude,
73
- delete: delete
66
+ ignore: command[:ignore] || [],
67
+ exclude: command[:exclude] || [],
68
+ delete: command[:delete] || false
74
69
  )
75
70
  end
76
71
 
72
+ build_sync_result(source, destination, result, duration)
73
+ end
74
+
75
+ private
76
+
77
+ def build_sync_description(source, destination, delete)
78
+ desc = "sync: #{source} -> #{destination}"
79
+ desc += " (delete: #{delete})" if delete
80
+ desc
81
+ end
82
+
83
+ def build_sync_result(source, destination, result, duration)
77
84
  {
78
85
  command: "sync: #{source} -> #{destination}",
79
86
  duration: duration,
@@ -85,8 +92,6 @@ module Kdeploy
85
92
  }
86
93
  end
87
94
 
88
- private
89
-
90
95
  def measure_time
91
96
  start_time = Time.now
92
97
  result = yield
@@ -11,9 +11,7 @@ module Kdeploy
11
11
 
12
12
  def self.group_key_for(cmd)
13
13
  case cmd[:type]
14
- when :upload, :upload_template
15
- "#{cmd[:type]}_#{cmd[:source]}"
16
- when :sync
14
+ when :upload, :upload_template, :sync
17
15
  "#{cmd[:type]}_#{cmd[:source]}"
18
16
  when :run
19
17
  "#{cmd[:type]}_#{cmd[:command].to_s.lines.first.strip}"
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Kdeploy module for version management
4
4
  module Kdeploy
5
- VERSION = '1.2.28' unless const_defined?(:VERSION)
5
+ VERSION = '1.2.29' unless const_defined?(:VERSION)
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kdeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.28
4
+ version: 1.2.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kk