bard 0.62.1 → 0.63.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f18316a4dc7dcd513e1dcac34f50fb757cfbf9072a617680ba1241a53c484539
4
- data.tar.gz: 1c8fcb0539271a4f86e22cf442b65cf3ee864388c4705ef6b1b2243e7a46e5cf
3
+ metadata.gz: 3d7d5a0ea2e8612375c2cdff91db9018db99cbebd5c7b261eac8bd8cd759c56d
4
+ data.tar.gz: b92bf6109d27d6266ea4d5c600814fcc27c0cede6620a7cac3d2a1f829dc9604
5
5
  SHA512:
6
- metadata.gz: 6ef61f9c77b19fbff8231eb2707501c9f6185eb343b8da84507d00673bf38ec5c28da1e636a972955f976237f256e8f40b890c750350665a6b28819b74fa76d5
7
- data.tar.gz: 5da351a322da23ac6f8351a46161939d4b0288538a9e4610e7a5d92eec4599932f00fd1972bb4b3b130d9dbe4b0ba6ad8151824c11b85380ccdbcb4813692f86
6
+ metadata.gz: 78f9952dad75d7cd3b2bc3320b94101e184173edc10fab5c8d12a7c8ed1e87db17852715879fc18d446a1fa077ac9fae34b85c13ddce626ffd54bd87cc013476
7
+ data.tar.gz: 639bb68fe3c42d18d9c5709f4fae18707578496423c4982b37c97e00e981458a7dc3eee4bf7eae596c99c18efd39f0bee714c0fb47d2d721fad1b5acb0b7caa5
@@ -7,6 +7,7 @@ on:
7
7
  jobs:
8
8
  build_ruby_cache:
9
9
  runs-on: ubuntu-22.04
10
+ timeout-minutes: 30
10
11
  steps:
11
12
  - uses: actions/checkout@v3
12
13
  - uses: ruby/setup-ruby@v1
@@ -13,6 +13,7 @@ permissions:
13
13
  jobs:
14
14
  test:
15
15
  runs-on: ubuntu-22.04-16core
16
+ timeout-minutes: 30
16
17
  env:
17
18
  RAILS_ENV: test
18
19
  RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
@@ -37,6 +38,7 @@ jobs:
37
38
  autodeploy-dependabot-prs:
38
39
  needs: test
39
40
  runs-on: ubuntu-22.04
41
+ timeout-minutes: 30
40
42
  if: github.actor == 'dependabot[bot]'
41
43
  steps:
42
44
  - name: Merge Dependabot PR
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 server, command, home: false
36
- server = @config.servers[server.to_sym]
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, server, path, verbose: false
50
- server = @config.servers[server.to_sym]
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 from, to, path, verbose: false
69
- from = @config.servers[from.to_sym]
70
- to = @config.servers[to.to_sym]
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, server, path, verbose: false
85
- server = @config.servers[server.to_sym]
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 from, to, path, verbose: false
108
- from = @config.servers[from.to_sym]
109
- to = @config.servers[to.to_sym]
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
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "0.62.1"
2
+ VERSION = "0.63.0"
3
3
  end
4
4
 
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 [FROM=production, TO=local]", "copy master key from FROM to TO"
227
- def master_key from="production", to="local"
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.62.1
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-03 00:00:00.000000000 Z
11
+ date: 2024-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor