dspace_rest_client 1.1.0 → 1.1.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/lib/dspace_client.rb +8 -3
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 897a024750a2818ec7f3459e477f6c6072050cbf
|
4
|
+
data.tar.gz: 1ff39a3e082596ec01d78974b0eb6b64d68e72c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fe37e42a9e19de271130ff290c12c5d8b3d43b301ef385d8f3a42e89c7b09149af78e5fc57b26d8190772bbf1c0ed34bf1ed6650291ea372237685834ea2611
|
7
|
+
data.tar.gz: d243d4ad8ef2b7d60b7957a27514eab883de73236e474224e533d17872b91e1f1635e0ce158747a4edc949832dd48c14c6c746b2bfc1727a171fab72ba8e9051
|
data/lib/dspace_client.rb
CHANGED
@@ -3,9 +3,14 @@ require 'rest-client'
|
|
3
3
|
class DspaceClient
|
4
4
|
attr_reader :rest_client
|
5
5
|
|
6
|
-
def initialize(url)
|
6
|
+
def initialize(url, authenticated_token = nil)
|
7
7
|
@url = url
|
8
|
-
|
8
|
+
|
9
|
+
if (authenticated_token.nil?)
|
10
|
+
@rest_client = build_rest_client url
|
11
|
+
else
|
12
|
+
@rest_client = build_rest_client url, rest_dspace_token: authenticated_token
|
13
|
+
end
|
9
14
|
end
|
10
15
|
|
11
16
|
def repository
|
@@ -25,7 +30,7 @@ class DspaceClient
|
|
25
30
|
@rest_client = build_rest_client @url, rest_dspace_token: authenticated_token
|
26
31
|
@dspace_repository = build_repository @rest_client
|
27
32
|
|
28
|
-
|
33
|
+
authenticated_token
|
29
34
|
end
|
30
35
|
|
31
36
|
def logout
|
metadata
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dspace_rest_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauricio Giacomini Girardello
|
8
8
|
- Bruno N. Zanette
|
9
|
+
- Mateus Rambo Strey
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|