sfrest 0.0.44 → 0.0.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfrest/backup.rb +15 -0
- data/lib/sfrest/stage.rb +5 -2
- data/lib/sfrest/version.rb +1 -1
- 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: 51d36dbe0a29aba983d022e9994d5ae195c43091c2ba789cb14fd629cc6165ed
|
4
|
+
data.tar.gz: 07b3f754680dfa15977ecbadb44becee43aa26cc0faf7bdeb524bfeb315b63bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c55a2e20dc000a7c428a2e5687cd3017af74b21879dda024e941e7c66c249bac3fcadb6781c3b5848b851a375bd14b4e8835818ca16cbbe433c031d96c3dfe
|
7
|
+
data.tar.gz: b1e43ff4361ae815f98642451cf7aaefdb902f12d16ea830932c8677a259bb3bd98a3ea367d3db3110298af76e33b56837be3f0b2355b73305aafe3570a51005
|
data/lib/sfrest/backup.rb
CHANGED
@@ -44,5 +44,20 @@ module SFRest
|
|
44
44
|
def backup_url(site_id, backup_id, lifetime = 60)
|
45
45
|
@conn.get("/api/v1/sites/#{site_id}/backups/#{backup_id}/url?lifetime=#{lifetime}")
|
46
46
|
end
|
47
|
+
|
48
|
+
# Configures the backup expiration and automatic deletion setting.
|
49
|
+
# @param [Integer] days Number of days after which backups are deleted.
|
50
|
+
def expiration_set(days)
|
51
|
+
payload = {
|
52
|
+
'expiration_days' => days
|
53
|
+
}
|
54
|
+
@conn.put('/api/v1/backup-expiration/', payload.to_json)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Gets the current the backup expiration and automatic deletion setting.
|
58
|
+
# @return [Hash]
|
59
|
+
def expiration_get
|
60
|
+
@conn.get('/api/v1/backup-expiration/')
|
61
|
+
end
|
47
62
|
end
|
48
63
|
end
|
data/lib/sfrest/stage.rb
CHANGED
@@ -35,6 +35,7 @@ module SFRest
|
|
35
35
|
# @param [Array] Stacks Array of stack ids to wipe
|
36
36
|
# @param [Boolean] skip_site_files site skip file transfer during staging
|
37
37
|
# @param [Array] skip_site_files_overwrite list of files to skip during staging
|
38
|
+
# @param [Boolean] force_psu_hook Force post-staging-update hook to run even if VCS paths are the same
|
38
39
|
#
|
39
40
|
# @return [Integer] Id of the staging task created.
|
40
41
|
# rubocop:disable Metrics/ParameterLists
|
@@ -45,7 +46,8 @@ module SFRest
|
|
45
46
|
synchronize_all_users: true,
|
46
47
|
wipe_stacks: [],
|
47
48
|
skip_site_files: false,
|
48
|
-
skip_site_files_overwrite: []
|
49
|
+
skip_site_files_overwrite: [],
|
50
|
+
force_psu_hook: false)
|
49
51
|
raise InvalidApiVersion, staging_versions unless staging_versions.include? 2
|
50
52
|
|
51
53
|
payload = { 'to_env' => env, 'sites' => sites,
|
@@ -54,7 +56,8 @@ module SFRest
|
|
54
56
|
'synchronize_all_users' => synchronize_all_users,
|
55
57
|
'wipe_stacks' => wipe_stacks,
|
56
58
|
'skip_site_files' => skip_site_files,
|
57
|
-
'skip_site_files_overwrite' => skip_site_files_overwrite
|
59
|
+
'skip_site_files_overwrite' => skip_site_files_overwrite,
|
60
|
+
'force_psu_hook' => force_psu_hook }.to_json
|
58
61
|
@conn.post('/api/v2/stage', payload)
|
59
62
|
end
|
60
63
|
# rubocop:enable Metrics/ParameterLists
|
data/lib/sfrest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ACSF Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|