worthwhile 0.1.0 → 0.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/WORTHWHILE_VERSION +1 -1
- data/lib/worthwhile/engine.rb +0 -1
- data/lib/worthwhile/version.rb +1 -1
- data/spec/models/worthwhile/generic_file_spec.rb +5 -0
- data/{app → worthwhile-models/app}/actors/concerns/worthwhile/manages_embargoes_actor.rb +0 -0
- data/{app → worthwhile-models/app}/actors/curation_concern/base_actor.rb +0 -0
- data/{app → worthwhile-models/app}/actors/curation_concern/generic_file_actor.rb +0 -0
- data/{app → worthwhile-models/app}/actors/curation_concern/generic_work_actor.rb +0 -0
- data/{app → worthwhile-models/app}/actors/curation_concern/linked_resource_actor.rb +0 -0
- data/worthwhile-models/app/models/concerns/curation_concern/versioned_content.rb +17 -0
- data/worthwhile-models/app/models/concerns/worthwhile/generic_file_base.rb +1 -1
- data/worthwhile-models/lib/worthwhile/models/engine.rb +3 -3
- data/worthwhile-models/lib/worthwhile/models/version.rb +1 -1
- metadata +10 -10
- data/worthwhile-models/app/models/concerns/worthwhile/generic_file/versioned_content.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51148dfa82366649166775f5fa61af807bddc4e6
|
4
|
+
data.tar.gz: 9719ed8f1dfe0a007814ae0fafbd799dc95fda61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a60c1ae8730ea3828fd0ca18acb9076e9fd128e9e6c10d426c02f1c778d3d36e0b238c17242356a99c0f60dc1aa9235aac967b6cd3ddbd24e1d3a76ec6bbecc2
|
7
|
+
data.tar.gz: 4f7cdd14bac47eeb3716473fd6ecccafa8d03962ba4f1643b41d7d24684a066817348b62c361a50fd73e3a07f22f19ead5f5d6965834d7d45cb8b00c365dd16e
|
data/WORTHWHILE_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/worthwhile/engine.rb
CHANGED
data/lib/worthwhile/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module CurationConcern
|
2
|
+
module VersionedContent
|
3
|
+
def versions
|
4
|
+
return [] unless persisted?
|
5
|
+
@versions ||= content.versions.collect {|version| Worthwhile::ContentVersion.new(content, version)}
|
6
|
+
end
|
7
|
+
|
8
|
+
def latest_version
|
9
|
+
versions.first || Worthwhile::ContentVersion::Null.new(content)
|
10
|
+
end
|
11
|
+
|
12
|
+
def current_version_id
|
13
|
+
latest_version.version_id
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
@@ -12,7 +12,7 @@ module Worthwhile
|
|
12
12
|
include Sufia::GenericFile::Metadata
|
13
13
|
include Sufia::GenericFile::Versions
|
14
14
|
include Sufia::Permissions::Readable
|
15
|
-
include
|
15
|
+
include CurationConcern::VersionedContent
|
16
16
|
|
17
17
|
included do
|
18
18
|
belongs_to :batch, property: :is_part_of, class_name: 'ActiveFedora::Base'
|
@@ -2,9 +2,9 @@ require 'sufia/models'
|
|
2
2
|
module Worthwhile
|
3
3
|
module Models
|
4
4
|
class Engine < ::Rails::Engine
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
config.autoload_paths += %W(
|
6
|
+
#{config.root}/app/actors/concerns
|
7
|
+
)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: worthwhile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hydra-head
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.
|
75
|
+
version: 0.1.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1.
|
82
|
+
version: 0.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sufia-models
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -292,11 +292,6 @@ files:
|
|
292
292
|
- RELEASING.md
|
293
293
|
- Rakefile
|
294
294
|
- WORTHWHILE_VERSION
|
295
|
-
- app/actors/concerns/worthwhile/manages_embargoes_actor.rb
|
296
|
-
- app/actors/curation_concern/base_actor.rb
|
297
|
-
- app/actors/curation_concern/generic_file_actor.rb
|
298
|
-
- app/actors/curation_concern/generic_work_actor.rb
|
299
|
-
- app/actors/curation_concern/linked_resource_actor.rb
|
300
295
|
- app/assets/images/default.png
|
301
296
|
- app/assets/images/nope.png
|
302
297
|
- app/assets/javascripts/.gitkeep
|
@@ -589,17 +584,22 @@ files:
|
|
589
584
|
- vendor/assets/stylesheets/token-input-facebook.css
|
590
585
|
- vendor/assets/stylesheets/token-input-mac.css
|
591
586
|
- vendor/assets/stylesheets/token-input.css
|
587
|
+
- worthwhile-models/app/actors/concerns/worthwhile/manages_embargoes_actor.rb
|
588
|
+
- worthwhile-models/app/actors/curation_concern/base_actor.rb
|
589
|
+
- worthwhile-models/app/actors/curation_concern/generic_file_actor.rb
|
590
|
+
- worthwhile-models/app/actors/curation_concern/generic_work_actor.rb
|
591
|
+
- worthwhile-models/app/actors/curation_concern/linked_resource_actor.rb
|
592
592
|
- worthwhile-models/app/models/concerns/curation_concern/collection_model.rb
|
593
593
|
- worthwhile-models/app/models/concerns/curation_concern/curatable.rb
|
594
594
|
- worthwhile-models/app/models/concerns/curation_concern/has_representative.rb
|
595
595
|
- worthwhile-models/app/models/concerns/curation_concern/human_readable_type.rb
|
596
|
+
- worthwhile-models/app/models/concerns/curation_concern/versioned_content.rb
|
596
597
|
- worthwhile-models/app/models/concerns/curation_concern/with_basic_metadata.rb
|
597
598
|
- worthwhile-models/app/models/concerns/curation_concern/with_editors.rb
|
598
599
|
- worthwhile-models/app/models/concerns/curation_concern/with_generic_files.rb
|
599
600
|
- worthwhile-models/app/models/concerns/curation_concern/with_linked_resources.rb
|
600
601
|
- worthwhile-models/app/models/concerns/curation_concern/work.rb
|
601
602
|
- worthwhile-models/app/models/concerns/worthwhile/ability.rb
|
602
|
-
- worthwhile-models/app/models/concerns/worthwhile/generic_file/versioned_content.rb
|
603
603
|
- worthwhile-models/app/models/concerns/worthwhile/generic_file_base.rb
|
604
604
|
- worthwhile-models/app/models/concerns/worthwhile/solr_document_behavior.rb
|
605
605
|
- worthwhile-models/app/models/generic_work.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Worthwhile
|
2
|
-
class GenericFile
|
3
|
-
module VersionedContent
|
4
|
-
def versions
|
5
|
-
return [] unless persisted?
|
6
|
-
@versions ||= content.versions.collect {|version| Worthwhile::ContentVersion.new(content, version)}
|
7
|
-
end
|
8
|
-
|
9
|
-
def latest_version
|
10
|
-
versions.first || Worthwhile::ContentVersion::Null.new(content)
|
11
|
-
end
|
12
|
-
|
13
|
-
def current_version_id
|
14
|
-
latest_version.version_id
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|