bard 1.3.2 → 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: 5600a5fdcdae6f00c10a98e56c836afca1ccb4d2dc2bb2bd736f513583ae5946
4
- data.tar.gz: b479fccb4f68ea90e731581dc15d4ea09c5b53977588a89e6a7e54e74b8b31d5
3
+ metadata.gz: fa717f489274f4bb6340a42930201281ab1c012d368b9cbdee3263bac15ec62b
4
+ data.tar.gz: 010036ea949f34ac503ec179ebbace96f95762b0bdd7e35674a0674b8c2dc924
5
5
  SHA512:
6
- metadata.gz: b1af6063c459fccd82df1d5f339c356f583d1df3d28f60f39f1545fe89285bb6d7d3bef2965f1551f6aa5368b86cfdd3354aac295b06b602cfd237439676bb85
7
- data.tar.gz: d634bb866e0b952a35d911fd5a02b5ef8dd469c746a969a5bf616ac367d2d758f1650f4af617e1fef96445444191537dba8822a5ca1b2c0c28b55f1cf6fa9ab3
6
+ metadata.gz: 39bce499b49e7d9c33cf9147190a3b4ee986fe383b905d9c31e2fb9dfff79cdb819050943eb50615c230f96c7133e1b4816563afecb8cf0e4f4adc1854f46de6
7
+ data.tar.gz: 7765e288e7184d9d124e4a2c8b55aeda92fd6ab35f99c8d35ec3e887ecdb7b60b6009f7726e5095bf21c1accf59d8a862175b6b9110dff46673088ee3b30edc0
data/lib/bard/cli/new.rb CHANGED
@@ -34,7 +34,7 @@ class Bard::CLI::New < Bard::CLI::Command
34
34
  rvm use --create #{ruby_version}@#{project_name}
35
35
 
36
36
  gem list rails -i || gem install rails --no-document
37
- rails new #{project_name} --skip-kamal -m #{template_path}
37
+ rails new #{project_name} --skip-git --skip-kamal -m #{template_path}
38
38
  '
39
39
  BASH
40
40
  end
@@ -43,6 +43,7 @@ class Bard::CLI::New < Bard::CLI::Command
43
43
  Bard::Github.new(project_name).create_repo
44
44
  run! <<~BASH
45
45
  cd ../#{project_name}
46
+ git init -b master
46
47
  git add -A
47
48
  git commit -m"initial commit."
48
49
  git remote add origin git@github.com:botandrosedesign/#{project_name}
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.2"
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.2
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