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 +4 -4
- data/lib/bard/config.rb +8 -1
- data/lib/bard/github_pages.rb +2 -1
- data/lib/bard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa717f489274f4bb6340a42930201281ab1c012d368b9cbdee3263bac15ec62b
|
4
|
+
data.tar.gz: 010036ea949f34ac503ec179ebbace96f95762b0bdd7e35674a0674b8c2dc924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
92
|
+
ping *urls
|
86
93
|
end
|
87
94
|
|
88
95
|
backup false
|
data/lib/bard/github_pages.rb
CHANGED
@@ -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
|
-
|
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
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.
|
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-
|
11
|
+
date: 2024-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|