rya 0.6.0 → 0.6.1
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/Gemfile.lock +1 -1
- data/lib/rya/core_extensions.rb +14 -4
- data/lib/rya/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d17c0c0ca582101d0d745d17097eb04f045220df
|
4
|
+
data.tar.gz: 5a77af9402db8fc782d80aed266fbbe208eeb858
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52fa718c1d7aefae67bf71f9e747fae67716f199b32c95576e76c69524409146ebf0314de829878167beff7308d2121f50817da6ccb5d1b24fdc1f18d838937b
|
7
|
+
data.tar.gz: 2d5e9bbe8e3a484c1103ea4e984b2c7ebf2a4db6ec34917b2e31144ad14bbae2055e19dcdbaeac934252ccaaa5321b5ba412cbaf4105b6818df12985d2910312
|
data/Gemfile.lock
CHANGED
data/lib/rya/core_extensions.rb
CHANGED
@@ -217,29 +217,39 @@ module Rya
|
|
217
217
|
|
218
218
|
# Run a command and time it as well!
|
219
219
|
#
|
220
|
+
# @param title Give your command a snappy title to log!
|
221
|
+
# @param cmd The actual command you want to run
|
222
|
+
# @param logger Something that responds to #info for printing. If nil, just print to STDERR.
|
223
|
+
# @param run If true, actually run the command, if false, then don't.
|
224
|
+
#
|
225
|
+
# @note The 'run' keyword argument is nice if you have some big pipeline and you need to temporarily prevent sections of the code from running.
|
226
|
+
#
|
220
227
|
# @example
|
221
228
|
#
|
222
229
|
# Process.extend Rya::CoreExtensions::Process
|
223
|
-
# Time.extend Rya::CoreExtensions::Time
|
224
230
|
#
|
225
231
|
# Process.run_and_time_it! "Saying hello",
|
226
232
|
# %Q{echo "hello world"}
|
227
233
|
#
|
234
|
+
# Process.run_and_time_it! "This will not run",
|
235
|
+
# "echo 'hey'",
|
236
|
+
# run: false
|
237
|
+
#
|
228
238
|
# Process.run_and_time_it! "This will raise SystemExit",
|
229
239
|
# "ls arstoeiarntoairnt"
|
230
240
|
def run_and_time_it! title = "",
|
231
241
|
cmd = "",
|
232
242
|
logger = Rya::AbortIf::logger,
|
243
|
+
run: true,
|
233
244
|
&b
|
234
245
|
|
235
|
-
|
246
|
+
time_it title, logger, run: run do
|
247
|
+
Rya::AbortIf.logger.debug { "Running: #{cmd}" }
|
236
248
|
|
237
|
-
time_it title, logger do
|
238
249
|
run_it! cmd, &b
|
239
250
|
end
|
240
251
|
end
|
241
252
|
end
|
242
|
-
|
243
253
|
end
|
244
254
|
end
|
245
255
|
|
data/lib/rya/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|