strawberry_api 0.6.2 → 0.6.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 621aeca78e398bd4f8711fd214e38516078782a8c67221702ff01a30f9f05e5f
|
4
|
+
data.tar.gz: 2e85813f11bdac184f588e2f2b087645e6e770dbc86176d4662836e41f8b87f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 133729b2660ff2aa398ec44525b0714f01fe6966ee70433ae7683eb3901ef195be51c9cbe5907d4b920dca2ec464b764a553eafe7f54492b651fde050170d64f
|
7
|
+
data.tar.gz: db89d0cdd754b4f1fcb399b077316487965c7225209bc19055e677b62b98d79d6217a1bfd4000999fafd02f063fbbe90c2cc0cf0157d565676e4cd2f53169fa0
|
@@ -46,8 +46,9 @@ module StrawberryAPI
|
|
46
46
|
options: options
|
47
47
|
}.to_json
|
48
48
|
|
49
|
-
|
50
|
-
|
49
|
+
job = post("/library_ingests", body: body).parse['job']
|
50
|
+
|
51
|
+
library(project_id: project_id)
|
51
52
|
end
|
52
53
|
|
53
54
|
# Deletes a library
|
@@ -90,9 +90,9 @@ module StrawberryAPI
|
|
90
90
|
custom_metadata: custom_metadata
|
91
91
|
}.to_json
|
92
92
|
|
93
|
-
|
93
|
+
job = post("/projects", body: body).parse['job']
|
94
94
|
|
95
|
-
|
95
|
+
project(id: job['project_id'])
|
96
96
|
end
|
97
97
|
|
98
98
|
# Updates a project
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module StrawberryAPI
|
2
|
-
|
2
|
+
|
3
3
|
class Project
|
4
4
|
|
5
5
|
attr_accessor :id
|
@@ -35,13 +35,13 @@ module StrawberryAPI
|
|
35
35
|
attr_accessor :mounted_by
|
36
36
|
attr_accessor :subprojects
|
37
37
|
attr_accessor :parentprojects
|
38
|
-
|
38
|
+
|
39
39
|
def initialize(params = {})
|
40
40
|
params.each do |k, v|
|
41
41
|
if k == 'archive_strategy_state'
|
42
42
|
v = ArchiveStrategyState.new(v)
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
instance_variable_set("@#{k}", v) unless v.nil?
|
46
46
|
end
|
47
47
|
end
|
@@ -50,16 +50,16 @@ module StrawberryAPI
|
|
50
50
|
#
|
51
51
|
#
|
52
52
|
# @return [Boolean] Project locked
|
53
|
-
#
|
53
|
+
#
|
54
54
|
def locked?
|
55
|
-
!self.locked_by.nil?
|
55
|
+
!self.locked_by.nil?
|
56
56
|
end
|
57
57
|
|
58
58
|
# Shortcut that determines whether the project is frozen
|
59
59
|
#
|
60
60
|
#
|
61
61
|
# @return [Boolean] Project frozen
|
62
|
-
#
|
62
|
+
#
|
63
63
|
def frozen?
|
64
64
|
!self.frozen_by_id.nil?
|
65
65
|
end
|
@@ -68,7 +68,7 @@ module StrawberryAPI
|
|
68
68
|
#
|
69
69
|
#
|
70
70
|
# @return [Boolean] Project archived
|
71
|
-
#
|
71
|
+
#
|
72
72
|
def archived?
|
73
73
|
!self.archive_strategy_id.nil?
|
74
74
|
end
|
@@ -77,7 +77,7 @@ module StrawberryAPI
|
|
77
77
|
#
|
78
78
|
#
|
79
79
|
# @return [Boolean] Project deleted
|
80
|
-
#
|
80
|
+
#
|
81
81
|
def deleted?
|
82
82
|
self.deleted
|
83
83
|
end
|
data/samples/test.rb
CHANGED