runfile 0.4.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8573e778f7613b6aa1f2195701e35e9c43a41d39
4
- data.tar.gz: a718391979ede594e166b07f4fab511f039b7814
3
+ metadata.gz: 1e111538a4979749e713b04fb8923319832a1476
4
+ data.tar.gz: babe075877cfb3303216c5fa0b28a57610a421b4
5
5
  SHA512:
6
- metadata.gz: 070d0ed20712692a1a9d99de2126943eb496fb81c542f6115b90e46060d23a069958fcaac1741ff2033443d88cb6b983193332787a7d950729aa26b8a6acc7b9
7
- data.tar.gz: 8a0a80e643101d1073b472490d775ebfcb0f143bb8472767dd72d8c528f7fba07588319d9205128cefd4ddf35969ce4ccb564783771d738277b18306b01a0082
6
+ metadata.gz: 61066ce548063ca59745775f689da55dc4e621e0966eb137981d0296e49e47e59625b24cfc84b2d4972303f2e69d8669979836178730544b06a1304cc0b15431
7
+ data.tar.gz: 5b833eb34b1bbe3efd9c49c15ff83ef854f70fad6ed315a104d4e810f092bcffc362706b190dc14c898c46993482fdba566cf829dbe676e977d0a161d1a7b558
data/README.md CHANGED
@@ -11,7 +11,7 @@ A beautiful command line application framework.
11
11
  Rake-inspired, Docopt inside.
12
12
 
13
13
 
14
- ## Wait, What?
14
+ ## Wait, What? ##
15
15
 
16
16
  **Runfile** lets you create command line applications in a way similar
17
17
  to [Rake](https://github.com/ruby/rake), but with the full power of
@@ -23,19 +23,22 @@ You create a `Runfile`, and execute commands with
23
23
  [Learn More in the Wiki](https://github.com/DannyBen/runfile/wiki)
24
24
 
25
25
 
26
- ## Install
26
+
27
+ ## Install ##
27
28
 
28
29
  $ gem install runfile
29
30
 
30
31
 
31
- ## Quick Start
32
32
 
33
- $ run make
34
- $ run --help
35
- $ vi Runfile
33
+ ## Quick Start ##
34
+
35
+ $ run make # create a new Runfile
36
+ $ run --help # show the usage patterns
37
+ $ vi Runfile # edit the Runfile
36
38
 
37
39
 
38
- ## Example
40
+
41
+ ## Example ##
39
42
 
40
43
  The most minimal `Runfile` looks like this:
41
44
 
@@ -80,7 +83,29 @@ Options:
80
83
  Show version
81
84
  ```
82
85
 
83
- ## Documentation
86
+
87
+
88
+ ## Runfile per project or global Runfiles ##
89
+
90
+ In addition to the per project `Runfile` files, it is also possible to
91
+ create global runfiles that are accessible to you only or to anybody on
92
+ the system.
93
+
94
+ When you execute `run`, we will look for files in this order:
95
+
96
+ - `Runfile` in the current directory
97
+ - `*.runfile` in the current folder or sub folders
98
+ - `~/runfile/**/*.runfile`
99
+ - `/etc/runfile/**/*.runfile`
100
+
101
+ When you execute `run!`, we will ignore the local Runfile (if present) and
102
+ only search for global (named) runfiles.
103
+
104
+ Read more in the [Runfile Location and Filename wiki page](https://github.com/DannyBen/runfile/wiki/Runfile-Location-and-Filename)
105
+
106
+
107
+
108
+ ## Documentation ##
84
109
 
85
110
  - [Learn by Example](https://github.com/DannyBen/runfile/tree/master/examples)
86
111
  - [Runfile Command Reference](https://github.com/DannyBen/runfile/wiki/Runfile-Command-Reference)
@@ -67,7 +67,7 @@ module Runfile
67
67
  # Show some helpful tips, and a list of available runfiles
68
68
  def show_make_help(runfiles)
69
69
  say "!txtpur!Runfile engine v#{Runfile::VERSION}"
70
- runfiles.size < 3 and 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/ or anywhere in the PATH."
70
+ runfiles.size < 3 and 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/."
71
71
  if runfiles.empty?
72
72
  say "\n!txtred!Runfile not found."
73
73
  else
@@ -78,6 +78,11 @@ module Runfile
78
78
 
79
79
  # Return array of folders we should search for runfiles
80
80
  def runfile_folders
81
+ [Dir.pwd, "#{Dir.home}/runfile", "/etc/runfile"]
82
+ end
83
+
84
+ # [UNUSED] Same as runfile_folders, but including PATH
85
+ def runfile_folders_with_path
81
86
  dirs = path_dirs
82
87
  dirs.insert 0, Dir.pwd, "#{Dir.home}/runfile", "/etc/runfile"
83
88
  dirs
@@ -1,3 +1,3 @@
1
1
  module Runfile
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit