bard 0.62.2 → 0.63.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bard/base.rb +12 -12
- data/lib/bard/version.rb +1 -1
- data/lib/bard.rb +6 -2
- 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: 3d7d5a0ea2e8612375c2cdff91db9018db99cbebd5c7b261eac8bd8cd759c56d
|
4
|
+
data.tar.gz: b92bf6109d27d6266ea4d5c600814fcc27c0cede6620a7cac3d2a1f829dc9604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78f9952dad75d7cd3b2bc3320b94101e184173edc10fab5c8d12a7c8ed1e87db17852715879fc18d446a1fa077ac9fae34b85c13ddce626ffd54bd87cc013476
|
7
|
+
data.tar.gz: 639bb68fe3c42d18d9c5709f4fae18707578496423c4982b37c97e00e981458a7dc3eee4bf7eae596c99c18efd39f0bee714c0fb47d2d721fad1b5acb0b7caa5
|
data/lib/bard/base.rb
CHANGED
@@ -32,8 +32,8 @@ class Bard::CLI < Thor
|
|
32
32
|
@project_name ||= File.expand_path(".").split("/").last
|
33
33
|
end
|
34
34
|
|
35
|
-
def ssh_command
|
36
|
-
server = @config.servers
|
35
|
+
def ssh_command server_name, command, home: false
|
36
|
+
server = @config.servers.fetch(server_name.to_sym)
|
37
37
|
uri = URI.parse("ssh://#{server.ssh}")
|
38
38
|
ssh_key = server.ssh_key ? "-i #{server.ssh_key} " : ""
|
39
39
|
command = "#{server.env} #{command}" if server.env
|
@@ -46,8 +46,8 @@ class Bard::CLI < Thor
|
|
46
46
|
command
|
47
47
|
end
|
48
48
|
|
49
|
-
def copy direction,
|
50
|
-
server = @config.servers
|
49
|
+
def copy direction, server_name, path, verbose: false
|
50
|
+
server = @config.servers.fetch(server_name.to_sym)
|
51
51
|
|
52
52
|
uri = URI.parse("ssh://#{server.gateway}")
|
53
53
|
port = uri.port ? "-p#{uri.port}" : ""
|
@@ -65,9 +65,9 @@ class Bard::CLI < Thor
|
|
65
65
|
run_crucial command, verbose: verbose
|
66
66
|
end
|
67
67
|
|
68
|
-
def move
|
69
|
-
from = @config.servers
|
70
|
-
to = @config.servers
|
68
|
+
def move from_name, to_name, path, verbose: false
|
69
|
+
from = @config.servers.fecth(from_name.to_sym)
|
70
|
+
to = @config.servers.fetch(to_name.to_sym)
|
71
71
|
raise NotImplementedError if from.gateway || to.gateway || from.ssh_key || to.ssh_key
|
72
72
|
|
73
73
|
from_uri = URI.parse("ssh://#{from.ssh}")
|
@@ -81,8 +81,8 @@ class Bard::CLI < Thor
|
|
81
81
|
run_crucial command, verbose: verbose
|
82
82
|
end
|
83
83
|
|
84
|
-
def rsync direction,
|
85
|
-
server = @config.servers
|
84
|
+
def rsync direction, server_name, path, verbose: false
|
85
|
+
server = @config.servers.fetch(server_name.to_sym)
|
86
86
|
|
87
87
|
uri = URI.parse("ssh://#{server.gateway}")
|
88
88
|
port = uri.port ? "-p#{uri.port}" : ""
|
@@ -104,9 +104,9 @@ class Bard::CLI < Thor
|
|
104
104
|
run_crucial command, verbose: verbose
|
105
105
|
end
|
106
106
|
|
107
|
-
def rsync_remote
|
108
|
-
from = @config.servers
|
109
|
-
to = @config.servers
|
107
|
+
def rsync_remote from_name, to_name, path, verbose: false
|
108
|
+
from = @config.servers.fetch(from_name.to_sym)
|
109
|
+
to = @config.servers.fetch(to_name.to_sym)
|
110
110
|
raise NotImplementedError if from.gateway || to.gateway || from.ssh_key || to.ssh_key
|
111
111
|
|
112
112
|
dest_path = path.dup
|
data/lib/bard/version.rb
CHANGED
data/lib/bard.rb
CHANGED
@@ -223,8 +223,12 @@ class Bard::CLI < Thor
|
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
226
|
-
desc "master_key
|
227
|
-
|
226
|
+
desc "master_key --from=production --to=local", "copy master key from from to to"
|
227
|
+
method_options %w[from] => :string, %w[to] => :string
|
228
|
+
def master_key
|
229
|
+
default_from = @config.servers.key?(:production) ? "production" : "staging"
|
230
|
+
from = options.fetch(:from, default_from)
|
231
|
+
to = options.fetch(:to, "local")
|
228
232
|
if to == "local"
|
229
233
|
copy :from, from, "config/master.key"
|
230
234
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.63.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|