thrush 0.0.3 → 0.0.4
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 +8 -8
- data/lib/thrush.rb +13 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTA5ZDMxOWQxODI2ZmQ0YTViMGFmN2M0N2FjYzdkMTk0ODAxZWU2ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDNkYmI3Y2NjYTA1ZjlhODllMWRmNTViOWFiODEyZDcwMGY2ZmY0ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTEwZGI1ZDBhOTJlZGZhN2ZlYjcxZTZkN2JkZGQ3NDIzMDc4MmViZGQxOWEy
|
10
|
+
MTQ4YmQwNTU1MGM1MDdlNjA1NzZlNTI3OGRiMGEzMDMxNGFjMzAzZjg2NDBm
|
11
|
+
MzIwY2Q1NTkxZmQ4YmFkMjVhZTc5ZWFjYzllMjYzM2E3YTIxOWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGE0MzViNTBmNmE5NTcyZTgwNGYyM2U2ZDdiN2JkMWEwNzBjYWRiNDY4ZThj
|
14
|
+
YTk3NmY5Nzk3MjU1OWY5YTcwODA0YjU3NTQzNTAzZWRiNTdjNzIwYjc4OThj
|
15
|
+
MzNmM2I1ZGQ0OTAwN2M4NjA0NjhkZTZlMjM0NmU0ZGUwZDk5MjA=
|
data/lib/thrush.rb
CHANGED
@@ -113,13 +113,14 @@ def header(h)
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def run!
|
116
|
+
client = env(:client).nil? ? 'Thrush' : env(:client)
|
116
117
|
if @flags.has_key?(:help)
|
117
|
-
puts header("
|
118
|
+
puts header("#{ client } client help for (ENV = #{ @current_env.upcase })").blue.bold
|
118
119
|
puts "#{ env(:help) }\n"
|
119
120
|
exit
|
120
121
|
end
|
121
122
|
|
122
|
-
puts header("
|
123
|
+
puts header("#{ client } client for (ENV = #{ @current_env.upcase })").blue.bold
|
123
124
|
puts "** DEBUG MODE **".yellow if debug?
|
124
125
|
i = 1
|
125
126
|
|
@@ -152,21 +153,24 @@ def run!
|
|
152
153
|
end
|
153
154
|
when :rsync
|
154
155
|
debug = debug? ? 'n' : ''
|
155
|
-
|
156
|
-
cmd = ["rsync -#{ debug }vazcO --no-o --no-g"]
|
156
|
+
rsh = cmd_vals(:rsh, cmd_values)
|
157
157
|
|
158
|
-
|
158
|
+
# TODO: The default rsync values I've hardcoded including --no-o, --no-g and other defaults should be flags that someone can pass in.
|
159
|
+
cmd = []
|
160
|
+
cmd << 'sudo' if rsh.nil? && sudo
|
161
|
+
cmd << "rsync -#{ debug }vazcO --no-o --no-g"
|
159
162
|
cmd << "--rsh=#{ rsh }" unless rsh.nil?
|
160
|
-
|
161
163
|
cmd << "--exclude '.git' --exclude '.idea' --exclude '.DS_Store'"
|
162
164
|
|
163
165
|
ignore = cmd_vals(:ignore, cmd_values)
|
164
166
|
ignore.each { |exclude| cmd << "--exclude '#{ exclude }'" } unless ignore.nil? || ignore.empty?
|
165
167
|
|
166
|
-
|
168
|
+
if rsh == 'sync'
|
169
|
+
cmd << "--rsync-path='sudo rsync'" if sudo
|
167
170
|
|
168
|
-
|
169
|
-
|
171
|
+
path = cmd_vals(:path, cmd_values)
|
172
|
+
cmd << "--rsync-path='#{ path }'" unless path.nil? || path.empty?
|
173
|
+
end
|
170
174
|
|
171
175
|
cmd << cmd_vals(:src, cmd_values)
|
172
176
|
|