browse-everything 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +105 -30
- data/.gitignore +4 -2
- data/.rubocop.yml +54 -34
- data/.rubocop_todo.yml +0 -5
- data/.tool-versions +2 -0
- data/CONTRIBUTING.md +22 -0
- data/Gemfile +41 -33
- data/README.md +66 -31
- data/Rakefile +9 -1
- data/app/assets/javascripts/browse_everything/behavior.js +45 -31
- data/app/assets/javascripts/browse_everything.js +1 -1
- data/app/assets/javascripts/treetable.webpack.js +687 -0
- data/app/controllers/browse_everything_controller.rb +60 -60
- data/app/helpers/browse_everything_helper.rb +4 -0
- data/app/views/browse_everything/_files.html.erb +3 -2
- data/bin/rails +14 -0
- data/browse-everything.gemspec +13 -12
- data/lib/browse_everything/auth/google/credentials.rb +5 -5
- data/lib/browse_everything/auth/google/request_parameters.rb +38 -38
- data/lib/browse_everything/driver/base.rb +15 -14
- data/lib/browse_everything/driver/box.rb +56 -56
- data/lib/browse_everything/driver/dropbox.rb +44 -41
- data/lib/browse_everything/driver/file_system.rb +31 -18
- data/lib/browse_everything/driver/google_drive.rb +38 -38
- data/lib/browse_everything/driver/s3.rb +61 -61
- data/lib/browse_everything/engine.rb +10 -3
- data/lib/browse_everything/file_entry.rb +1 -1
- data/lib/browse_everything/retriever.rb +69 -69
- data/lib/browse_everything/version.rb +1 -1
- data/lib/browse_everything.rb +1 -1
- data/spec/dummy_test_app/Rakefile +6 -0
- data/spec/dummy_test_app/app/assets/config/manifest.js +3 -0
- data/spec/dummy_test_app/app/assets/images/.keep +0 -0
- data/spec/dummy_test_app/app/assets/javascripts/application.js +25 -0
- data/spec/dummy_test_app/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy_test_app/app/assets/javascripts/channels/.keep +0 -0
- data/spec/dummy_test_app/app/assets/stylesheets/application.scss +18 -0
- data/spec/dummy_test_app/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy_test_app/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy_test_app/app/controllers/application_controller.rb +3 -0
- data/spec/dummy_test_app/app/controllers/concerns/.keep +0 -0
- data/spec/{support → dummy_test_app}/app/controllers/file_handler_controller.rb +0 -0
- data/spec/dummy_test_app/app/helpers/application_helper.rb +2 -0
- data/spec/dummy_test_app/app/jobs/application_job.rb +2 -0
- data/spec/dummy_test_app/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy_test_app/app/models/application_record.rb +3 -0
- data/spec/dummy_test_app/app/models/concerns/.keep +0 -0
- data/spec/dummy_test_app/app/views/file_handler/index.html.erb +10 -0
- data/spec/{support → dummy_test_app}/app/views/file_handler/main.html.erb +6 -3
- data/spec/dummy_test_app/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy_test_app/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy_test_app/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy_test_app/bin/bundle +3 -0
- data/spec/dummy_test_app/bin/rails +4 -0
- data/spec/dummy_test_app/bin/rake +4 -0
- data/spec/dummy_test_app/bin/setup +38 -0
- data/spec/dummy_test_app/bin/update +29 -0
- data/spec/dummy_test_app/bin/yarn +11 -0
- data/spec/dummy_test_app/config/application.rb +27 -0
- data/spec/dummy_test_app/config/boot.rb +5 -0
- data/spec/dummy_test_app/config/browse_everything_providers.yml +25 -0
- data/spec/dummy_test_app/config/cable.yml +10 -0
- data/spec/dummy_test_app/config/database.yml +25 -0
- data/spec/dummy_test_app/config/environment.rb +5 -0
- data/spec/dummy_test_app/config/environments/development.rb +54 -0
- data/spec/dummy_test_app/config/environments/production.rb +91 -0
- data/spec/dummy_test_app/config/environments/test.rb +42 -0
- data/spec/dummy_test_app/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy_test_app/config/initializers/assets.rb +14 -0
- data/spec/dummy_test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy_test_app/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy_test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy_test_app/config/initializers/inflections.rb +16 -0
- data/spec/dummy_test_app/config/initializers/mime_types.rb +4 -0
- data/spec/dummy_test_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy_test_app/config/locales/en.yml +33 -0
- data/spec/dummy_test_app/config/puma.rb +56 -0
- data/spec/dummy_test_app/config/routes.rb +9 -0
- data/spec/dummy_test_app/config/secrets.yml +32 -0
- data/spec/dummy_test_app/config/spring.rb +6 -0
- data/spec/dummy_test_app/config.ru +5 -0
- data/spec/dummy_test_app/lib/assets/.keep +0 -0
- data/spec/dummy_test_app/log/.keep +0 -0
- data/spec/dummy_test_app/package.json +5 -0
- data/spec/dummy_test_app/public/404.html +67 -0
- data/spec/dummy_test_app/public/422.html +67 -0
- data/spec/dummy_test_app/public/500.html +66 -0
- data/spec/dummy_test_app/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy_test_app/public/apple-touch-icon.png +0 -0
- data/spec/dummy_test_app/public/favicon.ico +0 -0
- data/spec/dummy_test_app/tmp/.gitkeep +0 -0
- data/spec/features/select_files_spec.rb +1 -0
- data/spec/features/test_compiling_stylesheets_spec.rb +1 -1
- data/spec/lib/browse_everything/driver_spec.rb +43 -3
- data/spec/spec_helper.rb +3 -28
- data/tasks/ci.rake +1 -1
- metadata +180 -94
- data/karma.conf.js +0 -71
- data/spec/javascripts/behavior_spec.js +0 -7
- data/spec/javascripts/helpers/jasmine-jquery.js +0 -838
- data/spec/javascripts/helpers/jquery.js +0 -11008
- data/spec/javascripts/karma_spec.rb +0 -16
- data/spec/support/app/views/file_handler/index.html.erb +0 -6
- data/spec/test_app_templates/Gemfile.extra +0 -9
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77087f10e05aea7eb2efb26ceb8df9464fdd40526f2be33140e12ca68d55a9f3
|
4
|
+
data.tar.gz: 2d0b4e7d61ea1f944d168db0c60713597e6b944e470d1f99b3292b11c56b7f18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f68074141160f41b9bb125afd1ae42110e36038f41c1b310d65fef69037e84fe95d07ab1b5619b4bda196e77f15262421cb801b8e16ca0acb31f7d1fc50ce63
|
7
|
+
data.tar.gz: f351fa62b040ba18aefc6e1f44226f610f04aca67217cd49a48ffcb0554cfc5b759e234eab73de19953f1d7960a1350dde082e6697e08f0f099b5f6c6f9904b4
|
data/.circleci/config.yml
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
---
|
2
2
|
version: 2.1
|
3
3
|
orbs:
|
4
|
-
samvera: samvera/circleci-orb@0
|
4
|
+
samvera: samvera/circleci-orb@1.0
|
5
|
+
browser-tools: circleci/browser-tools@1.1
|
5
6
|
|
6
7
|
jobs:
|
7
8
|
build:
|
@@ -12,60 +13,134 @@ jobs:
|
|
12
13
|
type: string
|
13
14
|
bundler_version:
|
14
15
|
type: string
|
15
|
-
default: 2.
|
16
|
+
default: 2.1.4
|
16
17
|
executor:
|
17
18
|
name: 'samvera/ruby'
|
18
19
|
ruby_version: << parameters.ruby_version >>
|
19
20
|
environment:
|
20
21
|
RAILS_VERSION: << parameters.rails_version >>
|
21
22
|
steps:
|
22
|
-
-
|
23
|
+
- browser-tools/install-chrome
|
23
24
|
|
24
|
-
- samvera/
|
25
|
-
bundler_version: << parameters.bundler_version >>
|
26
|
-
ruby_version: << parameters.ruby_version >>
|
27
|
-
project: 'browse-everything'
|
25
|
+
- samvera/cached_checkout
|
28
26
|
|
29
|
-
-
|
30
|
-
|
27
|
+
- run:
|
28
|
+
name: Check for a branch named 'master'
|
29
|
+
command: |
|
30
|
+
git fetch --all --quiet --prune --prune-tags
|
31
|
+
if [[ -n "$(git branch --all --list master */master)" ]]; then
|
32
|
+
echo "A branch named 'master' was found. Please remove it."
|
33
|
+
echo "$(git branch --all --list master */master)"
|
34
|
+
fi
|
35
|
+
[[ -z "$(git branch --all --list master */master)" ]]
|
31
36
|
|
32
|
-
- samvera/
|
33
|
-
ruby_version: << parameters.ruby_version >>
|
37
|
+
- samvera/bundle:
|
34
38
|
bundler_version: << parameters.bundler_version >>
|
35
|
-
|
39
|
+
ruby_version: << parameters.ruby_version >>
|
36
40
|
|
37
41
|
- samvera/rubocop
|
38
42
|
|
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
43
|
- samvera/parallel_rspec
|
44
44
|
|
45
45
|
workflows:
|
46
46
|
ci:
|
47
47
|
jobs:
|
48
|
+
- build:
|
49
|
+
name: "ruby3-1_rails7-0"
|
50
|
+
ruby_version: 3.1.2
|
51
|
+
rails_version: 7.0.3
|
52
|
+
|
53
|
+
- build:
|
54
|
+
name: "ruby3-1_rails6-1"
|
55
|
+
ruby_version: 3.1.2
|
56
|
+
rails_version: 6.1.6
|
57
|
+
- build:
|
58
|
+
name: "ruby3-0_rails6-1"
|
59
|
+
ruby_version: 3.0.3
|
60
|
+
rails_version: 6.1.6
|
61
|
+
|
62
|
+
- build:
|
63
|
+
name: "ruby3-0_rails6-0"
|
64
|
+
ruby_version: 3.0.3
|
65
|
+
rails_version: 6.0.4.7
|
66
|
+
- build:
|
67
|
+
name: "ruby2-7_rails6-0"
|
68
|
+
ruby_version: 2.7.5
|
69
|
+
rails_version: 6.0.4.7
|
70
|
+
- build:
|
71
|
+
name: "ruby2-6_rails6-0"
|
72
|
+
ruby_version: 2.6.9
|
73
|
+
rails_version: 6.0.4.7
|
74
|
+
|
75
|
+
- build:
|
76
|
+
name: "ruby2-7_rails5-2"
|
77
|
+
ruby_version: 2.7.5
|
78
|
+
rails_version: 5.2.7
|
48
79
|
- build:
|
49
80
|
name: "ruby2-6_rails5-2"
|
50
|
-
ruby_version: 2.6.
|
51
|
-
rails_version: 5.2.
|
81
|
+
ruby_version: 2.6.9
|
82
|
+
rails_version: 5.2.7
|
83
|
+
|
84
|
+
- build:
|
85
|
+
name: "ruby2-7_rails5-1"
|
86
|
+
ruby_version: 2.7.5
|
87
|
+
rails_version: 5.1.7
|
52
88
|
- build:
|
53
89
|
name: "ruby2-6_rails5-1"
|
54
|
-
ruby_version: 2.6.
|
90
|
+
ruby_version: 2.6.9
|
55
91
|
rails_version: 5.1.7
|
92
|
+
|
93
|
+
nightly:
|
94
|
+
triggers:
|
95
|
+
- schedule:
|
96
|
+
cron: "0 0 * * *"
|
97
|
+
filters:
|
98
|
+
branches:
|
99
|
+
only:
|
100
|
+
- main
|
101
|
+
jobs:
|
102
|
+
- build:
|
103
|
+
name: "ruby3-1_rails7-0"
|
104
|
+
ruby_version: 3.1.2
|
105
|
+
rails_version: 7.0.3
|
106
|
+
|
56
107
|
- build:
|
57
|
-
name: "
|
58
|
-
ruby_version:
|
59
|
-
rails_version:
|
108
|
+
name: "ruby3-1_rails6-1"
|
109
|
+
ruby_version: 3.1.2
|
110
|
+
rails_version: 6.1.6
|
60
111
|
- build:
|
61
|
-
name: "
|
62
|
-
ruby_version:
|
63
|
-
rails_version:
|
112
|
+
name: "ruby3-0_rails6-1"
|
113
|
+
ruby_version: 3.0.3
|
114
|
+
rails_version: 6.1.6
|
115
|
+
|
64
116
|
- build:
|
65
|
-
name: "
|
66
|
-
ruby_version:
|
67
|
-
rails_version:
|
117
|
+
name: "ruby3-0_rails6-0"
|
118
|
+
ruby_version: 3.0.3
|
119
|
+
rails_version: 6.0.4.7
|
68
120
|
- build:
|
69
|
-
name: "ruby2-
|
70
|
-
ruby_version: 2.
|
121
|
+
name: "ruby2-7_rails6-0"
|
122
|
+
ruby_version: 2.7.5
|
123
|
+
rails_version: 6.0.4.7
|
124
|
+
- build:
|
125
|
+
name: "ruby2-6_rails6-0"
|
126
|
+
ruby_version: 2.6.9
|
127
|
+
rails_version: 6.0.4.7
|
128
|
+
|
129
|
+
- build:
|
130
|
+
name: "ruby2-7_rails5-2"
|
131
|
+
ruby_version: 2.7.5
|
132
|
+
rails_version: 5.2.7
|
133
|
+
- build:
|
134
|
+
name: "ruby2-6_rails5-2"
|
135
|
+
ruby_version: 2.6.9
|
136
|
+
rails_version: 5.2.7
|
137
|
+
|
138
|
+
- build:
|
139
|
+
name: "ruby2-7_rails5-1"
|
140
|
+
ruby_version: 2.7.5
|
71
141
|
rails_version: 5.1.7
|
142
|
+
- build:
|
143
|
+
name: "ruby2-6_rails5-1"
|
144
|
+
ruby_version: 2.6.9
|
145
|
+
rails_version: 5.1.7
|
146
|
+
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -3,71 +3,91 @@ inherit_gem:
|
|
3
3
|
bixby: bixby_default.yml
|
4
4
|
|
5
5
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
6
|
+
TargetRubyVersion: 2.6
|
7
7
|
DisplayCopNames: true
|
8
8
|
Exclude:
|
9
9
|
- 'vendor/**/*'
|
10
|
+
- 'spec/dummy_test_app/**/*'
|
11
|
+
- 'bin/rails'
|
10
12
|
|
11
|
-
|
12
|
-
Enabled:
|
13
|
-
Rails/FilePath:
|
14
|
-
Exclude:
|
15
|
-
- 'lib/generators/browse_everything/config_generator.rb'
|
13
|
+
Style/GuardClause:
|
14
|
+
Enabled: false
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
StyleI/IfUnlessModifier:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Bundler/DuplicatedGem:
|
19
20
|
Exclude:
|
20
|
-
- '
|
21
|
-
|
21
|
+
- 'Gemfile'
|
22
|
+
|
23
|
+
Layout/LineLength:
|
22
24
|
Max: 400
|
23
25
|
Exclude:
|
24
26
|
- 'spec/lib/browse_everything/driver/box_spec.rb'
|
25
27
|
- 'spec/lib/browse_everything/driver/dropbox_spec.rb'
|
28
|
+
|
26
29
|
Metrics/BlockLength:
|
27
30
|
Exclude:
|
28
31
|
- '*.gemspec'
|
29
32
|
- 'spec/**/*'
|
30
33
|
|
31
|
-
|
32
|
-
|
34
|
+
Metrics/ClassLength:
|
35
|
+
Max: 130
|
36
|
+
Exclude:
|
37
|
+
- 'lib/browse_everything/driver/google_drive.rb'
|
38
|
+
|
39
|
+
Metrics/MethodLength:
|
40
|
+
Exclude:
|
41
|
+
- 'spec/test_app_templates/lib/generators/test_app_generator.rb'
|
42
|
+
|
43
|
+
Naming/FileName:
|
44
|
+
Exclude:
|
45
|
+
- 'browse-everything.gemspec'
|
46
|
+
- 'Gemfile'
|
47
|
+
- 'lib/browse-everything.rb'
|
48
|
+
|
49
|
+
Rails:
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Rails/FilePath:
|
53
|
+
Exclude:
|
54
|
+
- 'lib/generators/browse_everything/config_generator.rb'
|
33
55
|
|
34
56
|
RSpec/DescribeClass:
|
35
57
|
Exclude:
|
36
58
|
- 'spec/javascripts/**/*'
|
37
|
-
|
38
|
-
RSpec/LeadingSubject:
|
39
|
-
Enabled: false
|
40
59
|
|
41
60
|
RSpec/ExampleLength:
|
42
61
|
Enabled: false
|
43
62
|
|
44
|
-
RSpec/
|
63
|
+
RSpec/LeadingSubject:
|
45
64
|
Enabled: false
|
46
65
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
Layout/IndentationConsistency:
|
51
|
-
EnforcedStyle: rails
|
66
|
+
RSpec/MultipleExpectations:
|
67
|
+
Enabled: false
|
52
68
|
|
53
|
-
|
54
|
-
|
55
|
-
- 'browse-everything.gemspec'
|
56
|
-
- 'Gemfile'
|
57
|
-
- 'lib/browse-everything.rb'
|
69
|
+
RSpec/NestedGroups:
|
70
|
+
Enabled: false
|
58
71
|
|
59
72
|
Style/MixinUsage:
|
60
73
|
Exclude:
|
61
|
-
- 'spec/
|
62
|
-
- 'spec/lib/browse_everything/driver/google_drive_spec.rb'
|
63
|
-
- 'spec/lib/browse_everything/driver/file_system_spec.rb'
|
64
|
-
- 'spec/lib/browse_everything/driver/dropbox_spec.rb'
|
65
|
-
- 'spec/lib/browse_everything/driver/box_spec.rb'
|
66
|
-
- 'spec/lib/browse_everything/driver/base_spec.rb'
|
74
|
+
- 'spec/helper/browse_everything_controller_helper_spec.rb'
|
67
75
|
- 'spec/lib/browse_everything/browser_spec.rb'
|
76
|
+
- 'spec/lib/browse_everything/driver/base_spec.rb'
|
77
|
+
- 'spec/lib/browse_everything/driver/box_spec.rb'
|
78
|
+
- 'spec/lib/browse_everything/driver/dropbox_spec.rb'
|
79
|
+
- 'spec/lib/browse_everything/driver/file_system_spec.rb'
|
80
|
+
- 'spec/lib/browse_everything/driver/google_drive_spec.rb'
|
81
|
+
- 'spec/lib/browse_everything/driver/s3_spec.rb'
|
68
82
|
- 'spec/services/browser_factory_spec.rb'
|
69
|
-
- 'spec/helper/browse_everything_controller_helper_spec.rb'
|
70
83
|
|
71
|
-
|
84
|
+
Style/NumericLiterals:
|
85
|
+
MinDigits: 7
|
86
|
+
|
87
|
+
Style/RedundantBegin:
|
88
|
+
Exclude:
|
89
|
+
- 'lib/browse_everything/browser.rb'
|
90
|
+
|
91
|
+
Style/IfUnlessModifier:
|
72
92
|
Exclude:
|
73
93
|
- 'Gemfile'
|
data/.rubocop_todo.yml
CHANGED
data/.tool-versions
ADDED
data/CONTRIBUTING.md
CHANGED
@@ -22,6 +22,28 @@ https://wiki.duraspace.org/display/samvera/Samvera+Community+Intellectual+Proper
|
|
22
22
|
|
23
23
|
You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.
|
24
24
|
|
25
|
+
## Language
|
26
|
+
|
27
|
+
The language we use matters. Today, tomorrow, and for years to come
|
28
|
+
people will read the code we write. They will judge us for our
|
29
|
+
design, logic, and the words we use to describe the system.
|
30
|
+
|
31
|
+
Our words should be accessible. Favor descriptive words that give
|
32
|
+
meaning while avoiding reinforcing systemic inequities. For example,
|
33
|
+
in the Samvera community, we should favor using allowed\_list instead
|
34
|
+
of whitelist, denied\_list instead of blacklist, or source/copy
|
35
|
+
instead of master/slave.
|
36
|
+
|
37
|
+
We're going to get it wrong, but this is a call to keep working to
|
38
|
+
make it right. View our code and the words we choose as a chance to
|
39
|
+
have a conversation. A chance to grow an understanding of the systems
|
40
|
+
we develop as well as the systems in which we live.
|
41
|
+
|
42
|
+
See [“Blacklists” and “whitelists”: a salutary warning concerning the
|
43
|
+
prevalence of racist language in discussions of predatory
|
44
|
+
publishing](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6148600/) for
|
45
|
+
further details.
|
46
|
+
|
25
47
|
## Contribution Tasks
|
26
48
|
|
27
49
|
* Reporting Issues
|
data/Gemfile
CHANGED
@@ -9,41 +9,49 @@ group :development, :test do
|
|
9
9
|
gem 'pry-byebug' unless ENV['CI']
|
10
10
|
end
|
11
11
|
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
12
|
+
# == Extra dependencies for dummy test app ==
|
13
|
+
#
|
14
|
+
# Extra dependencies for dummy test app are in .gemspec as a development dependency
|
15
|
+
# where possible. But when dependencies vary for different versions
|
16
|
+
# of Rails, rails-version-specific dependencies are here, behind conditionals, for now.
|
17
|
+
#
|
18
|
+
# TODO switch to use appraisal gem instead, encapsulating these different additional
|
19
|
+
# dependencies per Rails version, as well as method of choosing operative rails version.
|
20
|
+
#
|
21
|
+
# We allow testing under multiple versions of Rails by setting ENV RAILS_VERSION,
|
22
|
+
# used in CI, can be used locally too.
|
23
|
+
|
24
|
+
# Set a default RAILS_VERSION so we make sure to get extra dependencies for it...
|
25
|
+
|
26
|
+
ENV['RAILS_VERSION'] ||= "7.0.3"
|
27
|
+
|
28
|
+
if ENV['RAILS_VERSION']
|
29
|
+
if ENV['RAILS_VERSION'] == 'edge'
|
30
|
+
gem 'rails', github: 'rails/rails'
|
31
|
+
else
|
32
|
+
gem 'rails', ENV['RAILS_VERSION']
|
34
33
|
end
|
35
34
|
|
36
35
|
case ENV['RAILS_VERSION']
|
37
|
-
when /^
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
gem
|
43
|
-
|
44
|
-
|
36
|
+
when /^7\.0\./
|
37
|
+
# rspec-rails 6.0 is required for Rails 7 support, it's currently only in pre-release,
|
38
|
+
# opt into it here. This should not be required when rspec-rails 6.0.0 final is released.
|
39
|
+
# Note rspec-rails 6.0.0 does not support rails before 6.1, so different versions of
|
40
|
+
# rspec-rails will be needed for different jobs, but that should happen automatically.
|
41
|
+
gem "rspec-rails", ">= 6.0.0.rc1"
|
42
|
+
|
43
|
+
# sprockets is optional for rails 7, but we currently require it, and test with it.
|
44
|
+
gem "sprockets-rails"
|
45
|
+
when /^6\.1\./
|
46
|
+
# opt into mail 2.8.0.rc1 so we get extra dependencies required for rails 6.1
|
47
|
+
# Once mail 2.8.0 final is released this will not be required.
|
48
|
+
# https://github.com/mikel/mail/pull/1472
|
49
|
+
gem "mail", ">= 2.8.0.rc1"
|
50
|
+
when /^6\.0\./
|
51
|
+
gem 'sass-rails', '>= 6'
|
52
|
+
when /^5\.[12]\./
|
53
|
+
gem 'sass-rails', '~> 5.0'
|
54
|
+
gem 'sprockets', '~> 3.7'
|
55
|
+
gem 'thor', '~> 0.20'
|
45
56
|
end
|
46
57
|
end
|
47
|
-
# END ENGINE_CART BLOCK
|
48
|
-
|
49
|
-
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__)) unless File.exist?(file)
|
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
Code:
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/browse-everything.png)](http://badge.fury.io/rb/browse-everything)
|
5
5
|
[![CircleCI](https://circleci.com/gh/samvera/browse-everything.svg?style=svg)](https://circleci.com/gh/samvera/browse-everything)
|
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
6
|
|
8
7
|
Docs:
|
9
8
|
[![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
|
@@ -25,6 +24,36 @@ download the files.
|
|
25
24
|
|
26
25
|
**This gem does not depend on hydra-head**
|
27
26
|
|
27
|
+
## Technical Debt/Legacy warning
|
28
|
+
|
29
|
+
This is code with a long history that has a number of known problems;
|
30
|
+
we are trying to keep it alive for existing projects using it. But caution is
|
31
|
+
advised in introducing it, in it's present form, to new projects.
|
32
|
+
|
33
|
+
A significant overhaul of this gem may be desirable (with backwards-breaking
|
34
|
+
changes), to better accomplish gem goals. But there has not been the
|
35
|
+
interest/resources in the community to accomplish that at present.
|
36
|
+
|
37
|
+
Some known current issues (Jun 2022):
|
38
|
+
|
39
|
+
* The S3 adapter is known working; but it's not clear if other adapters using
|
40
|
+
OAuth2 (main use case for this gem) are in fact working reliably. And there
|
41
|
+
is some concern that the current browse-everything integration API may not be
|
42
|
+
compatible with proper OAuth/OAuth2 flows to support OAuth integrations --
|
43
|
+
originally the main use case of this gem.
|
44
|
+
|
45
|
+
* The CSS and Javascript were both written for use with the sprockets Rails
|
46
|
+
asset pipeline. Recent versions of Rails may require custom configuration
|
47
|
+
to use sprockets (especially for JS), which is not currently covered in
|
48
|
+
instructions here. Using other means of including CSS and JS may require
|
49
|
+
confusing customization also not fully covered here.
|
50
|
+
|
51
|
+
* Javascript depends on JQuery, bootstrap (3 or 4; 5 untested), as well as a
|
52
|
+
vendored copy of a jquery.treetable plugin.
|
53
|
+
|
54
|
+
* CSS is provided for compatibilty with bootstrap 3 or bootstrap 4, but not
|
55
|
+
bootstrap 5 (or no bootstrap at all)
|
56
|
+
|
28
57
|
## Product Owner & Maintenance
|
29
58
|
|
30
59
|
BrowseEverything is a Core Component of the Samvera community. The documentation for
|
@@ -33,20 +62,24 @@ what this means can be found
|
|
33
62
|
|
34
63
|
### Product Owner
|
35
64
|
|
36
|
-
[
|
65
|
+
[jrgriffiniii](https://github.com/jrgriffiniii)
|
37
66
|
|
38
67
|
# Getting Started
|
39
68
|
|
40
69
|
## Supported Ruby Releases
|
41
|
-
Currently, the following releases of Ruby are
|
42
|
-
-
|
43
|
-
-
|
44
|
-
- 2.
|
70
|
+
Currently, the following releases of Ruby are tested:
|
71
|
+
- 3.1
|
72
|
+
- 3.0
|
73
|
+
- 2.7
|
74
|
+
- 2.6
|
45
75
|
|
46
76
|
## Supported Rails Releases
|
47
77
|
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
|
-
-
|
49
|
-
-
|
78
|
+
- 7.0
|
79
|
+
- 6.1
|
80
|
+
- 6.0
|
81
|
+
- 5.2
|
82
|
+
- 5.1
|
50
83
|
|
51
84
|
## Installation
|
52
85
|
|
@@ -98,29 +131,6 @@ If your app has installed a previous version of browse-everything, you may have
|
|
98
131
|
|
99
132
|
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
133
|
|
101
|
-
## Testing
|
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:
|
107
|
-
|
108
|
-
```bash
|
109
|
-
bundle exec rake
|
110
|
-
```
|
111
|
-
|
112
|
-
Tests by default will be run with bootstrap-4 integration. To test bootstrap-3 integration: `TEST_BOOTSTRAP=3 bundle exec rake`.
|
113
|
-
|
114
|
-
### Testing Problems
|
115
|
-
Should you attempt to execute the test suite and encounter the following error:
|
116
|
-
```bash
|
117
|
-
Your Ruby version is 2.x.x, but your Gemfile specified 2.y.z
|
118
|
-
```
|
119
|
-
...then you must clean the internal test app generated by `engine_cart` with the following:
|
120
|
-
```bash
|
121
|
-
bundle exec rake engine_cart:clean
|
122
|
-
```
|
123
|
-
|
124
134
|
## Usage
|
125
135
|
|
126
136
|
### Adding Providers
|
@@ -251,6 +261,31 @@ See `spec/support/app/views/file_handler/index.html` for an example use case. Yo
|
|
251
261
|
create a fully-functioning demo app in `spec/internal` (though you will have to create
|
252
262
|
`spec/internal/config/browse_everything.providers.yml` file with your own configuration info.)
|
253
263
|
|
264
|
+
## Development Testing
|
265
|
+
|
266
|
+
This is a Rails Engine which is tested using an in-repo "dummy" app, in the style of skeletons
|
267
|
+
generated by `rails plugin new --full`.
|
268
|
+
|
269
|
+
### Rails utilities
|
270
|
+
|
271
|
+
This gives you Rails-provided tools you can run in project home dir, like: `./bin/rails console`, `./bin/rails server` (to start the dummy app in dev mode), `bundle exec rake db:drop db:create db:migrate` (db management in dummy app).
|
272
|
+
|
273
|
+
### Test suite
|
274
|
+
|
275
|
+
Full CI/test suite may be executed with the following invocation:
|
276
|
+
|
277
|
+
```bash
|
278
|
+
bundle exec rake
|
279
|
+
```
|
280
|
+
|
281
|
+
Or individually, `bundle exec rubocop`, `bundle exec rspec`.
|
282
|
+
|
283
|
+
### Testing with different versions of dependencies
|
284
|
+
|
285
|
+
You can test with different versions of rails by setting ENV variable `RAILS_VERSION` to a specific version like `"6.1.2"` or `"7.0.0"`, perhaps by `export RAILS_ENV=7.0.0` to set it in your shell session.
|
286
|
+
|
287
|
+
After changing `RAILS_VERSION` you may have to run `rm Gemfile.lock` and `bundle install` again. If you get a `Bundler could not find compatible versions...` error, for instance.
|
288
|
+
|
254
289
|
# Help
|
255
290
|
|
256
291
|
The Samvera community is here to help. Please see our [support guide](./SUPPORT.md).
|
data/Rakefile
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
begin
|
4
|
+
require 'bundler/setup'
|
5
|
+
rescue LoadError
|
6
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
+
end
|
8
|
+
|
9
|
+
APP_RAKEFILE = File.expand_path("spec/dummy_test_app/Rakefile", __dir__)
|
10
|
+
load 'rails/tasks/engine.rake'
|
11
|
+
|
3
12
|
require 'bundler/gem_tasks'
|
4
13
|
|
5
14
|
Dir.glob('tasks/*.rake').each { |r| import r }
|
6
15
|
|
7
16
|
require 'rspec/core/rake_task'
|
8
|
-
require 'engine_cart/rake_task'
|
9
17
|
|
10
18
|
task default: [:ci]
|