browse-everything 1.0.0.rc1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +71 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +4 -0
  5. data/CONTRIBUTING.md +3 -3
  6. data/LICENSE.txt +205 -22
  7. data/README.md +31 -14
  8. data/Rakefile +0 -9
  9. data/app/assets/javascripts/browse_everything/behavior.js +448 -0
  10. data/app/assets/stylesheets/browse_everything.scss +0 -6
  11. data/app/assets/stylesheets/browse_everything/_browse_everything.scss +2 -116
  12. data/app/assets/stylesheets/browse_everything/_browse_everything_bootstrap3.scss +123 -0
  13. data/app/assets/stylesheets/browse_everything/_browse_everything_bootstrap4.scss +117 -0
  14. data/app/views/browse_everything/_files.html.erb +1 -0
  15. data/app/views/browse_everything/_providers.html.erb +2 -1
  16. data/app/views/browse_everything/index.html.erb +3 -2
  17. data/browse-everything.gemspec +7 -9
  18. data/karma.conf.js +71 -0
  19. data/lib/browse-everything.rb +0 -2
  20. data/lib/browse_everything.rb +11 -5
  21. data/lib/browse_everything/driver/box.rb +10 -3
  22. data/lib/browse_everything/driver/dropbox.rb +25 -9
  23. data/lib/browse_everything/driver/file_system.rb +17 -5
  24. data/lib/browse_everything/driver/google_drive.rb +2 -1
  25. data/lib/browse_everything/driver/s3.rb +18 -2
  26. data/lib/browse_everything/retriever.rb +7 -2
  27. data/lib/browse_everything/version.rb +1 -1
  28. data/lib/generators/browse_everything/install_generator.rb +1 -7
  29. data/lib/generators/browse_everything/templates/browse_everything_providers.yml.example +1 -0
  30. data/spec/javascripts/behavior_spec.js +1 -3
  31. data/spec/javascripts/helpers/jquery.js +11008 -0
  32. data/spec/javascripts/karma_spec.rb +16 -0
  33. data/spec/lib/browse_everything/browser_spec.rb +5 -3
  34. data/spec/lib/browse_everything/driver/dropbox_spec.rb +20 -1
  35. data/spec/lib/browse_everything_spec.rb +7 -0
  36. data/spec/spec_helper.rb +8 -1
  37. data/spec/support/capybara.rb +0 -5
  38. data/spec/test_app_templates/Gemfile.extra +7 -0
  39. data/spec/test_app_templates/lib/generators/test_app_generator.rb +7 -1
  40. metadata +69 -82
  41. data/.travis.yml +0 -27
  42. data/app/assets/javascripts/browse_everything/behavior.js.coffee +0 -342
  43. data/app/helpers/font_awesome_version_helper.rb +0 -17
  44. data/lib/generators/browse_everything/assets_generator.rb +0 -13
  45. data/lib/generators/browse_everything/templates/browse_everything.scss +0 -6
  46. data/spec/javascripts/jasmine_spec.rb +0 -21
  47. data/spec/javascripts/support/jasmine.yml +0 -124
  48. data/spec/javascripts/support/jasmine_helper.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 46cd3b246ede692cfea34a3251136fe8eb5e64a1
4
- data.tar.gz: b0bc78f050b3c55dae7b3dab2962c606ecc9cf8c
2
+ SHA256:
3
+ metadata.gz: 9580ccdb2b53c75f59eb7002892d3a65c26438a407d19b383825989b43eca287
4
+ data.tar.gz: 8ee75aa2fa5f43768f0019456eb9eb49ab90e3ec6fc1a38008c476e47d9506d1
5
5
  SHA512:
