clian 0.2.0 → 0.3.0
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/clian.gemspec +1 -1
- data/lib/clian/cli.rb +13 -15
- data/lib/clian/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aafa95a344936cada12ed9d9a235a8dd7cae688
|
4
|
+
data.tar.gz: d03183a7f68c26aecb8b1293d17de893ee8beed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb12e871477882eab8efd453a395fe5ba4018dd41495a954ac57052565e34a58642140de1e32ca19d3e38e137eb4b6ae286ccb0e25281170a3ce14ca56fdc712
|
7
|
+
data.tar.gz: 6353f628553f9dac6f66c4296145abd73e70e2b3fdc103498d86ee3bb4fbf03e18b5855936fb6c55fe6aba99c338c98619b94d35e99dec95d549114eb28b2acc
|
data/clian.gemspec
CHANGED
@@ -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.
|
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"
|
data/lib/clian/cli.rb
CHANGED
@@ -5,13 +5,14 @@ module Clian
|
|
5
5
|
################################################################
|
6
6
|
# config files
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
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.
|
14
|
-
def self.
|
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(
|
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: #{
|
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
|
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] ||
|
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
|
-
|
200
|
-
|
201
|
-
end
|
202
|
-
end
|
203
|
-
end
|
200
|
+
end # class Cli
|
201
|
+
end # module Clian
|
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.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-
|
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.
|
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.
|
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.
|
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.
|