sfrest 0.0.38 → 0.0.39

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: 7039e02a8fd620b58a601bdbca8cb00353ac78819593e4d45612e9ec93e3bd5d
4
- data.tar.gz: 0b62f183dabf16e48091bc6aeaffbc938c0de3d2b0171f65d4230eac8139f71d
3
+ metadata.gz: 1e2e8fc07cf9577be1a4a1ccca84a3049b992e27e318a8b1d6d7fcd575f82fee
4
+ data.tar.gz: 4c234cc4ce912626b82c1899a139026c02c214176a83018118e57d0714ef2dc1
5
5
  SHA512:
6
- metadata.gz: 352329ee8101653fc4d58943724590fbe91b7b8243d0d72e9e82a62683c3276824b91c64b1fe1f4a91551cfb3659bdd516aaf090de588e35651b19a549c87abd
7
- data.tar.gz: 46e63d0eb317bac5bd088dcf5cd0ae3bb4ffd84c8f4d3aaed07b589a3ceb76d0b40502fa9e5e49d0c4553614d69838c5f56b10fe279ffab0ba7fd8582a492536
6
+ metadata.gz: 60dc925219e31dce103270055b1dbf73285f4b6ee4a08d18f697603a4d85c17eeb04aeaf7c82c0155ceed9514867cb2a7830955632f7d08217070d4db2c0878b
7
+ data.tar.gz: 65076385c8d487c6adc87d1981bf8a39005f9208056b0733ec2a322d80949d2f46808833bd762309e0280f3b760c45c8898bf93d40e50c1fcca4b3b51eac896c
@@ -169,6 +169,7 @@ module SFRest
169
169
  collection
170
170
  cron
171
171
  domains
172
+ factory_standard_domain
172
173
  group
173
174
  info
174
175
  profile
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SFRest
4
+ # We need to keep this naming due to the way connection.rb autoloads things.
5
+ # rubocop: disable Naming/ClassAndModuleCamelCase
6
+ # Manage the factory standard domain feature.
7
+ class Factory_standard_domain
8
+ # rubocop: enable Naming/ClassAndModuleCamelCase
9
+
10
+ # @param [SFRest::Connection] conn
11
+ def initialize(conn)
12
+ @conn = conn
13
+ end
14
+
15
+ # Get current factory standard domains settings
16
+ #
17
+ # @return [Array] an array of factory standard domains with their associated settings.
18
+ def factory_standard_domain_mapping
19
+ @conn.get('/api/v1/factory-standard-domains')
20
+ end
21
+
22
+ # Enable the factory standard domains settings for a given template name.
23
+ # @param [String] domain_template_name the domain template name.
24
+ # @param [Array] new_template the templates to be used.
25
+ #
26
+ # @return [Array] an array of factory standard domains with their associated settings.
27
+ def enable_factory_standard_domain_template(domain_template_name, new_template = [])
28
+ payload = {
29
+ 'new_template' => new_template
30
+ }.to_json
31
+ @conn.put("/api/v1/factory-standard-domains/#{domain_template_name}", payload)
32
+ end
33
+
34
+ # Disable the centralized role management settings for a given role.
35
+ # @param [String] domain_template_name the domain template name.
36
+ #
37
+ # @return [Array] an array of factory standard domains with their associated settings.
38
+ def disable_factory_standard_domain_template(domain_template_name)
39
+ @conn.delete("/api/v1/factory-standard-domains/#{domain_template_name}")
40
+ end
41
+
42
+ # Backfills the factory standard domains using the templates defined.
43
+ #
44
+ # @return [Array] an array containing the message and task_id for that operation.
45
+ def backfill_domains
46
+ @conn.post('/api/v1/factory-standard-domains', {}.to_json)
47
+ end
48
+ end
49
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SFRest
4
4
  # Just tracks the version of sfrest.
5
- VERSION = '0.0.38'
5
+ VERSION = '0.0.39'
6
6
  end
data/lib/sfrest.rb CHANGED
@@ -17,6 +17,7 @@ require 'sfrest/connection'
17
17
  require 'sfrest/cron'
18
18
  require 'sfrest/domains'
19
19
  require 'sfrest/error'
20
+ require 'sfrest/factory_standard_domain'
20
21
  require 'sfrest/group'
21
22
  require 'sfrest/info'
22
23
  require 'sfrest/profile'
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.38
4
+ version: 0.0.39
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-02-11 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -110,6 +110,7 @@ files:
110
110
  - lib/sfrest/cron.rb
111
111
  - lib/sfrest/domains.rb
112
112
  - lib/sfrest/error.rb
113
+ - lib/sfrest/factory_standard_domain.rb
113
114
  - lib/sfrest/group.rb
114
115
  - lib/sfrest/info.rb
115
116
  - lib/sfrest/pathbuilder.rb