globus_client 0.17.0 → 0.19.0
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/.rubocop.yml +7 -2
- data/Gemfile.lock +66 -60
- data/README.md +2 -0
- data/lib/globus_client/endpoint.rb +2 -2
- data/lib/globus_client/errors.rb +11 -8
- data/lib/globus_client/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: f0e9b2a20c38868f833aca12a60ece5a56437b50bcf061cf672a111f0402e9eb
|
|
4
|
+
data.tar.gz: 66ae72d349533e3eb58a6eefc85f438412996fab7b63cf13c2709c828860aa98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d499900bce9d074a15aff26f2f1c2338beee12ea32fed918ea35638760dd2a925ecf8c047dc7d204a1d5351c82e623ca973ce4f9c940ef975064037e4706ebf2
|
|
7
|
+
data.tar.gz: c3a31f5cf3d68e0a22443f710069b2c8fd4285b18e7fbb92fe277c8efa97baaadba2002244e4a8453fb7775eb103df7586c0164cd2e1984a8ffaa73723232484
|
data/.rubocop.yml
CHANGED
|
@@ -5,7 +5,7 @@ plugins:
|
|
|
5
5
|
- rubocop-rspec
|
|
6
6
|
|
|
7
7
|
AllCops:
|
|
8
|
-
TargetRubyVersion:
|
|
8
|
+
TargetRubyVersion: 4.0
|
|
9
9
|
DisplayCopNames: true
|
|
10
10
|
SuggestExtensions: false
|
|
11
11
|
NewCops: disable
|
|
@@ -13,6 +13,11 @@ AllCops:
|
|
|
13
13
|
- bin/**
|
|
14
14
|
- vendor/bundle/**/*
|
|
15
15
|
|
|
16
|
+
# Development uses Ruby 4, but the gem still supports Ruby 3.1 consumers.
|
|
17
|
+
Gemspec/RequiredRubyVersion:
|
|
18
|
+
Exclude:
|
|
19
|
+
- globus_client.gemspec
|
|
20
|
+
|
|
16
21
|
# Per team developer playbook
|
|
17
22
|
RSpec/MultipleMemoizedHelpers:
|
|
18
23
|
Enabled: false
|
|
@@ -22,7 +27,7 @@ Layout/LineLength:
|
|
|
22
27
|
Max: 150
|
|
23
28
|
|
|
24
29
|
# Naming
|
|
25
|
-
Naming/
|
|
30
|
+
Naming/PredicatePrefix:
|
|
26
31
|
ForbiddenPrefixes:
|
|
27
32
|
- is_
|
|
28
33
|
- have_
|
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.19.0)
|
|
5
5
|
activesupport (>= 4.2)
|
|
6
6
|
faraday
|
|
7
7
|
faraday-retry
|
|
@@ -10,119 +10,125 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activesupport (8.
|
|
13
|
+
activesupport (8.1.4)
|
|
14
14
|
base64
|
|
15
|
-
benchmark (>= 0.3)
|
|
16
15
|
bigdecimal
|
|
17
16
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
18
17
|
connection_pool (>= 2.2.5)
|
|
19
18
|
drb
|
|
20
19
|
i18n (>= 1.6, < 2)
|
|
20
|
+
json
|
|
21
21
|
logger (>= 1.4.2)
|
|
22
22
|
minitest (>= 5.1)
|
|
23
23
|
securerandom (>= 0.3)
|
|
24
24
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
25
|
uri (>= 0.13.1)
|
|
26
|
-
addressable (2.
|
|
27
|
-
public_suffix (>= 2.0.2, <
|
|
26
|
+
addressable (2.9.0)
|
|
27
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
28
28
|
ast (2.4.3)
|
|
29
29
|
base64 (0.3.0)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
concurrent-ruby (1.3.
|
|
34
|
-
connection_pool (
|
|
35
|
-
crack (1.0.
|
|
30
|
+
bigdecimal (4.1.3)
|
|
31
|
+
byebug (13.0.0)
|
|
32
|
+
reline (>= 0.6.0)
|
|
33
|
+
concurrent-ruby (1.3.8)
|
|
34
|
+
connection_pool (3.0.2)
|
|
35
|
+
crack (1.0.1)
|
|
36
36
|
bigdecimal
|
|
37
37
|
rexml
|
|
38
38
|
diff-lcs (1.6.2)
|
|
39
|
-
docile (1.4.1)
|
|
40
39
|
drb (2.2.3)
|
|
41
|
-
faraday (2.
|
|
42
|
-
faraday-net_http (>= 2.0, < 3.
|
|
40
|
+
faraday (2.15.0)
|
|
41
|
+
faraday-net_http (>= 2.0, < 3.6)
|
|
43
42
|
json
|
|
44
43
|
logger
|
|
45
|
-
faraday-net_http (3.
|
|
46
|
-
net-http (
|
|
47
|
-
faraday-retry (2.
|
|
44
|
+
faraday-net_http (3.5.0)
|
|
45
|
+
net-http (~> 0.5)
|
|
46
|
+
faraday-retry (2.4.0)
|
|
48
47
|
faraday (~> 2.0)
|
|
49
|
-
hashdiff (1.2.
|
|
50
|
-
i18n (1.
|
|
48
|
+
hashdiff (1.2.1)
|
|
49
|
+
i18n (1.15.2)
|
|
51
50
|
concurrent-ruby (~> 1.0)
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
io-console (0.9.4)
|
|
52
|
+
json (3.1.0)
|
|
53
|
+
language_server-protocol (3.17.0.6)
|
|
54
54
|
lint_roller (1.1.0)
|
|
55
55
|
logger (1.7.0)
|
|
56
|
-
minitest (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
minitest (6.0.6)
|
|
57
|
+
drb (~> 2.0)
|
|
58
|
+
prism (~> 1.5)
|
|
59
|
+
net-http (0.10.0)
|
|
60
|
+
net-protocol (>= 0.3.0)
|
|
61
|
+
uri (>= 0.11.1)
|
|
62
|
+
net-protocol (0.4.0)
|
|
63
|
+
timeout
|
|
64
|
+
parallel (2.3.0)
|
|
65
|
+
parser (3.3.12.0)
|
|
61
66
|
ast (~> 2.4.1)
|
|
62
67
|
racc
|
|
63
|
-
prism (1.
|
|
64
|
-
public_suffix (
|
|
68
|
+
prism (1.9.0)
|
|
69
|
+
public_suffix (7.0.5)
|
|
65
70
|
racc (1.8.1)
|
|
66
71
|
rainbow (3.1.1)
|
|
67
|
-
rake (13.
|
|
68
|
-
regexp_parser (2.
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
rake (13.4.2)
|
|
73
|
+
regexp_parser (2.13.1)
|
|
74
|
+
reline (0.7.0)
|
|
75
|
+
io-console (~> 0.5)
|
|
76
|
+
rexml (3.4.4)
|
|
77
|
+
rspec (3.13.2)
|
|
71
78
|
rspec-core (~> 3.13.0)
|
|
72
79
|
rspec-expectations (~> 3.13.0)
|
|
73
80
|
rspec-mocks (~> 3.13.0)
|
|
74
|
-
rspec-core (3.13.
|
|
81
|
+
rspec-core (3.13.6)
|
|
75
82
|
rspec-support (~> 3.13.0)
|
|
76
83
|
rspec-expectations (3.13.5)
|
|
77
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
78
85
|
rspec-support (~> 3.13.0)
|
|
79
|
-
rspec-mocks (3.13.
|
|
86
|
+
rspec-mocks (3.13.8)
|
|
80
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
81
88
|
rspec-support (~> 3.13.0)
|
|
82
|
-
rspec-support (3.13.
|
|
83
|
-
rubocop (1.
|
|
84
|
-
json (
|
|
89
|
+
rspec-support (3.13.7)
|
|
90
|
+
rubocop (1.92.0)
|
|
91
|
+
json (>= 2.3)
|
|
85
92
|
language_server-protocol (~> 3.17.0.2)
|
|
86
93
|
lint_roller (~> 1.1.0)
|
|
87
|
-
parallel (
|
|
94
|
+
parallel (>= 1.10)
|
|
88
95
|
parser (>= 3.3.0.2)
|
|
89
96
|
rainbow (>= 2.2.2, < 4.0)
|
|
90
|
-
regexp_parser (>= 2.
|
|
91
|
-
rubocop-ast (>= 1.
|
|
97
|
+
regexp_parser (>= 2.11.3, < 3.0)
|
|
98
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
92
99
|
ruby-progressbar (~> 1.7)
|
|
93
100
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
94
|
-
rubocop-ast (1.
|
|
101
|
+
rubocop-ast (1.50.0)
|
|
95
102
|
parser (>= 3.3.7.2)
|
|
96
|
-
prism (~> 1.
|
|
97
|
-
rubocop-performance (1.
|
|
103
|
+
prism (~> 1.7)
|
|
104
|
+
rubocop-performance (1.27.0)
|
|
98
105
|
lint_roller (~> 1.1)
|
|
99
|
-
rubocop (>= 1.
|
|
100
|
-
rubocop-ast (>= 1.
|
|
101
|
-
rubocop-rspec (3.
|
|
106
|
+
rubocop (>= 1.89.0, < 2.0)
|
|
107
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
108
|
+
rubocop-rspec (3.10.2)
|
|
102
109
|
lint_roller (~> 1.1)
|
|
103
|
-
|
|
110
|
+
regexp_parser (>= 2.0)
|
|
111
|
+
rubocop (~> 1.86, >= 1.86.2)
|
|
104
112
|
ruby-progressbar (1.13.0)
|
|
105
113
|
securerandom (0.4.1)
|
|
106
|
-
simplecov (
|
|
107
|
-
|
|
108
|
-
simplecov-html (~> 0.11)
|
|
109
|
-
simplecov_json_formatter (~> 0.1)
|
|
110
|
-
simplecov-html (0.13.1)
|
|
111
|
-
simplecov_json_formatter (0.1.4)
|
|
114
|
+
simplecov (1.3.2)
|
|
115
|
+
timeout (0.6.1)
|
|
112
116
|
tzinfo (2.0.6)
|
|
113
117
|
concurrent-ruby (~> 1.0)
|
|
114
|
-
unicode-display_width (3.
|
|
115
|
-
unicode-emoji (~> 4.
|
|
116
|
-
unicode-emoji (4.0
|
|
117
|
-
uri (1.
|
|
118
|
-
webmock (3.
|
|
118
|
+
unicode-display_width (3.3.0)
|
|
119
|
+
unicode-emoji (~> 4.3)
|
|
120
|
+
unicode-emoji (4.3.0)
|
|
121
|
+
uri (1.1.2)
|
|
122
|
+
webmock (3.34.0)
|
|
119
123
|
addressable (>= 2.8.0)
|
|
120
124
|
crack (>= 0.3.2)
|
|
121
125
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
122
|
-
zeitwerk (2.
|
|
126
|
+
zeitwerk (2.8.3)
|
|
123
127
|
|
|
124
128
|
PLATFORMS
|
|
125
129
|
arm64-darwin-23
|
|
130
|
+
arm64-darwin-24
|
|
131
|
+
arm64-darwin-25
|
|
126
132
|
x86_64-darwin-19
|
|
127
133
|
x86_64-darwin-20
|
|
128
134
|
x86_64-darwin-21
|
|
@@ -140,4 +146,4 @@ DEPENDENCIES
|
|
|
140
146
|
webmock
|
|
141
147
|
|
|
142
148
|
BUNDLED WITH
|
|
143
|
-
|
|
149
|
+
4.0.23
|
data/README.md
CHANGED
|
@@ -69,6 +69,8 @@ end
|
|
|
69
69
|
|
|
70
70
|
## Development
|
|
71
71
|
|
|
72
|
+
Use Ruby 4.0.7 for development and testing.
|
|
73
|
+
|
|
72
74
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
73
75
|
|
|
74
76
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
@@ -88,7 +88,7 @@ class GlobusClient
|
|
|
88
88
|
attr_reader :path, :user_id, :notify_email
|
|
89
89
|
|
|
90
90
|
def globus_identity_id
|
|
91
|
-
Identity.new.get_identity_id(user_id)
|
|
91
|
+
@globus_identity_id ||= Identity.new.get_identity_id(user_id)
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
# Builds up a path from a list of path elements. E.g., input would look like:
|
|
@@ -187,7 +187,7 @@ class GlobusClient
|
|
|
187
187
|
content_type: 'application/json'
|
|
188
188
|
)
|
|
189
189
|
|
|
190
|
-
response.fetch('DATA').find { |acl| acl['path'] == full_path }
|
|
190
|
+
response.fetch('DATA').find { |acl| acl['path'] == full_path && acl['principal'] == globus_identity_id }
|
|
191
191
|
end
|
|
192
192
|
|
|
193
193
|
def access_rule_id
|
data/lib/globus_client/errors.rb
CHANGED
|
@@ -3,28 +3,31 @@
|
|
|
3
3
|
class GlobusClient
|
|
4
4
|
# Holds all of the client's custom exception classes
|
|
5
5
|
module Errors
|
|
6
|
+
# Base class for all of the client's custom exceptions, so that consumers can rescue any of them
|
|
7
|
+
class Error < StandardError; end
|
|
8
|
+
|
|
6
9
|
# Error raised when the Globus Auth or Transfer API returns a 400 error
|
|
7
|
-
class BadRequestError <
|
|
10
|
+
class BadRequestError < Error; end
|
|
8
11
|
|
|
9
12
|
# Error raised by the Globus Auth API returns a 401 Unauthorized
|
|
10
|
-
class UnauthorizedError <
|
|
13
|
+
class UnauthorizedError < Error; end
|
|
11
14
|
|
|
12
15
|
# Error raised when the Globus Auth or Transfer API returns a 403 Forbidden
|
|
13
|
-
class ForbiddenError <
|
|
16
|
+
class ForbiddenError < Error; end
|
|
14
17
|
|
|
15
18
|
# Error raised when the Globus Auth or Transfer API returns a 404 NotFound
|
|
16
|
-
class ResourceNotFound <
|
|
19
|
+
class ResourceNotFound < Error; end
|
|
17
20
|
|
|
18
21
|
# Error raised when a consumer acts upon an access rule that was not found
|
|
19
|
-
class AccessRuleNotFound <
|
|
22
|
+
class AccessRuleNotFound < Error; end
|
|
20
23
|
|
|
21
24
|
# Error raised when response has an unexpected error (e.g., an HTTP 500)
|
|
22
|
-
class InternalServerError <
|
|
25
|
+
class InternalServerError < Error; end
|
|
23
26
|
|
|
24
27
|
# Error raised when the Globus Transfer API returns a 502 Bad Gateway
|
|
25
|
-
class EndpointError <
|
|
28
|
+
class EndpointError < Error; end
|
|
26
29
|
|
|
27
30
|
# Error raised when the remote server returns a 503 Bad Gateway
|
|
28
|
-
class ServiceUnavailable <
|
|
31
|
+
class ServiceUnavailable < Error; end
|
|
29
32
|
end
|
|
30
33
|
end
|
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.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Collier
|
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
116
|
version: '0'
|
|
117
117
|
requirements: []
|
|
118
|
-
rubygems_version:
|
|
118
|
+
rubygems_version: 4.0.16
|
|
119
119
|
specification_version: 4
|
|
120
120
|
summary: Interface for interacting with the Globus API.
|
|
121
121
|
test_files: []
|