bard 1.9.3 → 1.9.5

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: db107258ade941629a55a75db659aa3dad90b2c02c96159daeaa92176c4f44d9
4
- data.tar.gz: d9f717eb565742dc0c43faedcc1d91c2062fb3f1071704f8e116b413b9cb9fce
3
+ metadata.gz: 6d5acbc3e0a86aae1981b7bae5706a46e4029a8ea478dcd22fb7556a64b704fd
4
+ data.tar.gz: 6341214a33f8f83e4b708bd21be4b6befbaba2655530927e2d38a59aff7f5fb4
5
5
  SHA512:
6
- metadata.gz: 7393a158dd7fbacad7cb8d5925c78b215901d4eccbede3ea0f6e523d0b10a2a28b5911f3bf21d9480720eb407022c7755095c493caf824aa9982d55b81476e67
7
- data.tar.gz: 31e3e86db02130c716963c76a9e393fb1402488d54cff7a1672937c73da59565c0dd2e5f8b42f40b5326e8a5d0de4c056fee7e98f6799b54e2803685c06039eb
6
+ metadata.gz: d51a2580abb4620389077c93029195496c37a330bcc163eaa9ed7e7c2c8f7d8c7bc099b99bbc08fb6724575ede7a739e98d7db0c042335d2fca0a3bd407f5afe
7
+ data.tar.gz: f6dea9e844e74edbafa46e9bfdc943d750705a314cf4f64b80fcb3a58e0a35d2d59613ac334faf6b21dfdc730919bbcdbf9112896312bc7f57de9e53c33e5402
@@ -20,7 +20,7 @@ module Bard::CLI::Deploy
20
20
  if !Bard::Git.up_to_date_with_remote?(branch)
21
21
  run! "git push origin #{branch}:#{branch}"
22
22
  end
23
- invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"]
23
+ invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"] || config.ci == false
24
24
 
25
25
  else
26
26
  run! "git fetch origin"
@@ -55,7 +55,7 @@ module Bard::CLI::Deploy
55
55
 
56
56
  run! "git push -f origin #{branch}:#{branch}"
57
57
 
58
- invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"]
58
+ invoke :ci, [branch], options.slice("local-ci", "ci") unless options["skip-ci"] || config.ci == false
59
59
 
60
60
  run! "git push origin #{branch}:master"
61
61
  if Bard::Git.current_branch != "master"
@@ -8,7 +8,7 @@ module Bard
8
8
  class GithubPages < DeployStrategy
9
9
  def initialize(target, url = nil, **options)
10
10
  super(target)
11
- @url = url
11
+ @url = url || target.github_pages
12
12
  @options = options
13
13
 
14
14
  # Auto-configure ping URL if provided
@@ -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.3"
2
+ VERSION = "1.9.5"
3
3
  end
4
4
 
@@ -25,6 +25,7 @@ describe Bard::CLI::Deploy do
25
25
  let(:cli) { TestDeployCLI.new }
26
26
 
27
27
  before do
28
+ allow(config).to receive(:ci).and_return(nil)
28
29
  allow(cli).to receive(:config).and_return(config)
29
30
  allow(cli).to receive(:options).and_return({ target: "production" })
30
31
  allow(cli).to receive(:puts)
@@ -88,6 +89,17 @@ describe Bard::CLI::Deploy do
88
89
  cli.deploy
89
90
  end
90
91
  end
92
+
93
+ context "with ci disabled in config" do
94
+ it "skips CI step" do
95
+ allow(config).to receive(:ci).and_return(false)
96
+
97
+ expect(cli).not_to receive(:invoke).with(:ci, anything, anything)
98
+ expect(production_server).to receive(:run!).with("git pull origin master && bin/setup")
99
+
100
+ cli.deploy
101
+ end
102
+ end
91
103
  end
92
104
 
93
105
  context "when on feature branch" do
@@ -130,6 +142,20 @@ describe Bard::CLI::Deploy do
130
142
  end
131
143
  end
132
144
 
145
+ context "when on feature branch with ci disabled in config" do
146
+ before do
147
+ allow(cli).to receive(:options).and_return({ target: "production" })
148
+ allow(config).to receive(:ci).and_return(false)
149
+ end
150
+
151
+ it "skips CI step" do
152
+ expect(cli).not_to receive(:invoke).with(:ci, anything, anything)
153
+ expect(production_server).to receive(:run!).with("git pull origin master && bin/setup")
154
+
155
+ cli.deploy
156
+ end
157
+ end
158
+
133
159
  context "with github remote" do
134
160
  it "pushes to github remote" do
135
161
  allow(cli).to receive(:`).with("git remote").and_return("origin\ngithub\n")
@@ -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.3
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-18 00:00:00.000000000 Z
10
+ date: 2026-02-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: thor