bard 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bard/cli/new.rb +1 -1
- data/lib/bard/github_pages.rb +9 -8
- data/lib/bard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5600a5fdcdae6f00c10a98e56c836afca1ccb4d2dc2bb2bd736f513583ae5946
|
4
|
+
data.tar.gz: b479fccb4f68ea90e731581dc15d4ea09c5b53977588a89e6a7e54e74b8b31d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1af6063c459fccd82df1d5f339c356f583d1df3d28f60f39f1545fe89285bb6d7d3bef2965f1551f6aa5368b86cfdd3354aac295b06b602cfd237439676bb85
|
7
|
+
data.tar.gz: d634bb866e0b952a35d911fd5a02b5ef8dd469c746a969a5bf616ac367d2d758f1650f4af617e1fef96445444191537dba8822a5ca1b2c0c28b55f1cf6fa9ab3
|
data/lib/bard/cli/new.rb
CHANGED
@@ -33,7 +33,7 @@ class Bard::CLI::New < Bard::CLI::Command
|
|
33
33
|
source ~/.rvm/scripts/rvm
|
34
34
|
rvm use --create #{ruby_version}@#{project_name}
|
35
35
|
|
36
|
-
gem list rails -i
|
36
|
+
gem list rails -i || gem install rails --no-document
|
37
37
|
rails new #{project_name} --skip-kamal -m #{template_path}
|
38
38
|
'
|
39
39
|
BASH
|
data/lib/bard/github_pages.rb
CHANGED
@@ -23,8 +23,9 @@ module Bard
|
|
23
23
|
def build_site
|
24
24
|
FileUtils.rm_rf "tmp/github-build-".sub(@sha, "*")
|
25
25
|
run! <<~BASH
|
26
|
-
|
26
|
+
set -e
|
27
27
|
RAILS_ENV=production bundle exec rails s -p 3000 -d --pid tmp/pids/server.pid
|
28
|
+
bundle exec rake assets:clean assets:precompile
|
28
29
|
|
29
30
|
# Create the output directory and enter it
|
30
31
|
BUILD=#{@build_dir}
|
@@ -34,17 +35,17 @@ module Bard
|
|
34
35
|
cd $BUILD
|
35
36
|
|
36
37
|
# wait until server responds
|
37
|
-
|
38
|
+
echo waiting...
|
39
|
+
curl --retry 5 --retry-delay 2 http://localhost:3000
|
38
40
|
|
41
|
+
echo copying...
|
39
42
|
# Mirror the site to the build folder, ignoring links with query params
|
40
|
-
wget --reject-regex "(.*)\\?(.*)" -FEmnH http://
|
43
|
+
wget --reject-regex "(.*)\\?(.*)" -FEmnH http://localhost:3000/
|
41
44
|
echo #{@domain} > CNAME
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
+
BASH
|
46
|
+
ensure # cleanup
|
47
|
+
run! <<~BASH
|
45
48
|
cat tmp/pids/server.pid | xargs -I {} kill {}
|
46
|
-
|
47
|
-
# Clean up the assets
|
48
49
|
rm -rf public/assets
|
49
50
|
BASH
|
50
51
|
end
|
data/lib/bard/version.rb
CHANGED