hydra-core 5.0.0.pre3 → 5.0.0.pre4
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/lib/hydra-core.rb +18 -1
- data/lib/hydra-head/version.rb +1 -1
- data/lib/hydra.rb +5 -9
- data/lib/hydra/models.rb +7 -0
- data/spec/support/Gemfile +1 -1
- data/spec/unit/hydra-head-engine_spec.rb +1 -2
- data/spec/unit/hydra-head_spec.rb +1 -2
- metadata +5 -5
- data/lib/hydra-head.rb +0 -27
data/lib/hydra-core.rb
CHANGED
@@ -1 +1,18 @@
|
|
1
|
-
require 'hydra
|
1
|
+
require 'hydra'
|
2
|
+
|
3
|
+
module HydraHead
|
4
|
+
require 'hydra-head/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
5
|
+
require 'hydra-head/routes'
|
6
|
+
# If you put this in your application's routes.rb, it will add the Hydra Head routes to the app.
|
7
|
+
# The hydra:head generator puts this in routes.rb for you by default.
|
8
|
+
# See {HydraHead::Routes} for information about how to modify which routes are generated.
|
9
|
+
# @example
|
10
|
+
# # in config/routes.rb
|
11
|
+
# MyAppName::Application.routes.draw do
|
12
|
+
# Blacklight.add_routes(self)
|
13
|
+
# HydraHead.add_routes(self)
|
14
|
+
# end
|
15
|
+
def self.add_routes(router, options = {})
|
16
|
+
HydraHead::Routes.new(router, options).draw
|
17
|
+
end
|
18
|
+
end
|
data/lib/hydra-head/version.rb
CHANGED
data/lib/hydra.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
require 'hydra-access-controls'
|
2
|
-
require 'hydra-file-access'
|
3
|
-
|
4
2
|
# Hydra libraries
|
5
3
|
module Hydra
|
6
4
|
extend ActiveSupport::Autoload
|
@@ -10,19 +8,17 @@ module Hydra
|
|
10
8
|
autoload :ModelMethods
|
11
9
|
autoload :RepositoryController
|
12
10
|
autoload :Solr
|
13
|
-
|
14
11
|
module ModelMixins
|
15
|
-
#
|
12
|
+
# ModelMixins already loaded by hydra-access-controls
|
16
13
|
autoload :CommonMetadata
|
17
14
|
autoload :SolrDocumentExtension
|
18
15
|
end
|
19
|
-
|
20
|
-
extend ActiveSupport::Autoload
|
21
|
-
autoload :FileAsset
|
22
|
-
end
|
23
|
-
|
16
|
+
autoload :Models
|
24
17
|
end
|
25
18
|
|
19
|
+
# require these models once the hydra module has been set up, so that all autoloads take place
|
20
|
+
#require 'hydra-file-access'
|
21
|
+
|
26
22
|
begin
|
27
23
|
SolrDocument.use_extension Hydra::ModelMixins::SolrDocumentExtension
|
28
24
|
rescue NameError
|
data/lib/hydra/models.rb
ADDED
data/spec/support/Gemfile
CHANGED
@@ -7,6 +7,6 @@ gem 'sqlite3'
|
|
7
7
|
gem 'devise'
|
8
8
|
gem 'blacklight'
|
9
9
|
gem 'hydra-access-controls', :path=>'../../../hydra-access-controls'
|
10
|
-
gem 'hydra-core', :path=>'../../'
|
10
|
+
gem 'hydra-core', :path=>'../../', :require=>'hydra-core'
|
11
11
|
gem 'rspec-rails'
|
12
12
|
gem 'factory_girl_rails', "<2.0.0" # >=2.0.0 requires ruby 1.9
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0.
|
4
|
+
version: 5.0.0.pre4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-10-
|
13
|
+
date: 2012-10-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
requirements:
|
180
180
|
- - '='
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: 5.0.0.
|
182
|
+
version: 5.0.0.pre4
|
183
183
|
type: :runtime
|
184
184
|
prerelease: false
|
185
185
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -187,7 +187,7 @@ dependencies:
|
|
187
187
|
requirements:
|
188
188
|
- - '='
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version: 5.0.0.
|
190
|
+
version: 5.0.0.pre4
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: sqlite3
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|
@@ -362,7 +362,6 @@ files:
|
|
362
362
|
- lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml
|
363
363
|
- lib/generators/hydra/templates/solr_conf/solr.xml
|
364
364
|
- lib/hydra-core.rb
|
365
|
-
- lib/hydra-head.rb
|
366
365
|
- lib/hydra-head/engine.rb
|
367
366
|
- lib/hydra-head/routes.rb
|
368
367
|
- lib/hydra-head/version.rb
|
@@ -375,6 +374,7 @@ files:
|
|
375
374
|
- lib/hydra/model_methods.rb
|
376
375
|
- lib/hydra/model_mixins/common_metadata.rb
|
377
376
|
- lib/hydra/model_mixins/solr_document_extension.rb
|
377
|
+
- lib/hydra/models.rb
|
378
378
|
- lib/hydra/models/file_asset.rb
|
379
379
|
- lib/hydra/repository_controller.rb
|
380
380
|
- lib/hydra/solr.rb
|
data/lib/hydra-head.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
module HydraHead
|
2
|
-
require 'hydra-head/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
3
|
-
require 'hydra-head/routes'
|
4
|
-
require 'hydra'
|
5
|
-
|
6
|
-
def self.version
|
7
|
-
HydraHead::VERSION
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.root
|
11
|
-
@root ||= File.expand_path(File.dirname(File.dirname(__FILE__)))
|
12
|
-
end
|
13
|
-
|
14
|
-
# If you put this in your application's routes.rb, it will add the Hydra Head routes to the app.
|
15
|
-
# The hydra:head generator puts this in routes.rb for you by default.
|
16
|
-
# See {HydraHead::Routes} for information about how to modify which routes are generated.
|
17
|
-
# @example
|
18
|
-
# # in config/routes.rb
|
19
|
-
# MyAppName::Application.routes.draw do
|
20
|
-
# Blacklight.add_routes(self)
|
21
|
-
# HydraHead.add_routes(self)
|
22
|
-
# end
|
23
|
-
def self.add_routes(router, options = {})
|
24
|
-
HydraHead::Routes.new(router, options).draw
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|