artk 0.3.0 → 0.3.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 +8 -8
- data/app/models/artk/resource.rb +10 -8
- data/lib/artk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWFjNGMyOWUwMWE1ZmNmOTJkMDY0ZTE5ZGNjYmJjNjAwZTU2Y2U4OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGU0YTQxMWQ1ZDUzYjQ3NzU4MmY4OGM3YmVlYjVkZTMzNDdlNjBiMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjljNDFhMmJjMjczYWViN2M1ZDQ3MDAxMDUxYTkyY2QwN2FmODUwOTllOWNi
|
10
|
+
ZDhjNzMyMWRiNTkxY2Q5NTVlZjk4MGYyYzRlOGEzMDM0MTkyYWI3MjliZjEz
|
11
|
+
MjFiZGNjMjM1NDY2N2RlYjM2NmIzZTVkY2Y5NDdiMGU3N2YxODg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTgwMTNkMzE3OTBkMTU1NGM1Nzg2NDBhZjgyOGExMWRhOTBmYjkxYWE0ZjZl
|
14
|
+
NjlkZWM5ZGY3MThkODA2NGE5MWYxNThlMzQ5YWJiZDg4ZjkzZTFiZjhhNjIx
|
15
|
+
ZDY4MGFmNWQ4ZTM3YjhkODM4NDQ0ODdmNDY0NTlkYjJhOGJlYjI=
|
data/app/models/artk/resource.rb
CHANGED
@@ -20,10 +20,10 @@ class Resource < Artk::Base
|
|
20
20
|
self.where("eadFaUniqueIdentifier = '#{id}'").first
|
21
21
|
end
|
22
22
|
|
23
|
-
# Returns all Artk::Component objects
|
24
|
-
#
|
23
|
+
# Returns all Artk::Component objects or <c> nodes that are in the collection.
|
24
|
+
# We have to build the component levels one by one, limited to 6 levels.
|
25
25
|
def all_series
|
26
|
-
first =
|
26
|
+
first = self.components
|
27
27
|
second = []
|
28
28
|
third = []
|
29
29
|
fourth = []
|
@@ -31,11 +31,11 @@ class Resource < Artk::Base
|
|
31
31
|
sixth = []
|
32
32
|
|
33
33
|
# Get additional series, second through sixth
|
34
|
-
second = first.collect { |r|
|
35
|
-
third = second.collect { |r|
|
36
|
-
fourth = third.collect { |r|
|
37
|
-
fifth = fourth.collect { |r|
|
38
|
-
sixth = fifth.collect { |r|
|
34
|
+
second = first.collect { |r| r.sub_components }.flatten unless first.empty?
|
35
|
+
third = second.collect { |r| r.sub_components }.flatten unless second.empty?
|
36
|
+
fourth = third.collect { |r| r.sub_components }.flatten unless third.empty?
|
37
|
+
fifth = fourth.collect { |r| r.sub_components }.flatten unless fourth.empty?
|
38
|
+
sixth = fifth.collect { |r| r.sub_components }.flatten unless fifth.empty?
|
39
39
|
|
40
40
|
return (first + second + third + fourth + fifth + sixth).sort
|
41
41
|
end
|
@@ -51,10 +51,12 @@ class Resource < Artk::Base
|
|
51
51
|
|
52
52
|
private
|
53
53
|
|
54
|
+
# not used because we're returning all components and not just those that have sub-components
|
54
55
|
def retrieve_initial_series
|
55
56
|
self.components.keep_if{ |c| c.has_child? }
|
56
57
|
end
|
57
58
|
|
59
|
+
# not used because we're returning all components and not just those that have sub-components
|
58
60
|
def retrieve_additional_series component
|
59
61
|
component.sub_components.keep_if{ |c| c.has_child? }
|
60
62
|
end
|
data/lib/artk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Wead
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10
|
11
|
+
date: 2013-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.1.
|
134
|
+
rubygems_version: 2.1.11
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Provides a Rails interface to Archivist's Toolkit
|