arclight 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +12 -0
  3. data/.gitignore +5 -0
  4. data/.rubocop.yml +66 -0
  5. data/.solr_wrapper +5 -0
  6. data/.travis.yml +30 -2
  7. data/CONTRIBUTING.md +43 -0
  8. data/Gemfile +36 -0
  9. data/LICENSE.txt +1 -0
  10. data/README.md +85 -12
  11. data/Rakefile +14 -3
  12. data/app/assets/images/blacklight/compact.svg +25 -0
  13. data/app/assets/images/blacklight/logo.png +0 -0
  14. data/app/assets/javascripts/arclight/arclight.js +9 -0
  15. data/app/assets/javascripts/arclight/collection_context.js +18 -0
  16. data/app/assets/javascripts/arclight/collection_navigation.js +114 -0
  17. data/app/assets/javascripts/arclight/collection_scrollspy.js +6 -0
  18. data/app/assets/javascripts/arclight/component_ancestors.js +56 -0
  19. data/app/assets/javascripts/arclight/oembed_viewer.js +39 -0
  20. data/app/assets/javascripts/arclight/truncator.js.erb +23 -0
  21. data/app/assets/stylesheets/arclight/application.scss +13 -0
  22. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +3 -0
  23. data/app/assets/stylesheets/arclight/modules/collection_search.scss +3 -0
  24. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +174 -0
  25. data/app/assets/stylesheets/arclight/modules/highlights.scss +10 -0
  26. data/app/assets/stylesheets/arclight/modules/layout.scss +33 -0
  27. data/app/assets/stylesheets/arclight/modules/mastheads.scss +60 -0
  28. data/app/assets/stylesheets/arclight/modules/repositories.scss +29 -0
  29. data/app/assets/stylesheets/arclight/modules/repository_card.scss +54 -0
  30. data/app/assets/stylesheets/arclight/modules/search_results.scss +75 -0
  31. data/app/assets/stylesheets/arclight/modules/show_collection.scss +78 -0
  32. data/app/assets/stylesheets/arclight/modules/sidebar.scss +16 -0
  33. data/app/assets/stylesheets/arclight/variables.scss +2 -0
  34. data/app/controllers/arclight/repositories_controller.rb +40 -0
  35. data/app/controllers/concerns/arclight/field_config_helpers.rb +86 -0
  36. data/app/factories/blacklight_field_configuration_factory.rb +29 -0
  37. data/app/helpers/arclight_helper.rb +173 -0
  38. data/app/models/arclight/parent.rb +24 -0
  39. data/app/models/arclight/parents.rb +34 -0
  40. data/app/models/arclight/requests/google_form.rb +44 -0
  41. data/app/models/concerns/arclight/catalog.rb +22 -0
  42. data/app/models/concerns/arclight/search_behavior.rb +46 -0
  43. data/app/models/concerns/arclight/solr_document.rb +131 -0
  44. data/app/presenters/arclight/index_presenter.rb +10 -0
  45. data/app/presenters/arclight/show_presenter.rb +27 -0
  46. data/app/views/arclight/.keep +0 -0
  47. data/app/views/arclight/repositories/_in_person_repository.html.erb +19 -0
  48. data/app/views/arclight/repositories/_repository.html.erb +62 -0
  49. data/app/views/arclight/repositories/index.html.erb +4 -0
  50. data/app/views/arclight/repositories/show.html.erb +38 -0
  51. data/app/views/arclight/requests/_google_form.html.erb +11 -0
  52. data/app/views/arclight/viewers/_oembed.html.erb +7 -0
  53. data/app/views/catalog/_arclight_document_index_header.html.erb +13 -0
  54. data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
  55. data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
  56. data/app/views/catalog/_arclight_document_show_header.html.erb +15 -0
  57. data/app/views/catalog/_arclight_document_show_header_collection.html.erb +12 -0
  58. data/app/views/catalog/_arclight_index_compact_default.html.erb +15 -0
  59. data/app/views/catalog/_arclight_online_content_indicator.html.erb +5 -0
  60. data/app/views/catalog/_arclight_rangelimit.html.erb +24 -0
  61. data/app/views/catalog/_arclight_viewer_default.html.erb +1 -0
  62. data/app/views/catalog/_collection_contents.html.erb +12 -0
  63. data/app/views/catalog/_collection_count.html.erb +7 -0
  64. data/app/views/catalog/_collection_downloads.html.erb +17 -0
  65. data/app/views/catalog/_collection_online_contents.html.erb +17 -0
  66. data/app/views/catalog/_collection_overview.html.erb +7 -0
  67. data/app/views/catalog/_component_overview.html.erb +46 -0
  68. data/app/views/catalog/_context_card.html.erb +27 -0
  69. data/app/views/catalog/_context_sidebar.html.erb +8 -0
  70. data/app/views/catalog/_custom_metadata.html.erb +16 -0
  71. data/app/views/catalog/_home.html.erb +1 -0
  72. data/app/views/catalog/_index_breadcrumb_default.html.erb +3 -0
  73. data/app/views/catalog/_index_default.html.erb +17 -0
  74. data/app/views/catalog/_index_header.html.erb +7 -0
  75. data/app/views/catalog/_index_header_hierarchy_default.html.erb +42 -0
  76. data/app/views/catalog/_index_header_online_contents_default.html.erb +1 -0
  77. data/app/views/catalog/_index_hierarchy_default.html.erb +28 -0
  78. data/app/views/catalog/_index_online_contents_default.html.erb +6 -0
  79. data/app/views/catalog/_results_histogram.html.erb +10 -0
  80. data/app/views/catalog/_search_results.html.erb +31 -0
  81. data/app/views/catalog/_search_results_repository.html.erb +6 -0
  82. data/app/views/catalog/_search_within_form.html.erb +16 -0
  83. data/app/views/catalog/_show_breadcrumbs_default.html.erb +7 -0
  84. data/app/views/catalog/_show_collection.html.erb +40 -0
  85. data/app/views/catalog/_show_component_sidebar.html.erb +12 -0
  86. data/app/views/catalog/_show_default.html.erb +32 -0
  87. data/app/views/catalog/_show_header.html.erb +5 -0
  88. data/app/views/catalog/_show_sidebar.html.erb +30 -0
  89. data/app/views/catalog/index.html.erb +8 -0
  90. data/app/views/layouts/catalog_result.html.erb +7 -0
  91. data/app/views/shared/_breadcrumbs.html.erb +15 -0
  92. data/app/views/shared/_context_sidebar.html.erb +8 -0
  93. data/app/views/shared/_header_navbar.html.erb +54 -0
  94. data/app/views/shared/_main_menu_links.html.erb +6 -0
  95. data/arclight.gemspec +17 -4
  96. data/bin/rails +13 -0
  97. data/config/locales/arclight.en.yml +65 -0
  98. data/config/routes.rb +6 -0
  99. data/lib/arclight.rb +5 -0
  100. data/lib/arclight/custom_component.rb +98 -0
  101. data/lib/arclight/custom_document.rb +93 -0
  102. data/lib/arclight/digital_object.rb +26 -0
  103. data/lib/arclight/engine.rb +55 -0
  104. data/lib/arclight/exceptions.rb +18 -0
  105. data/lib/arclight/indexer.rb +9 -0
  106. data/lib/arclight/normalized_date.rb +45 -0
  107. data/lib/arclight/normalized_id.rb +25 -0
  108. data/lib/arclight/normalized_title.rb +30 -0
  109. data/lib/arclight/repository.rb +91 -0
  110. data/lib/arclight/shared_indexing_behavior.rb +97 -0
  111. data/lib/arclight/shared_terminology_behavior.rb +65 -0
  112. data/lib/arclight/solr_ead_indexer_ext.rb +159 -0
  113. data/lib/arclight/version.rb +3 -1
  114. data/lib/arclight/viewer.rb +45 -0
  115. data/lib/arclight/viewers/oembed.rb +56 -0
  116. data/lib/arclight/year_range.rb +102 -0
  117. data/lib/generators/arclight/install_generator.rb +63 -0
  118. data/lib/generators/arclight/templates/arclight.js +2 -0
  119. data/lib/generators/arclight/templates/arclight.scss +3 -0
  120. data/lib/generators/arclight/templates/catalog_controller.rb +347 -0
  121. data/lib/generators/arclight/templates/config/downloads.yml +13 -0
  122. data/lib/generators/arclight/templates/config/repositories.yml +42 -0
  123. data/lib/generators/arclight/update_generator.rb +22 -0
  124. data/lib/tasks/index.rake +87 -0
  125. data/package.json +24 -0
  126. data/solr/conf/_rest_managed.json +3 -0
  127. data/solr/conf/admin-extra.html +31 -0
  128. data/solr/conf/elevate.xml +36 -0
  129. data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  130. data/solr/conf/protwords.txt +21 -0
  131. data/solr/conf/schema.xml +631 -0
  132. data/solr/conf/scripts.conf +24 -0
  133. data/solr/conf/solrconfig.xml +393 -0
  134. data/solr/conf/spellings.txt +2 -0
  135. data/solr/conf/stopwords.txt +58 -0
  136. data/solr/conf/stopwords_en.txt +58 -0
  137. data/solr/conf/synonyms.txt +31 -0
  138. data/solr/conf/xslt/example.xsl +132 -0
  139. data/solr/conf/xslt/example_atom.xsl +67 -0
  140. data/solr/conf/xslt/example_rss.xsl +66 -0
  141. data/solr/conf/xslt/luke.xsl +337 -0
  142. data/tasks/arclight.rake +68 -0
  143. data/template.rb +15 -0
  144. data/vendor/assets/javascripts/responsiveTruncator.js +69 -0
  145. data/vendor/assets/javascripts/stickyfill.js +480 -0
  146. metadata +301 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da7dfb3d7dc685b9162a9cfb6f1493eefea226ff
4
- data.tar.gz: a353787fa5e7d1db16180272c9c9acb28fde663c
3
+ metadata.gz: 8e7c36b89eeff34447138302c2d94e7e636fcff9
4
+ data.tar.gz: 69bd0a266a8f52c56bdca6adf416885bbfe07467
5
5
  SHA512:
6
- metadata.gz: 2ea749f25b499d904c9609bc2b5733dd92ad78a27640b2f8c90aa0ba478fb9e2d24f36d61e135cc87fcc855faf0024ebbb497deae23cab8ef3f837dfcd7feb18
7
- data.tar.gz: 97eaad0541a49445d6bcd41bf52e8a565baf50f3bae66de50c27db6224c2e81f94acdb7aa045f08d096523165fcb679e5b2eae9d322477399384c29af20e8f94
6
+ metadata.gz: f3d3fba678027f1c08cee5c6e261a71fc44167cf7dbb8e9203cb35780c6de8db447a0f58613f0cac1844ae460d3893ee96d54de4b5533a31d9de6eaf2f2db54f
7
+ data.tar.gz: 95216eaeba2998d57beafce31831a93172efcbb3ca6d0a196c9fd295f880ac0ad6e9c592c9decbee7ab458ba28181e2bfdc0fbd288c11c8c2591b9a2c640d064
data/.eslintrc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "airbnb-base/legacy",
3
+ "globals": {
4
+ "jQuery": true,
5
+ "$": true,
6
+ "Blacklight": true
7
+ },
8
+ "rules": {
9
+ "no-param-reassign": [2, { "props": false }],
10
+ "func-names": ["error", "never"]
11
+ }
12
+ }
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  /.bundle/
2
+ /.ruby-version
2
3
  /.yardoc
3
4
  /Gemfile.lock
4
5
  /_yardoc/
@@ -10,3 +11,7 @@
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
14
+
15
+ .internal_test_app
16
+
17
+ /node_modules/
data/.rubocop.yml ADDED
@@ -0,0 +1,66 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ Exclude:
5
+ - '.internal_test_app/**/*'
6
+ - 'bin/**/*'
7
+ - 'db/**/*'
8
+ - 'lib/generators/arclight/templates/**/*'
9
+ - 'vendor/**/*'
10
+ TargetRubyVersion: 2.4
11
+ DisplayCopNames: true
12
+
13
+ Rails:
14
+ Enabled: true
15
+
16
+ Metrics/LineLength:
17
+ Max: 120
18
+ Exclude:
19
+ - 'Gemfile'
20
+ - 'lib/arclight/custom_document.rb' # XPaths get long
21
+ - 'lib/arclight/custom_component.rb' # XPaths get long
22
+
23
+ Metrics/ModuleLength:
24
+ Max: 120
25
+
26
+ Metrics/ClassLength:
27
+ Max: 120
28
+
29
+ Metrics/BlockLength:
30
+ Exclude:
31
+ - !ruby/regexp /\.rake$/
32
+ - 'arclight.gemspec'
33
+ - 'spec/**/*'
34
+ - 'lib/arclight/custom_document.rb'
35
+
36
+ Metrics/MethodLength:
37
+ Exclude:
38
+ - 'lib/arclight/custom_document.rb' # arclight_field_definitions too long
39
+
40
+ Performance/RegexpMatch:
41
+ Enabled: false
42
+
43
+ Rails/OutputSafety:
44
+ Exclude:
45
+ - 'app/controllers/concerns/arclight/field_config_helpers.rb' # html_safe needs to be called to mimic BL JOIN behavior
46
+
47
+ RSpec/ExampleLength:
48
+ Enabled: false
49
+
50
+ RSpec/FilePath:
51
+ Exclude:
52
+ - 'spec/lib/arclight/viewers/oembed_spec.rb' # Default file path is o_embed, and that looks weird
53
+
54
+ RSpec/MultipleExpectations:
55
+ Enabled: false
56
+
57
+ RSpec/NestedGroups:
58
+ Max: 4
59
+
60
+ Style/Documentation:
61
+ Exclude:
62
+ - 'spec/**/*'
63
+ - 'lib/arclight.rb'
64
+
65
+ Bundler/DuplicatedGem:
66
+ Enabled: false
data/.solr_wrapper ADDED
@@ -0,0 +1,5 @@
1
+ # Place any default configuration for solr_wrapper here
2
+ # port: 8983
3
+ collection:
4
+ dir: solr/conf/
5
+ name: blacklight-core
data/.travis.yml CHANGED
@@ -1,5 +1,33 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ notifications:
4
+ email: false
3
5
  rvm:
4
- - 2.3.3
5
- before_install: gem install bundler -v 1.14.6
6
+ - 2.4.1
7
+ jdk:
8
+ - oraclejdk8
9
+
10
+ # Update to phantomjs 2.1.1 to fix issues with < 2
11
+ # See https://github.com/travis-ci/travis-ci/issues/3225#issuecomment-177592725
12
+ # and https://github.com/travis-ci/travis-ci/issues/3225#issuecomment-200965782
13
+ cache:
14
+ bundler: true
15
+ directories:
16
+ - "travis_phantomjs"
17
+
18
+ before_install:
19
+ - "phantomjs --version"
20
+ - "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
21
+ - "phantomjs --version"
22
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
23
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
24
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
25
+ - "hash -r"
26
+ - "phantomjs --version"
27
+
28
+ before_script:
29
+ - find spec/fixtures/ead -name '*.xml' | xargs xmllint --noout --schema spec/fixtures/xsd/ead.xsd
30
+ addons:
31
+ apt:
32
+ sources:
33
+ - libxml2-utils
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,43 @@
1
+ ## Contributing
2
+
3
+ ArcLight is a collaborative open source project where contributions are welcome. This contributing guide is borrowed in part from the [GeoBlacklight Contributing Guide](https://github.com/geoblacklight/geoblacklight/blob/master/CONTRIBUTING.md).
4
+
5
+ ### Reporting issues
6
+
7
+ Did you find a bug in ArcLight or interested in a new feature? Please make sure to add an issue for it in the [issue tracker](https://github.com/sul-dlss/arclight/issues) as follows:
8
+
9
+ - Make sure you have a [GitHub account](https://github.com/signup/free)
10
+ - Submit a new [Github issue](https://github.com/sul-dlss/arclight/issues) by:
11
+ - Clearly describing the issue
12
+ - Provide a descriptive summary
13
+ - Explain the expected behavior
14
+ - Explain the actual behavior
15
+ - Provide steps to reproduce the actual behavior
16
+
17
+ ### Contributing code or documentation
18
+
19
+ ArcLight also welcomes code and documentation contributions. We follow the [pull request](https://help.github.com/articles/using-pull-requests/) model for contributing on GitHub.
20
+
21
+ #### Pull request overview
22
+
23
+ 1. Fork it ( http://github.com/sul-dlss/arclight/fork )
24
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
25
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
26
+ 4. Push to the branch (`git push origin my-new-feature`)
27
+ 5. Create new Pull Request
28
+
29
+ #### Merging Changes
30
+
31
+ Here are some general rules to follow for merging pull requests.
32
+
33
+ - It is considered "poor form" to merge your own request.
34
+ - Please take the time to review the changes and get a sense of what is being changed. Things to consider:
35
+ - Does the commit message explain what is going on?
36
+ - Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
37
+ - Do all new methods, modules, and classes have comments? Do changed methods, modules, and classes have comments?
38
+ - Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
39
+ - Did the Travis tests complete successfully?
40
+ - If you are uncertain, bring other contributors into the conversation by creating a comment that includes their `@username`.
41
+ - If you like the pull request, but want others to chime in, create a +1 comment and tag a user.
42
+
43
+ If you wish to ask questions or participate further, see our general [README](https://github.com/sul-dlss/arclight/blob/master/README.md).
data/Gemfile CHANGED
@@ -1,4 +1,40 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in arclight.gemspec
4
6
  gemspec
7
+ # BEGIN ENGINE_CART BLOCK
8
+ # engine_cart: 1.1.0
9
+ # engine_cart stanza: 0.10.0
10
+ # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
11
+ file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
12
+ if File.exist?(file)
13
+ begin
14
+ eval_gemfile file
15
+ rescue Bundler::GemfileError => e
16
+ Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
17
+ Bundler.ui.warn e.message
18
+ end
19
+ else
20
+ Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
21
+
22
+ if ENV['RAILS_VERSION']
23
+ if ENV['RAILS_VERSION'] == 'edge'
24
+ gem 'rails', github: 'rails/rails'
25
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
26
+ else
27
+ gem 'rails', ENV['RAILS_VERSION']
28
+ end
29
+ end
30
+
31
+ case ENV['RAILS_VERSION']
32
+ when /^4.2/
33
+ gem 'coffee-rails', '~> 4.1.0'
34
+ gem 'responders', '~> 2.0'
35
+ gem 'sass-rails', '>= 5.0'
36
+ when /^4.[01]/
37
+ gem 'sass-rails', '< 5.0'
38
+ end
39
+ end
40
+ # END ENGINE_CART BLOCK
data/LICENSE.txt CHANGED
@@ -1,4 +1,5 @@
1
1
  Copyright 2017 The Board of Trustees of the Leland Stanford Junior University
2
+ Copyright (c) 2017, Regents of the University of Michigan.
2
3
 
3
4
  Licensed under the Apache License, Version 2.0 (the "License");
4
5
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,12 +1,23 @@
1
+ [![Build Status](https://travis-ci.org/sul-dlss/arclight.svg?branch=master)](https://travis-ci.org/sul-dlss/arclight)
2
+
3
+ [![Coverage Status](https://coveralls.io/repos/github/sul-dlss/arclight/badge.svg?branch=master)](https://coveralls.io/github/sul-dlss/arclight?branch=master)
4
+
1
5
  # Arclight
2
6
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/arclight`. To experiment with that code, run `bin/console` for an interactive prompt.
7
+ A Rails engine supporting discovery of archival materials.
8
+
9
+ During April - June 2017, ArcLight underwent its initial development as a Minimally Viable Product (MVP). The MVP is targeted for content that is described in the [Encoded Archival Description](http://eadiva.com/2/) (EAD) format. Future development is in the planning phase with no definitive timeline as yet.
10
+
11
+ ## Requirements
4
12
 
5
- TODO: Delete this and the text above, and describe your gem
13
+ * [Ruby](https://www.ruby-lang.org/en/) 2.2 or later
14
+ * [Rails](http://rubyonrails.org) 5.0 or later
6
15
 
7
16
  ## Installation
8
17
 
9
- Add this line to your application's Gemfile:
18
+ [Installing ArcLight](https://github.com/sul-dlss/arclight/wiki/Creating,-installing,-and-running-your-ArcLight-application) is straightforward in a Rails environment.
19
+
20
+ Basically, add this line to your application's `Gemfile`:
10
21
 
11
22
  ```ruby
12
23
  gem 'arclight'
@@ -14,28 +25,90 @@ gem 'arclight'
14
25
 
15
26
  And then execute:
16
27
 
17
- $ bundle
28
+ ```sh
29
+ $ bundle
30
+ ```
18
31
 
19
32
  Or install it yourself as:
20
33
 
21
- $ gem install arclight
34
+ ```sh
35
+ $ gem install arclight
36
+ ```
37
+
38
+ For further details, see our [Installing ArcLight](https://github.com/sul-dlss/arclight/wiki/Creating,-installing,-and-running-your-ArcLight-application) documentation.
22
39
 
23
40
  ## Usage
24
41
 
25
- TODO: Write usage instructions here
42
+ Arclight is a Ruby gem designed to work with archival data. It can be installed on a server or virtual server. Once running, finding aids in the form of archival collection data can be imported into Arclight through an indexing process. Institutional and repositories data can also be added to Arclight (Currently this requires a developer. Configuration pages will be added for this in future versions). Additional finding aids can be added at any time.
43
+
44
+ After data indexing, Arclight can to be used to search, browse, and display the repositories (sets of collections), collections, and components within collections. Globally available search allows filtering on several types of terms (Keyword, Name, Place, etc.). Once a search is begun, it can be further narrowed using facets on the left side of the search page. Selecting a search result goes directly to that results show or display page. Also global available are buttons for Repositories and Collections which can be used an any time.
45
+
46
+ Browsing allows you to view the Overview or Contents (when it exists) of a collection. The Overview tab displays top level metadata about the collection. The Contents tab displays an outline view of a next level of the collection. You can expand each level by selecting (clicking). Selecting a component in the Contents views goes to a component page which shows the metadata for it.
47
+
48
+ Some pages include an inline view tab to the right of an item which will expand the Contents further.
49
+
50
+ See the [ArcLight demo](https://arclight-demo.projectblacklight.org/) and [ArcLight MVP Wiki](https://github.com/sul-dlss/arclight/wiki) for usage.
51
+
52
+ See [Arclight Major Features](https://github.com/sul-dlss/arclight/wiki/Arclight-Major-Features) for a list of features.
53
+
54
+ ## Resources
55
+
56
+ * General
57
+ * [ArcLight team wiki](https://wiki.duraspace.org/display/hydra/ArcLight): includes design process documentation
58
+ * Use the [ArcLight Google Group](http://groups.google.com/d/forum/arclight-community) to contact us with questions
59
+ * MVP Implementation:
60
+ * [ArcLight demo site](https://arclight-demo.projectblacklight.org/)
61
+ * [YouTube channel](https://www.youtube.com/channel/UCbSaP93HdypsW6hXy7V1nFQ): MVP sprint demo videos
62
+ * [ArcLight MVP Wiki](https://github.com/sul-dlss/arclight/wiki)
63
+ * [Blacklight wiki](https://github.com/projectblacklight/blacklight/wiki)
64
+
65
+ ## ArcLight MVP Development team
66
+
67
+ * Stanford University
68
+ * [Camille Villa](https://github.com/camillevilla)
69
+ * [Darren Hardy](https://github.com/drh-stanford)
70
+ * [Gary Geisler](https://github.com/ggeisler)
71
+ * [Jack Reed](https://github.com/mejackreed)
72
+ * [Jennifer Vine](https://github.com/jvine)
73
+ * [Jessie Keck](https://github.com/jkeck)
74
+ * [Mark Matienzo](https://github.com/anarchivist)
75
+ * University of Michagan
76
+ * [Gordon Leacock](https://github.com/gordonleacock)
26
77
 
27
78
  ## Development
28
79
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
80
+ ArcLight development uses [`solr_wrapper`](https://rubygems.org/gems/solr_wrapper/versions/0.18.1) and [`engine_cart`](https://rubygems.org/gems/engine_cart) to host development instances of Solr and Rails server on your local machine.
30
81
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
82
+ ### Run the test suite
32
83
 
33
- ## Contributing
84
+ Ensure Solr and Rails are _not_ running (ports 8983 and 3000 respectively), then:
85
+
86
+ ```sh
87
+ $ bundle exec rake
88
+ ```
89
+
90
+ ### Run a development server
34
91
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/arclight.
92
+ ```sh
93
+ $ bundle exec rake arclight:server
94
+ ```
36
95
 
96
+ Then visit http://localhost:3000. It will also start a Solr instance on port 8983.
37
97
 
38
- ## License
98
+ ### Run a console
39
99
 
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
100
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
101
+
102
+ ### Release a new version of the gem
103
+
104
+ To release a new version:
105
+
106
+ 1. Update the version number in `lib/arclight/version.rb`
107
+ 2. Run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, build the gem file (e.g., `gem build arclight.gemspec`) and push the `.gem` file to [rubygems.org](https://rubygems.org) (e.g., `gem push arclight-x.y.z.gem`).
108
+
109
+ ## Contributing
110
+
111
+ [Bug reports](https://github.com/sul-dlss/arclight/issues) and [pull requests](https://github.com/sul-dlss/arclight/pulls) are welcome on ArcLight -- see [CONTRIBUTING.md](https://github.com/sul-dlss/arclight/blob/master/CONTRIBUTING.md) for details.
112
+ ## License
41
113
 
114
+ The gem is available as open source under the terms of the [Apache 2 License](https://opensource.org/licenses/Apache-2.0).
data/Rakefile CHANGED
@@ -1,6 +1,17 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ require 'rubocop/rake_task'
9
+ RuboCop::RakeTask.new(:rubocop)
10
+
11
+ Dir.glob('./tasks/*.rake').each { |f| load f }
12
+ Dir.glob('./lib/tasks/*.rake').each { |f| load f }
13
+
14
+ require 'engine_cart/rake_task'
15
+ require 'solr_ead'
16
+
17
+ task default: %i[rubocop eslint ci]
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Compact</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
8
+ <g id="Compact" stroke="#000000">
9
+ <path d="M1.43885093,2.44444444 L6.83349609,2.44444444" id="Line"></path>
10
+ <path d="M1.43885093,4.44444444 L6.83349609,4.44444444" id="Line"></path>
11
+ <path d="M1.43885093,6.44444444 L6.83349609,6.44444444" id="Line"></path>
12
+ <path d="M1.43885093,8.44444444 L6.83349609,8.44444444" id="Line"></path>
13
+ <path d="M1.43885093,10.4444444 L6.83349609,10.4444444" id="Line"></path>
14
+ <path d="M1.43885093,12.4444444 L6.83349609,12.4444444" id="Line"></path>
15
+ <path d="M1.43885093,14.4444444 L6.83349609,14.4444444" id="Line"></path>
16
+ <path d="M9.43885093,2.44444444 L14.8334961,2.44444444" id="Line"></path>
17
+ <path d="M9.43885093,4.44444444 L14.8334961,4.44444444" id="Line"></path>
18
+ <path d="M9.43885093,6.44444444 L14.8334961,6.44444444" id="Line"></path>
19
+ <path d="M9.43885093,8.44444444 L14.8334961,8.44444444" id="Line"></path>
20
+ <path d="M9.43885093,10.4444444 L14.8334961,10.4444444" id="Line"></path>
21
+ <path d="M9.43885093,12.4444444 L14.8334961,12.4444444" id="Line"></path>
22
+ <path d="M9.43885093,14.4444444 L14.8334961,14.4444444" id="Line"></path>
23
+ </g>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,9 @@
1
+ //= require arclight/collection_scrollspy
2
+ //= require arclight/collection_navigation
3
+ //= require arclight/collection_context
4
+ //= require arclight/component_ancestors
5
+ //= require arclight/oembed_viewer
6
+ //= require arclight/truncator
7
+
8
+ // Vendor Scripts
9
+ //= require responsiveTruncator
@@ -0,0 +1,18 @@
1
+ Blacklight.onLoad(function () {
2
+ 'use strict';
3
+
4
+ $('[data-arclight-collection-context="true"]').each(function (i, element) {
5
+ var $el = $(element);
6
+ var data = $el.data();
7
+ $.ajax({
8
+ url: data.arclightCollectionContextUrl
9
+ }).done(function (response) {
10
+ var resp = $.parseHTML(response);
11
+ var $doc = $(resp);
12
+ var link = $('<a></a>').attr('href', data.arclightCollectionContextUrl);
13
+ var addedSection = $doc.find('.al-show-header-section');
14
+ addedSection.find('h1').wrapInner(link);
15
+ $el.hide().html(addedSection).fadeIn(500);
16
+ });
17
+ });
18
+ });