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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 573ae6cb7e5e7436c17d556e135ae412e91aececfdbe2b85a1dfa2ff813302df
4
- data.tar.gz: 7ca7acc2ef22b1bf02bccb4ad19ea548d1d66756379d0882c488f9ac8bb3c2e7
3
+ metadata.gz: 7039e02a8fd620b58a601bdbca8cb00353ac78819593e4d45612e9ec93e3bd5d
4
+ data.tar.gz: 0b62f183dabf16e48091bc6aeaffbc938c0de3d2b0171f65d4230eac8139f71d
5
5
  SHA512:
6
- metadata.gz: 886b5c70829c51516e3812c062188a52883541d922ad1bf9c952bb05093aa0b890616b5a6a5b3f4ed24604fd5d4b2551c803922773d826a1fd3a82e7e4583d6f
7
- data.tar.gz: aaa80a02745ecc266300b76f37c6e0874adb2e9e2ca640ca94419f6fa48d23b64bb6eeab915a2dc4a6c2d8d21f6957014ed6c45c92e68bb0d919ddf17f57a8dc
6
+ metadata.gz: 352329ee8101653fc4d58943724590fbe91b7b8243d0d72e9e82a62683c3276824b91c64b1fe1f4a91551cfb3659bdd516aaf090de588e35651b19a549c87abd
7
+ data.tar.gz: 46e63d0eb317bac5bd088dcf5cd0ae3bb4ffd84c8f4d3aaed07b589a3ceb76d0b40502fa9e5e49d0c4553614d69838c5f56b10fe279ffab0ba7fd8582a492536
@@ -167,6 +167,7 @@ module SFRest
167
167
  centralized_role_management
168
168
  codebase
169
169
  collection
170
+ cron
170
171
  domains
171
172
  group
172
173
  info
@@ -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 }.to_json
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SFRest
4
4
  # Just tracks the version of sfrest.
5
- VERSION = '0.0.37'
5
+ VERSION = '0.0.38'
6
6
  end
data/lib/sfrest.rb CHANGED
@@ -14,6 +14,7 @@ require 'sfrest/centralized_role_management'
14
14
  require 'sfrest/codebase'
15
15
  require 'sfrest/collection'
16
16
  require 'sfrest/connection'
17
+ require 'sfrest/cron'
17
18
  require 'sfrest/domains'
18
19
  require 'sfrest/error'
19
20
  require 'sfrest/group'
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.37
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-01-28 00:00:00.000000000 Z
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