bard 0.50.0 → 0.50.2

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: b0143951321b002520b2680aa29b95c809dd2e53b6bbffffee26f2846ec77da6
4
- data.tar.gz: 27d3e89add08daf40c0ecdfc2e689d476015faa527e7cccaa9d2ff11159d89fb
3
+ metadata.gz: 805a92390c2917eeada517a6bc16b6e2e05269d203d7865a1fa6eecd67100026
4
+ data.tar.gz: d90481a4f76a4aeaf82368c391c30e525e29565cfefbe5517aa7e88c98476031
5
5
  SHA512:
6
- metadata.gz: 909fd33f890a8429bf6013ad0cc133ee36ee7fdea69d8c17a7fff10c5df88126d0edce954a36c434baa653c8ca47deefeeb31042099ea15cbd3b14c52eeebf38
7
- data.tar.gz: 9d65e8741eb39854403e7929ec93a829091ad2bd6bd041790537162be0b8c62b90941bf426547b3fec999a03150caaf3079ec224d2b7304ab01a8bec98fa2e22
6
+ metadata.gz: 1863f7bf1bf5336de2227dee80ef71fb7792b11dd3c31b4102f66b898a770f860b260cec73680ea50fe1516d9aa19360130e2a12950ec0bb7d5ed3d58aaacd07
7
+ data.tar.gz: 00650d41d9add6bdffe44701a21b7649868bdf9948e84d8490a341bbb4252257171288715bd2535649f384cf8e2171460f976b70d8840278e2aa61b03c085fda
@@ -1,10 +1,32 @@
1
1
  module AptDependencies
2
+ extend self
3
+
2
4
  def self.ensure!
3
- deps = File.readlines("Aptfile", chomp: true)
4
- deps.map do |dep|
5
- "apt list #{dep} | grep '\\[installed\\]' || sudo apt install -y #{dep}"
6
- end.join(" && ")
5
+ return "true" if deps_to_install.none?
6
+ if sudo_password_required? && ENV["RAILS_ENV"] != "development"
7
+ $stderr.puts "sudo requires password! cannot install #{deps_to_install.join}"
8
+ exit 1
9
+ else
10
+ "sudo apt install -y #{deps_to_install.join}"
11
+ end
12
+ end
13
+
14
+ private
15
+
16
+ def deps_to_install
17
+ installed_deps = `apt list imagemagick thunderbird --installed 2>/dev/null`.chomp.split("\n")[1..]
18
+ .map { |line| line.split("/")[0] }
19
+ deps - installed_deps
20
+ end
21
+
22
+ def deps
23
+ @deps ||= File.readlines("Aptfile", chomp: true).select { |line| line.length > 0 }
7
24
  rescue Errno::ENOENT
8
- "true"
25
+ @deps = []
26
+ end
27
+
28
+ def sudo_password_required?
29
+ !system("sudo -n true 2>/dev/null")
9
30
  end
10
31
  end
32
+
@@ -147,7 +147,7 @@ class Bard::CLI < Thor
147
147
  uri = if path =~ /^http/
148
148
  URI(path)
149
149
  else
150
- URI("https://api.github.com/repos/botandrose/#{project_name}/actions/#{path}")
150
+ URI("https://api.github.com/repos/botandrosedesign/#{project_name}/actions/#{path}")
151
151
  end
152
152
 
153
153
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
data/lib/bard/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "0.50.0"
2
+ VERSION = "0.50.2"
3
3
  end
4
4
 
data/lib/bard.rb CHANGED
@@ -162,6 +162,8 @@ class Bard::CLI < Thor
162
162
  def install
163
163
  install_files_path = File.expand_path(File.join(__dir__, "../install_files/*"))
164
164
  system "cp -R #{install_files_path} bin/"
165
+ github_files_path = File.expand_path(File.join(__dir__, "../install_files/.github"))
166
+ system "cp -R #{github_files_path} ./"
165
167
  end
166
168
 
167
169
  desc "ping [SERVER=production]", "hits the server over http to verify that its up."
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.50.0
4
+ version: 0.50.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-27 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor