knife-cloud 2.0.2 → 2.0.3
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/lib/chef/knife/cloud/list_resource_command.rb +12 -1
- data/lib/knife-cloud/version.rb +1 -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: 2faf09682aa12fa3ae8f46295159cbefea8158bcfc6f636f49c79f71cf6cb72d
|
4
|
+
data.tar.gz: 5d90a5bb0f7b079f757efdb08152aee4d0455c3595f509cb91e69e30984d2733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d123173f850f37bfc50dce54f9777da38f4e93ec5c8a7adcac70d27c6b7ab0b3dd59cdcfe083cf0e751b48735c19bb96c9435d38084e9c6b5094665a8cd615d
|
7
|
+
data.tar.gz: aa78eed5d15dac77723f355ddf8da5b4dede80c9388e2112c12eaea16e21f13ec208fe19e4877f8ec91a6425496ebacd6bc8dfe2e553f7d7a561523fc2c2e2b0
|
@@ -75,7 +75,10 @@ class Chef
|
|
75
75
|
# display column wise only if @columns_with_info is specified, else as a json for readable display.
|
76
76
|
begin
|
77
77
|
resource_list = @columns_with_info.map { |col_info| ui.color(col_info[:label], :bold) } if @columns_with_info.length > 0
|
78
|
-
|
78
|
+
records = data_sort(resources)
|
79
|
+
records.each do |resource|
|
80
|
+
next if resource.respond_to?(:deprecated) && resource.deprecated
|
81
|
+
|
79
82
|
if @columns_with_info.length > 0
|
80
83
|
list = get_resource_col_val(resource)
|
81
84
|
resource_list.concat(list) unless list.nil?
|
@@ -96,6 +99,14 @@ class Chef
|
|
96
99
|
end
|
97
100
|
end
|
98
101
|
|
102
|
+
def data_sort(resources)
|
103
|
+
if resources.length > 0
|
104
|
+
resources[0].respond_to?(:kind) && resources[0].kind == "compute#image" ? resources : resources.sort_by { |x| x.send(@sort_by_field).downcase }
|
105
|
+
else
|
106
|
+
[]
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
99
110
|
end # class ResourceListCommand
|
100
111
|
end
|
101
112
|
end
|
data/lib/knife-cloud/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaustubh Deorukhkar
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|