bard 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80973daeeda24da76f5147ef2a6804897db8f949708d50ea93e16240cab22b1d
4
- data.tar.gz: 4c9e0ecee009f76e31d5e059eab412cb829032ed8542a5717865dd10fe6695dc
3
+ metadata.gz: fa717f489274f4bb6340a42930201281ab1c012d368b9cbdee3263bac15ec62b
4
+ data.tar.gz: 010036ea949f34ac503ec179ebbace96f95762b0bdd7e35674a0674b8c2dc924
5
5
  SHA512:
6
- metadata.gz: '083b2ad6f495bf99cbb5146711a9aee82251b94dc3aa71cbba8f1d49fe63a60939efee14ceb1404750dec3e78c78a964321c09efa7164d018e57755f16cc6981'
7
- data.tar.gz: 4f34edaeeae7c1b5a7a419cf03d957ea1208ab0b75aa1fbe2a389d5b073a3d63bbc3eafc684cae17b25ce33c3b9ff59cf7261629c733df4fb4302a82ccfb0089
6
+ metadata.gz: 39bce499b49e7d9c33cf9147190a3b4ee986fe383b905d9c31e2fb9dfff79cdb819050943eb50615c230f96c7133e1b4816563afecb8cf0e4f4adc1854f46de6
7
+ data.tar.gz: 7765e288e7184d9d124e4a2c8b55aeda92fd6ab35f99c8d35ec3e887ecdb7b60b6009f7726e5095bf21c1accf59d8a862175b6b9110dff46673088ee3b30edc0
data/lib/bard/config.rb CHANGED
@@ -79,10 +79,17 @@ module Bard
79
79
  # short-hand for michael
80
80
 
81
81
  def github_pages url=nil
82
+ urls = []
83
+ if url.present?
84
+ uri = url.start_with?("http") ? URI.parse(url) : URI.parse("https://#{url}")
85
+ hostname = uri.hostname.sub(/^www\./, '')
86
+ urls = [hostname, "www.#{hostname}"]
87
+ end
88
+
82
89
  server :production do
83
90
  github_pages true
84
91
  ssh false
85
- ping url
92
+ ping *urls
86
93
  end
87
94
 
88
95
  backup false
@@ -9,6 +9,7 @@ module Bard
9
9
  @build_dir = "tmp/github-build-#{@sha}"
10
10
  @branch = "gh-pages"
11
11
  @domain = server.ping.first
12
+ @domain = URI.parse(@domain).hostname if @domain
12
13
 
13
14
  puts "Starting deployment to GitHub Pages..."
14
15
 
@@ -21,7 +22,7 @@ module Bard
21
22
  private
22
23
 
23
24
  def build_site
24
- FileUtils.rm_rf "tmp/github-build-".sub(@sha, "*")
25
+ system "rm -rf #{@build_dir.sub(@sha, "*")}"
25
26
  run! <<~BASH
26
27
  set -e
27
28
  RAILS_ENV=production bundle exec rails s -p 3000 -d --pid tmp/pids/server.pid
data/lib/bard/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "1.3.3"
2
+ VERSION = "1.3.4"
3
3
  end
4
4
 
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: 1.3.3
4
+ version: 1.3.4
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-12-30 00:00:00.000000000 Z
11
+ date: 2024-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor