power-rake 0.1.5 → 0.2.0

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: d09a6395534509badadfe9143f1bb333b9408edd
4
- data.tar.gz: 2954261da4f60ded8d20e2cfbb1b49a4a2b29a18
3
+ metadata.gz: 39dc079dd672e08a45cc21168c164a1eb16551cd
4
+ data.tar.gz: 58a173ccf76be578abf8f33b6213b45a45cebc03
5
5
  SHA512:
6
- metadata.gz: 51406e6e1976368ee96c18c92e6f0f1f7a733013d308dfe902daa16a2c0f07e02d4a22e986b61c238324c1cbbd07ce3a17827ca7077e80d26a1b88c82f6fd0b4
7
- data.tar.gz: 52a0b89cd51980798d3f67cdf3a04d8bbf7e55cfffb8b4008854a5f78fc8d04699d1e6165e714e8721d0e79cff318d7046a6a2d8b85ba912c3c589895d9b081f
6
+ metadata.gz: c113ea7d6f754dff558e5415f8fd3a8aade99bff0a5cba90665e368ed8e92a7a79dddb140d4fec0995ea713a48b422de2d314d23ee6d32208a6127446379d1b0
7
+ data.tar.gz: c5c6d0513ea3e50d9ddbf143f538d988f141a04170af38902ada61559ab3a074d1a9eb5ff79baadb15a9f24618266f3c557cacbbdbac6adc68b240f619d352b3
@@ -2,8 +2,8 @@
2
2
 
3
3
  # Prompt with control flow
4
4
  # @param [String]
5
- def continue?(message = 'Continue? (y|n)')
6
- abort 'Aborted!' unless prompt(message).downcase == 'y'
5
+ def continue?(message = 'Continue? (y|n)', expectation = 'y')
6
+ abort 'Aborted!' unless prompt(message) == 'y'
7
7
  end
8
8
 
9
9
  # Inline message prompt
@@ -12,16 +12,3 @@ def prompt(*args)
12
12
  value = STDIN.gets.strip
13
13
  value unless value.empty?
14
14
  end
15
-
16
- # Try a system command
17
- # @param [string]
18
- def try(command)
19
- system(command) || abort("Aborted! `#{command}`")
20
- end
21
-
22
- # Prompt before trying a system command
23
- # @param [string]
24
- def try?(command)
25
- continue? "#{command}\nContinue? (y|n)"
26
- try(command)
27
- end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module PowerRake
3
- VERSION = '0.1.5'
3
+ VERSION = '0.2.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tulino