sfrest 0.0.37 → 0.0.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfrest/connection.rb +1 -0
- data/lib/sfrest/cron.rb +28 -0
- data/lib/sfrest/stage.rb +5 -2
- data/lib/sfrest/version.rb +1 -1
- data/lib/sfrest.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7039e02a8fd620b58a601bdbca8cb00353ac78819593e4d45612e9ec93e3bd5d
|
4
|
+
data.tar.gz: 0b62f183dabf16e48091bc6aeaffbc938c0de3d2b0171f65d4230eac8139f71d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 352329ee8101653fc4d58943724590fbe91b7b8243d0d72e9e82a62683c3276824b91c64b1fe1f4a91551cfb3659bdd516aaf090de588e35651b19a549c87abd
|
7
|
+
data.tar.gz: 46e63d0eb317bac5bd088dcf5cd0ae3bb4ffd84c8f4d3aaed07b589a3ceb76d0b40502fa9e5e49d0c4553614d69838c5f56b10fe279ffab0ba7fd8582a492536
|
data/lib/sfrest/connection.rb
CHANGED
data/lib/sfrest/cron.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SFRest
|
4
|
+
# Manipulates SF cron jobs.
|
5
|
+
class Cron
|
6
|
+
# @param [SFRest::Connection] conn
|
7
|
+
def initialize(conn)
|
8
|
+
@conn = conn
|
9
|
+
end
|
10
|
+
|
11
|
+
# Gets a list of cron jobs
|
12
|
+
# @param [Integer] page
|
13
|
+
# @param [Integer] items per page
|
14
|
+
def get_cron_jobs(page = nil, limit = nil)
|
15
|
+
args = {}
|
16
|
+
args['page'] = page unless page.nil?
|
17
|
+
args['limit'] = limit unless limit.nil?
|
18
|
+
url = "/api/v1/cronjobs?#{args.map { |k, v| "#{k}=#{v}" }.join('&')}"
|
19
|
+
@conn.get(url)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Gets a cron job by its node id
|
23
|
+
# @param [Integer] cron job nid
|
24
|
+
def get_cron_job(nid)
|
25
|
+
@conn.get("/api/v1/cronjobs/#{nid}")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/sfrest/stage.rb
CHANGED
@@ -34,6 +34,7 @@ module SFRest
|
|
34
34
|
# @param [synchronize_all_users] only stage the user accounts required for the related collections and groups
|
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
|
+
# @param [Array] skip_site_files_overwrite list of files to skip during staging
|
37
38
|
#
|
38
39
|
# @return [Integer] Id of the staging task created.
|
39
40
|
# rubocop:disable Metrics/ParameterLists
|
@@ -43,7 +44,8 @@ module SFRest
|
|
43
44
|
wipe_target_environment: false,
|
44
45
|
synchronize_all_users: true,
|
45
46
|
wipe_stacks: [],
|
46
|
-
skip_site_files: false
|
47
|
+
skip_site_files: false,
|
48
|
+
skip_site_files_overwrite: [])
|
47
49
|
raise InvalidApiVersion, staging_versions unless staging_versions.include? 2
|
48
50
|
|
49
51
|
payload = { 'to_env' => env, 'sites' => sites,
|
@@ -51,7 +53,8 @@ module SFRest
|
|
51
53
|
'wipe_target_environment' => wipe_target_environment,
|
52
54
|
'synchronize_all_users' => synchronize_all_users,
|
53
55
|
'wipe_stacks' => wipe_stacks,
|
54
|
-
'skip_site_files' => skip_site_files
|
56
|
+
'skip_site_files' => skip_site_files,
|
57
|
+
'skip_site_files_overwrite' => skip_site_files_overwrite }.to_json
|
55
58
|
@conn.post('/api/v2/stage', payload)
|
56
59
|
end
|
57
60
|
# rubocop:enable Metrics/ParameterLists
|
data/lib/sfrest/version.rb
CHANGED
data/lib/sfrest.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.38
|
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-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/sfrest/codebase.rb
|
108
108
|
- lib/sfrest/collection.rb
|
109
109
|
- lib/sfrest/connection.rb
|
110
|
+
- lib/sfrest/cron.rb
|
110
111
|
- lib/sfrest/domains.rb
|
111
112
|
- lib/sfrest/error.rb
|
112
113
|
- lib/sfrest/group.rb
|