bard 1.9.2 → 1.9.4

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: '09960cdea14d636cd11c29d1f88114783daf97c144b379645daee11077f58815'
4
- data.tar.gz: 52089e9a96cd8aacb4e49bb075b03199e18f138bffdb6bc6e86d5f8262a017a3
3
+ metadata.gz: e057184a78e7652f2dd8f899644f90c6ffc619884536faf6a55a8bbe1378dac2
4
+ data.tar.gz: 52c07bf3dbf8ef0197b53ea966ef6c38dd6dd5d64e507a4339da9dcca7e0ed02
5
5
  SHA512:
6
- metadata.gz: 564cb4579c1a1451c2281e03f6541f621fc82e5be5e9ac2170e3c06838382d84bb860e02ada2670f444bf319ab62f5a42ff50a574b48c582a9dd304bf5075122
7
- data.tar.gz: b20e398b8b8e87b177c365944c157f40083231f9478da9555a324eb9f60a929abe4995ba52e421107e8ff501aebc497232ada569fc3aa53647d21537c1c4fb31
6
+ metadata.gz: f1bcfc4132c2e0ece74c4f9ef7ab69e27863ad7b80dfa7c0c372f7553304393561f9d70c2337242af58575d12d53971bd69769893e412260d3a5b4fada122003
7
+ data.tar.gz: c20547f052a4104ac93d84b6044041d5be5567fe2b28cf0fb8241c38193f2a6298f9586e1a8639b3a52aef428d7c8a55130610b0b075acf5a25cd239e99a672c
@@ -79,7 +79,6 @@ module Bard::CLI::Deploy
79
79
  # Use deployment strategy for v2.0 Targets, or fallback for v1.x Servers
80
80
  target = config[to]
81
81
  if target.respond_to?(:deploy_strategy) && target.deploy_strategy
82
- require "bard/deploy_strategy/#{target.deploy_strategy}"
83
82
  strategy = target.deploy_strategy_instance
84
83
  strategy.deploy
85
84
  elsif target.respond_to?(:github_pages) && target.github_pages
@@ -15,7 +15,6 @@ module Bard::CLI::Stage
15
15
 
16
16
  target = config[:staging]
17
17
  if target.respond_to?(:deploy_strategy) && target.deploy_strategy
18
- require "bard/deploy_strategy/#{target.deploy_strategy}"
19
18
  strategy = target.deploy_strategy_instance
20
19
  strategy.deploy
21
20
  else
data/lib/bard/config.rb CHANGED
@@ -49,6 +49,10 @@ module Bard
49
49
  @servers[key] = Server.define(project_name, key, &block)
50
50
  end
51
51
 
52
+ def remove_target(key)
53
+ @servers.delete(key.to_sym)
54
+ end
55
+
52
56
  # New v2.0 API - creates Target instances
53
57
  def target(key, &block)
54
58
  key = key.to_sym
@@ -58,3 +58,6 @@ module Bard
58
58
  end
59
59
  end
60
60
  end
61
+
62
+ # Auto-load all strategy files
63
+ Dir[File.join(__dir__, "deploy_strategy", "*.rb")].each { |f| require f }
data/lib/bard/plugin.rb CHANGED
@@ -21,6 +21,7 @@ module Bard
21
21
 
22
22
  def load_all!
23
23
  Dir[File.join(__dir__, "plugins", "*.rb")].sort.each { |f| require f }
24
+ Dir[File.join(Dir.pwd, "lib", "bard", "plugins", "*.rb")].sort.each { |f| require f }
24
25
  all.each(&:apply!)
25
26
  end
26
27
 
@@ -7,7 +7,7 @@ class Bard::Provision::Apt < Bard::Provision
7
7
  %(echo "\\$nrconf{restart} = \\"a\\";" | sudo tee /etc/needrestart/conf.d/90-autorestart.conf),
8
8
  "sudo apt-get update -y",
9
9
  "sudo apt-get upgrade -y",
10
- "sudo apt-get install -y curl",
10
+ "sudo apt-get install -y curl build-essential",
11
11
  ].join("; "), home: true
12
12
 
13
13
  puts " ✓"
@@ -7,8 +7,8 @@ class Bard::Provision::MySQL < Bard::Provision
7
7
  print " Installing,"
8
8
  provision_server.run! [
9
9
  "sudo apt-get install -y mysql-server",
10
- %(sudo mysql -uroot -e "ALTER USER \\"'\\"root\\"'\\"@\\"'\\"localhost\\"'\\" IDENTIFIED WITH mysql_native_password BY \\"'\\"\\"'\\", \\"'\\"root\\"'\\"@\\"'\\"localhost\\"'\\" PASSWORD EXPIRE NEVER; FLUSH PRIVILEGES;"),
11
- %(mysql -uroot -e "UPDATE mysql.user SET password_lifetime = NULL WHERE user = \\"'\\"root\\"'\\" AND host = \\"'\\"localhost\\"'\\";"),
10
+ %{sudo mysql -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '' PASSWORD EXPIRE NEVER; FLUSH PRIVILEGES;"},
11
+ %{mysql -uroot -e "UPDATE mysql.user SET password_lifetime = NULL WHERE user = 'root' AND host = 'localhost';"},
12
12
  ].join("; "), home: true
13
13
  end
14
14
 
data/lib/bard/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "1.9.2"
2
+ VERSION = "1.9.4"
3
3
  end
4
4
 
@@ -160,6 +160,22 @@ describe Bard::Config do
160
160
  end
161
161
  end
162
162
 
163
+ context "with remove_target" do
164
+ subject { described_class.new("tracker", source: <<~SOURCE) }
165
+ remove_target :staging
166
+ target :staging do
167
+ ssh "deploy@new-host.com"
168
+ end
169
+ SOURCE
170
+
171
+ it "replaces the default with a fresh target" do
172
+ staging = subject[:staging]
173
+ expect(staging).to be_a(Bard::Target)
174
+ expect(staging.ssh.to_s).to eq "deploy@new-host.com"
175
+ expect(staging.ping).to eq ["https://new-host.com"]
176
+ end
177
+ end
178
+
163
179
  context "with github_pages directive" do
164
180
  subject { described_class.new("test", source: "github_pages 'example.com'") }
165
181
 
@@ -20,7 +20,7 @@ describe Bard::Provision::Apt do
20
20
  %(echo "\\$nrconf{restart} = \\"a\\";" | sudo tee /etc/needrestart/conf.d/90-autorestart.conf),
21
21
  "sudo apt-get update -y",
22
22
  "sudo apt-get upgrade -y",
23
- "sudo apt-get install -y curl"
23
+ "sudo apt-get install -y curl build-essential"
24
24
  ].join("; ")
25
25
 
26
26
  expect(provision_server).to receive(:run!).with(expected_commands, home: true)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-12 00:00:00.000000000 Z
10
+ date: 2026-02-24 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: thor