blacklight 4.2.0 → 4.2.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: 64ee8019553f491ded8b0186b6d9d30358c2ca25
4
- data.tar.gz: d4935e93a6fa56fb5ae42f32f0140e61bb1b0032
3
+ metadata.gz: 4351fa82e876ef0b03e9d75450ea07744d8567e8
4
+ data.tar.gz: b7d75684699b261d2677a4ef063e27b95959c5fd
5
5
  SHA512:
6
- metadata.gz: 9e75097a23a6c9e685bf6c7924ae387ee47e14ef1723f43660d5597591dae6d0b6a3c50120fddb18dfe9373609215966623c33eae70ff7bf89d8db8c7a36b284
7
- data.tar.gz: 011cc55da8d2cc401dbb59450545b3b120e75e2919d960abe8c24c3c25d42c645f14c29d4efa77000101539b506c89af8e2feb9e493b7e1aaf27d59537fd3f50
6
+ metadata.gz: a31bb3788b2927af494e778c79c3367453d0f2a88f0d890abdf21743a3095281ac0f98218c189010f50bc7c1aff28b49e3211c5973a79a357fc2f825edd75b6a
7
+ data.tar.gz: 31b186d154589f37db2cea16ea55d8f894e9182bf94d901b470399b29a639fe2086ec0198751fc9bcdaf965b2a47e48b9aa038a4f0d62da309bf9d09449475c3
data/.travis.yml CHANGED
@@ -10,13 +10,14 @@ gemfile:
10
10
  - gemfiles/rails3.gemfile
11
11
  - gemfiles/rails4.gemfile
12
12
 
13
- # script:
14
- # - test_support/bin/test.sh
15
-
16
13
  notifications:
17
14
  irc: "irc.freenode.org#blacklight"
18
15
  email:
19
16
  - blacklight-commits@googlegroups.com
20
17
 
21
- # before_install:
22
- # - gem install bundler
18
+ env: JRUBY_OPTS="--server -Xcompile.invokedynamic=true -J-Xms512m -J-Xmx1024m"
19
+ # jruby 1.9 + rails 4.0.0.beta1 don't work well together
20
+ matrix:
21
+ allow_failures:
22
+ - rvm: jruby-19mode
23
+ gemfile: gemfiles/rails4.gemfile
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.0
1
+ 4.2.1
@@ -3,7 +3,7 @@ class Bookmark < ActiveRecord::Base
3
3
 
4
4
  belongs_to :user
5
5
  validates_presence_of :user_id, :scope=>:document_id
6
- attr_accessible :id, :document_id, :title
6
+ attr_accessible :id, :document_id, :title if Rails::VERSION::MAJOR < 4
7
7
 
8
8
 
9
9
  def document
data/app/models/search.rb CHANGED
@@ -4,7 +4,7 @@ class Search < ActiveRecord::Base
4
4
  belongs_to :user
5
5
 
6
6
  serialize :query_params
7
- attr_accessible :query_params
7
+ attr_accessible :query_params if Rails::VERSION::MAJOR < 4
8
8
 
9
9
  # A Search instance is considered a saved search if it has a user_id.
10
10
  def saved?
