bard-api 0.4.0 → 0.5.0
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 +10 -6
- data/lib/bard/api/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60efdcaa06460e992d61dcf738ee45a2f45c1c681c7a7ad79fa16691f73af1f6
|
|
4
|
+
data.tar.gz: a2dceba794d6160e4f7d19a97c2e632e6d4a3bf92ae8667e6c3578d4bafa16cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 994347c9042e652d6099d584ce4d599d19338bb295ca7fabb73087e6f29b042bc7853cbe51b0e8749cd85378d0edce97175096b6a37d541670b235f4e8fb8ced
|
|
7
|
+
data.tar.gz: 46c4672f58864f00c677369e7ac5cfbbed64285aef40096a2538b4ff5af305d34160a81ce7c6e92a0996bef7f6fc7f891f56eba3addb563850372c747b92fc78
|
data/lib/bard/api/app.rb
CHANGED
|
@@ -37,11 +37,15 @@ module Bard
|
|
|
37
37
|
|
|
38
38
|
def create_backup(request)
|
|
39
39
|
with_auth(request) do |payload|
|
|
40
|
+
s3 = payload["s3"].transform_keys(&:to_sym)
|
|
41
|
+
project_name = Bard::Config.current.project_name
|
|
42
|
+
|
|
40
43
|
backup = Bard::Backup.create!(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
type: :s3,
|
|
45
|
+
path: "bard-backup/#{project_name}",
|
|
46
|
+
**s3,
|
|
44
47
|
)
|
|
48
|
+
|
|
45
49
|
json_response(200, backup.as_json)
|
|
46
50
|
end
|
|
47
51
|
end
|
|
@@ -63,17 +67,17 @@ module Bard
|
|
|
63
67
|
|
|
64
68
|
def serialize_config(bard_config)
|
|
65
69
|
backup = bard_config.backup
|
|
66
|
-
production = bard_config.
|
|
70
|
+
production = bard_config.targets[:production]
|
|
67
71
|
{
|
|
68
72
|
project_name: bard_config.project_name,
|
|
69
73
|
backup: {
|
|
70
74
|
enabled: backup.enabled?,
|
|
71
75
|
bard_managed: backup.bard?,
|
|
72
76
|
self_managed: backup.self_managed?,
|
|
73
|
-
encryption_enabled:
|
|
77
|
+
encryption_enabled: !!bard_config.encrypt,
|
|
74
78
|
destinations: backup.destinations.map { |d| { name: d[:name], type: d[:type] } },
|
|
75
79
|
},
|
|
76
|
-
servers: production ? { production: { pings:
|
|
80
|
+
servers: production ? { production: { pings: production.ping } } : {},
|
|
77
81
|
}
|
|
78
82
|
end
|
|
79
83
|
|
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.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-05-
|
|
10
|
+
date: 2026-05-16 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: jwt
|
|
@@ -57,28 +57,28 @@ dependencies:
|
|
|
57
57
|
requirements:
|
|
58
58
|
- - ">="
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
60
|
+
version: '2.0'
|
|
61
61
|
type: :runtime
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
67
|
+
version: '2.0'
|
|
68
68
|
- !ruby/object:Gem::Dependency
|
|
69
69
|
name: bard-backup
|
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
|
72
72
|
- - ">="
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
74
|
+
version: '0.10'
|
|
75
75
|
type: :runtime
|
|
76
76
|
prerelease: false
|
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
79
|
- - ">="
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0'
|
|
81
|
+
version: '0.10'
|
|
82
82
|
- !ruby/object:Gem::Dependency
|
|
83
83
|
name: rack-test
|
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|