Skip to content

Commit f31c23a

Browse files
committed
Merge pull request #994 from projectblacklight/rails-matrix
Update travis' rails matrix
2 parents b450037 + efd86b9 commit f31c23a

File tree

7 files changed

+40
-17
lines changed

7 files changed

+40
-17
lines changed

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ notifications:
22
email: false
33

44
rvm:
5-
- 2.1.2
5+
- 2.1.4
66

77
matrix:
88
include:
9-
- rvm: 2.1.2
10-
env: "RAILS_VERSION=4.0.9"
9+
- rvm: 2.1.4
10+
env: "RAILS_VERSION=4.0.11"
1111
- rvm: 2.0.0
12-
env: "RAILS_VERSION=4.1.5"
12+
env: "RAILS_VERSION=4.1.7"
1313
- rvm: 1.9.3
14-
env: "RAILS_VERSION=4.1.5"
14+
env: "RAILS_VERSION=4.1.7"
1515
- rvm: jruby
16-
env: "RAILS_VERSION=4.1.5 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
17-
- rvm: 2.1.2
18-
env: "RAILS_VERSION=4.2.0.beta1"
16+
env: "RAILS_VERSION=4.1.7 JRUBY_OPTS=\"-J-Xms512m -J-Xmx1024m\""
17+
- rvm: 2.1.4
18+
env: "RAILS_VERSION=4.2.0.beta4"
1919
allow_failures:
20-
- env: "RAILS_VERSION=4.2.0.beta1"
20+
- env: "RAILS_VERSION=4.2.0.beta4"
2121

2222
before_install:
2323
- gem install bundler
2424

2525
env:
26-
- "RAILS_VERSION=3.2.19"
27-
- "RAILS_VERSION=4.1.5"
26+
- "RAILS_VERSION=3.2.20"
27+
- "RAILS_VERSION=4.1.7"
2828

2929
notifications:
3030
irc: "irc.freenode.org#blacklight"

Gemfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ else
2323
gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
2424

2525
# explicitly include sass-rails to get compatible sprocket dependencies
26-
gem 'sass-rails'
26+
if ENV['RAILS_VERSION'] and ENV['RAILS_VERSION'] =~ /^4.2/
27+
gem 'sass-rails', ">= 5.0.0.beta1"
28+
gem 'responders', "~> 2.0"
29+
else
30+
gem 'sass-rails'
31+
end
2732
end

app/views/layouts/blacklight.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<![endif]-->
1515

1616
<title><%= render_page_title %></title>
17-
<%= opensearch_description_tag application_name, opensearch_catalog_path(:format => 'xml', :only_path => false) %>
17+
<%= opensearch_description_tag application_name, opensearch_catalog_url(:format => 'xml') %>
1818
<%= favicon_link_tag 'favicon.ico' %>
1919
<%= stylesheet_link_tag "application", media: "all" %>
2020
<%= javascript_include_tag "application" %>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% @documents.each do |document| %>
22
<%= document.to_email_text %>
3-
<%= t('blacklight.email.text.url', :url =>polymorphic_path(document, {:only_path => false}.merge(@url_gen_params))) %>
3+
<%= t('blacklight.email.text.url', :url =>polymorphic_url(document, @url_gen_params)) %>
44
<% end %>
55
<%= t('blacklight.email.text.message', :message => @message) %>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<% @documents.each do |document| %>
22
<%= document.to_sms_text %>
3-
<%= t('blacklight.sms.text.url', :url => polymorphic_path(document, {:only_path => false}.merge(@url_gen_params)) ) %>
3+
<%= t('blacklight.sms.text.url', :url => polymorphic_url(document, @url_gen_params) ) %>
44
<% end %>

lib/blacklight/catalog.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ def email
116116

117117
if request.post? and validate_email_params
118118
email = RecordMailer.email_record(@documents, {:to => params[:to], :message => params[:message]}, url_options)
119-
email.deliver
119+
120+
if email.respond_to? :deliver_now
121+
email.deliver_now
122+
else
123+
email.deliver
124+
end
120125

121126
flash[:success] = I18n.t("blacklight.email.success")
122127

@@ -141,7 +146,12 @@ def sms
141146
to = "#{params[:to].gsub(/[^\d]/, '')}@#{params[:carrier]}"
142147

143148
sms = RecordMailer.sms_record(@documents, { :to => to }, url_options)
144-
sms.deliver
149+
150+
if sms.respond_to? :deliver_now
151+
sms.deliver_now
152+
else
153+
sms.deliver
154+
end
145155

146156
flash[:success] = I18n.t("blacklight.sms.success")
147157

lib/blacklight/solr/document.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ def initialize(source_doc={}, solr_response=nil)
4242
apply_extensions
4343
end
4444

45+
def to_model
46+
self
47+
end
48+
49+
def persisted?
50+
true
51+
end
52+
4553
# the wrapper method to the @_source object.
4654
# If a method is missing, it gets sent to @_source
4755
# with all of the original params and block

0 commit comments

Comments
 (0)