pfab 0.50.0 → 0.51.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 843d834bac5fcac5a8761c3571769bdfddfbe675b437c053c73f51ac5de2be5e
4
- data.tar.gz: 71d5523cf8f3fbdd3ac10775f16b75c25b36d427bce36d86f078a36c7d39b9b6
3
+ metadata.gz: c2ffa684bec7e96dac9c896b6f037f02e9c73e2c9c2943c47fc400c59c0d490d
4
+ data.tar.gz: a69b88c63cdc12a417c2ed80373c69b31ba5662c412efa6131dfc51168b2b7fa
5
5
  SHA512:
6
- metadata.gz: 7154a5cf912a6f890f4b4442942655a06a9d37dbcb1c53d0d0db55c1f752048ce5d47663e4b00ae79f0bcd4fe7dac4c744a086c91974337a672f2f89c49c1518
7
- data.tar.gz: b31ca987ad5f375d4f9d24ce253c42455a6d8ec8da2592885496d8f3066baef1f220c5dabdad7175f6b55ec0d3ae43be6ce5d359059d1ba5affa004cdd209fbd
6
+ metadata.gz: 24b51d55f108f38c95b6ae05a46104353033240a10a18481dafc56185377e9ae66735dc99f3c29276067bb361e16efa376dda5b05e7e33ff1e1abdbad0bf6429
7
+ data.tar.gz: 361531b33dfec0ce581c53d7049d6142792d4264a76a975f252c590ce0aee973412196edbdd3972c6c800fdd6176c1dc968abd6817524b59a65e38fcb9fdf284
data/lib/pfab/cli.rb CHANGED
@@ -106,18 +106,20 @@ module Pfab
106
106
 
107
107
  command :exec do |c|
108
108
  c.option "-c", "--command command", "use with exec to run a command and exit. default is /bin/sh"
109
- c.syntax = "pfab exec"
109
+ c.syntax = "pfab exec [-- command to execute]'"
110
110
  c.summary = "kubectl exec into a pod"
111
111
  c.description = "CLI to the Cloud"
112
112
  c.example "exec into the first pod in staging",
113
- "pfab exec"
113
+ "pfab -e staging exec"
114
114
  c.example "exec into the first pod in production",
115
- "ezp -p exec"
115
+ "pfab -p exec"
116
116
  c.action do |args, options|
117
117
  set_kube_context
118
+ # Access the command line input after "--"
119
+ additional_args = ARGV[ARGV.index('--') + 1..-1] if ARGV.include?('--')
118
120
  app_name = get_app_name
119
121
  first_pod = get_first_pod app_name
120
- kubectl "exec -it #{first_pod}", "-- #{options.command || '/bin/sh'}"
122
+ kubectl "exec -it #{first_pod}", "-- #{additional_args.join(" ") || options.command || '/bin/sh'}"
121
123
  end
122
124
  end
123
125
 
data/lib/pfab/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Pfab
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 50
4
+ MINOR = 51
5
5
  PATCH = 0
6
6
  BUILD = nil
7
7
 
data/pfab.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: pfab 0.50.0 ruby lib
5
+ # stub: pfab 0.51.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pfab".freeze
9
- s.version = "0.50.0"
9
+ s.version = "0.51.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Jeff Dwyer".freeze]
14
- s.date = "2024-05-06"
14
+ s.date = "2024-05-13"
15
15
  s.description = "k8s helper".freeze
16
16
  s.email = "jdwyer@prefab.cloud".freeze
17
17
  s.executables = ["pfab".freeze]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pfab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.50.0
4
+ version: 0.51.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dwyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-06 00:00:00.000000000 Z
11
+ date: 2024-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander