runfile 0.7.0 → 0.7.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: 45bf6efe3fbf5afdb2e64292cab5ec675ff1930b
4
- data.tar.gz: 304c5f384ec15e0311654b8cd8e383442c2132fc
3
+ metadata.gz: c5508b3065740db4ea5b4456a3a7867454e2c1a2
4
+ data.tar.gz: ab269e6c6dcfdc189c3855bb2b4b8b7f6e181ce7
5
5
  SHA512:
6
- metadata.gz: bdc1b161acd30d43cb447fdb06bb6e9ccaf0214389daac3469169a1d1fb5961ad8c96e2ab75a862d6e4d8bce8457d7c894ee25bbbdb4f2289d8886a2cd20e794
7
- data.tar.gz: 653e5140d60b20fac61eec1747dadc1ba4e9823fe36222d104c41bc0760f3431c3ebf1a0d326c94ced91f6868a828247764310c424601ff783111e226c31b763
6
+ metadata.gz: c4a7562a2b700b3e9bc61a93acb987593529abe0c1b4d00e748adb08d02adb030321f3bfd59b81c2b256ac39417f0bcb26da92b1d5d52923cf036d855bbfb97e
7
+ data.tar.gz: 9a3152f5b67b0ec9258bfd607540e8598eae111626fd02f86be1b2c7efb2f5bb9677e5f9f0b34ab47ad6e697e72b3b74bd80bf5e0b1973e6d63942469a16c745
data/README.md CHANGED
@@ -36,7 +36,7 @@ Install
36
36
  Quick Start
37
37
  --------------------------------------------------
38
38
 
39
- $ run make # create a new Runfile
39
+ $ run new # create a new Runfile
40
40
  $ run --help # show the usage patterns
41
41
  $ vi Runfile # edit the Runfile
42
42
 
@@ -5,20 +5,20 @@ module Runfile
5
5
 
6
6
  # The RunfileHelper class assists in:
7
7
  # 1. Finding named.runfiles
8
- # 2. Creating new runfiles (`run make`)
8
+ # 2. Creating new runfiles (`run new`)
9
9
  # 3. Showing a list of found system runfiles in a colorful help
10
10
  class RunfileHelper
11
11
  include SettingsMixin
12
12
 
13
13
  # Handle the case when `run` is called without a Runfile
14
- # present. We will let the user know they can type `run make`
14
+ # present. We will let the user know they can type `run new`
15
15
  # to create a new sample Runfile.
16
16
  # If the first argument matches the name of a *.runfile name,
17
17
  # we will return it to the caller. Otherwise, we return false
18
18
  # to indicate "no further handling is needed".
19
19
  def handle(argv)
20
20
  # make a new runfile
21
- if argv[0] == "make"
21
+ if argv[0] == "new" && !settings_present?
22
22
  make_runfile argv[1]
23
23
  return false
24
24
  end
@@ -74,7 +74,7 @@ module Runfile
74
74
  def show_make_help(runfiles, compact=false)
75
75
  say "!txtpur!Runfile engine v#{Runfile::VERSION}" unless compact
76
76
  if runfiles.size < 3 and !compact
77
- say "\nTip: Type '!txtblu!run make!txtrst!' or '!txtblu!run make name!txtrst!' to create a runfile.\nFor global access, place !txtblu!named.runfiles!txtrst! in ~/runfile/ or in /etc/runfile/."
77
+ say "\nTip: Type '!txtblu!run new!txtrst!' or '!txtblu!run new name!txtrst!' to create a runfile.\nFor global access, place !txtblu!named.runfiles!txtrst! in ~/runfile/ or in /etc/runfile/."
78
78
  end
79
79
  if runfiles.empty?
80
80
  say "\n!txtred!Runfile not found."
@@ -25,6 +25,10 @@ module Runfile
25
25
  def settings
26
26
  @settings ||= Settings.new.as_struct
27
27
  end
28
+
29
+ def settings_present?
30
+ File.file?('.runfile')
31
+ end
28
32
  end
29
33
 
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module Runfile
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-07 00:00:00.000000000 Z
11
+ date: 2016-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole