runfile 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -15
- data/lib/runfile/docopt_maker.rb +2 -2
- data/lib/runfile/runner.rb +2 -2
- data/lib/runfile/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cb84d16815dfadc5e82418e78fd206aa620b1db
|
4
|
+
data.tar.gz: ff736e5bb5457df832e1d86bcc30e0b511c5306a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e43ff2a0f3abcdad96268ac6a31dab5dad865af382ab083f71e18d3d8e7fb5c4cc8205a5e96909e2758368f9aab747ba0ec8defeda934c1b1bc6aa1a76b7ed5
|
7
|
+
data.tar.gz: c1d2e5d20e4fe53249bd36ed69805b724d45c3d43d0092505c2a346bb217c0a415b7f352e0440a853ae2211cb5241132950f77f56159d46daeccf06ba2ef387d
|
data/README.md
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
Runfile - If Rake and Docopt had a baby
|
2
2
|
=======================================
|
3
3
|
|
4
|
-
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/runfile.svg)](http://badge.fury.io/rb/runfile)
|
5
|
+
|
6
|
+
A beautiful command line application framework.
|
7
|
+
Rake-inspired, Docopt inside.
|
5
8
|
|
6
9
|
|
7
10
|
## Wait, What?
|
@@ -21,6 +24,13 @@ You create a `Runfile`, and execute commands with
|
|
21
24
|
$ gem install runfile
|
22
25
|
|
23
26
|
|
27
|
+
## Quick Start
|
28
|
+
|
29
|
+
$ run make
|
30
|
+
$ run --help
|
31
|
+
$ vi Runfile
|
32
|
+
|
33
|
+
|
24
34
|
## Example
|
25
35
|
|
26
36
|
The most minimal `Runfile` looks like this:
|
@@ -70,18 +80,6 @@ Options:
|
|
70
80
|
|
71
81
|
- [Learn by Example](https://github.com/DannyBen/runfile/tree/master/examples)
|
72
82
|
- [Runfile Command Reference](https://github.com/DannyBen/runfile/wiki/Runfile-Command-Reference)
|
73
|
-
- [
|
74
|
-
|
75
|
-
|
76
|
-
## Test
|
77
|
-
|
78
|
-
$ rake test
|
79
|
-
|
80
|
-
|
81
|
-
## Todo
|
83
|
+
- [Wiki](https://github.com/DannyBen/runfile/wiki)
|
84
|
+
- [Rubydoc](http://www.rubydoc.info/gems/runfile)
|
82
85
|
|
83
|
-
- (Colsole) Add newline detection in wordwrap (i.e. add indentation spaces
|
84
|
-
after newline)
|
85
|
-
- GitHub pages
|
86
|
-
- Can we have a colored docopt? Would be nice...
|
87
|
-
(working, but causing some issues, will probably abandon)
|
data/lib/runfile/docopt_maker.rb
CHANGED
@@ -23,7 +23,7 @@ module Runfile
|
|
23
23
|
doc += "#{@summary} \n" if @summary
|
24
24
|
doc += "\nUsage:\n";
|
25
25
|
@actions.each do |name, action|
|
26
|
-
doc += " run #{action.usage}\n"
|
26
|
+
doc += " run #{action.usage}\n" unless action.usage == false
|
27
27
|
end
|
28
28
|
doc += " run (-h | --help | --version)\n\n"
|
29
29
|
caption_printed = false
|
@@ -33,7 +33,7 @@ module Runfile
|
|
33
33
|
caption_printed = true
|
34
34
|
helpline = " #{action.help}"
|
35
35
|
wrapped = word_wrap helpline, width
|
36
|
-
doc += " #{action.usage}\n#{wrapped}\n\n"
|
36
|
+
doc += " #{action.usage}\n#{wrapped}\n\n" unless action.usage == false
|
37
37
|
end
|
38
38
|
doc += "Options:\n"
|
39
39
|
doc += " -h --help\n Show this screen\n\n"
|
data/lib/runfile/runner.rb
CHANGED
@@ -47,11 +47,11 @@ module Runfile
|
|
47
47
|
@last_usage = name if @last_usage.nil?
|
48
48
|
if @namespace
|
49
49
|
name = "#{namespace}_#{name}".to_sym
|
50
|
-
@last_usage = "#{@namespace} #{@last_usage}"
|
50
|
+
@last_usage = "#{@namespace} #{@last_usage}" unless @last_usage == false
|
51
51
|
end
|
52
52
|
if @superspace
|
53
53
|
name = "#{superspace}_#{name}".to_sym
|
54
|
-
@last_usage = "#{@superspace} #{@last_usage}"
|
54
|
+
@last_usage = "#{@superspace} #{@last_usage}" unless @last_usage == false
|
55
55
|
end
|
56
56
|
@actions[name] = Action.new(block, @last_usage, @last_help)
|
57
57
|
@last_usage = nil
|
data/lib/runfile/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.7
|
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: 2015-05-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colsole
|