sfrest 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sfrest/site.rb +9 -9
- data/lib/sfrest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16898910d9454541990159add8a5ad32b5bf07f0538a8c35c86c0abc448c2f60
|
4
|
+
data.tar.gz: 614c622674db0cbae5bd91db694c71afb526ebcc2d698b10fe845a6366924480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
60
|
-
#
|
61
|
-
#
|
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
|
-
|
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
|
-
|
71
|
-
current_path
|
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.
|
data/lib/sfrest/version.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.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-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|