sfrest 0.0.47 → 0.0.48

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: 8ed946f6b0298f0ca4df3ac69cd0e115d753dc0ced81f3273ec553d6a74e63e0
4
- data.tar.gz: 614d2820f4d859fc6baca75af35ace650d325c7021315a7b2a0721914f3322d4
3
+ metadata.gz: d38168ced43804e889671f1c50c6c70cf55d21963f86a756651afd1c8436108c
4
+ data.tar.gz: 5bc2f1e86adf416232eeeea83e33b21eb451c782790a7cb3691a113ab47d322a
5
5
  SHA512:
6
- metadata.gz: 70e0dfc842e24b9c56ba1dcb3dd2490979f82083666bdc50dd3dcacc52252da17e5b2366c55f0cd526a6cc78385b7c69fb5b5f87d0d954f387bccb007d0efe1d
7
- data.tar.gz: 29da6afca5ea8ad958b9c8f6d01f9a7e3c065bb0056e57e7cc5d7f72c9253569b371bbcb942990606f392ae2550a79d608f6819b9cf8303b00e88242245f33f4
6
+ metadata.gz: 2382ca986e5667d3c33f28aa57826807d6e41f94bb5bcccc627e47e2039ae182312ffe7af8a6c16d242d3e532d3729c744484c12574c9b2c4c5ffed8454bb45c
7
+ data.tar.gz: 671f3259df03c914f183fef09b22de7546668dff2df521586ba1b7ee8d5c5f062bf98d679755f2ef3c7c1f2eabf47546b35e066880420f723d5c4e7bce863ae0
data/lib/sfrest/group.rb CHANGED
@@ -143,8 +143,7 @@ module SFRest
143
143
  # @return [Integer] the id of groupname
144
144
  def get_group_id(groupname)
145
145
  res = group_list
146
- id = group_data_from_results(res, groupname, 'group_id')
147
- return id if id
146
+ group_data_from_results(res, groupname, 'group_id')
148
147
  end
149
148
 
150
149
  # Extract the group data for 'key' based on the site result object
data/lib/sfrest/stage.rb CHANGED
@@ -15,7 +15,7 @@ module SFRest
15
15
  # @param [Boolean] skip_gardener skip staging the gardener and only stage the sites
16
16
  #
17
17
  # @return [Integer] Id of the staging task created.
18
- # rubocop: disable Style/OptionalBooleanParameter
18
+ # rubocop: disable Style/OptionalBooleanParameter, Metrics/ParameterLists
19
19
  def stage(to_env = 'test', sites = nil, email_site_status = false, skip_gardener = false)
20
20
  raise InvalidApiVersion, staging_versions unless staging_versions.include? 1
21
21
 
@@ -24,7 +24,7 @@ module SFRest
24
24
  'skip_gardener' => skip_gardener }.to_json
25
25
  @conn.post('/api/v1/stage', payload)
26
26
  end
27
- # rubocop: enable Style/OptionalBooleanParameter
27
+ # rubocop: enable Style/OptionalBooleanParameter, Metrics/ParameterLists
28
28
 
29
29
  # Stage a site using the new method
30
30
  # @param [String] to_env the name of of target env. defaults to test
data/lib/sfrest/task.rb CHANGED
@@ -147,7 +147,9 @@ module SFRest
147
147
  # @param [Integer] status Integerish the status of the task
148
148
  # see SFRest::Task::STATUS_*
149
149
  # @return [Array[Integer]]
150
+ # rubocop:disable Metrics/ParameterLists
150
151
  def find_task_ids(limit = nil, page = nil, group = nil, klass = nil, status = nil)
152
+ # rubocop:enable Metrics/ParameterLists
151
153
  res = find_tasks limit: limit, page: page, group: group, klass: klass, status: status
152
154
  task_ids = []
153
155
  i = 0
@@ -303,7 +305,7 @@ module SFRest
303
305
  def wait_until_state(task_id, state, max_nap)
304
306
  blink_time = 5 # wake up and scan
305
307
  nap_start = Time.now
306
- state_method = method("task_#{state}?".to_sym)
308
+ state_method = method(:"task_#{state}?")
307
309
  loop do
308
310
  break if state_method.call(task_id)
309
311
  raise TaskNotDoneError, "Task: #{task_id} has taken too long to complete!" if Time.new > (nap_start + max_nap)
data/lib/sfrest/theme.rb CHANGED
@@ -9,7 +9,9 @@ module SFRest
9
9
  end
10
10
 
11
11
  # Sends a theme notification.
12
+ # rubocop:disable Metrics/ParameterLists
12
13
  def send_theme_notification(scope = 'site', event = 'modify', nid = 0, theme = '')
14
+ # rubocop:enable Metrics/ParameterLists
13
15
  current_path = '/api/v1/theme/notification'
14
16
  payload = { 'scope' => scope, 'event' => event, 'nid' => nid, 'theme' => theme }.to_json
15
17
  @conn.post(current_path, payload)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SFRest
4
4
  # Just tracks the version of sfrest.
5
- VERSION = '0.0.47'
5
+ VERSION = '0.0.48'
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.47
4
+ version: 0.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - ACSF Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-02 00:00:00.000000000 Z
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.4.22
152
+ rubygems_version: 3.0.3.1
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Acquia Site Factory Rest API.