timely-app 1.0.3 → 1.0.4
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/CHANGELOG.md +4 -0
- data/bin/timely-app +9 -5
- data/lib/timely-app/version.rb +1 -1
- data/timely-app.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fc2e1df8e95c1af4f14f67e40bd7849218fa6a25a7012b91d6c6bedba49875b
|
4
|
+
data.tar.gz: f10ba288aa8074824ee6cd2508e509564575ea0519c8502220e9b13bfd02cee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e05a47853c2dfb6233e8ddca0bbb3f1250ebdc1618328f5694370e0128b0ae52606385ed8886230eb0a9df0a8ba7a620c01c4c258ca3f8ab57db3b8fcf33df5d
|
7
|
+
data.tar.gz: 9e384734bc8a02b3778927cad38cb4e667c40fbf7e91cb048007b0041818aa79c88c4e1831e86ce4c94cc6dd87bc1b2476ec5ff8b8763a59e841978f366b01e8
|
data/CHANGELOG.md
CHANGED
data/bin/timely-app
CHANGED
@@ -26,6 +26,8 @@ module TimelyApp
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def command_exists?(cmd)
|
29
|
+
return false if cmd.nil? || cmd.empty?
|
30
|
+
|
29
31
|
client.respond_to?(cmd)
|
30
32
|
end
|
31
33
|
|
@@ -139,10 +141,11 @@ cli = TimelyApp::CLI.new(options)
|
|
139
141
|
cmd = ARGV.shift
|
140
142
|
case cmd
|
141
143
|
when "auth"
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
144
|
+
client_id = ARGV.shift || ENV.fetch('TIMELY_CLIENT_ID')
|
145
|
+
client_secret = ARGV.shift || ENV.fetch('TIMELY_CLIENT_SECRET')
|
146
|
+
ARGV.clear
|
147
|
+
if client_id && client_secret
|
148
|
+
cli.auth(client_id, client_secret)
|
146
149
|
else
|
147
150
|
puts "Usage: timely-app auth CLIENT_ID CLIENT_SECRET"
|
148
151
|
exit 1
|
@@ -158,8 +161,9 @@ when "config"
|
|
158
161
|
end
|
159
162
|
else
|
160
163
|
if cli.command_exists?(cmd)
|
161
|
-
|
164
|
+
args = ARGV.reduce({}){ |h, arg| k, v = arg.split("="); h[k] = v; h }
|
162
165
|
ARGV.clear
|
166
|
+
response = cli.call(cmd, *args)
|
163
167
|
case response
|
164
168
|
when Array
|
165
169
|
response.each do |r|
|
data/lib/timely-app/version.rb
CHANGED
data/timely-app.gemspec
CHANGED