rya 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eb2fd69948270d6e98f44081e99ca387451f9d8
4
- data.tar.gz: e37122a07b4a149e0b96b7bd8be1b7de2efd4e8c
3
+ metadata.gz: d17c0c0ca582101d0d745d17097eb04f045220df
4
+ data.tar.gz: 5a77af9402db8fc782d80aed266fbbe208eeb858
5
5
  SHA512:
6
- metadata.gz: 0d664d9d6e4fc3ac2c9e2194f4beca9bfadf2396936f7efe8e41e8944f883f34cbf13602dd98bd94c411f6a22ca65d9aa5d1e57ac2be6dbbe83c7ddd49d3e9e5
7
- data.tar.gz: 9df918880d832efdd5c9821a2f660efa6c51c33d8c250f7ab3f33a6ea56278f291f9d9c3e141bcbf075dc297493922e97b862bdc33bc81ed2fc29a5213da7aa7
6
+ metadata.gz: 52fa718c1d7aefae67bf71f9e747fae67716f199b32c95576e76c69524409146ebf0314de829878167beff7308d2121f50817da6ccb5d1b24fdc1f18d838937b
7
+ data.tar.gz: 2d5e9bbe8e3a484c1103ea4e984b2c7ebf2a4db6ec34917b2e31144ad14bbae2055e19dcdbaeac934252ccaaa5321b5ba412cbaf4105b6818df12985d2910312
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rya (0.6.0)
4
+ rya (0.6.1)
5
5
  abort_if (~> 0.2.0)
6
6
  systemu (~> 2.6, >= 2.6.5)
7
7
 
@@ -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
- Rya::AbortIf.logger.debug { "Running: #{cmd}" }
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
 
@@ -1,3 +1,3 @@
1
1
  module Rya
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2019-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler