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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 264474ee5d137de6c6e52c4be3bc48823b49e1df
4
- data.tar.gz: af85fb3abf76f468645c2441219dc4f01fa275d7
3
+ metadata.gz: 3fed95d76582c7f16a685f641d7773f822a69c9b
4
+ data.tar.gz: 36724bab665d2fd5def560d9b68c913335e84fed
5
5
  SHA512:
6
- metadata.gz: 1abf1a099b6ce0fba76dbdf54d56d02f862775f11526682994e19b7faaa26dec1d5d41eab1f950d4752f04c542e2c39da6f976a7654706d8002b46526ffc8da2
7
- data.tar.gz: d6f70db664e52fbe32c3faf942d6c9fc2dd4a36cd55fdbccf94908351ebee4f9153e66ef8be74c617aa6f3eb81ba887f01e0b8b045298c3f812df117e1a8598c
6
+ metadata.gz: 39f1b545fb0b2311612983b2367ab9edf57ac605603dd723c03fbe4836cb65cccd142cec85910db8cb0027eae77fd46aff4abc88c4bf494978bbfeb4cc31bfe6
7
+ data.tar.gz: 07daf47205ba20ab41ff652f2a6bdc56e4bad4b6dfbca0e443188776dc1d5ea34333c68d39ecf9fc5229d8575db4bfb488f3e9bebb1d0354cafcdb096b0d6f70
@@ -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
- @named_options ||= {}
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 = @named_options[name]
57
+ options = ::Clian::Cli::NAMED_OPTIONS[name]
58
58
  if type == :class
59
59
  class_option name, options
60
60
  else
@@ -1,3 +1,3 @@
1
1
  module Clian
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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: 2016-09-21 00:00:00.000000000 Z
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.1
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.