sfrest 0.0.44 → 0.0.46

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: a7c3089a14ab003da825c324f48c4e5566e1aed291697620497356a73dd1570d
4
+ data.tar.gz: 1435a6839f32c63347f98c7b7a0e287d9505242cd5b7a9b0aefdfa7bae4c5c9b
5
5
  SHA512:
6
- metadata.gz: f45092c3c47e83d4489e4c5bb22e56886072f1e93f2ad4a3cb9023ebb73f2d7ad569a604f242952958b3a752d62b97fb1b4c7893a6d7ecf4222359ebf0cfb632
7
- data.tar.gz: 99719c9f33909d86ad410f6e54cdc73699a96a5ea6e27e73d1b957da43787ce13f1d6e25cd6c42bf5bc70f4c0c598e00f02c86b16aba6eb088e6df7e431b63b7
6
+ metadata.gz: 840a9efdf45a6e4fd89c7961a58200d3af33a4e8dac09cb6ba3189f5a963cc33ee96979146a7702880034d98a448f4d1a9fc578f656c908ac0d0a34f7e8ce184
7
+ data.tar.gz: ac0f053e2777687b0580b972ef10d83e8bbc3dbb7988b3915043111701773c70e8df5189f958bc8813ac078bb2d7689b38e6d8563f3afd84331091b08abfc669
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
@@ -20,6 +20,19 @@ module SFRest
20
20
  @conn.get(current_path)
21
21
  end
22
22
 
23
+ # Get all domains of all sites known to site factory.
24
+ # @param [Hash] opts - 'limit' and 'page' are supported for pagination.
25
+ # @return [Hash] {
26
+ # "count": 111,
27
+ # "domains": [
28
+ # {'nid' => 2, 'domain' => 'foobar.com', 'type' => 'simple', 'readonly' => true},
29
+ # {'nid' => 6, 'domain' => 'zoofoo.com', 'type' => 'customerStandard', 'readonly' => false}
30
+ # ]}
31
+ def get_all(**opts)
32
+ current_path = "/api/v1/domains?#{URI.encode_www_form(opts)}"
33
+ @conn.get(current_path)
34
+ end
35
+
23
36
  # Get the custom domains on a node
24
37
  # @param [Integer] node_id The id of the node.
25
38
  #
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.46'
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.46
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: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon