ddr-models 1.9.0 → 1.10.0

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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/config/initializers/devise.rb +1 -0
  4. data/config/locales/groups.en.yml +6 -0
  5. data/db/migrate/20150130134416_add_user_key_to_events.rb +7 -0
  6. data/lib/ddr/auth.rb +6 -0
  7. data/lib/ddr/auth/ability.rb +0 -1
  8. data/lib/ddr/auth/failure_app.rb +16 -0
  9. data/lib/ddr/events/event.rb +9 -3
  10. data/lib/ddr/models/version.rb +1 -1
  11. data/spec/controllers/application_controller_spec.rb +22 -0
  12. data/spec/dummy/db/development.sqlite3 +0 -0
  13. data/spec/dummy/db/schema.rb +2 -1
  14. data/spec/dummy/db/test.sqlite3 +0 -0
  15. data/spec/dummy/log/development.log +3509 -6644
  16. data/spec/dummy/log/test.log +81324 -125780
  17. data/spec/models/ability_spec.rb +109 -53
  18. data/spec/routing/user_routing_spec.rb +26 -0
  19. data/spec/spec_helper.rb +2 -0
  20. data/spec/support/shared_examples_for_events.rb +3 -1
  21. metadata +9 -22
  22. data/app/controllers/users/sessions_controller.rb~ +0 -11
  23. data/lib/ddr/managers/#index_manager.rb# +0 -21
  24. data/lib/ddr/metadata/#permanent_id_record.rb# +0 -13
  25. data/lib/ddr/models/#has_ezid_identifier.rb# +0 -26
  26. data/lib/ddr/models/#has_permanent_identifier.rb# +0 -9
  27. data/lib/ddr/models/#index_fields.rb# +0 -13
  28. data/spec/dummy/log/production.log +0 -5
  29. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  30. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  31. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  32. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  33. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  34. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
@@ -1,11 +0,0 @@
1
- class Users::SessionsController < Devise::SessionsController
2
-
3
- def new
4
- if devise_mapping.omniauthable?
5
- redirect_to user_omniauth_authorize_path(:shibboleth)
6
- else
7
- super
8
- end
9
- end
10
-
11
- end
@@ -1,21 +0,0 @@
1
- module Ddr
2
- module Managers
3
- class IndexManager < Manager
4
-
5
- def indexes
6
- @indexes ||= {}
7
- end
8
-
9
- def index(method, *args)
10
- @indexes = indexes.merge(method: ActiveFedora::SolrService.solr_name(method, *args))
11
- end
12
-
13
- def to_solr(solr_doc)
14
- indexes.each_with_object(solr_doc) do |(method, field), doc|
15
- doc[field] = object.send(method)
16
- end
17
- end
18
-
19
- end
20
- end
21
- end
@@ -1,13 +0,0 @@
1
- module Ddr
2
- module Metadata
3
- class PermanentIdRecord
4
-
5
- def self.find(id)
6
- Ezid::Identifier.find(id)
7
- end
8
-
9
-
10
-
11
- end
12
- end
13
- end
@@ -1,26 +0,0 @@
1
- module Ddr
2
- module Models
3
- module HasEzidIdentifier
4
-
5
- protected
6
-
7
-
8
- def create_identifier
9
- create_ezid
10
- end
11
-
12
- private
13
-
14
- def create_ezid
15
- metadata = Ddr::Metadata::Ezid.new(self)
16
- ezid_identifier = Ezid::Identifier.create(metadata)
17
- Ddr::Metadata::PermanentIdentifier.new(ezid_identifier.id)
18
- end
19
-
20
- def get_ezid
21
- Ezid::Identifier.find(permanent_id.value)
22
- end
23
-
24
- end
25
- end
26
- end
@@ -1,9 +0,0 @@
1
- module Ddr
2
- module Models
3
- module HasPermanentIdentifier
4
-
5
-
6
-
7
- end
8
- end
9
- end
@@ -1,13 +0,0 @@
1
- module Ddr
2
- module Models
3
- class IndexFields
4
-
5
- def self.fields
6
- @@fields ||= {}
7
- end
8
-
9
- def
10
-
11
- end
12
- end
13
- end
@@ -1,5 +0,0 @@
1
- W, [2015-01-23T22:19:00.167893 #42266] WARN -- : Using the default predicate_mappings.yml that comes with active-fedora. If you want to override this, pass the path to predicate_mappings.yml to ActiveFedora - ie. ActiveFedora.init(:predicate_mappings_config_path => '/path/to/predicate_mappings.yml') - or set Rails.root and put predicate_mappings.yml into #{Rails.root}/config.
2
- W, [2015-01-23T22:22:55.548890 #42273] WARN -- : Using the default predicate_mappings.yml that comes with active-fedora. If you want to override this, pass the path to predicate_mappings.yml to ActiveFedora - ie. ActiveFedora.init(:predicate_mappings_config_path => '/path/to/predicate_mappings.yml') - or set Rails.root and put predicate_mappings.yml into #{Rails.root}/config.
3
- W, [2015-01-23T22:25:29.893657 #42287] WARN -- : Using the default predicate_mappings.yml that comes with active-fedora. If you want to override this, pass the path to predicate_mappings.yml to ActiveFedora - ie. ActiveFedora.init(:predicate_mappings_config_path => '/path/to/predicate_mappings.yml') - or set Rails.root and put predicate_mappings.yml into #{Rails.root}/config.
4
- W, [2015-01-23T22:26:56.596797 #42297] WARN -- : Using the default predicate_mappings.yml that comes with active-fedora. If you want to override this, pass the path to predicate_mappings.yml to ActiveFedora - ie. ActiveFedora.init(:predicate_mappings_config_path => '/path/to/predicate_mappings.yml') - or set Rails.root and put predicate_mappings.yml into #{Rails.root}/config.
5
- W, [2015-01-23T22:28:43.563903 #42308] WARN -- : Using the default predicate_mappings.yml that comes with active-fedora. If you want to override this, pass the path to predicate_mappings.yml to ActiveFedora - ie. ActiveFedora.init(:predicate_mappings_config_path => '/path/to/predicate_mappings.yml') - or set Rails.root and put predicate_mappings.yml into #{Rails.root}/config.