cloud-sh 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cloud/sh/commands/refresh.rb +7 -5
- data/lib/cloud/sh/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: 8a078e2085e381b44ed5b0d695fdeb3e5418184680e435c1eeaa381aa1cfd4eb
|
4
|
+
data.tar.gz: 94afa27d8d6cb670f3d263159d09191041bc1886f0f95e061c80751d5bc43fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28180a196c438a4c620a52d62657506b071387c3d41417ea578fd4ded07537f4e803d8225de699886725f402f800c0b0bcc99dd15accf852e5901387cbf79019
|
7
|
+
data.tar.gz: 7fe2dfb29b1b7d187c09768d6675ea3e6bc9ed56056f4150cf9c8c3734fbc4a9407c47ed0a79ad19e3e41da894e6e0d68f88a9837db78b501d1dcc1297fb06e9
|
data/Gemfile.lock
CHANGED
@@ -47,6 +47,7 @@ module Cloud
|
|
47
47
|
provider = cloud_provider(account)
|
48
48
|
provider.databases do |database|
|
49
49
|
next if database.cluster.ignore
|
50
|
+
|
50
51
|
if database.cluster.engine == "pg"
|
51
52
|
add_alias(:do, account, :psql, database.cluster, database.name, "psql \\\"#{database.uri}\\\"")
|
52
53
|
add_alias(:do, account, :pgdump, database.cluster, database.name, pgdump_command(database))
|
@@ -72,10 +73,10 @@ module Cloud
|
|
72
73
|
add_alias(:k8s, account, :switch, :to, cluster, kubectl("config use-context", cluster.context))
|
73
74
|
add_alias(:k8s, account, :ctl, cluster, kubectl("--context #{cluster.context}"))
|
74
75
|
cluster.pods.each do |namespace, pods|
|
75
|
-
add_alias(:k8s, account,
|
76
|
+
add_alias(:k8s, account, cluster, namespace, :tail, :all, "cloud-sh k8s tail --context #{cluster.context} --namespace #{namespace}")
|
76
77
|
pods.each do |pod|
|
77
|
-
add_alias(:k8s, account,
|
78
|
-
add_alias(:k8s, account,
|
78
|
+
add_alias(:k8s, account, cluster, namespace, :tail, pod.name, "cloud-sh k8s tail --context #{cluster.context} --namespace #{namespace} --pod #{pod.name}") unless pod.name == "console"
|
79
|
+
add_alias(:k8s, account, cluster, namespace, :exec, pod.name, "cloud-sh k8s exec --context #{cluster.context} --namespace #{namespace} --pod #{pod.name}")
|
79
80
|
add_alias(:k8s, account, cluster, namespace, :rails, :console, "cloud-sh k8s exec --context #{cluster.context} --namespace #{namespace} --pod #{pod.name} --cmd 'bundle exec rails console'") if pod.name == "console"
|
80
81
|
end
|
81
82
|
end
|
@@ -98,7 +99,7 @@ module Cloud
|
|
98
99
|
|
99
100
|
def mysqldump_command(database)
|
100
101
|
uri = URI.parse(database.uri)
|
101
|
-
dump_name = "#{database.
|
102
|
+
dump_name = "#{database.name}-`date +%Y%m%d%H%M`.sql"
|
102
103
|
[ :mysqldump, mysql_connection_params(uri), uri.path.delete("/"), "> #{dump_name}"].join(" ")
|
103
104
|
end
|
104
105
|
|
@@ -113,7 +114,7 @@ module Cloud
|
|
113
114
|
end
|
114
115
|
|
115
116
|
def pgdump_command(database)
|
116
|
-
dump_name = "#{database.
|
117
|
+
dump_name = "#{database.name}-`date +%Y%m%d%H%M`.sql"
|
117
118
|
"pg_dump \\\"#{database.uri}\\\" -f #{dump_name}"
|
118
119
|
end
|
119
120
|
|
@@ -124,6 +125,7 @@ module Cloud
|
|
124
125
|
|
125
126
|
def normalize_alias_part(part)
|
126
127
|
return nil if part.respond_to?(:default) && part.default
|
128
|
+
|
127
129
|
if part.respond_to?(:alias)
|
128
130
|
part = part.alias
|
129
131
|
elsif part.respond_to?(:name)
|
data/lib/cloud/sh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud-sh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristian Bica
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|