Skip to content

Commit

Permalink
Merge cb8490d into e7764c1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 13, 2018
2 parents e7764c1 + cb8490d commit afe2d00
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ notifications:
email: false

rvm:
- 2.3.1
- 2.3.8

matrix:
include:
- rvm: 2.5.3
env: "RAILS_VERSION=5.2.2"
- rvm: 2.2.5
env: "RAILS_VERSION=4.1.13"
- rvm: 2.1.5
Expand Down
2 changes: 1 addition & 1 deletion blacklight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_dependency "rails", ">= 3.2.6", "< 5"
s.add_dependency "rails", ">= 3.2.6", "< 6"
s.add_dependency "nokogiri", "~>1.6" # XML Parser
s.add_dependency "kaminari", ">= 0.15" # the pagination (page 1,2,3, etc..) of our search results
s.add_dependency "rsolr", "~> 1.0", ">= 1.0.11" # Library for interacting with rSolr.
Expand Down
8 changes: 7 additions & 1 deletion db/migrate/20140202020201_create_searches.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# -*- encoding : utf-8 -*-
class CreateSearches < ActiveRecord::Migration
from = if Rails.version > '5'
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration
end

class CreateSearches < from
def self.up
create_table :searches do |t|
t.text :query_params
Expand Down
11 changes: 9 additions & 2 deletions db/migrate/20140202020202_create_bookmarks.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# -*- encoding : utf-8 -*-
class CreateBookmarks < ActiveRecord::Migration

from = if Rails.version > '5'
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration
end

class CreateBookmarks < from
def self.up
create_table :bookmarks do |t|
t.integer :user_id, :null=>false
Expand All @@ -13,5 +20,5 @@ def self.up
def self.down
drop_table :bookmarks
end

end
11 changes: 9 additions & 2 deletions db/migrate/20140320000000_add_polymorphic_type_to_bookmarks.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# -*- encoding : utf-8 -*-
class AddPolymorphicTypeToBookmarks < ActiveRecord::Migration

from = if Rails.version > '5'
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration
end

class AddPolymorphicTypeToBookmarks < from
def change
add_column(:bookmarks, :document_type, :string)

add_index :bookmarks, :user_id
end
end
10 changes: 4 additions & 6 deletions lib/generators/blacklight/test_support_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@


# Need the requires here so we can call the generator from environment.rb
# as suggested above.
# as suggested above.
require 'rails/generators'
require 'rails/generators/base'
module Blacklight
class TestSupport < Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
desc """
Generate blacklight testing configurations for blacklight's own tests, or for blacklight plugins to use for testing
desc """
Generate blacklight testing configurations for blacklight's own tests, or for blacklight plugins to use for testing
"""
def alternate_controller
copy_file "alternate_controller.rb", "app/controllers/alternate_controller.rb"
Expand All @@ -19,9 +19,7 @@ def alternate_controller
member do
get :facet
end
end")


end\n") # the trailing CR is important (in Rails 5) so that any other additional routes get added on the next line.
end

def configure_action_mailer
Expand Down

0 comments on commit afe2d00

Please sign in to comment.