cli_helper 0.1.3 → 0.1.5
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 +4 -4
- data/cli_helper.gemspec +1 -1
- data/lib/cli_helper.rb +12 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf6d479723854bcd68382bbbc85fa40d2426fdf5
|
4
|
+
data.tar.gz: 4c8cb0f3ec92f929cac69c207bf13e537391ba96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79dd763049b7701c83878e58db93aeb198486c6ed0eb4af28402e25f4a3e771aa5fb7e4eec04804d76b24c617be453b532f088cc1aabc5e58373246bb5ab49f
|
7
|
+
data.tar.gz: e9ab43679b6d094820e7ed75e439d92824f1ca2d6de1976e6f4813a933d5b25e3b4014f35c4f814689175b046ce1e4501975ea14463219a4e15cac298e27ca9d
|
data/cli_helper.gemspec
CHANGED
data/lib/cli_helper.rb
CHANGED
@@ -31,6 +31,12 @@ module Slop
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
class SymbolOption < Option
|
35
|
+
def call(value)
|
36
|
+
value.to_sym
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
34
40
|
# An example of how to incorporate default values into
|
35
41
|
# the usage help text. Would prefer a generic solution
|
36
42
|
# in the base Option class.
|
@@ -78,6 +84,12 @@ module CliHelper
|
|
78
84
|
configatron.me
|
79
85
|
end
|
80
86
|
|
87
|
+
# Return full pathname of program
|
88
|
+
def my_dir
|
89
|
+
configatron.my_dir
|
90
|
+
end
|
91
|
+
alias :root :my_dir
|
92
|
+
|
81
93
|
# Returns the basename of the program as a string
|
82
94
|
def my_name
|
83
95
|
configatron.my_name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cli_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dewayne VanHoozer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: configatron
|
@@ -201,9 +201,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
203
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.4.
|
204
|
+
rubygems_version: 2.4.6
|
205
205
|
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: An encapsulation of an integration of slop, nenv, inifile and configatron.
|
208
208
|
test_files: []
|
209
|
-
has_rdoc:
|