power-rake 0.0.11 → 0.1.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: 0ada05d4d8c2a66371c43b27c58a69a23da20294
4
- data.tar.gz: 4ef9c9da3c5b619f338fc315c0c73bc98229b341
3
+ metadata.gz: 7a179240bd33cf8ecdfb30940b79dcc7d6ae576d
4
+ data.tar.gz: f99aca840d3c25c7c9e580594ca41a246b40606d
5
5
  SHA512:
6
- metadata.gz: 8a69d9a8fa8228e576b45b661713abd7cadbcc1e8a50d2f8d97445ec7aa9c1b68496e0ebcd58b007b8b7094a1b50188c92b6ec061722642ea01279568f455cb7
7
- data.tar.gz: 476f77d763f92e62c1f85ff5105d1aadce3f81d1e4ff28aaec1e1359fd9d0aff63ab8c904e79bce69b67af76f09526be4f756274137a0aa8c2d40194eb01c638
6
+ metadata.gz: 2cdc9c971cb92e21ab345f74d5717d55eb4034a96643ec933789223ace79f3fea7f89f1ad2557a19023ecf078054c9723f53b54abb4905e14f84674b61065147
7
+ data.tar.gz: 4ddca1cd225156c6d335c0e8b391f413f391eb66e270b2068065af3eff6171817379ebdf85d793827150f03f70fd4ab7aa9f9d854fd6bed6f2ddbb6aa27d28b6
data/lib/power-rake.rb CHANGED
@@ -1,28 +1,2 @@
1
1
  # frozen_string_literal: true
2
-
3
- # Prompt with control flow
4
- # @param [String]
5
- def continue?(message = 'Continue? (y|n)')
6
- abort 'Aborted!' unless prompt(message).downcase == 'y'
7
- end
8
-
9
- # Inline message prompt
10
- # @param [String]
11
- def prompt(message)
12
- print message
13
- STDIN.gets.strip
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
- puts command
26
- continue?
27
- try(command)
28
- end
2
+ Rake.application.add_import('lib/power-rake/common.rb')
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Prompt with control flow
4
+ # @param [String]
5
+ def continue?(message = 'Continue? (y|n)')
6
+ abort 'Aborted!' unless prompt(message).downcase == 'y'
7
+ end
8
+
9
+ # Inline message prompt
10
+ # @param [String]
11
+ def prompt(message)
12
+ print message
13
+ STDIN.gets.strip
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
+ puts command
26
+ continue?
27
+ try(command)
28
+ end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module PowerRake
2
- VERSION = '0.0.11'
3
+ VERSION = '0.1.0'
3
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.0.11
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tulino
@@ -31,6 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/power-rake.rb
34
+ - lib/power-rake/common.rb
34
35
  - lib/power-rake/version.rb
35
36
  homepage: http://rubygems.org/gems/power-rake
36
37
  licenses: