globus_client 0.19.0 → 0.19.1
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/Gemfile.lock +4 -4
- data/lib/globus_client/endpoint.rb +6 -0
- data/lib/globus_client/version.rb +1 -1
- data/lib/globus_client.rb +7 -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: d5042af28565b016cc3a3ad14fd96622e4c29758d7d7bc533c5d613647a23a6a
|
|
4
|
+
data.tar.gz: e0d17308303c4a67487d30d6faba68bbe18e8563d45705bf6cae7201a2964c46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b18bcbdb11fd2a0ee90e0bc496fd94a6a4e24f146630ce9a92722e8d378451974eb11c3184b3b384082f93473c478178d9bbdb2e4f61616fdb57c12476ce4f80
|
|
7
|
+
data.tar.gz: cc4e0a2bf3c679fdf168daf024768f3a1336cda1afd19f14fa0d0f82020c84bedc0cb5aee106ae61de1168146057d9130d65e5b39fb1697464c010fd5782f7a0
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
globus_client (0.19.
|
|
4
|
+
globus_client (0.19.1)
|
|
5
5
|
activesupport (>= 4.2)
|
|
6
6
|
faraday
|
|
7
7
|
faraday-retry
|
|
@@ -37,7 +37,7 @@ GEM
|
|
|
37
37
|
rexml
|
|
38
38
|
diff-lcs (1.6.2)
|
|
39
39
|
drb (2.2.3)
|
|
40
|
-
faraday (2.15.
|
|
40
|
+
faraday (2.15.1)
|
|
41
41
|
faraday-net_http (>= 2.0, < 3.6)
|
|
42
42
|
json
|
|
43
43
|
logger
|
|
@@ -62,7 +62,7 @@ GEM
|
|
|
62
62
|
net-protocol (0.4.0)
|
|
63
63
|
timeout
|
|
64
64
|
parallel (2.3.0)
|
|
65
|
-
parser (3.3.
|
|
65
|
+
parser (3.3.13.0)
|
|
66
66
|
ast (~> 2.4.1)
|
|
67
67
|
racc
|
|
68
68
|
prism (1.9.0)
|
|
@@ -87,7 +87,7 @@ GEM
|
|
|
87
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
88
88
|
rspec-support (~> 3.13.0)
|
|
89
89
|
rspec-support (3.13.7)
|
|
90
|
-
rubocop (1.92.
|
|
90
|
+
rubocop (1.92.1)
|
|
91
91
|
json (>= 2.3)
|
|
92
92
|
language_server-protocol (~> 3.17.0.2)
|
|
93
93
|
lint_roller (~> 1.1.0)
|
|
@@ -83,6 +83,12 @@ class GlobusClient
|
|
|
83
83
|
false
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
# @returns true if the user has an access rule with read/write permissions for the directory
|
|
87
|
+
# See https://docs.globus.org/api/transfer/acl/#get_list_of_access_rules
|
|
88
|
+
def writable?
|
|
89
|
+
access_rule&.fetch('permissions') == 'rw'
|
|
90
|
+
end
|
|
91
|
+
|
|
86
92
|
private
|
|
87
93
|
|
|
88
94
|
attr_reader :path, :user_id, :notify_email
|
data/lib/globus_client.rb
CHANGED
|
@@ -50,7 +50,7 @@ class GlobusClient # rubocop:disable Metrics/ClassLength
|
|
|
50
50
|
# rubocop:enable Metrics/ParameterLists
|
|
51
51
|
|
|
52
52
|
delegate :config, :disallow_writes, :allow_writes, :delete_access_rule, :file_count, :list_files, :mkdir, :rename, :total_size,
|
|
53
|
-
:user_valid?, :get_filenames, :has_files?, :exists?, :task_list, :tasks_in_progress?,
|
|
53
|
+
:user_valid?, :get_filenames, :has_files?, :exists?, :writable?, :task_list, :tasks_in_progress?,
|
|
54
54
|
:delete, :get, :post, :put, to: :instance
|
|
55
55
|
|
|
56
56
|
def default_transfer_url
|
|
@@ -211,6 +211,12 @@ class GlobusClient # rubocop:disable Metrics/ClassLength
|
|
|
211
211
|
.exists?
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
+
def writable?(...)
|
|
215
|
+
Endpoint
|
|
216
|
+
.new(...)
|
|
217
|
+
.writable?
|
|
218
|
+
end
|
|
219
|
+
|
|
214
220
|
def user_valid?(...)
|
|
215
221
|
Identity
|
|
216
222
|
.new
|
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.19.
|
|
4
|
+
version: 0.19.1
|
|
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: 4.0.
|
|
118
|
+
rubygems_version: 4.0.20
|
|
119
119
|
specification_version: 4
|
|
120
120
|
summary: Interface for interacting with the Globus API.
|
|
121
121
|
test_files: []
|