clian 0.2.0 → 0.3.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: 3fed95d76582c7f16a685f641d7773f822a69c9b
4
- data.tar.gz: 36724bab665d2fd5def560d9b68c913335e84fed
3
+ metadata.gz: 4aafa95a344936cada12ed9d9a235a8dd7cae688
4
+ data.tar.gz: d03183a7f68c26aecb8b1293d17de893ee8beed6
5
5
  SHA512:
6
- metadata.gz: 39f1b545fb0b2311612983b2367ab9edf57ac605603dd723c03fbe4836cb65cccd142cec85910db8cb0027eae77fd46aff4abc88c4bf494978bbfeb4cc31bfe6
7
- data.tar.gz: 07daf47205ba20ab41ff652f2a6bdc56e4bad4b6dfbca0e443188776dc1d5ea34333c68d39ecf9fc5229d8575db4bfb488f3e9bebb1d0354cafcdb096b0d6f70
6
+ metadata.gz: fb12e871477882eab8efd453a395fe5ba4018dd41495a954ac57052565e34a58642140de1e32ca19d3e38e137eb4b6ae286ccb0e25281170a3ce14ca56fdc712
7
+ data.tar.gz: 6353f628553f9dac6f66c4296145abd73e70e2b3fdc103498d86ee3bb4fbf03e18b5855936fb6c55fe6aba99c338c98619b94d35e99dec95d549114eb28b2acc
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ["lib"]
27
27
 
28
28
  spec.add_runtime_dependency "thor", ">= 0.19.1"
29
- spec.add_runtime_dependency "google-api-client", "0.9.pre4"
29
+ spec.add_runtime_dependency "google-api-client", "~> 0.13"
30
30
  spec.add_runtime_dependency "googleauth"
31
31
  spec.add_runtime_dependency "launchy"
32
32
  spec.add_runtime_dependency "mail"
@@ -5,13 +5,14 @@ module Clian
5
5
  ################################################################
6
6
  # config files
7
7
 
8
- CONFIG_HOME = File.join((ENV["XDG_CONFIG_HOME"] || "~/.config"), basename)
9
- CONFIG_FILE = "config.yml"
10
- CONFIG_PATH = File.join(CONFIG_HOME, CONFIG_FILE)
8
+ DEFAULT_CONFIG_HOME = File.join((ENV["XDG_CONFIG_HOME"] ||
9
+ "~/.config"), basename)
10
+ DEFAULT_CONFIG_FILE = "config.yml"
11
+ DEFAULT_CONFIG_PATH = File.join(DEFAULT_CONFIG_HOME, DEFAULT_CONFIG_FILE)
11
12
  NAMED_OPTIONS = {}
12
13
 
13
- def self.config_home ; CONFIG_HOME; end
14
- def self.config_path ; CONFIG_PATH; end
14
+ def self.default_config_home ; DEFAULT_CONFIG_HOME; end
15
+ def self.default_config_path ; DEFAULT_CONFIG_PATH; end
15
16
 
16
17
  ################################################################
17
18
  # rbenv support:
@@ -26,7 +27,7 @@ module Clian
26
27
  ENV["RBENV_VERSION"] = nil
27
28
  shims_path = File.expand_path("shims", ENV["RBENV_ROOT"])
28
29
  ENV["PATH"] = shims_path + ":" + ENV["PATH"]
29
- exec(File.readlink(__FILE__), *ARGV)
30
+ exec(File.readlink(command_path), *ARGV)
30
31
  end
31
32
 
32
33
  gemfile = File.expand_path("../../Gemfile", command_path)
@@ -67,7 +68,7 @@ module Clian
67
68
  # default options
68
69
  named_option :debug, :desc => "Set debug flag", :type => :boolean
69
70
  named_option :profile, :desc => "Set profiler flag", :type => :boolean
70
- named_option :config, :desc => "Set config path (default: #{CONFIG_PATH})", :banner => "FILE"
71
+ named_option :config, :desc => "Set config path (default: #{DEFAULT_CONFIG_PATH})", :banner => "FILE"
71
72
  named_option :dry_run, :desc => "Perform a trial run with no changes made", :type => :boolean
72
73
 
73
74
  ################################################################
@@ -130,7 +131,7 @@ module Clian
130
131
 
131
132
  no_commands do
132
133
  def invoke_command(command, *args)
133
- setup_global_options unless command.name == "init"
134
+ setup_global_options(command, *args)
134
135
  result = super
135
136
  teardown
136
137
  result
@@ -153,9 +154,9 @@ module Clian
153
154
 
154
155
  attr_reader :builder, :config, :calendar
155
156
 
156
- def setup_global_options
157
+ def setup_global_options(command, *args)
157
158
  exit_on_error do
158
- # @config = Clian::Config.create_from_file(options[:config] || CONFIG_PATH)
159
+ # @config = Clian::Config.create_from_file(options[:config] || DEFAULT_CONFIG_PATH)
159
160
  # @builder ||= Clian::Builder.new(@config)
160
161
  # if @config.general.tzid
161
162
  # Clian.default_tzid = @config.general.tzid
@@ -196,8 +197,5 @@ module Clian
196
197
  end
197
198
  end
198
199
 
199
- def symbolize_keys(hash)
200
- Hash[hash.map {|k,v| [k.to_sym, v]}]
201
- end
202
- end
203
- end
200
+ end # class Cli
201
+ end # module Clian
@@ -1,3 +1,3 @@
1
1
  module Clian
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.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.2.0
4
+ version: 0.3.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: 2017-03-16 00:00:00.000000000 Z
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: google-api-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.pre4
33
+ version: '0.13'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.9.pre4
40
+ version: '0.13'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: googleauth
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -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.2
166
+ rubygems_version: 2.6.11
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Small set of Ruby classes helpful for creation of CLI tools.