daengine 0.3.7.5 → 0.3.7.7
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.
data/app/models/digital_asset.rb
CHANGED
@@ -71,6 +71,14 @@ class DigitalAsset
|
|
71
71
|
(stale.count.to_f / self.count) <= 0.05
|
72
72
|
end
|
73
73
|
|
74
|
+
def path_is(path)
|
75
|
+
documents.where(path: path).first
|
76
|
+
end
|
77
|
+
|
78
|
+
def doc_changed_at(path)
|
79
|
+
path_is(path).try(:doc_changed_at)
|
80
|
+
end
|
81
|
+
|
74
82
|
def content_type_ids
|
75
83
|
ids = []
|
76
84
|
documents.try :each do |d|
|
@@ -92,10 +100,12 @@ class DigitalAsset
|
|
92
100
|
def is_investor_approved?
|
93
101
|
audiences.index(DigitalAsset::Audience::INVESTOR_APPROVED)
|
94
102
|
end
|
103
|
+
alias :investor_approved? :is_investor_approved?
|
95
104
|
|
96
105
|
def is_institutional_use?
|
97
106
|
audiences.index(DigitalAsset::Audience::INSTITUTIONAL_USE)
|
98
107
|
end
|
108
|
+
alias :institutional_use? :is_institutional_use?
|
99
109
|
|
100
110
|
def product
|
101
111
|
TaxonomyTerm.label_for_term(product_ids[0])
|
@@ -12,7 +12,11 @@ module Daengine
|
|
12
12
|
cs.each do |c|
|
13
13
|
if da.sami_code == c.samiCode
|
14
14
|
da.orderable = c.orderable == 'true'
|
15
|
-
|
15
|
+
begin
|
16
|
+
da.save!
|
17
|
+
rescue Exception => e
|
18
|
+
p "unable to set orderable status for #{da.try(:primary_path)}, #{da.errors.try(:first)}"
|
19
|
+
end
|
16
20
|
break
|
17
21
|
end
|
18
22
|
end
|
data/lib/daengine/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: daengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.7.
|
5
|
+
version: 0.3.7.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- sbhatia
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-05 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|