mkit 0.7.1 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1afe4867bef582182a677b340b94711d1bdadc431b831b76ab732ee6e5bde492
4
- data.tar.gz: 6c9a1ba41cc47ffc15a57c319b8773b504b68335bb7a764c5b0ea2093bff9fb2
3
+ metadata.gz: 2ddd1f77569b1f7982812ae1cf236b76816bd6fc31a27cde9067e010a296c981
4
+ data.tar.gz: cedb9272ef3c6ce621989c94a2fd08bf917e7a1f242c4f465306d82749af103c
5
5
  SHA512:
6
- metadata.gz: a6395376c6b518b5ac83f4e3463ad2e84e1fd61d23417c7176844500d43513d5f6b3903dd6b56d5d2defac2c7b32c1ef7456907c20b133032c80baf4c35432f2
7
- data.tar.gz: ea834c19e06d5c603c64570a1b86d1652a25fe21c7ba44657a60f5c174ca764c8105be3705396dfa718f2ff57a11682e2e0aa84134654553933cc976d4a88afa
6
+ metadata.gz: 5ae6c65f2c6b68e116c66c8ac5716f5668d7642922869fdccbf55264d9f9bd96bc36320148bcd9e7d0f2909d010f1caf55e18095c301415432e48a2ecb5845dc
7
+ data.tar.gz: ad171bc7fa68ac93813dd15675119bc328f929063694c4627c7db013a5ad938dfdbedb0c8a7a9e45fbfc5b2ae834ef11ca4a24fae16ff37cd81c1f9d0a1da2b4
data/bin/mkit CHANGED
@@ -42,14 +42,14 @@ class MKItClient
42
42
  FileUtils.mkdir_p(@config_dir)
43
43
  end
44
44
  FileUtils.cp("#{@root}/config/mkitc_config.yml", @config_dir) unless File.exist?(@config_file)
45
- profile({ verb: 'set' }, { profile_name: 'local' }) unless File.exist?(@profile_file)
45
+ profile({ verb: 'set' }, { profile: 'local' }) unless File.exist?(@profile_file)
46
46
  end
47
47
 
48
48
  def read_configuration(init_call = false)
49
49
  current_profile = File.read(@profile_file)
50
50
  if current_profile.nil? || current_profile.empty?
51
51
  # force set default
52
- profile({ verb: 'set' }, { profile_name: 'local' })
52
+ profile({ verb: 'set' }, { profile: 'local' })
53
53
  current_profile = 'local'
54
54
  end
55
55
  cfg = YAML.load_file(@config_file)
@@ -146,13 +146,13 @@ class MKItClient
146
146
 
147
147
  case request[:verb]
148
148
  when 'set'
149
- profile = request_data[:profile_name]
149
+ profile = request_data[:profile]
150
150
  if cfg['mkit'][profile.lstrip].nil?
151
151
  raise InvalidParametersException.new("Profile not found on '~/.mkit' configuration", cmd)
152
152
  end
153
153
 
154
154
  puts "Setting current profile to #{profile}."
155
- File.write(@profile_file, request_data[:profile_name])
155
+ File.write(@profile_file, request_data[:profile])
156
156
  ''
157
157
  when 'show'
158
158
  active = File.read("#{@config_dir}/current")
@@ -134,8 +134,8 @@
134
134
  - "-f"
135
135
  - name: nr_lines
136
136
  help:
137
- - -n <lines>
138
- - Number of lines to show from the end of the logs
137
+ - -n <string>
138
+ - Number of lines to show from the end of the logs (default 10)
139
139
  mandatory: false
140
140
  param: "<%=nr_lines%>"
141
141
  type: option
@@ -144,7 +144,7 @@
144
144
  - name: pods
145
145
  help:
146
146
  - -p <[pods]>
147
- - Show logs for specified logs, e.g. pod1, pod2 (default first)
147
+ - Show logs for specified pods, e.g. pod1, pod2 (default first)
148
148
  mandatory: false
149
149
  param: "<%=pods%>"
150
150
  type: option
@@ -182,7 +182,7 @@
182
182
  uri: "/mkit/proxy/status"
183
183
  - cmd: profile
184
184
  usage:
185
- - "<[set <profile_name>]|[show]>"
185
+ - "<[set <profile>]|[show]>"
186
186
  help: mkit client configuration profile
187
187
  options:
188
188
  - cmd: set
@@ -9,6 +9,7 @@ module MKIt
9
9
  command = "docker logs"
10
10
  command += " -f" if options[:follow] == 'true'
11
11
  command += " -n #{options[:nr_lines]}" if options[:nr_lines]
12
+ command += " -n 10" unless options[:nr_lines]
12
13
  command += " #{@pod.name}"
13
14
  super(command: command)
14
15
  end
data/lib/mkit/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module MKIt
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasco Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-15 00:00:00.000000000 Z
11
+ date: 2024-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-dns