blacklight-gallery 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 94afcde16a490934a83e5232c0f1f647a65546d7
4
+ data.tar.gz: 578e0ba2d4baaeebe736af68c87645611ad27374
5
+ SHA512:
6
+ metadata.gz: b5df9ae74acf4f310055aedbabd9ab576fdb6dfe441c4809d3c1d18a511a428a61a1b41279c7f5f514b5db3ac113787715a4f17b0bd232ac5e34de37da082e2b
7
+ data.tar.gz: 6ab0242fc6d8b6dfd5bee324a3f8cdc52b6e30a5ec15e846a7282cd00841d311cbe6cc564d5c9fb27e6c99afd9937fcda396bdbc066a80cdc91e8cc7178a9328
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ jetty
19
+ spec/internal
data/.travis.yml ADDED
@@ -0,0 +1,18 @@
1
+ notifications:
2
+ email: false
3
+
4
+ rvm:
5
+ - 2.1.0
6
+ - 2.0.0
7
+ - 1.9.3
8
+ - jruby-19mode
9
+
10
+ notifications:
11
+ irc: "irc.freenode.org#blacklight"
12
+ email:
13
+ - blacklight-commits@googlegroups.com
14
+
15
+ env:
16
+ global:
17
+ - JRUBY_OPTS="-J-Xms512m -J-Xmx1024m"
18
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in blacklight-gallery.gemspec
4
+ gemspec
5
+
6
+ group :test do
7
+ gem "bootstrap-sass"
8
+ gem 'turbolinks'
9
+ gem 'sass-rails'
10
+ end
11
+
12
+ gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
13
+
14
+ if File.exists?('spec/test_app_templates/Gemfile.extra')
15
+ eval File.read('spec/test_app_templates/Gemfile.extra'), nil, 'spec/test_app_templates/Gemfile.extra'
16
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2014 The Board of Trustees of the Leland Stanford Junior University.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Blacklight::Gallery
2
+
3
+ Gallery views for Blacklight search results
4
+
5
+ ## Installation
6
+
7
+ Add this line to your Blacklight application's Gemfile:
8
+
9
+ gem 'blacklight-gallery'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install blacklight-gallery
18
+
19
+ ## Usage
20
+
21
+ Run the gallery generator:
22
+
23
+ $ rails g blacklight_gallery:install
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( http://github.com/<my-github-username>/blacklight-gallery/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.6.0.zip"
4
+ APP_ROOT = File.dirname(__FILE__)
5
+
6
+ require 'rspec/core/rake_task'
7
+ require 'engine_cart/rake_task'
8
+
9
+ require 'jettywrapper'
10
+ require 'blacklight'
11
+
12
+ task :default => :ci
13
+
14
+ desc "Run specs"
15
+ RSpec::Core::RakeTask.new do |t|
16
+
17
+ end
18
+
19
+ desc "Load fixtures"
20
+ task :fixtures => ['engine_cart:generate'] do
21
+ within_test_app do
22
+ system "rake blacklight:solr:seed RAILS_ENV=test"
23
+ abort "Error running fixtures" unless $?.success?
24
+ end
25
+ end
26
+
27
+ desc "Execute Continuous Integration build"
28
+ task :ci => ['jetty:clean', 'engine_cart:generate'] do
29
+
30
+ require 'jettywrapper'
31
+ jetty_params = {
32
+ :jetty_home => File.expand_path(File.dirname(__FILE__) + '/jetty'),
33
+ :quiet => false,
34
+ :jetty_port => 8888,
35
+ :solr_home => File.expand_path(File.dirname(__FILE__) + '/jetty/solr'),
36
+ :startup_wait => 30
37
+ }
38
+
39
+ error = Jettywrapper.wrap(jetty_params) do
40
+ Rake::Task['fixtures'].invoke
41
+ Rake::Task['spec'].invoke
42
+ end
43
+ raise "test failures: #{error}" if error
44
+ end
@@ -0,0 +1,22 @@
1
+ #documents.gallery {
2
+ .document {
3
+ border-bottom: none;
4
+ min-height: 400px;
5
+ }
6
+
7
+ .index_title {
8
+ width: 100%;
9
+ }
10
+
11
+ .document-counter {
12
+ display: none;
13
+ }
14
+
15
+ .index-document-functions {
16
+ clear: left;
17
+ }
18
+ }
19
+
20
+ .view-icon-gallery {
21
+ &:before { content: "\e011"; }
22
+ }
@@ -0,0 +1,4 @@
1
+ <% # container for all documents in index view -%>
2
+ <div id="documents" class="row gallery">
3
+ <%= render :collection => documents, :as => :document, :partial => 'index_gallery' %>
4
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="document col-xs-6 col-md-3">
2
+ <div class="thumbnail">
3
+ <%= render_thumbnail_tag document %>
4
+ <div class="caption">
5
+ <%= render_document_partials document, blacklight_config.view_config(:gallery).partials, :document_counter => document_counter %>
6
+ </div>
7
+ </div>
8
+ </div>
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'blacklight/gallery/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "blacklight-gallery"
8
+ spec.version = Blacklight::Gallery::VERSION
9
+ spec.authors = ["Chris Beer"]
10
+ spec.email = ["cabeer@stanford.edu"]
11
+ spec.summary = %q{Gallery display for Blacklight}
12
+ spec.homepage = ""
13
+ spec.license = "Apache 2.0"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "rails"
21
+ spec.add_dependency "blacklight", ">= 5.0.0.pre4", "< 6.0"
22
+ spec.add_dependency "bootstrap-sass", "~> 3.0"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.5"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "rspec-rails"
27
+ spec.add_development_dependency "jettywrapper"
28
+ spec.add_development_dependency "engine_cart"
29
+ spec.add_development_dependency "capybara"
30
+ end
@@ -0,0 +1,5 @@
1
+ en:
2
+ blacklight:
3
+ search:
4
+ view:
5
+ gallery: "Gallery"
@@ -0,0 +1,7 @@
1
+ require "blacklight/gallery/version"
2
+
3
+ module Blacklight
4
+ module Gallery
5
+ require 'blacklight/gallery/engine'
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ require 'blacklight'
2
+
3
+ module Blacklight
4
+ module Gallery
5
+ class Engine < Rails::Engine
6
+ Blacklight::Configuration.default_values[:view].gallery.partials = [:index_header]
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module Blacklight
2
+ module Gallery
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ require 'rails/generators'
2
+
3
+ module BlacklightGallery
4
+ class Install < Rails::Generators::Base
5
+
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ def assets
9
+ copy_file "blacklight_gallery.css.scss", "app/assets/stylesheets/blacklight_gallery.css.scss"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require blacklight_gallery/default
3
+ */
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Gallery view" do
4
+ before { visit catalog_index_path :q => 'medicine', :view => 'gallery' }
5
+
6
+ it "should display results in a galley view" do
7
+ expect(page).to have_selector("#documents.gallery")
8
+ expect(page).to have_selector(".gallery .document .thumbnail .caption")
9
+ expect(page).to have_content("Strong Medicine speaks")
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
2
+
3
+ require 'blacklight'
4
+ require 'blacklight/gallery'
5
+
6
+ require 'engine_cart'
7
+ EngineCart.load_application!
8
+
9
+ require 'rspec/rails'
10
+ require 'capybara/rspec'
@@ -0,0 +1,22 @@
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 'poltergeist'
17
+ gem 'simplecov'
18
+ end
19
+
20
+ gem 'jettywrapper', '>= 1.2.0'
21
+
22
+ gem 'blacklight'
@@ -0,0 +1,24 @@
1
+ require 'rails/generators'
2
+
3
+ class TestAppGenerator < Rails::Generators::Base
4
+ source_root File.expand_path("../../../../test_app_templates", __FILE__)
5
+
6
+ def remove_index
7
+ remove_file "public/index.html"
8
+ end
9
+
10
+ def run_blacklight_generator
11
+ say_status("warning", "GENERATING BL", :yellow)
12
+
13
+ Bundler.with_clean_env do
14
+ run "bundle install"
15
+ end
16
+
17
+ generate 'blacklight:install'
18
+ end
19
+
20
+ def run_gallery_install
21
+ generate 'blacklight_gallery:install'
22
+ end
23
+
24
+ end
metadata ADDED
@@ -0,0 +1,200 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blacklight-gallery
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Chris Beer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: blacklight
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 5.0.0.pre4
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '6.0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 5.0.0.pre4
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '6.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: bootstrap-sass
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: bundler
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.5'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.5'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rake
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rspec-rails
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: jettywrapper
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'
117
+ - !ruby/object:Gem::Dependency
118
+ name: engine_cart
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: capybara
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ description:
146
+ email:
147
+ - cabeer@stanford.edu
148
+ executables: []
149
+ extensions: []
150
+ extra_rdoc_files: []
151
+ files:
152
+ - ".gitignore"
153
+ - ".travis.yml"
154
+ - Gemfile
155
+ - LICENSE.txt
156
+ - README.md
157
+ - Rakefile
158
+ - app/assets/stylesheets/blacklight_gallery/default.css.scss
159
+ - app/views/catalog/_document_gallery.html.erb
160
+ - app/views/catalog/_index_gallery.html.erb
161
+ - blacklight-gallery.gemspec
162
+ - config/locales/blacklight-gallery.en.yml
163
+ - lib/blacklight/gallery.rb
164
+ - lib/blacklight/gallery/engine.rb
165
+ - lib/blacklight/gallery/version.rb
166
+ - lib/generators/blacklight_gallery/install_generator.rb
167
+ - lib/generators/blacklight_gallery/templates/blacklight_gallery.css.scss
168
+ - spec/features/gallery_spec.rb
169
+ - spec/spec_helper.rb
170
+ - spec/test_app_templates/Gemfile.extra
171
+ - spec/test_app_templates/lib/generators/test_app_generator.rb
172
+ homepage: ''
173
+ licenses:
174
+ - Apache 2.0
175
+ metadata: {}
176
+ post_install_message:
177
+ rdoc_options: []
178
+ require_paths:
179
+ - lib
180
+ required_ruby_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ required_rubygems_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ requirements: []
191
+ rubyforge_project:
192
+ rubygems_version: 2.2.0
193
+ signing_key:
194
+ specification_version: 4
195
+ summary: Gallery display for Blacklight
196
+ test_files:
197
+ - spec/features/gallery_spec.rb
198
+ - spec/spec_helper.rb
199
+ - spec/test_app_templates/Gemfile.extra
200
+ - spec/test_app_templates/lib/generators/test_app_generator.rb