bard 1.9.2 → 1.9.3

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: db107258ade941629a55a75db659aa3dad90b2c02c96159daeaa92176c4f44d9
4
+ data.tar.gz: d9f717eb565742dc0c43faedcc1d91c2062fb3f1071704f8e116b413b9cb9fce
5
5
  SHA512:
6
- metadata.gz: 564cb4579c1a1451c2281e03f6541f621fc82e5be5e9ac2170e3c06838382d84bb860e02ada2670f444bf319ab62f5a42ff50a574b48c582a9dd304bf5075122
7
- data.tar.gz: b20e398b8b8e87b177c365944c157f40083231f9478da9555a324eb9f60a929abe4995ba52e421107e8ff501aebc497232ada569fc3aa53647d21537c1c4fb31
6
+ metadata.gz: 7393a158dd7fbacad7cb8d5925c78b215901d4eccbede3ea0f6e523d0b10a2a28b5911f3bf21d9480720eb407022c7755095c493caf824aa9982d55b81476e67
7
+ data.tar.gz: 31e3e86db02130c716963c76a9e393fb1402488d54cff7a1672937c73da59565c0dd2e5f8b42f40b5326e8a5d0de4c056fee7e98f6799b54e2803685c06039eb
@@ -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
 
data/lib/bard/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "1.9.2"
2
+ VERSION = "1.9.3"
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
 
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.3
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-18 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: thor