bard-api 0.7.0 → 0.7.2
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 +4 -4
- data/lib/bard/api/app.rb +6 -2
- data/lib/bard/api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb3c291a8c804638f9772066f06931da361325929c1e1d83b4e05f96129402ea
|
|
4
|
+
data.tar.gz: 70bdf967ed1b328854bef3a96e10f55d4b4233c3f9152f3f1288e4fc91be5c14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6dfc5296a1c8304c9d3a4a2ead2c460b3192ecfb4e230b679708674e4a4fd04ed5bd7d1f955379a6fde4817c69df1e93a4a16e271c4d788ad85a06d74e23e186
|
|
7
|
+
data.tar.gz: 51613fc4e1cb69a2e4ca9eb38bc5486ef71fe6fc89cce3ddf32e1f5f93db8afc6c865254705bcd671804b91e2c66a66485d2b8b457b3d8604397bde8249da318
|
data/lib/bard/api/app.rb
CHANGED
|
@@ -4,7 +4,6 @@ require "rack"
|
|
|
4
4
|
require "json"
|
|
5
5
|
require "bundler"
|
|
6
6
|
require_relative "auth"
|
|
7
|
-
require "bard/backup"
|
|
8
7
|
|
|
9
8
|
module Bard
|
|
10
9
|
module Api
|
|
@@ -32,10 +31,11 @@ module Bard
|
|
|
32
31
|
# git pull lands a lockfile with not-yet-installed gems.
|
|
33
32
|
def spawn_detached_deploy(command)
|
|
34
33
|
Bundler.with_unbundled_env do
|
|
34
|
+
# After a Puma hot restart its listener survives exec; held here, it'd block the deploy's own restart.
|
|
35
35
|
pid = Process.spawn(
|
|
36
36
|
deploy_env,
|
|
37
37
|
"systemd-run", "--user", "--scope", "--collect", "--quiet", "bash", "-lc", command,
|
|
38
|
-
:in => "/dev/null", %i[out err] => ["log/bard-deploy.log", "a"],
|
|
38
|
+
:in => "/dev/null", %i[out err] => ["log/bard-deploy.log", "a"], close_others: true,
|
|
39
39
|
)
|
|
40
40
|
Process.detach(pid)
|
|
41
41
|
end
|
|
@@ -106,6 +106,8 @@ module Bard
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
def create_backup(request)
|
|
109
|
+
# Loaded per endpoint: bard-backup pulls in ActiveRecord via backhoe, which a database-less app can't boot with.
|
|
110
|
+
require "bard/backup"
|
|
109
111
|
with_auth(request) do |payload|
|
|
110
112
|
s3 = payload["s3"].transform_keys(&:to_sym)
|
|
111
113
|
project_name = Bard::Config.current.project_name
|
|
@@ -138,6 +140,7 @@ module Bard
|
|
|
138
140
|
end
|
|
139
141
|
|
|
140
142
|
def latest_backup(request)
|
|
143
|
+
require "bard/backup"
|
|
141
144
|
with_auth(request) do
|
|
142
145
|
backup = Bard::Backup.latest
|
|
143
146
|
json_response(200, backup.as_json)
|
|
@@ -147,6 +150,7 @@ module Bard
|
|
|
147
150
|
end
|
|
148
151
|
|
|
149
152
|
def config(request)
|
|
153
|
+
require "bard/backup"
|
|
150
154
|
with_auth(request) do
|
|
151
155
|
json_response(200, serialize_config(Bard::Config.current))
|
|
152
156
|
end
|
data/lib/bard/api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bard-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: jwt
|
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
118
|
version: '0'
|
|
119
119
|
requirements: []
|
|
120
|
-
rubygems_version:
|
|
120
|
+
rubygems_version: 4.0.6
|
|
121
121
|
specification_version: 4
|
|
122
122
|
summary: REST API for BARD-managed Rails projects
|
|
123
123
|
test_files: []
|