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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15bac5247b3e3d00d8768db3340f88a89bbe0de1b9be834fd7e33b894ad07c9f
4
- data.tar.gz: e854d3e6b0dc267d9bd2d7c859481cfa53fa3e668da0eb328cefa2958e187fd6
3
+ metadata.gz: 51d36dbe0a29aba983d022e9994d5ae195c43091c2ba789cb14fd629cc6165ed
4
+ data.tar.gz: 07b3f754680dfa15977ecbadb44becee43aa26cc0faf7bdeb524bfeb315b63bb
5
5
  SHA512:
6
- metadata.gz: f45092c3c47e83d4489e4c5bb22e56886072f1e93f2ad4a3cb9023ebb73f2d7ad569a604f242952958b3a752d62b97fb1b4c7893a6d7ecf4222359ebf0cfb632
7
- data.tar.gz: 99719c9f33909d86ad410f6e54cdc73699a96a5ea6e27e73d1b957da43787ce13f1d6e25cd6c42bf5bc70f4c0c598e00f02c86b16aba6eb088e6df7e431b63b7
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 }.to_json
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SFRest
4
4
  # Just tracks the version of sfrest.
5
- VERSION = '0.0.44'
5
+ VERSION = '0.0.45'
6
6
  end
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.44
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-08-10 00:00:00.000000000 Z
11
+ date: 2022-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon