blacklight-marc 5.0.0 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +19 -7
- data/Rakefile +8 -37
- data/app/helpers/blacklight_bookmarks_helper.rb +3 -0
- data/app/helpers/blacklight_marc_helper.rb +5 -5
- data/app/views/bookmarks/_endnote.html.erb +5 -3
- data/app/views/bookmarks/_marc_tools.html.erb +2 -0
- data/app/views/bookmarks/_refworks.html.erb +5 -3
- data/blacklight-marc.gemspec +2 -1
- data/lib/blacklight/marc/version.rb +1 -1
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +11 -8
- data/spec/views/bookmarks/_endnote.html.erb_spec.rb +1 -1
- data/spec/views/bookmarks/_refworks.html.erb_spec.rb +4 -3
- metadata +29 -11
- data/spec/test_app_templates/Gemfile.extra +0 -21
- data/spec/test_app_templates/lib/tasks/blacklight_test_app.rake +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f0fb70263ceb51ccdd8cd3d861101dbc74bf1df
|
4
|
+
data.tar.gz: 7ef0b31a16dbcaafa8a4afa3c09c523f766e00aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77bdd9fd66ca82d8f11fcde0c392105327772ba0eb44bc665aa9c868ad3df7d8e96f0a836139519055e74dfdcc42349ed573b061c3a91b357e944eb4af605389
|
7
|
+
data.tar.gz: 23bdcd829106648025d26239dd506ccbde04901707cf46ee354d3ea8bff32f25cee9bc3bbdb43e383fea4ad1dc4bd8779d97a12d1d5bc6f44203b9d833598ba8
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,15 +1,27 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
#
|
4
|
-
gemspec
|
3
|
+
# Please see blacklight_marc.gemspec for dependency information.
|
4
|
+
gemspec path: File.expand_path('..', __FILE__)
|
5
|
+
|
6
|
+
|
7
|
+
# Peg simplecov to < 0.8 until this is resolved:
|
8
|
+
# https://github.com/colszowka/simplecov/issues/281
|
9
|
+
gem 'simplecov', '~> 0.7.1', require: false
|
10
|
+
gem 'coveralls', require: false
|
11
|
+
|
12
|
+
gem 'engine_cart', '~> 0.3.0'
|
13
|
+
|
14
|
+
# pin to known-working versions of rails and dependencies
|
15
|
+
gem 'rails', '4.0.4'
|
16
|
+
gem 'sass', '~> 3.2.15'
|
17
|
+
gem 'sprockets', '~> 2.11.0'
|
5
18
|
|
6
19
|
group :test do
|
7
|
-
gem 'devise'
|
8
|
-
gem "bootstrap-sass"
|
9
|
-
gem 'turbolinks'
|
10
20
|
gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
|
11
21
|
end
|
12
22
|
|
13
|
-
|
14
|
-
|
23
|
+
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
|
24
|
+
if File.exists?(file)
|
25
|
+
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
26
|
+
instance_eval File.read(file)
|
15
27
|
end
|
data/Rakefile
CHANGED
@@ -1,21 +1,16 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.0.0.zip"
|
3
|
-
APP_ROOT = File.expand_path("..", __FILE__)
|
4
|
-
|
5
|
-
TEST_APP_TEMPLATES = 'spec/test_app_templates'
|
6
|
-
TEST_APP = 'spec/internal'
|
7
3
|
|
8
4
|
require 'jettywrapper'
|
9
5
|
require 'rspec/core/rake_task'
|
6
|
+
require 'engine_cart/rake_task'
|
10
7
|
|
11
8
|
RSpec::Core::RakeTask.new(:spec)
|
12
9
|
|
13
10
|
task :default => [:ci]
|
14
11
|
|
15
|
-
task :ci => ['blacklight_marc:
|
16
|
-
|
17
|
-
jetty_params = Jettywrapper.load_config
|
18
|
-
jetty_params[:startup_wait]= 60
|
12
|
+
task :ci => ['blacklight_marc:clean', 'blacklight_marc:generate'] do
|
13
|
+
jetty_params = Jettywrapper.load_config('test')
|
19
14
|
error = Jettywrapper.wrap(jetty_params) do
|
20
15
|
Rake::Task["blacklight_marc:fixtures"].invoke
|
21
16
|
Rake::Task['spec'].invoke
|
@@ -34,35 +29,11 @@ namespace :blacklight_marc do
|
|
34
29
|
end
|
35
30
|
end
|
36
31
|
|
37
|
-
desc "
|
38
|
-
task :
|
39
|
-
unless File.exists?('spec/internal/Rakefile')
|
40
|
-
puts "Generating rails app"
|
41
|
-
`rails new #{TEST_APP}`
|
42
|
-
puts "Copying gemfile"
|
43
|
-
open("#{TEST_APP}/Gemfile", 'a') do |f|
|
44
|
-
f.write File.read(TEST_APP_TEMPLATES + "/Gemfile.extra")
|
45
|
-
f.write "gem 'blacklight-marc', :path => '../../'"
|
46
|
-
end
|
47
|
-
puts "Copying generator"
|
48
|
-
`cp -r #{TEST_APP_TEMPLATES}/lib/generators #{TEST_APP}/lib`
|
49
|
-
within_test_app do
|
50
|
-
puts "Bundle install"
|
51
|
-
`bundle install`
|
52
|
-
puts "running test_app_generator"
|
53
|
-
system "rails generate test_app"
|
54
|
-
|
55
|
-
puts "running migrations"
|
56
|
-
puts `rake db:migrate db:test:prepare`
|
57
|
-
end
|
58
|
-
end
|
59
|
-
puts "Done generating test app"
|
32
|
+
desc "Clean out the test rails app"
|
33
|
+
task :clean => ['engine_cart:clean', 'jetty:clean'] do
|
60
34
|
end
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
Bundler.with_clean_env do
|
65
|
-
yield
|
35
|
+
|
36
|
+
desc "Create the test rails app"
|
37
|
+
task :generate => ['engine_cart:generate'] do
|
66
38
|
end
|
67
|
-
FileUtils.cd(APP_ROOT)
|
68
39
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module BlacklightMarcHelper
|
2
|
-
|
2
|
+
|
3
3
|
# puts together a collection of documents into one refworks export string
|
4
4
|
def render_refworks_texts(documents)
|
5
5
|
val = ''
|
6
6
|
documents.each do |doc|
|
7
|
-
if doc.
|
8
|
-
val += doc.
|
7
|
+
if doc.exports_as? :refworks_marc_txt
|
8
|
+
val += doc.export_as(:refworks_marc_txt) + "\n"
|
9
9
|
end
|
10
10
|
end
|
11
11
|
val
|
@@ -15,8 +15,8 @@ module BlacklightMarcHelper
|
|
15
15
|
def render_endnote_texts(documents)
|
16
16
|
val = ''
|
17
17
|
documents.each do |doc|
|
18
|
-
if doc.
|
19
|
-
val += doc.
|
18
|
+
if doc.exports_as? :endnote
|
19
|
+
val += doc.export_as(:endnote) + "\n"
|
20
20
|
end
|
21
21
|
end
|
22
22
|
val
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% if @document_list.any? {|d| d.exports_as? :endnote } %>
|
2
|
+
<li class="endnote">
|
3
|
+
<%= link_to t('blacklight.tools.endnote'), bookmarks_path(:endnote, params_for_search), :class => "btn btn-default", :id => "endnoteLink" %>
|
4
|
+
</li>
|
5
|
+
<% end %>
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% if @document_list.any? {|d| d.exports_as? :refworks_marc_txt } %>
|
2
|
+
<li class="refworks">
|
3
|
+
<%= link_to t('blacklight.tools.refworks'), refworks_export_url(url: bookmarks_export_url(:refworks_marc_txt, params_for_search)), :class => "btn btn-default", :id => "refworksLink" %>
|
4
|
+
</li>
|
5
|
+
<% end %>
|
data/blacklight-marc.gemspec
CHANGED
@@ -17,13 +17,14 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "blacklight", "
|
20
|
+
spec.add_dependency "blacklight", ">= 5.4.0.rc1", "< 6.0"
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.3"
|
23
23
|
spec.add_development_dependency "rake"
|
24
24
|
spec.add_development_dependency "rspec"
|
25
25
|
spec.add_development_dependency "rspec-rails"
|
26
26
|
spec.add_development_dependency "jettywrapper"
|
27
|
+
spec.add_development_dependency "capybara"
|
27
28
|
spec.add_dependency "rails"
|
28
29
|
# Let's allow future versions of marc, count on
|
29
30
|
# them to be backwards compat until 1.1
|
@@ -11,20 +11,19 @@ class TestAppGenerator < Rails::Generators::Base
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
def copy_blacklight_test_app_rake_task
|
15
|
-
copy_file "lib/tasks/blacklight_test_app.rake"
|
16
|
-
end
|
17
|
-
|
18
14
|
def remove_index
|
19
15
|
remove_file "public/index.html"
|
20
|
-
remove_file 'app/assets/images/rails.png'
|
21
16
|
end
|
22
|
-
|
17
|
+
|
23
18
|
def run_blacklight_generator
|
24
19
|
say_status("warning", "GENERATING BL", :yellow)
|
20
|
+
gem 'blacklight', "5.4.0"
|
25
21
|
|
26
|
-
|
27
|
-
|
22
|
+
Bundler.with_clean_env do
|
23
|
+
run "bundle install"
|
24
|
+
end
|
25
|
+
|
26
|
+
generate 'blacklight:install', '--devise --jettywrapper'
|
28
27
|
end
|
29
28
|
|
30
29
|
def run_test_support_generator
|
@@ -32,4 +31,8 @@ class TestAppGenerator < Rails::Generators::Base
|
|
32
31
|
|
33
32
|
generate 'blacklight:test_support'
|
34
33
|
end
|
34
|
+
|
35
|
+
def run_blacklight_marc_generator
|
36
|
+
generate 'blacklight_marc:marc'
|
37
|
+
end
|
35
38
|
end
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'bookmarks/_endnote.html.erb' do
|
4
4
|
it "should have a link" do
|
5
|
-
assign(:
|
5
|
+
assign(:document_list, [mock_model(Bookmark, document_id: 7, exports_as?: true), mock_model(Bookmark, document_id: 8, exports_as?: true)])
|
6
6
|
render
|
7
7
|
expect(rendered).to have_link "Export to EndNote"
|
8
8
|
end
|
@@ -2,9 +2,10 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'bookmarks/_refworks.html.erb' do
|
4
4
|
it "should have a link" do
|
5
|
-
|
5
|
+
view.stub(encrypt_user_id: 1)
|
6
|
+
view.stub(current_or_guest_user: mock_model(User))
|
7
|
+
assign(:document_list, [mock_model(Bookmark, document_id: 7, exports_as?: true), mock_model(Bookmark, document_id: 8, exports_as?: true)])
|
6
8
|
render
|
7
|
-
expect(rendered).to
|
9
|
+
expect(rendered).to have_link "Export to Refworks"
|
8
10
|
end
|
9
11
|
end
|
10
|
-
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-marc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blacklight
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.4.0.rc1
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '6.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
29
|
+
version: 5.4.0.rc1
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +100,20 @@ dependencies:
|
|
94
100
|
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: capybara
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
97
117
|
- !ruby/object:Gem::Dependency
|
98
118
|
name: rails
|
99
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,8 +161,10 @@ files:
|
|
141
161
|
- LICENSE
|
142
162
|
- README.md
|
143
163
|
- Rakefile
|
164
|
+
- app/helpers/blacklight_bookmarks_helper.rb
|
144
165
|
- app/helpers/blacklight_marc_helper.rb
|
145
166
|
- app/views/bookmarks/_endnote.html.erb
|
167
|
+
- app/views/bookmarks/_marc_tools.html.erb
|
146
168
|
- app/views/bookmarks/_refworks.html.erb
|
147
169
|
- app/views/catalog/_marc_view.html.erb
|
148
170
|
- app/views/catalog/endnote.endnote.erb
|
@@ -184,9 +206,7 @@ files:
|
|
184
206
|
- spec/lib/tasks/solr_marc_task_spec.rb
|
185
207
|
- spec/routing/routes_spec.rb
|
186
208
|
- spec/spec_helper.rb
|
187
|
-
- spec/test_app_templates/Gemfile.extra
|
188
209
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
189
|
-
- spec/test_app_templates/lib/tasks/blacklight_test_app.rake
|
190
210
|
- spec/views/bookmarks/_endnote.html.erb_spec.rb
|
191
211
|
- spec/views/bookmarks/_refworks.html.erb_spec.rb
|
192
212
|
- test_support/data/test_data.utf8.mrc
|
@@ -210,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
230
|
version: '0'
|
211
231
|
requirements: []
|
212
232
|
rubyforge_project:
|
213
|
-
rubygems_version: 2.2.
|
233
|
+
rubygems_version: 2.2.2
|
214
234
|
signing_key:
|
215
235
|
specification_version: 4
|
216
236
|
summary: MARC support for Blacklight
|
@@ -224,8 +244,6 @@ test_files:
|
|
224
244
|
- spec/lib/tasks/solr_marc_task_spec.rb
|
225
245
|
- spec/routing/routes_spec.rb
|
226
246
|
- spec/spec_helper.rb
|
227
|
-
- spec/test_app_templates/Gemfile.extra
|
228
247
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
229
|
-
- spec/test_app_templates/lib/tasks/blacklight_test_app.rake
|
230
248
|
- spec/views/bookmarks/_endnote.html.erb_spec.rb
|
231
249
|
- spec/views/bookmarks/_refworks.html.erb_spec.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
platforms :jruby do
|
2
|
-
gem 'jdbc-sqlite3'
|
3
|
-
gem 'mediashelf-loggable', '>= 0.4.8'
|
4
|
-
gem 'therubyrhino'
|
5
|
-
end
|
6
|
-
|
7
|
-
platforms :ruby do
|
8
|
-
gem 'sqlite3'
|
9
|
-
end
|
10
|
-
|
11
|
-
gem 'jquery-rails'
|
12
|
-
|
13
|
-
group :test do
|
14
|
-
gem 'rspec-rails', '~> 2.13'
|
15
|
-
gem 'generator_spec'
|
16
|
-
gem 'capybara'
|
17
|
-
gem 'simplecov', :platform => :mri_19
|
18
|
-
end
|
19
|
-
|
20
|
-
gem 'blacklight' #, github: 'projectblacklight/blacklight'
|
21
|
-
gem 'jettywrapper', '>= 1.2.0'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'rspec/core/rake_task'
|
2
|
-
|
3
|
-
desc "run the blacklight gem spec"
|
4
|
-
gem_home = File.expand_path('../../../../..', __FILE__)
|
5
|
-
|
6
|
-
namespace :blacklight_test_app do
|
7
|
-
|
8
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
9
|
-
t.pattern = gem_home + '/spec/**/*_spec.rb'
|
10
|
-
t.rspec_opts = "--colour"
|
11
|
-
t.ruby_opts = "-I#{gem_home}/spec"
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|