bard 0.44.0 → 0.45.1

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: 6ae411fccf104a6b049a476bfcc662b26d258687a304aa6a4115078a37aafa3f
4
- data.tar.gz: ef5e3967d6569b1fb9c58b55ccc668a98fbda97b3f626cd31c3897106ecb04c2
3
+ metadata.gz: ae2aaf36ed328b519c7b21dde4613e2c5f9549477d032cb5208512a8a50c23fd
4
+ data.tar.gz: a8d341af27fd88167618074ed12621a3cec1c14ed80abab8bb359f2678043de2
5
5
  SHA512:
6
- metadata.gz: 59a9e9b54fa1669571c4e61cdcb8ff12e19b511ab12a31ac79a9481cab6964ec53730daa789f685053ce658ba340efe5bfb7f1b031114436563a12c13a3d4ff1
7
- data.tar.gz: 11036591830610869ab72ba374f47bd5d95b4de1f991366636dbc137fd394f75494c5a8ae192f7a089fddfd7e7b7f1756b2e1da6cc6f2ab3ada362ac93747130
6
+ metadata.gz: 2f5de7283881fd2d654fe4a9c4975c9d03c110520982a9cfbb828bf1c31eb66da9aab1fa86e44218899b0ec85483105aa7efe9ec61319facf9e05c0001c8fad4
7
+ data.tar.gz: 4f52fd46c07b105ae5ee32c379296785a0c06c2ba78c69a0731b8379c3577afdd7eaaddad09cb0d91d4dc2b247c0a082e1e383f9b1253beb4c94073f6b47e13e
data/lib/bard/base.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "thor"
2
2
  require "term/ansicolor"
3
3
  require "open3"
4
+ require "uri"
4
5
 
5
6
  class Bard::CLI < Thor
6
7
  include Term::ANSIColor
data/lib/bard/ci.rb CHANGED
@@ -38,11 +38,11 @@ class Bard::CLI < Thor
38
38
  end
39
39
 
40
40
  def exists?
41
- `curl -s -I #{ci_host}/?token=botandrose` =~ /\b200 OK\b/
41
+ `curl -s -I #{ci_host}/` =~ /\b200 OK\b/
42
42
  end
43
43
 
44
44
  def console
45
- raw = `curl -s #{ci_host}/lastBuild/console?token=botandrose`
45
+ raw = `curl -s #{ci_host}/lastBuild/console`
46
46
  raw[%r{<pre.*?>(.+)</pre>}m, 1]
47
47
  end
48
48
 
@@ -51,17 +51,21 @@ class Bard::CLI < Thor
51
51
  private
52
52
 
53
53
  def get_last_time_elapsed
54
- response = `curl -s #{ci_host}/lastStableBuild/api/xml?token=botandrose`
54
+ response = `curl -s #{ci_host}/lastStableBuild/api/xml`
55
55
  response.match(/<duration>(\d+)<\/duration>/)
56
56
  $1 ? $1.to_i / 1000 : nil
57
57
  end
58
58
 
59
+ def auth
60
+ "botandrose:11cc2ba6ef2e43fbfbedc1f466724f6290"
61
+ end
62
+
59
63
  def ci_host
60
- "http://botandrose:thecakeisalie!@ci.botandrose.com/job/#{project_name}"
64
+ "http://#{auth}@ci.botandrose.com/job/#{project_name}"
61
65
  end
62
66
 
63
67
  def start
64
- command = "curl -s -I -X POST '#{ci_host}/buildWithParameters?token=botandrose&GIT_REF=#{sha}'"
68
+ command = "curl -s -I -X POST -L '#{ci_host}/buildWithParameters?GIT_REF=#{sha}'"
65
69
  output = `#{command}`
66
70
  @queueId = output[%r{Location: .+/queue/item/(\d+)/}, 1].to_i
67
71
  end
data/lib/bard/config.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "uri"
2
+
1
3
  class Bard::CLI < Thor
2
4
  class Config
3
5
  def initialize project_name, path
data/lib/bard/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "0.44.0"
2
+ VERSION = "0.45.1"
3
3
  end
4
4
 
data/lib/bard.rb CHANGED
@@ -178,7 +178,7 @@ class Bard::CLI < Thor
178
178
 
179
179
  command = "curl -sfL #{url} 2>&1 1>/dev/null"
180
180
  unless system command
181
- puts "#{server.to_s.capitalize} is down!"
181
+ puts "#{server.key.to_s.capitalize} is down!"
182
182
  exit 1
183
183
  end
184
184
  end
@@ -197,5 +197,10 @@ class Bard::CLI < Thor
197
197
  def download_ci_test_coverage
198
198
  rsync :from, :ci, "coverage"
199
199
  end
200
+
201
+ desc "vim", "open all files that have changed since master"
202
+ def vim
203
+ exec "vim -p `git diff master --name-only | grep -v sass$ | tac`"
204
+ end
200
205
  end
201
206
 
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: 0.44.0
4
+ version: 0.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2021-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  requirements: []
175
- rubygems_version: 3.0.3
175
+ rubygems_version: 3.0.8
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: CLI to automate common development tasks.