busbar-cli 1.9.2 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/busbar_cli.rb +1 -0
- data/lib/busbar_cli/commands.rb +1 -0
- data/lib/busbar_cli/commands/nodetypes.rb +17 -0
- data/lib/busbar_cli/config/version.rb +1 -1
- data/lib/busbar_cli/models.rb +1 -0
- data/lib/busbar_cli/models/environment.rb +10 -0
- data/lib/busbar_cli/models/nodetype.rb +12 -0
- data/lib/busbar_cli/repositories.rb +1 -0
- data/lib/busbar_cli/repositories/nodetypes_repository.rb +13 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdc228f546309ef55d73857144c42342aab59774
|
4
|
+
data.tar.gz: be9080480a0f1ce0632a0730ede8170cd7e48091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b36299c95d25c838dfed38ccecac1617473f87269cbc4ce3f96b634d4557ccd95ecfb4f6391c16e3a2a5e84c17bacb4a0d46270501cb0b73d771235b8aabad11
|
7
|
+
data.tar.gz: 75729de146953bde8b911242738446ba0412b795478ac2feb8802b7bda679ba313d7551aa2a2a7d676bda8b9a0121e86c3d0a9d3d6874967d5025ea87d247cb1
|
data/lib/busbar_cli.rb
CHANGED
data/lib/busbar_cli/commands.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module Commands
|
2
|
+
module Nodetypes
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
desc 'nodetypes', 'Show available Busbar Nodetypes'
|
7
|
+
|
8
|
+
def nodetypes ()
|
9
|
+
resources = NodetypesRepository.all()
|
10
|
+
|
11
|
+
resources.map do |resource|
|
12
|
+
Printer.print_resource(resource)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Version Variables
|
2
2
|
VERSION = '1.9'.freeze
|
3
|
-
BUSBAR_PATCH_VERSION = '
|
3
|
+
BUSBAR_PATCH_VERSION = '3'.freeze
|
4
4
|
KUBECTL_PATCH_VERSION = '6'.freeze
|
5
5
|
BUSBAR_VERSION = "#{VERSION}.#{BUSBAR_PATCH_VERSION}".freeze
|
6
6
|
KUBECTL_VERSION = "#{VERSION}.#{KUBECTL_PATCH_VERSION}".freeze
|
data/lib/busbar_cli/models.rb
CHANGED
@@ -13,6 +13,7 @@ class Environment
|
|
13
13
|
attribute :public, Boolean
|
14
14
|
attribute :created_at, String
|
15
15
|
attribute :updated_at, String
|
16
|
+
attribute :components, Array
|
16
17
|
|
17
18
|
def as_text
|
18
19
|
"App: #{app_id}\n" \
|
@@ -25,6 +26,7 @@ class Environment
|
|
25
26
|
"Default Branch: #{default_branch}\n" \
|
26
27
|
"Default Node ID: #{default_node_id}\n" \
|
27
28
|
"Settings: \n#{pretty_settings}\n" \
|
29
|
+
"Components: \n#{pretty_components}\n" \
|
28
30
|
"Created_at: #{created_at}\n" \
|
29
31
|
"Updated_at: #{updated_at}"
|
30
32
|
end
|
@@ -36,4 +38,12 @@ class Environment
|
|
36
38
|
"\t#{setting}: #{value}"
|
37
39
|
end.join("\n")
|
38
40
|
end
|
41
|
+
|
42
|
+
def pretty_components
|
43
|
+
components.sort_by(&:first).map do |component|
|
44
|
+
component.map do |attribute, value|
|
45
|
+
"\t#{attribute}: #{value}"
|
46
|
+
end.join("\n")
|
47
|
+
end.join("\n\t--\n")
|
48
|
+
end
|
39
49
|
end
|
@@ -5,3 +5,4 @@ require 'busbar_cli/repositories/deployments_repository'
|
|
5
5
|
require 'busbar_cli/repositories/databases_repository'
|
6
6
|
require 'busbar_cli/repositories/environments_repository'
|
7
7
|
require 'busbar_cli/repositories/settings_repository'
|
8
|
+
require 'busbar_cli/repositories/nodetypes_repository'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class NodetypesRepository
|
2
|
+
NODETYPES_ROUTE = '/nodes/'.freeze
|
3
|
+
|
4
|
+
class << self
|
5
|
+
def all
|
6
|
+
nodetypes_data = JSON.parse(Request.get(NODETYPES_ROUTE).body)
|
7
|
+
|
8
|
+
nodetypes_data.map do |nodetype_data|
|
9
|
+
Nodetype.new(nodetype_data)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: busbar-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Marques
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- lib/busbar_cli/commands/kubeconfig_update.rb
|
158
158
|
- lib/busbar_cli/commands/latest_build.rb
|
159
159
|
- lib/busbar_cli/commands/logs.rb
|
160
|
+
- lib/busbar_cli/commands/nodetypes.rb
|
160
161
|
- lib/busbar_cli/commands/profile.rb
|
161
162
|
- lib/busbar_cli/commands/profiles.rb
|
162
163
|
- lib/busbar_cli/commands/publish.rb
|
@@ -187,6 +188,7 @@ files:
|
|
187
188
|
- lib/busbar_cli/models/component_log.rb
|
188
189
|
- lib/busbar_cli/models/database.rb
|
189
190
|
- lib/busbar_cli/models/environment.rb
|
191
|
+
- lib/busbar_cli/models/nodetype.rb
|
190
192
|
- lib/busbar_cli/models/setting.rb
|
191
193
|
- lib/busbar_cli/repositories.rb
|
192
194
|
- lib/busbar_cli/repositories/apps_repository.rb
|
@@ -195,6 +197,7 @@ files:
|
|
195
197
|
- lib/busbar_cli/repositories/databases_repository.rb
|
196
198
|
- lib/busbar_cli/repositories/deployments_repository.rb
|
197
199
|
- lib/busbar_cli/repositories/environments_repository.rb
|
200
|
+
- lib/busbar_cli/repositories/nodetypes_repository.rb
|
198
201
|
- lib/busbar_cli/repositories/settings_repository.rb
|
199
202
|
- lib/busbar_cli/services.rb
|
200
203
|
- lib/busbar_cli/services/app_config.rb
|