env_switcher 1.0.0
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 +7 -0
- data/.gitignore +17 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +72 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +14 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/switcher +6 -0
- data/ext/env_switcher/extconf.rb +3 -0
- data/ext/env_switcher/switcher.c +9 -0
- data/ext/env_switcher/switcher.h +6 -0
- data/lib/env_switcher.rb +8 -0
- data/lib/env_switcher/commands/aws.rb +113 -0
- data/lib/env_switcher/commands/kubernetes.rb +53 -0
- data/lib/env_switcher/main_command.rb +45 -0
- data/lib/env_switcher/version.rb +3 -0
- data/switcher.gemspec +39 -0
- metadata +166 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0a50652b224f1dc772d4a29c951276ce1295e5f7ef82eeaf47e4dec65ac843a1
|
4
|
+
data.tar.gz: 58fb33cc9746855289fa81e2df1e851d65ff981843497834a69ff0d9d34a8926
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9c05db533e189f187e16509444bf9f2145ab31ded3db5d83c798af0ef48098f727ef127e2e5922cee435539dca295db4b6d3046322023902c11340926df059d3
|
7
|
+
data.tar.gz: c96f9486ffac6e41db2a3f0be283adafe609619fd4c5434e8e3dca96556f04e885e81e3a9766713b44807ad9572de417fd258af80fd9a1be3980557f28b47f62
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
env_switcher (1.0.0)
|
5
|
+
clamp (~> 1.3.2)
|
6
|
+
tty-config (~> 0.4.0)
|
7
|
+
tty-editor (~> 0.6.0)
|
8
|
+
tty-pager (~> 0.14)
|
9
|
+
tty-prompt (~> 0.22)
|
10
|
+
tty-screen (~> 0.8.1)
|
11
|
+
tty-which (~> 0.4)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
clamp (1.3.2)
|
17
|
+
diff-lcs (1.4.4)
|
18
|
+
pastel (0.8.0)
|
19
|
+
tty-color (~> 0.5)
|
20
|
+
rake (12.3.3)
|
21
|
+
rake-compiler (1.1.1)
|
22
|
+
rake
|
23
|
+
rspec (3.9.0)
|
24
|
+
rspec-core (~> 3.9.0)
|
25
|
+
rspec-expectations (~> 3.9.0)
|
26
|
+
rspec-mocks (~> 3.9.0)
|
27
|
+
rspec-core (3.9.3)
|
28
|
+
rspec-support (~> 3.9.3)
|
29
|
+
rspec-expectations (3.9.3)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.9.0)
|
32
|
+
rspec-mocks (3.9.1)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.9.0)
|
35
|
+
rspec-support (3.9.4)
|
36
|
+
strings (0.2.0)
|
37
|
+
strings-ansi (~> 0.2)
|
38
|
+
unicode-display_width (~> 1.5)
|
39
|
+
unicode_utils (~> 1.4)
|
40
|
+
strings-ansi (0.2.0)
|
41
|
+
tty-color (0.5.2)
|
42
|
+
tty-config (0.4.0)
|
43
|
+
tty-cursor (0.7.1)
|
44
|
+
tty-editor (0.6.0)
|
45
|
+
tty-prompt (~> 0.22)
|
46
|
+
tty-pager (0.14.0)
|
47
|
+
strings (~> 0.2.0)
|
48
|
+
tty-screen (~> 0.8)
|
49
|
+
tty-prompt (0.22.0)
|
50
|
+
pastel (~> 0.8)
|
51
|
+
tty-reader (~> 0.8)
|
52
|
+
tty-reader (0.8.0)
|
53
|
+
tty-cursor (~> 0.7)
|
54
|
+
tty-screen (~> 0.8)
|
55
|
+
wisper (~> 2.0)
|
56
|
+
tty-screen (0.8.1)
|
57
|
+
tty-which (0.4.2)
|
58
|
+
unicode-display_width (1.7.0)
|
59
|
+
unicode_utils (1.4.0)
|
60
|
+
wisper (2.0.1)
|
61
|
+
|
62
|
+
PLATFORMS
|
63
|
+
ruby
|
64
|
+
|
65
|
+
DEPENDENCIES
|
66
|
+
env_switcher!
|
67
|
+
rake (~> 12.0)
|
68
|
+
rake-compiler
|
69
|
+
rspec (~> 3.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Chengqing Su
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Env Switcher
|
2
|
+
|
3
|
+
This a small tool to switch you aws credential and kubernetes contexts interactively.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'env_switcher'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install env_switcher
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
This tool depends on `aws-cli` and `kubectl`.
|
24
|
+
|
25
|
+
Run
|
26
|
+
```
|
27
|
+
env_switcher
|
28
|
+
```
|
29
|
+
|
30
|
+
## Development
|
31
|
+
|
32
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
33
|
+
|
34
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
require "rake/extensiontask"
|
7
|
+
|
8
|
+
task :build => :compile
|
9
|
+
|
10
|
+
Rake::ExtensionTask.new("env_switcher") do |ext|
|
11
|
+
ext.lib_dir = "lib/env_switcher"
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => [:clobber, :compile, :spec]
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "env_switcher"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
# require "irb"
|
14
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/switcher
ADDED
data/lib/env_switcher.rb
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
module EnvSwitcher
|
4
|
+
module Commands
|
5
|
+
class Aws < Clamp::Command
|
6
|
+
|
7
|
+
def initialize(invocation_path, context = nil)
|
8
|
+
ensure_aws_cli_config_dir
|
9
|
+
ensure_aws_config_dir
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
subcommand 'add', 'add aws credentials' do
|
14
|
+
def execute
|
15
|
+
add
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
subcommand 'clean', 'clean aws credentials' do
|
20
|
+
def execute
|
21
|
+
change_aws_credentials
|
22
|
+
change_aws_config
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
subcommand 'switch', 'switch aws credential' do
|
27
|
+
def execute
|
28
|
+
switch
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def execute
|
33
|
+
request_help
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def switch
|
39
|
+
if aws_config.keys.empty?
|
40
|
+
prompt.error("please add an aws account at first")
|
41
|
+
return
|
42
|
+
end
|
43
|
+
|
44
|
+
result = prompt.select("which aws account you want to use?", aws_config.keys)
|
45
|
+
|
46
|
+
change_aws_credentials(aws_config[result]['aws_access_key_id'], aws_config[result]['aws_secret_access_key'])
|
47
|
+
change_aws_config(aws_config[result]['region'])
|
48
|
+
end
|
49
|
+
|
50
|
+
def change_aws_credentials(aws_access_key_id = "", aws_secret_access_key = "")
|
51
|
+
credentials = "
|
52
|
+
[default]
|
53
|
+
aws_access_key_id=#{aws_access_key_id}
|
54
|
+
aws_secret_access_key=#{aws_secret_access_key}"
|
55
|
+
File.write(File.expand_path('~/.aws/credentials'), credentials)
|
56
|
+
end
|
57
|
+
|
58
|
+
def change_aws_config(region = "")
|
59
|
+
config = "
|
60
|
+
[default]
|
61
|
+
region=#{region}
|
62
|
+
output=json"
|
63
|
+
|
64
|
+
File.write(File.expand_path('~/.aws/config'), config)
|
65
|
+
end
|
66
|
+
|
67
|
+
def add
|
68
|
+
result = prompt.collect do
|
69
|
+
key(:account_number).ask("Account Number?", required: true)
|
70
|
+
|
71
|
+
key(:region).ask("Region?", default: 'ap-southeast-1')
|
72
|
+
key(:alias).ask("Alias?",)
|
73
|
+
key(:aws_access_key_id).ask("AWS Access Key Id?", required: true)
|
74
|
+
key(:aws_secret_access_key).ask("AWS Secret Access Key?", required: true)
|
75
|
+
end
|
76
|
+
|
77
|
+
aws_config[aws_name(result[:alias], result[:account_number])] = result
|
78
|
+
|
79
|
+
File.write(aws_config_path, JSON.pretty_generate(aws_config))
|
80
|
+
end
|
81
|
+
|
82
|
+
def aws_name(name, account_number)
|
83
|
+
name.nil? ? account_number : "#{name}(#{account_number})"
|
84
|
+
end
|
85
|
+
|
86
|
+
def aws_config
|
87
|
+
@aws_config ||= (File.exists?(aws_config_path) ? JSON.parse(File.read(aws_config_path)) : Hash.new)
|
88
|
+
end
|
89
|
+
|
90
|
+
def aws_config_path
|
91
|
+
File.expand_path('~/.env_switcher/aws/config.json')
|
92
|
+
end
|
93
|
+
|
94
|
+
def prompt
|
95
|
+
@prompt ||= TTY::Prompt.new
|
96
|
+
end
|
97
|
+
|
98
|
+
def ensure_aws_cli_config_dir
|
99
|
+
ensure_dir '~/.aws'
|
100
|
+
end
|
101
|
+
|
102
|
+
def ensure_aws_config_dir
|
103
|
+
ensure_dir '~/.env_switcher'
|
104
|
+
ensure_dir '~/.env_switcher/aws'
|
105
|
+
end
|
106
|
+
|
107
|
+
def ensure_dir(dir_name)
|
108
|
+
dir_path = File.expand_path(dir_name)
|
109
|
+
Dir.mkdir dir_path unless Dir.exists? dir_path
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module EnvSwitcher
|
4
|
+
module Commands
|
5
|
+
class Kubernetes < Clamp::Command
|
6
|
+
subcommand 'switch', 'switch kubernetes context' do
|
7
|
+
def execute
|
8
|
+
switch
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
subcommand 'eks', 'Add kubernetes context from AWS EKS' do
|
13
|
+
def execute
|
14
|
+
add_eks_cluster_to_contexts
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def execute
|
19
|
+
request_help
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def add_eks_cluster_to_contexts
|
25
|
+
choose_eks_clusters.each { |cluster_name| `aws eks update-kubeconfig --name #{cluster_name}` }
|
26
|
+
end
|
27
|
+
|
28
|
+
def choose_eks_clusters
|
29
|
+
prompt.multi_select("Choose EKS clusters: ", list_eks_cluster_names)
|
30
|
+
end
|
31
|
+
|
32
|
+
def list_eks_cluster_names
|
33
|
+
JSON.parse(`aws eks list-clusters --query clusters --output json`)
|
34
|
+
end
|
35
|
+
|
36
|
+
def switch
|
37
|
+
`kubectl config use-context #{select_kubernetes_context}`
|
38
|
+
end
|
39
|
+
|
40
|
+
def select_kubernetes_context
|
41
|
+
prompt.select("Switch to ", kubernetes_context_names)
|
42
|
+
end
|
43
|
+
|
44
|
+
def kubernetes_context_names
|
45
|
+
`kubectl config get-contexts -o name`.split("\n")
|
46
|
+
end
|
47
|
+
|
48
|
+
def prompt
|
49
|
+
@prompt ||= TTY::Prompt.new
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'clamp'
|
2
|
+
require 'tty-prompt'
|
3
|
+
require 'env_switcher/commands/aws'
|
4
|
+
require 'env_switcher/commands/kubernetes'
|
5
|
+
|
6
|
+
module EnvSwitcher
|
7
|
+
class MainCommand < Clamp::Command
|
8
|
+
|
9
|
+
option "--version", :flag, "Show version" do
|
10
|
+
puts EnvSwitcher::VERSION
|
11
|
+
end
|
12
|
+
|
13
|
+
def execute
|
14
|
+
command = prompt.select("What do you want to do?") do |menu|
|
15
|
+
menu.choice "AWS", -> { EnvSwitcher::Commands::Aws }
|
16
|
+
menu.choice "Kubernetes", -> { EnvSwitcher::Commands::Kubernetes }
|
17
|
+
end
|
18
|
+
choice_command(command)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def choice_command(parent_command)
|
24
|
+
subcommand = parent_command.find_subcommand_class(choice_subcommand(parent_command))
|
25
|
+
if subcommand.has_subcommands?
|
26
|
+
choice_command(subcommand)
|
27
|
+
else
|
28
|
+
subcommand.new(invocation_path, context).execute
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def choice_subcommand(parent_command)
|
33
|
+
prompt.select("which subcommand you want to execute?", subcommand_names(parent_command))
|
34
|
+
end
|
35
|
+
|
36
|
+
def subcommand_names(parent_command)
|
37
|
+
parent_command.recognised_subcommands.map { |subcommand| subcommand.names }.flatten
|
38
|
+
end
|
39
|
+
|
40
|
+
def prompt
|
41
|
+
@prompt ||= TTY::Prompt.new
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
data/switcher.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
require 'env_switcher/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "env_switcher"
|
8
|
+
spec.version = EnvSwitcher::VERSION
|
9
|
+
spec.authors = ["Chengqing Su"]
|
10
|
+
spec.email = ["suchengqing1995@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "This is a tool to help you switch env, eg. aws account, k8s context"
|
13
|
+
spec.description = "This is a tool to help you switch env, eg. aws account, k8s context"
|
14
|
+
spec.homepage = "https://github.com/chengqing-su/env-env_switcher"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/chengqing-su/env_switcher.git"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/chengqing-su/env_switcher"
|
21
|
+
|
22
|
+
spec.add_dependency 'clamp', '~> 1.3.2'
|
23
|
+
spec.add_dependency 'tty-config', '~> 0.4.0'
|
24
|
+
spec.add_dependency 'tty-editor', '~> 0.6.0'
|
25
|
+
spec.add_dependency 'tty-pager', '~> 0.14'
|
26
|
+
spec.add_dependency 'tty-prompt', '~> 0.22'
|
27
|
+
spec.add_dependency 'tty-screen', '~> 0.8.1'
|
28
|
+
spec.add_dependency 'tty-which', '~> 0.4'
|
29
|
+
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
32
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
33
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
end
|
35
|
+
spec.bindir = "exe"
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ["lib"]
|
38
|
+
spec.extensions = ["ext/env_switcher/extconf.rb"]
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: env_switcher
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chengqing Su
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-10-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: clamp
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: tty-config
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.4.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tty-editor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.6.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.6.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: tty-pager
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.14'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.14'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: tty-prompt
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.22'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.22'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: tty-screen
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.8.1
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.8.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: tty-which
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.4'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.4'
|
111
|
+
description: This is a tool to help you switch env, eg. aws account, k8s context
|
112
|
+
email:
|
113
|
+
- suchengqing1995@gmail.com
|
114
|
+
executables:
|
115
|
+
- switcher
|
116
|
+
extensions:
|
117
|
+
- ext/env_switcher/extconf.rb
|
118
|
+
extra_rdoc_files: []
|
119
|
+
files:
|
120
|
+
- ".gitignore"
|
121
|
+
- ".rspec"
|
122
|
+
- ".travis.yml"
|
123
|
+
- Gemfile
|
124
|
+
- Gemfile.lock
|
125
|
+
- LICENSE.txt
|
126
|
+
- README.md
|
127
|
+
- Rakefile
|
128
|
+
- bin/console
|
129
|
+
- bin/setup
|
130
|
+
- exe/switcher
|
131
|
+
- ext/env_switcher/extconf.rb
|
132
|
+
- ext/env_switcher/switcher.c
|
133
|
+
- ext/env_switcher/switcher.h
|
134
|
+
- lib/env_switcher.rb
|
135
|
+
- lib/env_switcher/commands/aws.rb
|
136
|
+
- lib/env_switcher/commands/kubernetes.rb
|
137
|
+
- lib/env_switcher/main_command.rb
|
138
|
+
- lib/env_switcher/version.rb
|
139
|
+
- switcher.gemspec
|
140
|
+
homepage: https://github.com/chengqing-su/env-env_switcher
|
141
|
+
licenses:
|
142
|
+
- MIT
|
143
|
+
metadata:
|
144
|
+
homepage_uri: https://github.com/chengqing-su/env-env_switcher
|
145
|
+
source_code_uri: https://github.com/chengqing-su/env_switcher.git
|
146
|
+
changelog_uri: https://github.com/chengqing-su/env_switcher
|
147
|
+
post_install_message:
|
148
|
+
rdoc_options: []
|
149
|
+
require_paths:
|
150
|
+
- lib
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: 2.3.0
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
requirements: []
|
162
|
+
rubygems_version: 3.1.4
|
163
|
+
signing_key:
|
164
|
+
specification_version: 4
|
165
|
+
summary: This is a tool to help you switch env, eg. aws account, k8s context
|
166
|
+
test_files: []
|