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 +4 -4
- data/install_files/apt_dependencies.rb +27 -5
- data/lib/bard/ci/github_actions.rb +1 -1
- data/lib/bard/version.rb +1 -1
- data/lib/bard.rb +2 -0
- 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: 805a92390c2917eeada517a6bc16b6e2e05269d203d7865a1fa6eecd67100026
|
4
|
+
data.tar.gz: d90481a4f76a4aeaf82368c391c30e525e29565cfefbe5517aa7e88c98476031
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
4
|
-
|
5
|
-
"
|
6
|
-
|
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
|
-
|
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/
|
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
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.
|
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-
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|