6
- metadata.gz: a5e82c374b814abca77205c8d79705eb901952a5cb589559d66c7b6619a2673c8f5978f425f17f7639d9862b5dfb7155d28b1ac15a84ddcfc03246ad394b8b2c
7
- data.tar.gz: 0a9935875a2ed98761c866e297a7114fa6352da032548f7c4fe9ca164ebd00101ff7404822f56529eb4c38199bb1a54438d55390b8e9317e6550f88b97a0ba07
6
+ metadata.gz: c524b3167dd198a71e119b7b30d759f935e72f8fc5e894dca5af6dd5120b93cff436c1671ad589a53b8f3753c7d3b59b6cad2d16a82b3fe305b9a50e6d2f057e
7
+ data.tar.gz: 600342a8f49b0ac444a0bd8fc5eea6da81f065d9c5cd7ec41999ba7bb671e95229750278618ed94235759c5e255f8126fe9704864f67f8a22a575dc059edbae7
@@ -0,0 +1,71 @@
1
+ ---
2
+ version: 2.1
3
+ orbs:
4
+ samvera: samvera/circleci-orb@0
5
+
6
+ jobs:
7
+ build:
8
+ parameters:
9
+ ruby_version:
10
+ type: string
11
+ rails_version:
12
+ type: string
13
+ bundler_version:
14
+ type: string
15
+ default: 2.0.1
16
+ executor:
17
+ name: 'samvera/ruby'
18
+ ruby_version: << parameters.ruby_version >>
19
+ environment:
20
+ RAILS_VERSION: << parameters.rails_version >>
21
+ steps:
22
+ - samvera/cached_checkout
23
+
24
+ - samvera/bundle_for_gem:
25
+ bundler_version: << parameters.bundler_version >>
26
+ ruby_version: << parameters.ruby_version >>
27
+ project: 'browse-everything'
28
+
29
+ - samvera/engine_cart_generate:
30
+ cache_key: v1-internal-test-app-{{ checksum "browse-everything.gemspec" }}-{{ checksum "spec/test_app_templates/lib/generators/test_app_generator.rb" }}-{{ checksum "lib/generators/browse_everything/install_generator.rb" }}-{{ checksum "lib/generators/browse_everything/config_generator.rb" }}--<< parameters.rails_version >>-<< parameters.ruby_version >>
31
+
32
+ - samvera/bundle_for_gem:
33
+ ruby_version: << parameters.ruby_version >>
34
+ bundler_version: << parameters.bundler_version >>
35
+ project: 'browse-everything'
36
+
37
+ - samvera/rubocop
38
+
39
+ - run:
40
+ name: Install Karma for JavaScript and functional tests
41
+ command: sudo npm install -g karma karma-jasmine karma-chrome-launcher
42
+
43
+ - samvera/parallel_rspec
44
+
45
+ workflows:
46
+ ci:
47
+ jobs:
48
+ - build:
49
+ name: "ruby2-6_rails5-2"
50
+ ruby_version: 2.6.3
51
+ rails_version: 5.2.3
52
+ - build:
53
+ name: "ruby2-6_rails5-1"
54
+ ruby_version: 2.6.3
55
+ rails_version: 5.1.7
56
+ - build:
57
+ name: "ruby2-5_rails5-2"
58
+ ruby_version: 2.5.5
59
+ rails_version: 5.2.3
60
+ - build:
61
+ name: "ruby2-5_rails5-1"
62
+ ruby_version: 2.5.5
63
+ rails_version: 5.1.7
64
+ - build:
65
+ name: "ruby2-4_rails5-2"
66
+ ruby_version: 2.4.6
67
+ rails_version: 5.2.3
68
+ - build:
69
+ name: "ruby2-4_rails5-1"
70
+ ruby_version: 2.4.6
71
+ rails_version: 5.1.7
data/.gitignore CHANGED
@@ -13,6 +13,7 @@ lib/bundler/man
13
13
  pkg
14
14
  rdoc
15
15
  spec/reports
16
+ spec/fixtures/Getting Started.pdf
16
17
  test/tmp
17
18
  test/version_tmp
18
19
  tmp
@@ -31,6 +31,10 @@ Metrics/BlockLength:
31
31
  RSpec/NestedGroups:
32
32
  Enabled: false
33
33
 
34
+ RSpec/DescribeClass:
35
+ Exclude:
36
+ - 'spec/javascripts/**/*'
37
+
34
38
  RSpec/LeadingSubject:
35
39
  Enabled: false
36
40
 
@@ -127,12 +127,12 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
127
127
  We adopted [Github's Pull Request Review](https://help.github.com/articles/about-pull-request-reviews/) for our repositories.
128
128
  Common checks that may occur in our repositories:
129
129
 
130
- 1. Travis CI - where our automated tests are running
130
+ 1. CircleCI - where our automated tests are running
131
131
  2. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
132
132
 
133
133
  If one or more of the required checks failed (or are incomplete), the code should not be merged (and the UI will not allow it). If all of the checks have passed, then anyone on the project (including the pull request submitter) may merge the code.
134
134
 
135
- *Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks (Travis CI is usually the culprit), so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.*
135
+ *Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks, so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.*
136
136
 
137
137
  #### Things to Consider When Reviewing
138
138
 
@@ -149,7 +149,7 @@ This is your chance for a mentoring moment of another developer. Take time to gi
149
149
  * Do new or changed methods, modules, and classes have documentation?
150
150
  * Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
151
151
  * Does the description of the new/changed specs match your understanding of what the spec is doing?
152
- * Did the Travis tests complete successfully?
152
+ * Did the CircleCI tests complete successfully?
153
153
 
154
154
  If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer.
155
155
 
@@ -1,22 +1,205 @@
1
- Copyright (c) 2013 Michael Klein
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2012 Penn State University
190
+ Copyright 2013 University of Notre Dame, Northwestern University, and Data Curation Experts
191
+ Copyright 2014 Data Curation Experts
192
+ Additional copyright may be held by others, as reflected in the commit log
193
+
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Code:
4
4
  [![Gem Version](https://badge.fury.io/rb/browse-everything.png)](http://badge.fury.io/rb/browse-everything)
5
- [![Build Status](https://travis-ci.org/samvera/browse-everything.svg?branch=master)](https://travis-ci.org/samvera/browse-everything)
5
+ [![CircleCI](https://circleci.com/gh/samvera/browse-everything.svg?style=svg)](https://circleci.com/gh/samvera/browse-everything)
6
6
  [![Coverage Status](https://coveralls.io/repos/samvera/browse-everything/badge.svg?branch=master&service=github)](https://coveralls.io/github/samvera/browse-everything?branch=master)
7
7
 
8
8
  Docs:
@@ -39,17 +39,14 @@ what this means can be found
39
39
 
40
40
  ## Supported Ruby Releases
41
41
  Currently, the following releases of Ruby are supported:
42
- - 2.5.1
43
- - 2.4.4
44
- - 2.3.7
45
- - Please note that this is the last release in the 2.3.x series, and support is [scheduled to be withdrawn](https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-3-7-released/). We would strongly recommend that one upgrades from 2.3.7 in response to this.
42
+ - 2.6.3
43
+ - 2.5.5
44
+ - 2.4.6
46
45
 
47
46
  ## Supported Rails Releases
48
- - 5.2.0
49
- - 5.1.6
50
- - 5.0.7
51
- - 4.2.10
52
- - The supported Rail releases follow those specified by [the security policy of the Rails Community](https://rubyonrails.org/security/). As is the case with the supported Ruby releases, it is recommended that one upgrades from any Rails release no longer receiving security updates.
47
+ The supported Rail releases follow those specified by [the security policy of the Rails Community](https://rubyonrails.org/security/). As is the case with the supported Ruby releases, it is recommended that one upgrades from any Rails release no longer receiving security updates.
48
+ - 5.2.3
49
+ - 5.1.7
53
50
 
54
51
  ## Installation
55
52
 
@@ -66,7 +63,7 @@ Or install it yourself as:
66
63
 
67
64
  $ gem install browse-everything
68
65
 
69
- ### Configuring the gem
66
+ ## Configuring the gem in your host app
70
67
 
71
68
  After installing the gem, run the generator
72
69
 
@@ -76,9 +73,15 @@ This generator will set up the _config/browse_everything_providers.yml_ file and
76
73
 
77
74
  If you prefer not to use the generator, or need info on how to set up providers in the browse_everything_providers.yml, use the info on [Configuring browse-everything](https://github.com/samvera/browse-everything/wiki/Configuring-browse-everything).
78
75
 
79
- ### Include the CSS and JavaScript
76
+ Browse-everything depends on bootstrap, it can work with bootstrap 3 or bootstrap 4.
80
77
 
81
- Add `@import "browse_everything";` to your application.css.scss
78
+ ### CSS
79
+
80
+ **For bootstrap3 support**, your app should include the [bootstrap-sass](https://github.com/twbs/bootstrap-sass) gem in it's Gemfile, and following the install directions for bootstrap-sass, should have `@import 'bootstrap-sprockets'` and `@import 'bootstrap'` in it's application.scss. After those lines, add `@import "browse_everything/browse_everything_bootstrap3";` to your application.scss.
81
+
82
+ **For bootstrap4 support**, your app should include the [bootstrap](https://github.com/twbs/bootstrap-rubygem) gem in it's Gemfile, and following the install directions for that gem should have `@import "bootstrap";` in it's application.scss. After that line, add `@import 'browse_everything/browse_everything_bootstrap4'` to your application.scss.
83
+
84
+ ### Javascript
82
85
 
83
86
  In `app/assets/javascripts/application.js` include jquery and the BrowseEverything
84
87
 
@@ -87,13 +90,27 @@ In `app/assets/javascripts/application.js` include jquery and the BrowseEverythi
87
90
  //= require browse_everything
88
91
  ```
89
92
 
93
+ (Same for bootstrap3 or bootstrap 4)
94
+
95
+ ### Migration CSS inclusion from pre-1.0
96
+
97
+ If your app has installed a previous version of browse-everything, you may have a generated file at `./app/assets/stylesheets/browse_everything.scss`, which has a line in it `@import "browse_everything/browse_everything";`. That import should no longer be used; it can be changed to `@import "browse_everything/browse_everything_bootstrap3"` instead.
98
+
99
+ However, we also recommend merging the contents of this file into your main `application.scss` file, as documented in the current install instructions. With the separate generated file with bootstrap imports, you may likely be including bootstrap CSS in your generated CSS bundle twice, if you also have that import in your main application.scss already.
100
+
90
101
  ## Testing
91
- This is a Rails Engine which is tested using the [engine_cart](https://github.com/cbeer/engine_cart) Gem. Test suites may be executed with the following invocation:
102
+ This is a Rails Engine which is tested using the [engine_cart](https://github.com/cbeer/engine_cart) Gem and rspec.
103
+
104
+ One rspec test invokes [karma](https://karma-runner.github.io/latest/index.html) to run Javascript tests. For this test to succeed, you need to install karma on your system, first by making sure `npm` is installed, and then run `npm install -g karma karma-jasmine karma-chrome-launcher`.
105
+
106
+ Test suites may be executed with the following invocation:
92
107
 
93
108
  ```bash
94
109
  bundle exec rake
95
110
  ```
96
111
 
112
+ Tests by default will be run with bootstrap-4 integration. To test bootstrap-3 integration: `TEST_BOOTSTRAP=3 bundle exec rake`.
113
+
97
114
  ### Testing Problems
98
115
  Should you attempt to execute the test suite and encounter the following error:
99
116
  ```bash
data/Rakefile CHANGED
@@ -6,14 +6,5 @@ Dir.glob('tasks/*.rake').each { |r| import r }
6
6
 
7
7
  require 'rspec/core/rake_task'
8
8
  require 'engine_cart/rake_task'
9
- require 'jasmine'
10
- load 'jasmine/tasks/jasmine.rake'
11
-
12
- # Set up the test application prior to running jasmine tasks.
13
- task 'jasmine:require' => :setup_test_server
14
- task :setup_test_server do
15
- require 'engine_cart'
16
- EngineCart.load_application!
17
- end
18
9
 
19
10
  task default: [:ci]