worthwhile 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5dc022225019a4ba976d79fde13890bdf57d9652
4
- data.tar.gz: 0b2f53fc1cfd7b66f1d719b143a48882497741e6
3
+ metadata.gz: 51148dfa82366649166775f5fa61af807bddc4e6
4
+ data.tar.gz: 9719ed8f1dfe0a007814ae0fafbd799dc95fda61
5
5
  SHA512:
6
- metadata.gz: ccc281f98244b539da01d9a88d7ae3be106ce85efe88f262ecb12860a5f1e92c62bcc4104a17283ca8ec29538fee50c52d8bec775b7a2b0777fb8d0383e8530d
7
- data.tar.gz: d666f3ae3ae112fb99eff15a2721108fd6bc226a5bb2c7b02ccb41f6aad756267b878116475a1740956e05a332ce645f91c50d33e6970ae94eb1aadd3ae9b9c3
6
+ metadata.gz: a60c1ae8730ea3828fd0ca18acb9076e9fd128e9e6c10d426c02f1c778d3d36e0b238c17242356a99c0f60dc1aa9235aac967b6cd3ddbd24e1d3a76ec6bbecc2
7
+ data.tar.gz: 4f7cdd14bac47eeb3716473fd6ecccafa8d03962ba4f1643b41d7d24684a066817348b62c361a50fd73e3a07f22f19ead5f5d6965834d7d45cb8b00c365dd16e
data/WORTHWHILE_VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -10,7 +10,6 @@ module Worthwhile
10
10
 
11
11
  config.autoload_paths += %W(
12
12
  #{config.root}/lib
13
- #{config.root}/app/actors/concerns
14
13
  )
15
14
 
16
15
  initializer 'worthwhile.initialize' do
@@ -1,3 +1,3 @@
1
1
  module Worthwhile
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -21,6 +21,11 @@ describe Worthwhile::GenericFile do
21
21
  end
22
22
  end
23
23
 
24
+ context "with versions" do
25
+ it "should have versions" do
26
+ expect(subject.versions).to eq []
27
+ end
28
+ end
24
29
 
25
30
  describe 'with a parent work' do
26
31
  let(:parent_pid) { 'pid:123' }
@@ -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 Worthwhile::GenericFile::VersionedContent
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
- # config.autoload_paths += %W(
6
- # #{config.root}/app/models/datastreams
7
- # )
5
+ config.autoload_paths += %W(
6
+ #{config.root}/app/actors/concerns
7
+ )
8
8
  end
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  module Worthwhile
2
2
  module Models
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  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.0
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-08 00:00:00.000000000 Z
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.0
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.0
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