globus_client 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -18
- data/api_test.rb +2 -2
- data/lib/globus_client/endpoint.rb +4 -0
- data/lib/globus_client/version.rb +1 -1
- data/lib/globus_client.rb +11 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb50d72f725c17c845856c0f00f8753c1c709ee1adbe9876a2863692692f7274
|
4
|
+
data.tar.gz: 7c2b9379dcf066d3f827b10ecc8eb52106054bd1f5203e16015d8e21435fe9cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2e10ae21d5e6d4c1cf2a42e69ee2e8608772812136e8f068e13418b6ddb606de72ef3e8e22c8a774baedbf986f16ccf0e1499cc1bf6f563866636d9a3c3c48e
|
7
|
+
data.tar.gz: 8a0b323fa8002d1591f1b4ddb57e400862647d782faeb78da92e548fcdb5ef1acf064b499683db0c9609f50d9afcf06a4d41d99f1d4c36f0e3829ccdfc8f151a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
globus_client (0.
|
4
|
+
globus_client (0.12.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
faraday
|
7
7
|
faraday-retry
|
@@ -10,21 +10,23 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (7.0.
|
13
|
+
activesupport (7.0.8)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 1.6, < 2)
|
16
16
|
minitest (>= 5.1)
|
17
17
|
tzinfo (~> 2.0)
|
18
|
-
addressable (2.8.
|
18
|
+
addressable (2.8.5)
|
19
19
|
public_suffix (>= 2.0.2, < 6.0)
|
20
20
|
ast (2.4.2)
|
21
|
+
base64 (0.1.1)
|
21
22
|
byebug (11.1.3)
|
22
23
|
concurrent-ruby (1.2.2)
|
23
24
|
crack (0.4.5)
|
24
25
|
rexml
|
25
26
|
diff-lcs (1.5.0)
|
26
27
|
docile (1.4.0)
|
27
|
-
faraday (2.7.
|
28
|
+
faraday (2.7.11)
|
29
|
+
base64
|
28
30
|
faraday-net_http (>= 2.0, < 3.1)
|
29
31
|
ruby2_keywords (>= 0.0.4)
|
30
32
|
faraday-net_http (3.0.2)
|
@@ -36,7 +38,7 @@ GEM
|
|
36
38
|
json (2.6.3)
|
37
39
|
language_server-protocol (3.17.0.3)
|
38
40
|
lint_roller (1.1.0)
|
39
|
-
minitest (5.
|
41
|
+
minitest (5.20.0)
|
40
42
|
parallel (1.23.0)
|
41
43
|
parser (3.2.2.3)
|
42
44
|
ast (~> 2.4.1)
|
@@ -46,7 +48,7 @@ GEM
|
|
46
48
|
rainbow (3.1.1)
|
47
49
|
rake (13.0.6)
|
48
50
|
regexp_parser (2.8.1)
|
49
|
-
rexml (3.2.
|
51
|
+
rexml (3.2.6)
|
50
52
|
rspec (3.12.0)
|
51
53
|
rspec-core (~> 3.12.0)
|
52
54
|
rspec-expectations (~> 3.12.0)
|
@@ -60,26 +62,28 @@ GEM
|
|
60
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
63
|
rspec-support (~> 3.12.0)
|
62
64
|
rspec-support (3.12.1)
|
63
|
-
rubocop (1.
|
65
|
+
rubocop (1.56.3)
|
66
|
+
base64 (~> 0.1.1)
|
64
67
|
json (~> 2.3)
|
68
|
+
language_server-protocol (>= 3.17.0)
|
65
69
|
parallel (~> 1.10)
|
66
70
|
parser (>= 3.2.2.3)
|
67
71
|
rainbow (>= 2.2.2, < 4.0)
|
68
72
|
regexp_parser (>= 1.8, < 3.0)
|
69
73
|
rexml (>= 3.2.5, < 4.0)
|
70
|
-
rubocop-ast (>= 1.28.
|
74
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
71
75
|
ruby-progressbar (~> 1.7)
|
72
76
|
unicode-display_width (>= 2.4.0, < 3.0)
|
73
77
|
rubocop-ast (1.29.0)
|
74
78
|
parser (>= 3.2.1.0)
|
75
79
|
rubocop-capybara (2.18.0)
|
76
80
|
rubocop (~> 1.41)
|
77
|
-
rubocop-factory_bot (2.
|
81
|
+
rubocop-factory_bot (2.24.0)
|
78
82
|
rubocop (~> 1.33)
|
79
|
-
rubocop-performance (1.
|
83
|
+
rubocop-performance (1.19.1)
|
80
84
|
rubocop (>= 1.7.0, < 2.0)
|
81
85
|
rubocop-ast (>= 0.4.0)
|
82
|
-
rubocop-rspec (2.
|
86
|
+
rubocop-rspec (2.24.0)
|
83
87
|
rubocop (~> 1.33)
|
84
88
|
rubocop-capybara (~> 2.17)
|
85
89
|
rubocop-factory_bot (~> 2.22)
|
@@ -91,26 +95,26 @@ GEM
|
|
91
95
|
simplecov_json_formatter (~> 0.1)
|
92
96
|
simplecov-html (0.12.3)
|
93
97
|
simplecov_json_formatter (0.1.4)
|
94
|
-
standard (1.
|
98
|
+
standard (1.31.1)
|
95
99
|
language_server-protocol (~> 3.17.0.2)
|
96
100
|
lint_roller (~> 1.0)
|
97
|
-
rubocop (~> 1.
|
101
|
+
rubocop (~> 1.56.2)
|
98
102
|
standard-custom (~> 1.0.0)
|
99
|
-
standard-performance (~> 1.
|
103
|
+
standard-performance (~> 1.2)
|
100
104
|
standard-custom (1.0.2)
|
101
105
|
lint_roller (~> 1.0)
|
102
106
|
rubocop (~> 1.50)
|
103
|
-
standard-performance (1.
|
107
|
+
standard-performance (1.2.0)
|
104
108
|
lint_roller (~> 1.1)
|
105
|
-
rubocop-performance (~> 1.
|
109
|
+
rubocop-performance (~> 1.19.0)
|
106
110
|
tzinfo (2.0.6)
|
107
111
|
concurrent-ruby (~> 1.0)
|
108
112
|
unicode-display_width (2.4.2)
|
109
|
-
webmock (3.
|
113
|
+
webmock (3.19.1)
|
110
114
|
addressable (>= 2.8.0)
|
111
115
|
crack (>= 0.3.2)
|
112
116
|
hashdiff (>= 0.4.0, < 2.0.0)
|
113
|
-
zeitwerk (2.6.
|
117
|
+
zeitwerk (2.6.11)
|
114
118
|
|
115
119
|
PLATFORMS
|
116
120
|
x86_64-darwin-19
|
data/api_test.rb
CHANGED
@@ -21,8 +21,8 @@ Benchmark.bm(20) do |benchmark|
|
|
21
21
|
GlobusClient.mkdir(user_id:, path:)
|
22
22
|
end
|
23
23
|
|
24
|
-
benchmark.report("
|
25
|
-
@user_exists = GlobusClient.
|
24
|
+
benchmark.report("user_valid?:") do
|
25
|
+
@user_exists = GlobusClient.user_valid?(user_id)
|
26
26
|
end
|
27
27
|
|
28
28
|
benchmark.report("before_perms:") do
|
@@ -197,6 +197,10 @@ class GlobusClient
|
|
197
197
|
req.headers["Content-Type"] = "application/json"
|
198
198
|
end
|
199
199
|
|
200
|
+
# debugging of Globus responses
|
201
|
+
response_body = JSON.parse(response.body)
|
202
|
+
raise(StandardError, "Response is missing DATA in: #{response_body}") unless response_body.key?("DATA")
|
203
|
+
|
200
204
|
JSON
|
201
205
|
.parse(response.body)["DATA"]
|
202
206
|
.find { |acl| acl["path"] == full_path }
|
data/lib/globus_client.rb
CHANGED
@@ -23,7 +23,17 @@ class GlobusClient
|
|
23
23
|
# @param auth_url [String] the authentication API URL
|
24
24
|
def configure(client_id:, client_secret:, uploads_directory:, transfer_endpoint_id:, transfer_url: default_transfer_url, auth_url: default_auth_url)
|
25
25
|
instance.config = OpenStruct.new(
|
26
|
-
|
26
|
+
# For the initial token, use a dummy value to avoid hitting any APIs
|
27
|
+
# during configuration, allowing the `TokenWrapper` to handle auto-magic
|
28
|
+
# token refreshing. Why not immediately get a valid token? Our apps
|
29
|
+
# commonly invoke client `.configure` methods in the initializer in all
|
30
|
+
# application environments, even those that are never expected to
|
31
|
+
# connect to production APIs, such as local development machines.
|
32
|
+
#
|
33
|
+
# NOTE: `nil` and blank string cannot be used as dummy values here as
|
34
|
+
# they lead to a malformed request to be sent, which triggers an
|
35
|
+
# exception not rescued by `TokenWrapper`
|
36
|
+
token: "a temporary dummy token to avoid hitting the API before it is needed",
|
27
37
|
client_id:,
|
28
38
|
client_secret:,
|
29
39
|
uploads_directory:,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globus_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Collier
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-09-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.4.
|
211
|
+
rubygems_version: 3.4.19
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: Interface for interacting with the Globus API.
|