blacklight 3.0.0pre8 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.0
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'base64'
|
2
|
+
page_info = paginate_params(@response)
|
2
3
|
|
3
4
|
xml.instruct!(:xml, :encoding => "UTF-8")
|
4
5
|
|
@@ -16,18 +17,18 @@ xml.feed("xmlns" => "http://www.w3.org/2005/Atom",
|
|
16
17
|
# Navigational and context links
|
17
18
|
|
18
19
|
xml.link( "rel" => "next",
|
19
|
-
"href" => url_for(params.merge(:only_path => false, :page => (
|
20
|
-
) if
|
20
|
+
"href" => url_for(params.merge(:only_path => false, :page => (page_info.current_page + 1).to_s))
|
21
|
+
) if page_info.num_pages > page_info.current_page
|
21
22
|
|
22
23
|
xml.link( "rel" => "previous",
|
23
|
-
"href" => url_for(params.merge(:only_path => false, :page => (
|
24
|
-
) if
|
24
|
+
"href" => url_for(params.merge(:only_path => false, :page => (page_info.current_page - 1).to_s))
|
25
|
+
) if page_info.current_page > 1
|
25
26
|
|
26
27
|
xml.link( "rel" => "first",
|
27
28
|
"href" => url_for(params.merge(:only_path => false, :page => "1")))
|
28
29
|
|
29
30
|
xml.link( "rel" => "last",
|
30
|
-
"href" => url_for(params.merge(:only_path => false, :page =>
|
31
|
+
"href" => url_for(params.merge(:only_path => false, :page => page_info.num_pages.to_s)))
|
31
32
|
|
32
33
|
# "search" doesn't seem to actually be legal, but is very common, and
|
33
34
|
# used as an example in opensearch docs
|
@@ -36,10 +37,10 @@ xml.feed("xmlns" => "http://www.w3.org/2005/Atom",
|
|
36
37
|
"href" => url_for(:controller=>'catalog',:action => 'opensearch', :format => 'xml', :only_path => false))
|
37
38
|
|
38
39
|
# opensearch response elements
|
39
|
-
xml.opensearch :totalResults, @response.
|
40
|
-
xml.opensearch :startIndex, @response.
|
41
|
-
xml.opensearch :itemsPerPage,
|
42
|
-
xml.opensearch :Query, :role => "request", :searchTerms => params[:q], :startPage =>
|
40
|
+
xml.opensearch :totalResults, @response.total.to_s
|
41
|
+
xml.opensearch :startIndex, @response.start.to_s
|
42
|
+
xml.opensearch :itemsPerPage, page_info.limit_value
|
43
|
+
xml.opensearch :Query, :role => "request", :searchTerms => params[:q], :startPage => page_info.current_page
|
43
44
|
|
44
45
|
|
45
46
|
# updated is required, for now we'll just set it to now, sorry
|
data/blacklight.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
# PRODUCTION GEM REQUIREMENTS
|
22
22
|
# ---------------------------------------
|
23
23
|
s.add_dependency "rails", "~> 3.0"
|
24
|
-
s.add_dependency "nokogiri", "~>1.5
|
24
|
+
s.add_dependency "nokogiri", "~>1.5" # XML Parser
|
25
25
|
s.add_dependency "unicode" # provides C-form normalization of unicode characters, as required by refworks.
|
26
26
|
s.add_dependency "marc", "~> 0.4.3" # Marc record parser
|
27
27
|
s.add_dependency "rsolr", '~> 1.0' # Library for interacting with rSolr.
|
@@ -3,12 +3,10 @@ class AddUserTypesToBookmarksSearches < ActiveRecord::Migration
|
|
3
3
|
def self.up
|
4
4
|
add_column :searches, :user_type, :string
|
5
5
|
add_column :bookmarks, :user_type, :string
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
UPDATE bookmarks set user_type="<%=model_name%>"
|
11
|
-
SQL
|
6
|
+
Search.reset_column_information
|
7
|
+
Bookmark.reset_column_information
|
8
|
+
Search.update_all("user_type = '<%=model_name%>'")
|
9
|
+
Bookmark.update_all("user_type = '<%=model_name%>'")
|
12
10
|
end
|
13
11
|
|
14
12
|
def self.down
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 3
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 3.0.
|
9
|
+
- 0
|
10
|
+
version: 3.0.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jonathan Rochkind
|
@@ -21,108 +22,112 @@ autorequire:
|
|
21
22
|
bindir: bin
|
22
23
|
cert_chain: []
|
23
24
|
|
24
|
-
date: 2011-07-
|
25
|
+
date: 2011-07-11 00:00:00 -04:00
|
25
26
|
default_executable:
|
26
27
|
dependencies:
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: rails
|
30
|
+
prerelease: false
|
29
31
|
requirement: &id001 !ruby/object:Gem::Requirement
|
30
32
|
none: false
|
31
33
|
requirements:
|
32
34
|
- - ~>
|
33
35
|
- !ruby/object:Gem::Version
|
36
|
+
hash: 7
|
34
37
|
segments:
|
35
38
|
- 3
|
36
39
|
- 0
|
37
40
|
version: "3.0"
|
38
41
|
type: :runtime
|
39
|
-
prerelease: false
|
40
42
|
version_requirements: *id001
|
41
43
|
- !ruby/object:Gem::Dependency
|
42
44
|
name: nokogiri
|
45
|
+
prerelease: false
|
43
46
|
requirement: &id002 !ruby/object:Gem::Requirement
|
44
47
|
none: false
|
45
48
|
requirements:
|
46
49
|
- - ~>
|
47
50
|
- !ruby/object:Gem::Version
|
51
|
+
hash: 5
|
48
52
|
segments:
|
49
53
|
- 1
|
50
54
|
- 5
|
51
|
-
|
52
|
-
- beta
|
53
|
-
- 3
|
54
|
-
version: 1.5.0.beta.3
|
55
|
+
version: "1.5"
|
55
56
|
type: :runtime
|
56
|
-
prerelease: false
|
57
57
|
version_requirements: *id002
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: unicode
|
60
|
+
prerelease: false
|
60
61
|
requirement: &id003 !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
63
|
requirements:
|
63
64
|
- - ">="
|
64
65
|
- !ruby/object:Gem::Version
|
66
|
+
hash: 3
|
65
67
|
segments:
|
66
68
|
- 0
|
67
69
|
version: "0"
|
68
70
|
type: :runtime
|
69
|
-
prerelease: false
|
70
71
|
version_requirements: *id003
|
71
72
|
- !ruby/object:Gem::Dependency
|
72
73
|
name: marc
|
74
|
+
prerelease: false
|
73
75
|
requirement: &id004 !ruby/object:Gem::Requirement
|
74
76
|
none: false
|
75
77
|
requirements:
|
76
78
|
- - ~>
|
77
79
|
- !ruby/object:Gem::Version
|
80
|
+
hash: 9
|
78
81
|
segments:
|
79
82
|
- 0
|
80
83
|
- 4
|
81
84
|
- 3
|
82
85
|
version: 0.4.3
|
83
86
|
type: :runtime
|
84
|
-
prerelease: false
|
85
87
|
version_requirements: *id004
|
86
88
|
- !ruby/object:Gem::Dependency
|
87
89
|
name: rsolr
|
90
|
+
prerelease: false
|
88
91
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
92
|
none: false
|
90
93
|
requirements:
|
91
94
|
- - ~>
|
92
95
|
- !ruby/object:Gem::Version
|
96
|
+
hash: 15
|
93
97
|
segments:
|
94
98
|
- 1
|
95
99
|
- 0
|
96
100
|
version: "1.0"
|
97
101
|
type: :runtime
|
98
|
-
prerelease: false
|
99
102
|
version_requirements: *id005
|
100
103
|
- !ruby/object:Gem::Dependency
|
101
104
|
name: rsolr-ext
|
105
|
+
prerelease: false
|
102
106
|
requirement: &id006 !ruby/object:Gem::Requirement
|
103
107
|
none: false
|
104
108
|
requirements:
|
105
109
|
- - ~>
|
106
110
|
- !ruby/object:Gem::Version
|
111
|
+
hash: 15
|
107
112
|
segments:
|
108
113
|
- 1
|
109
114
|
- 0
|
110
115
|
version: "1.0"
|
111
116
|
type: :runtime
|
112
|
-
prerelease: false
|
113
117
|
version_requirements: *id006
|
114
118
|
- !ruby/object:Gem::Dependency
|
115
119
|
name: kaminari
|
120
|
+
prerelease: false
|
116
121
|
requirement: &id007 !ruby/object:Gem::Requirement
|
117
122
|
none: false
|
118
123
|
requirements:
|
119
124
|
- - ">="
|
120
125
|
- !ruby/object:Gem::Version
|
126
|
+
hash: 3
|
121
127
|
segments:
|
122
128
|
- 0
|
123
129
|
version: "0"
|
124
130
|
type: :runtime
|
125
|
-
prerelease: false
|
126
131
|
version_requirements: *id007
|
127
132
|
description: "Blacklight is a free and open source ruby-on-rails based discovery interface (a.k.a. \xE2\x80\x9Cnext-generation catalog\xE2\x80\x9D) especially optimized for heterogeneous collections. You can use it as a library catalog, as a front end for a digital repository, or as a single-search interface to aggregate digital content that would otherwise be siloed."
|
128
133
|
email:
|
@@ -402,24 +407,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
402
407
|
requirements:
|
403
408
|
- - ">="
|
404
409
|
- !ruby/object:Gem::Version
|
405
|
-
hash:
|
410
|
+
hash: 3
|
406
411
|
segments:
|
407
412
|
- 0
|
408
413
|
version: "0"
|
409
414
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
410
415
|
none: false
|
411
416
|
requirements:
|
412
|
-
- - "
|
417
|
+
- - ">="
|
413
418
|
- !ruby/object:Gem::Version
|
419
|
+
hash: 3
|
414
420
|
segments:
|
415
|
-
-
|
416
|
-
|
417
|
-
- 1
|
418
|
-
version: 1.3.1
|
421
|
+
- 0
|
422
|
+
version: "0"
|
419
423
|
requirements: []
|
420
424
|
|
421
425
|
rubyforge_project: blacklight
|
422
|
-
rubygems_version: 1.
|
426
|
+
rubygems_version: 1.5.2
|
423
427
|
signing_key:
|
424
428
|
specification_version: 3
|
425
429
|
summary: A next-geration Library Catalag for Universities
|