sfrest 0.0.34 → 0.0.35

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: 4c59bfb1dd3ab6cde61f5db37e267d97824ceeea04f8306d25b083eadf394988
4
- data.tar.gz: 6546e19cee41d06a5f44b2c09b6d8c3fb090730b78e8f712388dd05b039f6966
3
+ metadata.gz: 16898910d9454541990159add8a5ad32b5bf07f0538a8c35c86c0abc448c2f60
4
+ data.tar.gz: 614c622674db0cbae5bd91db694c71afb526ebcc2d698b10fe845a6366924480
5
5
  SHA512:
6
- metadata.gz: 8eb3c3b56c037e6ab162d8ba7dfa939be6d8a5d5fe62124acbc1eae30259eb3a5fb5db5d129248870f91983b8badd8b0e5f0d4be8d62eec1126fcbc2588fbda3
7
- data.tar.gz: d96ed66389ea837e2b293f041d68b4751ebeedd08f69e582921afac2d85b07c7c95fb1055e5fdcaa10e6c23a9e2a0951ef0ae347127d8704b0fb9fa91106f188
6
+ metadata.gz: 29ef2feca8cd6d6bb3a78efa6ebef26cea4c6fd52aad8b05d3a859582047a9f263fca0f58526b28c35b01197d66b3bb7d373aa6a494b08a716040d99bb43f8dc
7
+ data.tar.gz: 62303e0c264dbddec7652a8d6ab45b75f6ba9bd701bf5e565c74cf9e9048d53c783863472e480cc99772c63e8dc9db5b5592c072524a123cc9e8f9ea4e675d4e
data/lib/sfrest/site.rb CHANGED
@@ -55,20 +55,21 @@ module SFRest
55
55
  res['sites'].first['id']
56
56
  end
57
57
 
58
- # Gets the complete list of sites
59
- # Makes multiple requests to the factory to get all the sites on the factory
60
- # @param [Boolean] show_incomplete whether to include incomplete sites in
61
- # the list. The default differs from UI/SF to maintain backward compatibility.
58
+ # Gets the complete list of sites.
59
+ #
60
+ # Makes multiple requests to the factory to get all the sites on the
61
+ # factory.
62
+ #
63
+ # @param [Hash] opts query parameters to be used in this request.
62
64
  # @return [Hash{'count' => Integer, 'sites' => Hash}]
63
- # rubocop: disable Style/OptionalBooleanParameter
64
- def site_list(show_incomplete = true)
65
+ def site_list(**opts)
65
66
  page = 1
66
67
  not_done = true
67
68
  count = 0
68
69
  sites = []
69
70
  while not_done
70
- current_path = '/api/v1/sites?page='.dup << page.to_s
71
- current_path <<= '&show_incomplete=true' if show_incomplete
71
+ opts['page'] = page
72
+ current_path = "/api/v1/sites?#{URI.encode_www_form(opts)}"
72
73
  res = @conn.get(current_path)
73
74
  if res['sites'] == []
74
75
  not_done = false
@@ -86,7 +87,6 @@ module SFRest
86
87
  end
87
88
  { 'count' => count, 'sites' => sites }
88
89
  end
89
- # rubocop: enable Style/OptionalBooleanParameter
90
90
 
91
91
  # Creates a site.
92
92
  # @param [String] sitename The name of the site to create.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SFRest
4
4
  # Just tracks the version of sfrest.
5
- VERSION = '0.0.34'
5
+ VERSION = '0.0.35'
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.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - ACSF Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-26 00:00:00.000000000 Z
11
+ date: 2021-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon