umlaut 4.0.0.beta1 → 4.0.0.beta2
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/README.md +2 -0
- data/app/models/referent.rb +1 -1
- data/app/views/resolve/_search_inside.html.erb +1 -1
- data/lib/umlaut/version.rb +1 -1
- data/test/unit/referent_test.rb +8 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
[](https://coveralls.io/r/team-umlaut/umlaut)
|
7
7
|
<!--[](http://rails-brakeman.com/team-umlaut/umlaut)-->
|
8
8
|
|
9
|
+
(Umlaut 4.0.0.beta1 is out, and this README refers to Umlaut 4.x, and we recommend starting with Umlaut 4.x even though it's only in beta. Install with `gem install umlaut --pre`)
|
10
|
+
|
9
11
|
Umlaut is software for libraries (the kind with books).
|
10
12
|
|
11
13
|
It could be described as a front-end layer on top of an existing OpenURL
|
data/app/models/referent.rb
CHANGED
@@ -204,7 +204,7 @@ class Referent < ActiveRecord::Base
|
|
204
204
|
|
205
205
|
def add_identifier(id)
|
206
206
|
unless ( identifiers.find{|i| i == id} )
|
207
|
-
Referent.with_connection do
|
207
|
+
Referent.connection_pool.with_connection do
|
208
208
|
self.referent_values.create(:key_name => 'identifier', :value => id, :normalized_value => ReferentValue.normalize(id), :metadata => false, :private_data => false).save!
|
209
209
|
end
|
210
210
|
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<div class="search-inside-source form-group">
|
16
16
|
<%=t 'umlaut.display_sections.search_inside.via' %>
|
17
|
-
<% if
|
17
|
+
<% if search_providers.length > 1 %>
|
18
18
|
<%= select_tag("id", options_for_select(search_providers.collect {|st| [st.view_data[:display_text], st.id]}),
|
19
19
|
:class =>"form-control id") %>
|
20
20
|
<% else %>
|
data/lib/umlaut/version.rb
CHANGED
data/test/unit/referent_test.rb
CHANGED
@@ -28,6 +28,14 @@ class ReferentTest < ActiveSupport::TestCase
|
|
28
28
|
assert_equal "new title", rvs.first.value
|
29
29
|
end
|
30
30
|
|
31
|
+
def test_add_identifier
|
32
|
+
referent = Referent.new
|
33
|
+
referent.save
|
34
|
+
|
35
|
+
referent.add_identifier("urn:isbn:123")
|
36
|
+
assert referent.identifiers.any? { |i| i == "urn:isbn:123" }
|
37
|
+
end
|
38
|
+
|
31
39
|
def test_create_by_context_object
|
32
40
|
url = "url_ver=Z39.88-2004&url_ctx_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Actx&ctx_ver=Z39.88-2004&ctx_tim=2014-09-03T09%3A56%3A22-04%3A00&ctx_id=&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rft.genre=article&rft.au=Chen%2C+Yu-Hui&rft.date=2009-05-01&rft.volume=60&rft.issue=5&rft.spage=953&rft.jtitle=Journal+of+the+American+Society+for+Information+Science+%26+Technology&rft.issn=15322882&rft.pub=Wiley-Blackwell&rft.atitle=An+exploration+into+the+practices+of+library+Web+usability+in+ARL+academic+libraries.&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft_id=info%3Adoi%2F10.1002%2Fasi.21032&rfr_id=http%3A%2F%2Fcatalyst.library.jhu.edu%2Fsearch%2Farticles"
|
33
41
|
co = OpenURL::ContextObject.new_from_kev(url)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: umlaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.beta2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -1041,7 +1041,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1041
1041
|
version: '0'
|
1042
1042
|
segments:
|
1043
1043
|
- 0
|
1044
|
-
hash:
|
1044
|
+
hash: 70160940147080541
|
1045
1045
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1046
1046
|
none: false
|
1047
1047
|
requirements:
|