clian 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clian/cli.rb +3 -3
- data/lib/clian/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fed95d76582c7f16a685f641d7773f822a69c9b
|
4
|
+
data.tar.gz: 36724bab665d2fd5def560d9b68c913335e84fed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39f1b545fb0b2311612983b2367ab9edf57ac605603dd723c03fbe4836cb65cccd142cec85910db8cb0027eae77fd46aff4abc88c4bf494978bbfeb4cc31bfe6
|
7
|
+
data.tar.gz: 07daf47205ba20ab41ff652f2a6bdc56e4bad4b6dfbca0e443188776dc1d5ea34333c68d39ecf9fc5229d8575db4bfb488f3e9bebb1d0354cafcdb096b0d6f70
|
data/lib/clian/cli.rb
CHANGED
@@ -8,6 +8,7 @@ module Clian
|
|
8
8
|
CONFIG_HOME = File.join((ENV["XDG_CONFIG_HOME"] || "~/.config"), basename)
|
9
9
|
CONFIG_FILE = "config.yml"
|
10
10
|
CONFIG_PATH = File.join(CONFIG_HOME, CONFIG_FILE)
|
11
|
+
NAMED_OPTIONS = {}
|
11
12
|
|
12
13
|
def self.config_home ; CONFIG_HOME; end
|
13
14
|
def self.config_path ; CONFIG_PATH; end
|
@@ -40,8 +41,7 @@ module Clian
|
|
40
41
|
# register preset options
|
41
42
|
|
42
43
|
def self.named_option(name, options)
|
43
|
-
|
44
|
-
@named_options[name] = options
|
44
|
+
::Clian::Cli::NAMED_OPTIONS[name] = options
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.expand_option(*names)
|
@@ -54,7 +54,7 @@ module Clian
|
|
54
54
|
|
55
55
|
def self.expand_named_option(type, *names)
|
56
56
|
names.each do |name|
|
57
|
-
options =
|
57
|
+
options = ::Clian::Cli::NAMED_OPTIONS[name]
|
58
58
|
if type == :class
|
59
59
|
class_option name, options
|
60
60
|
else
|
data/lib/clian/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshinari Nomura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.5.
|
166
|
+
rubygems_version: 2.5.2
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: Small set of Ruby classes helpful for creation of CLI tools.
|