howzit 2.0.27 → 2.0.28
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/CHANGELOG.md +8 -0
- data/lib/howzit/task.rb +20 -17
- data/lib/howzit/topic.rb +7 -1
- data/lib/howzit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2a724cc90c349de14afa896512a32d69bcf2fa44575f69e74b0a6f96d615ebb
|
4
|
+
data.tar.gz: 73c54a8893fa66784575235d329ad698da6e7a34a2741e09d2d93149b118f68a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d4c9e0c7e5c78f10479cea93dffa09fdf768d335210897feb127f849040bced7a05924a60f6621173ececb1fde116fe5a3ecc79270767c12718b1a1f9742281
|
7
|
+
data.tar.gz: ff2c18f91883cf4f3b6035b8b304a23575381fd1b9a74333781db8ac000b13d03eb43969bb80d964e3dafeec3556a2152392b2eb074a34561981753233e1fc9e
|
data/CHANGELOG.md
CHANGED
data/lib/howzit/task.rb
CHANGED
@@ -56,11 +56,13 @@ module Howzit
|
|
56
56
|
script.write(block)
|
57
57
|
script.close
|
58
58
|
File.chmod(0o777, script.path)
|
59
|
-
system(%(/bin/sh -c "#{script.path}"))
|
59
|
+
res = system(%(/bin/sh -c "#{script.path}"))
|
60
60
|
ensure
|
61
61
|
script.close
|
62
62
|
script.unlink
|
63
63
|
end
|
64
|
+
|
65
|
+
res
|
64
66
|
end
|
65
67
|
|
66
68
|
##
|
@@ -85,7 +87,7 @@ module Howzit
|
|
85
87
|
def run_run
|
86
88
|
title = Howzit.options[:show_all_code] ? @action : @title
|
87
89
|
Howzit.console.info("{bg}Running {bw}#{title}{x}".c)
|
88
|
-
system(@action)
|
90
|
+
return system(@action)
|
89
91
|
end
|
90
92
|
|
91
93
|
##
|
@@ -95,6 +97,7 @@ module Howzit
|
|
95
97
|
title = Howzit.options[:show_all_code] ? @action : @title
|
96
98
|
Howzit.console.info("{bg}Copied {bw}#{title}{bg} to clipboard{x}".c)
|
97
99
|
Util.os_copy(@action)
|
100
|
+
return true
|
98
101
|
end
|
99
102
|
|
100
103
|
##
|
@@ -103,22 +106,22 @@ module Howzit
|
|
103
106
|
def run
|
104
107
|
output = []
|
105
108
|
tasks = 1
|
106
|
-
if @type == :block
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
109
|
+
res = if @type == :block
|
110
|
+
run_block
|
111
|
+
else
|
112
|
+
case @type
|
113
|
+
when :include
|
114
|
+
output, tasks = run_include
|
115
|
+
when :run
|
116
|
+
run_run
|
117
|
+
when :copy
|
118
|
+
run_copy
|
119
|
+
when :open
|
120
|
+
Util.os_open(@action)
|
121
|
+
end
|
122
|
+
end
|
120
123
|
|
121
|
-
[output, tasks]
|
124
|
+
[output, tasks, res]
|
122
125
|
end
|
123
126
|
|
124
127
|
##
|
data/lib/howzit/topic.rb
CHANGED
@@ -63,9 +63,15 @@ module Howzit
|
|
63
63
|
next unless res
|
64
64
|
|
65
65
|
end
|
66
|
-
run_output, total = task.run
|
66
|
+
run_output, total, success = task.run
|
67
|
+
|
67
68
|
output.concat(run_output)
|
68
69
|
tasks += total
|
70
|
+
|
71
|
+
unless success
|
72
|
+
Howzit.console.warn '{br}Error running task{bw} - non-zero exit, ending processing{x}'.c
|
73
|
+
break
|
74
|
+
end
|
69
75
|
end
|
70
76
|
else
|
71
77
|
Howzit.console.warn "{r}--run: No {br}@directive{xr} found in {bw}#{@title}{x}".c
|
data/lib/howzit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: howzit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|