civo_cli 0.3.17 → 0.3.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +3 -3
- data/lib/civo_cli/version.rb +1 -1
- data/lib/finder.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f93f73f2a2afbc365839db9f52da82fdd3f292a6e159d4d5e3f22f1cda88ae62
|
4
|
+
data.tar.gz: 97bc0335f30dc807700f7bda9b4e60d72686debc39f5db2894d7997012f545a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68ef9d04db721b0b9ec8717b2e0bebf5279ab948b37dbf66727bef2340c700fbfacae546bd01b0eaeabbd003dc88e6f11b7687f73ce252cedf345d8d7eba620f
|
7
|
+
data.tar.gz: 444d5ece596ff7d0bf6acf3e45c5c0956431e1f654ae69d250a5d49d4e6be342f817e242bd6c0ef420eeba5cf5ead66dc6996c67b463084a13155aeb6797bbee
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ All notable changes to the Civo CLI will be documented in this file.
|
|
3
3
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
5
5
|
|
6
|
+
## [0.3.17] - 2019-09-11
|
7
|
+
### Changed
|
8
|
+
- If there is one exact match for a cluster, return that, only try partial matches if there are no exact matches
|
9
|
+
|
6
10
|
## [0.3.17] - 2019-09-11
|
7
11
|
### Changed
|
8
12
|
- Edited help text for cluster creation to clarify application name discovery
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
civo_cli (0.3.
|
4
|
+
civo_cli (0.3.18)
|
5
5
|
bundler (~> 1.17)
|
6
6
|
civo (>= 1.2.8)
|
7
7
|
colorize
|
@@ -35,7 +35,7 @@ GEM
|
|
35
35
|
faraday (0.15.4)
|
36
36
|
multipart-post (>= 1.2, < 3)
|
37
37
|
ffi (1.11.1)
|
38
|
-
flexirest (1.
|
38
|
+
flexirest (1.8.0)
|
39
39
|
activesupport
|
40
40
|
crack
|
41
41
|
faraday
|
@@ -112,7 +112,7 @@ GEM
|
|
112
112
|
addressable (>= 2.3.6)
|
113
113
|
crack (>= 0.3.2)
|
114
114
|
hashdiff (>= 0.4.0, < 2.0.0)
|
115
|
-
zeitwerk (2.1.
|
115
|
+
zeitwerk (2.1.10)
|
116
116
|
|
117
117
|
PLATFORMS
|
118
118
|
ruby
|
data/lib/civo_cli/version.rb
CHANGED
data/lib/finder.rb
CHANGED
@@ -4,6 +4,10 @@ class Finder
|
|
4
4
|
Civo::Kubernetes.all.items.each do |cluster|
|
5
5
|
result << cluster
|
6
6
|
end
|
7
|
+
|
8
|
+
matched = result.detect { |cluster| cluster.name == id || cluster.id == id }
|
9
|
+
return matched if matched
|
10
|
+
|
7
11
|
result.select! { |cluster| cluster.name.include?(id) || cluster.id.include?(id) }
|
8
12
|
|
9
13
|
if result.count.zero?
|
@@ -19,10 +23,14 @@ class Finder
|
|
19
23
|
|
20
24
|
def self.detect_app(name)
|
21
25
|
result = []
|
22
|
-
Civo::Kubernetes.applications.items
|
26
|
+
apps = Civo::Kubernetes.applications.items
|
27
|
+
apps.each do |app|
|
23
28
|
result << app if app.name.downcase.include?(name.downcase)
|
24
29
|
end
|
25
30
|
|
31
|
+
matched = apps.detect { |app| app.name.downcase == name.downcase }
|
32
|
+
return matched if matched
|
33
|
+
|
26
34
|
if result.count.zero?
|
27
35
|
puts "No Kubernetes marketplace applications found for '#{name}'. Please check your query."
|
28
36
|
exit 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civo_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
252
|
- !ruby/object:Gem::Version
|
253
253
|
version: '0'
|
254
254
|
requirements: []
|
255
|
-
rubygems_version: 3.0.
|
255
|
+
rubygems_version: 3.0.6
|
256
256
|
signing_key:
|
257
257
|
specification_version: 4
|
258
258
|
summary: CLI for interacting with Civo.com
|