@@ -3,7 +3,7 @@
3
3
  <%= link_to t('blacklight.tools.cite'), citation_catalog_path(:sort=>params[:sort], :per_page=>params[:per_page], :id => @bookmarks.collect{|doc| doc.document_id}), {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink btn'} %>
4
4
  </li>
5
5
  <li class="refworks">
6
- <%= render :partial => 'catalog/refworks_form', :locals => {:documents=>@bookmarks} %>
6
+ <%= render :partial => 'catalog/refworks_form', :locals => {:documents=>@document_list} %>
7
7
  </li>
8
8
 
9
9
  <li class="endnote">
data/blacklight.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.add_dependency "rsolr", "~> 1.0.6" # Library for interacting with rSolr.
29
29
  s.add_dependency "kaminari", "~> 0.13" # the pagination (page 1,2,3, etc..) of our search results
30
30
  s.add_dependency "sass-rails"
31
- s.add_dependency "bootstrap-sass", "~> 2.2.0"
31
+ s.add_dependency "bootstrap-sass", ">= 2.2.0", "< 2.4"
32
32
  s.add_development_dependency "jettywrapper", ">= 1.4.1"
33
33
  s.add_development_dependency "rspec-rails"
34
34
  end
@@ -6,5 +6,5 @@ gemspec :path=>"../"
6
6
  gem 'simplecov', :platform => :mri
7
7
  gem 'simplecov-rcov', :platform => :mri
8
8
 
9
- gem 'rails', '4.0.0.beta1'
10
- gem 'sass-rails', '4.0.0.beta1'
9
+ gem 'rails', '4.0.0.rc1'
10
+ gem 'sass-rails', '4.0.0.rc1'
@@ -49,7 +49,7 @@ module Blacklight
49
49
  get "saved_searches", :to => "saved_searches#index", :as => "saved_searches"
50
50
  put "saved_searches/save/:id", :to => "saved_searches#save", :as => "save_search"
51
51
  delete "saved_searches/forget/:id", :to => "saved_searches#forget", :as => "forget_search"
52
- post "saved_searches/forget/:id", :to => "saved_searches#forget", :as => "forget_search"
52
+ post "saved_searches/forget/:id", :to => "saved_searches#forget"
53
53
  end
54
54
  end
55
55
 
@@ -59,6 +59,7 @@ module Blacklight
59
59
  get 'catalog/opensearch', :as => "opensearch_catalog"
60
60
  get 'catalog/citation', :as => "citation_catalog"
61
61
  get 'catalog/email', :as => "email_catalog"
62
+ post 'catalog/email'
62
63
  get 'catalog/sms', :as => "sms_catalog"
63
64
  get 'catalog/endnote', :as => "endnote_catalog"
64
65
  get 'catalog/send_email_record', :as => "send_email_record_catalog"
@@ -1,5 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
- require File.join(File.dirname(__FILE__), 'mash') unless defined?(Mash)
3
2
  # SolrHelper is a controller layer mixin. It is in the controller scope: request params, session etc.
4
3
  #
5
4
  # NOTE: Be careful when creating variables here as they may be overriding something that already exists.
@@ -78,9 +78,6 @@ EOF
78
78
  end
79
79
 
80
80
  gem "devise-guests", "~> 0.3"
81
- if Rails::VERSION::MAJOR == 4
82
- gem 'protected_attributes' # Required for devise
83
- end
84
81
 
85
82
  Bundler.with_clean_env do
86
83
  run "bundle install"
@@ -370,7 +370,7 @@ describe FacetsHelper do
370
370
 
371
371
  helper.should_receive(:facet_display_value).and_return('Z')
372
372
  helper.should_receive(:add_facet_params_and_redirect).and_return('link')
373
- helper.render_facet_value('simple_field', mock(:value => 'A', :hits => 10)).should == "<a href=\"link\" class=\"facet_select\">Z</a> <span class=\"count\">10</span>"
373
+ helper.render_facet_value('simple_field', mock(:value => 'A', :hits => 10)).should == (helper.link_to("Z", "link", :class => "facet_select") + " " + (helper.content_tag :span, 10, :class => 'count')).html_safe
374
374
  end
375
375
 
376
376
 
@@ -550,10 +550,12 @@ describe 'Blacklight::SolrHelper' do
550
550
  end
551
551
 
552
552
  it "should use the configured request handler " do
553
- blacklight_config.stub(:solr_request_handler => 'custom_request_handler')
553
+ blacklight_config.stub(:default_solr_params).and_return({:qt => 'custom_request_handler'})
554
554
  Blacklight.solr.should_receive(:send_and_receive) do |path, params|
555
555
  path.should == 'select'
556
- params[:params].should include(:start => 0, :rows => 10, :qt=>"custom_request_handler", :q=>"", "spellcheck.q"=>"", :"facet.field"=>["format", "{!ex=pub_date_single}pub_date", "subject_topic_facet", "language_facet", "lc_1letter_facet", "subject_geo_facet", "subject_era_facet"], :"facet.query"=>["pub_date:[2007 TO *]", "pub_date:[2002 TO *]", "pub_date:[1987 TO *]"], :"f.subject_topic_facet.facet.limit"=>21, :sort=>"score desc, pub_date_sort desc, title_sort asc")
556
+ params[:params][:'facet.field'].should == ["format", "{!ex=pub_date_single}pub_date", "subject_topic_facet", "language_facet", "lc_1letter_facet", "subject_geo_facet", "subject_era_facet"]
557
+ params[:params][:"facet.query"].should == ["pub_date:[#{5.years.ago.year} TO *]", "pub_date:[#{10.years.ago.year} TO *]", "pub_date:[#{25.years.ago.year} TO *]"]
558
+ params[:params].should include(:rows => 10, :qt=>"custom_request_handler", :q=>"", "spellcheck.q"=>"", :"f.subject_topic_facet.facet.limit"=>21, :sort=>"score desc, pub_date_sort desc, title_sort asc")
557
559
  end.and_return({'response'=>{'docs'=>[]}})
558
560
  get_search_results(:q => @all_docs_query)
559
561
  end
@@ -1,24 +1,15 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3
3
 
4
- module BookmarkSpecHelper
5
- def valid_bookmark_attributes
6
- {
7
- :id => 1,
8
- :user_id => 1,
9
- :document_id => 'u001'
10
- }
11
- end
12
- end
13
-
14
4
  describe Bookmark do
15
- include BookmarkSpecHelper
16
5
  before(:each) do
17
6
  @bookmark = Bookmark.new
18
7
  end
19
8
 
20
9
  it "should be valid" do
21
- @bookmark.assign_attributes valid_bookmark_attributes, :without_protection => true
10
+ @bookmark.id = 1
11
+ @bookmark.user_id = 1
12
+ @bookmark.document_id = 'u001'
22
13
  @bookmark.should be_valid
23
14
  end
24
15
 
@@ -31,7 +22,9 @@ describe Bookmark do
31
22
  end
32
23
 
33
24
  it "should be valid after saving" do
34
- @bookmark.assign_attributes valid_bookmark_attributes, :without_protection => true
25
+ @bookmark.id = 1
26
+ @bookmark.user_id = 1
27
+ @bookmark.document_id = 'u001'
35
28
  @bookmark.save
36
29
  @bookmark.should be_valid
37
30
  end
@@ -21,7 +21,7 @@ describe Search do
21
21
  describe "saved?" do
22
22
  it "should be true when user_id is not NULL and greater than 0" do
23
23
  @search = Search.new
24
- @search.assign_attributes({:user_id => 1}, :without_protection => true)
24
+ @search.user_id = 1
25
25
  @search.save
26
26
 
27
27
  @search.saved?.should be_true
@@ -46,16 +46,23 @@ describe Search do
46
46
  Search.destroy_all
47
47
  days_old = 7
48
48
  unsaved_search_today = Search.new
49
- unsaved_search_today.assign_attributes({:user_id => nil, :created_at => Date.today}, :without_protection => true)
49
+ unsaved_search_today.user_id = nil
50
+ unsaved_search_today.created_at = Date.today
50
51
  unsaved_search_today.save
52
+
51
53
  unsaved_search_past = Search.new
52
- unsaved_search_past.assign_attributes({:user_id => nil, :created_at => Date.today - (days_old + 1).days}, :without_protection => true)
54
+ unsaved_search_past.user_id = nil
55
+ unsaved_search_past.created_at = Date.today - (days_old + 1).days
53
56
  unsaved_search_past.save
57
+
54
58
  saved_search_today = Search.new
55
- saved_search_today.assign_attributes({:user_id => 1, :created_at => Date.today}, :without_protection => true)
59
+ saved_search_today.user_id = 1
60
+ saved_search_today.created_at = Date.today
56
61
  saved_search_today.save
62
+
57
63
  saved_search_past = Search.new
58
- saved_search_past.assign_attributes({:user_id => 1, :created_at => (Date.today - (days_old + 1).days)}, :without_protection => true)
64
+ saved_search_past.user_id = 1
65
+ saved_search_past.created_at = Date.today - (days_old + 1).days
59
66
  saved_search_past.save
60
67
 
61
68
  lambda do
@@ -3,9 +3,11 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3
3
  describe "Routing" do
4
4
  describe "Paths Generated by Custom Routes:" do
5
5
  # paths generated by custom routes
6
- it "should map {:controller => 'catalog', :action => 'email'} to /catalog/email" do
6
+ it "should have a path for showing the email form" do
7
7
  { :get => "/catalog/email" }.should route_to(:controller => 'catalog', :action => 'email')
8
-
8
+ end
9
+ it "should have a path for sending the email" do
10
+ { :post => "/catalog/email" }.should route_to(:controller => 'catalog', :action => 'email')
9
11
  end
10
12
  it "should map {:controller => 'catalog', :action => 'sms'} to /catalog/sms" do
11
13
  { :get => "/catalog/sms" }.should route_to(:controller => 'catalog', :action => 'sms')
@@ -18,21 +20,6 @@ describe "Routing" do
18
20
  end
19
21
  end
20
22
 
21
- # parameters generated from routes
22
- describe "Parameters Generated from Routes:" do
23
- it "should map /catalog/email to {:controller => 'catalog', :action => 'email'}" do
24
- { :get => "/catalog/email" }.should route_to(:controller => 'catalog', :action => 'email')
25
- end
26
- it "should map /catalog/sms to {:controller => 'catalog', :action => 'sms'}" do
27
- { :get => "/catalog/sms" }.should route_to(:controller => 'catalog', :action => 'sms')
28
- end
29
- it "should map /catalog/666 to {:controller => 'catalog', :action => 'show', :id => 666}" do
30
- { :get => "/catalog/666" }.should route_to(:controller => 'catalog', :action => 'show', :id => "666")
31
- end
32
- it "should map /catalog/111/librarian_view to {:controller => 'catalog', :action => 'librarian_view', :id => 111}" do
33
- { :get => "/catalog/111/librarian_view" }.should route_to(:controller => 'catalog', :action => 'librarian_view', :id => "111")
34
- end
35
- end
36
23
 
37
24
  describe "catalog_path for SolrDocument", :test => true do
38
25
  it "should route correctly" do
@@ -17,7 +17,7 @@ gem 'jquery-rails'
17
17
 
18
18
  # For testing
19
19
  group :development, :test do
20
- gem 'rspec-rails', '~> 2.12.0'
20
+ gem 'rspec-rails', '~> 2.13.1'
21
21
  end
22
22
 
23
23
  group :test do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -15,30 +15,8 @@ authors:
15
15
  - Naomi Dushay
16
16
  autorequire:
17
17
  bindir: bin
18
- cert_chain:
19
- - |
20
- -----BEGIN CERTIFICATE-----
21
- MIIDaDCCAlCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA9MQ4wDAYDVQQDDAVjaHJp
22
- czEVMBMGCgmSJomT8ixkARkWBWNiZWVyMRQwEgYKCZImiZPyLGQBGRYEaW5mbzAe
23
- Fw0xMzAzMDcwNDI1MzRaFw0xNDAzMDcwNDI1MzRaMD0xDjAMBgNVBAMMBWNocmlz
24
- MRUwEwYKCZImiZPyLGQBGRYFY2JlZXIxFDASBgoJkiaJk/IsZAEZFgRpbmZvMIIB
25
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2UC2Jw9BQ7bNTyVHaxGKbCqV
26
- H+BggkU9CWOBB8YA7j2ebcAjRlj6AemKWHB0fPEi9qmGaE1bMbus8IJbFcjkZNqG
27
- 6yHVdOq9tacSH4iiEdH3QioWSte0zY7vwD9u92QLaNzUAm9yjIYF6ZDNM/dl25Hb
28
- UYDURJXfLOKe3AivodRujsHRxDLFpS6FjdmwB9m8N2JBs/uOrUULB48aaa36pWWE
29
- w4rhqT9kOpZl8BRdE/pTrePlQGDZ8Oe74gVWJth4lavtMaPP+UqHigmlnFvWO9+D
30
- a+9q1qwvQ3ySYRJIACIsYaY6rlhZ6i+PGKhbCnG6at6bC9TVu2JfKbC/LBP9mwID
31
- AQABo3MwcTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU61dLp5FY
32
- qfqrGhr0V8WPGwAIEKQwGwYDVR0RBBQwEoEQY2hyaXNAY2JlZXIuaW5mbzAbBgNV
33
- HRIEFDASgRBjaHJpc0BjYmVlci5pbmZvMA0GCSqGSIb3DQEBBQUAA4IBAQBuQW5N
34
- 6NaEla5fJftOPCecLSB5z8oS+fAO8LbfcUqHSo+y/1ZkN8kF8Y1SaoqPpqxuOZ4g
35
- zX+X6k0gJHLKHTNufTaLhORd66Tp1raoW2qqKEcoshOcoQyw/mh9KYLVaQEX8US8
36
- 0yZ9dRMWFtRjwvkvueNMzLZidH+GsaDq/bxR9/9PAv+4RxQRYw+nrAglf2DxINSI
37
- o8CdBnIKvzS1JRgM172NHIwScyJdDFWxfBh1CTG9VRXTwQfyQmM0h1GThWYcdNw7
38
- W4KPvarE4dgxT4TXIIKkh/K/Z9yaYt73biInVukEI9H2HHWkuAyblxg1jcR/zy+w
39
- K27NJ2vhSpx2PPhb
40
- -----END CERTIFICATE-----
41
- date: 2013-03-29 00:00:00.000000000 Z
18
+ cert_chain: []
19
+ date: 2013-05-09 00:00:00.000000000 Z
42
20
  dependencies:
43
21
  - !ruby/object:Gem::Dependency
44
22
  name: rails
@@ -134,16 +112,22 @@ dependencies:
134
112
  name: bootstrap-sass
135
113
  requirement: !ruby/object:Gem::Requirement
136
114
  requirements:
137
- - - ~>
115
+ - - '>='
138
116
  - !ruby/object:Gem::Version
139
117
  version: 2.2.0
118
+ - - <
119
+ - !ruby/object:Gem::Version
120
+ version: '2.4'
140
121
  type: :runtime
141
122
  prerelease: false
142
123
  version_requirements: !ruby/object:Gem::Requirement
143
124
  requirements:
144
- - - ~>
125
+ - - '>='
145
126
  - !ruby/object:Gem::Version
146
127
  version: 2.2.0
128
+ - - <
129
+ - !ruby/object:Gem::Version
130
+ version: '2.4'
147
131
  - !ruby/object:Gem::Dependency
148
132
  name: jettywrapper
149
133
  requirement: !ruby/object:Gem::Requirement
@@ -499,7 +483,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
499
483
  version: '0'
500
484
  requirements: []
501
485
  rubyforge_project: blacklight
502
- rubygems_version: 2.0.0
486
+ rubygems_version: 2.0.3
503
487
  signing_key:
504
488
  specification_version: 4
505
489
  summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,3 +0,0 @@
1
- f���U��R�m��
2
- A�X�g�
3
- �;�>���ʕ�w��qL�d�W�s��(���_N�r$b+���8A! S)�_���t:8%����Bf�~�=�0�*3�p"��=�C�E��X*�^��dN �e'�Y^-en~?�A\6D�G+�"��<s�1{��S�Pv�ʽ_~g<�������?��B�QWƉ��J��=h�}���b��3Ols��3y>�߶�A�+= �v ލ�Z�U+4���=)u��Ӵ����Z��