browse-everything 1.0.0.rc1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.circleci/config.yml +71 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +4 -0
- data/CONTRIBUTING.md +3 -3
- data/LICENSE.txt +205 -22
- data/README.md +31 -14
- data/Rakefile +0 -9
- data/app/assets/javascripts/browse_everything/behavior.js +448 -0
- data/app/assets/stylesheets/browse_everything.scss +0 -6
- data/app/assets/stylesheets/browse_everything/_browse_everything.scss +2 -116
- data/app/assets/stylesheets/browse_everything/_browse_everything_bootstrap3.scss +123 -0
- data/app/assets/stylesheets/browse_everything/_browse_everything_bootstrap4.scss +117 -0
- data/app/views/browse_everything/_files.html.erb +1 -0
- data/app/views/browse_everything/_providers.html.erb +2 -1
- data/app/views/browse_everything/index.html.erb +3 -2
- data/browse-everything.gemspec +7 -9
- data/karma.conf.js +71 -0
- data/lib/browse-everything.rb +0 -2
- data/lib/browse_everything.rb +11 -5
- data/lib/browse_everything/driver/box.rb +10 -3
- data/lib/browse_everything/driver/dropbox.rb +25 -9
- data/lib/browse_everything/driver/file_system.rb +17 -5
- data/lib/browse_everything/driver/google_drive.rb +2 -1
- data/lib/browse_everything/driver/s3.rb +18 -2
- data/lib/browse_everything/retriever.rb +7 -2
- data/lib/browse_everything/version.rb +1 -1
- data/lib/generators/browse_everything/install_generator.rb +1 -7
- data/lib/generators/browse_everything/templates/browse_everything_providers.yml.example +1 -0
- data/spec/javascripts/behavior_spec.js +1 -3
- data/spec/javascripts/helpers/jquery.js +11008 -0
- data/spec/javascripts/karma_spec.rb +16 -0
- data/spec/lib/browse_everything/browser_spec.rb +5 -3
- data/spec/lib/browse_everything/driver/dropbox_spec.rb +20 -1
- data/spec/lib/browse_everything_spec.rb +7 -0
- data/spec/spec_helper.rb +8 -1
- data/spec/support/capybara.rb +0 -5
- data/spec/test_app_templates/Gemfile.extra +7 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +7 -1
- metadata +69 -82
- data/.travis.yml +0 -27
- data/app/assets/javascripts/browse_everything/behavior.js.coffee +0 -342
- data/app/helpers/font_awesome_version_helper.rb +0 -17
- data/lib/generators/browse_everything/assets_generator.rb +0 -13
- data/lib/generators/browse_everything/templates/browse_everything.scss +0 -6
- data/spec/javascripts/jasmine_spec.rb +0 -21
- data/spec/javascripts/support/jasmine.yml +0 -124
- data/spec/javascripts/support/jasmine_helper.rb +0 -16
@@ -1,116 +1,2 @@
|
|
1
|
-
@import "
|
2
|
-
@import "
|
3
|
-
|
4
|
-
@mixin ev-link {
|
5
|
-
cursor: pointer;
|
6
|
-
a {
|
7
|
-
color: inherit;
|
8
|
-
background-color: inherit;
|
9
|
-
text-decoration: none;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
#browse-everything {
|
14
|
-
overflow-y: hidden;
|
15
|
-
position: fixed !important;
|
16
|
-
margin: 0 0 0 -37.5%;
|
17
|
-
left: 50%;
|
18
|
-
top: 10%;
|
19
|
-
background-color: initial;
|
20
|
-
width: 75%;
|
21
|
-
|
22
|
-
div {
|
23
|
-
background-color: white;
|
24
|
-
}
|
25
|
-
|
26
|
-
.modal-header {
|
27
|
-
padding: 8px;
|
28
|
-
}
|
29
|
-
|
30
|
-
.modal-body {
|
31
|
-
overflow: hidden;
|
32
|
-
}
|
33
|
-
|
34
|
-
.modal-footer {
|
35
|
-
margin: 0px;
|
36
|
-
}
|
37
|
-
|
38
|
-
.row {
|
39
|
-
margin: inherit;
|
40
|
-
}
|
41
|
-
|
42
|
-
.ev-files {
|
43
|
-
position: relative;
|
44
|
-
overflow-x: auto;
|
45
|
-
overflow-y: auto;
|
46
|
-
|
47
|
-
li {
|
48
|
-
overflow: hidden;
|
49
|
-
text-overflow: ellipsis;
|
50
|
-
.ev-file-name {
|
51
|
-
white-space: nowrap;
|
52
|
-
}
|
53
|
-
border-top: none;
|
54
|
-
}
|
55
|
-
|
56
|
-
&.detail {
|
57
|
-
}
|
58
|
-
|
59
|
-
&.list ul {
|
60
|
-
@include content-columns(3);
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
.ev-container li {
|
65
|
-
cursor: pointer;
|
66
|
-
}
|
67
|
-
|
68
|
-
.ev-body {
|
69
|
-
padding: 0;
|
70
|
-
}
|
71
|
-
|
72
|
-
.ev-providers {
|
73
|
-
padding: 4px;
|
74
|
-
}
|
75
|
-
|
76
|
-
.ev-files {
|
77
|
-
table {
|
78
|
-
width: 100%;
|
79
|
-
max-width: 100%;
|
80
|
-
tr {
|
81
|
-
width: 100%;
|
82
|
-
max-width: 100%;
|
83
|
-
td {
|
84
|
-
white-space: nowrap;
|
85
|
-
overflow: hidden;
|
86
|
-
text-overflow: ellipsis;
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
|
-
.ev-files {
|
93
|
-
height: 50vh;
|
94
|
-
li { @include ev-link; }
|
95
|
-
}
|
96
|
-
|
97
|
-
.ev-providers {
|
98
|
-
select { width: 30% }
|
99
|
-
}
|
100
|
-
|
101
|
-
.loading {
|
102
|
-
pointer-events: none;
|
103
|
-
opacity: 0.2;
|
104
|
-
}
|
105
|
-
|
106
|
-
.loading-progress {
|
107
|
-
position: absolute;
|
108
|
-
top: 8em;
|
109
|
-
left: 4em;
|
110
|
-
}
|
111
|
-
|
112
|
-
// Massively large text instead of something more artistic
|
113
|
-
.loading-text {
|
114
|
-
font-size: 4em;
|
115
|
-
}
|
116
|
-
}
|
1
|
+
@warn "`@import browse_everything/browse_everything` is deprecated, please `@import browse_everything_bootstrap3` instead";
|
2
|
+
@import "browse_everything_bootstrap3";
|
@@ -0,0 +1,123 @@
|
|
1
|
+
// It is important this file starts with underscore, so sprockets-sass won't try to compile
|
2
|
+
// it independently, even though nothing explicit is directing it to.
|
3
|
+
//
|
4
|
+
// CSS for bootstrap 3, intended to be sass @import'ed into a context that has access to
|
5
|
+
// bootstrap 3 mixins and variables.
|
6
|
+
|
7
|
+
@import "jquery.treetable";
|
8
|
+
@import "jquery.treetable.theme.browse";
|
9
|
+
|
10
|
+
@mixin ev-link {
|
11
|
+
cursor: pointer;
|
12
|
+
a {
|
13
|
+
color: inherit;
|
14
|
+
background-color: inherit;
|
15
|
+
text-decoration: none;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
#browse-everything {
|
20
|
+
overflow-y: hidden;
|
21
|
+
position: fixed !important;
|
22
|
+
margin: 0 0 0 -37.5%;
|
23
|
+
left: 50%;
|
24
|
+
top: 10%;
|
25
|
+
background-color: initial;
|
26
|
+
width: 75%;
|
27
|
+
|
28
|
+
div {
|
29
|
+
background-color: white;
|
30
|
+
}
|
31
|
+
|
32
|
+
.modal-header {
|
33
|
+
padding: 8px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.modal-body {
|
37
|
+
overflow: hidden;
|
38
|
+
}
|
39
|
+
|
40
|
+
.modal-footer {
|
41
|
+
margin: 0px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.row {
|
45
|
+
margin: inherit;
|
46
|
+
}
|
47
|
+
|
48
|
+
.ev-files {
|
49
|
+
position: relative;
|
50
|
+
overflow-x: auto;
|
51
|
+
overflow-y: auto;
|
52
|
+
|
53
|
+
li {
|
54
|
+
overflow: hidden;
|
55
|
+
text-overflow: ellipsis;
|
56
|
+
.ev-file-name {
|
57
|
+
white-space: nowrap;
|
58
|
+
}
|
59
|
+
border-top: none;
|
60
|
+
}
|
61
|
+
|
62
|
+
&.list ul {
|
63
|
+
@include content-columns(3);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
.ev-container li {
|
68
|
+
cursor: pointer;
|
69
|
+
}
|
70
|
+
|
71
|
+
.ev-body {
|
72
|
+
padding: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
.ev-providers {
|
76
|
+
padding: 4px;
|
77
|
+
}
|
78
|
+
|
79
|
+
.ev-files {
|
80
|
+
table {
|
81
|
+
width: 100%;
|
82
|
+
max-width: 100%;
|
83
|
+
tr {
|
84
|
+
width: 100%;
|
85
|
+
max-width: 100%;
|
86
|
+
td {
|
87
|
+
white-space: nowrap;
|
88
|
+
overflow: hidden;
|
89
|
+
text-overflow: ellipsis;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
.ev-files {
|
96
|
+
height: 50vh;
|
97
|
+
li {
|
98
|
+
@include ev-link;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
.ev-providers {
|
103
|
+
select {
|
104
|
+
width: 30%
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
.loading {
|
109
|
+
pointer-events: none;
|
110
|
+
opacity: 0.2;
|
111
|
+
}
|
112
|
+
|
113
|
+
.loading-progress {
|
114
|
+
position: absolute;
|
115
|
+
top: 8em;
|
116
|
+
left: 4em;
|
117
|
+
}
|
118
|
+
|
119
|
+
// Massively large text instead of something more artistic
|
120
|
+
.loading-text {
|
121
|
+
font-size: 4em;
|
122
|
+
}
|
123
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
// It is important this file starts with underscore, so sprockets-sass won't try to compile
|
2
|
+
// it independently, even though nothing explicit is directing it to.
|
3
|
+
//
|
4
|
+
// CSS for bootstrap 3, intended to be sass @import'ed into a context that has access to
|
5
|
+
// bootstrap 3 mixins and variables.
|
6
|
+
//
|
7
|
+
// This updates the original bootstrap3 SCSS to work with bootstrap 4, but also improves/fixes
|
8
|
+
// some display while we're at it.
|
9
|
+
|
10
|
+
@import "jquery.treetable";
|
11
|
+
@import "jquery.treetable.theme.browse";
|
12
|
+
|
13
|
+
@mixin ev-link {
|
14
|
+
cursor: pointer;
|
15
|
+
a {
|
16
|
+
color: inherit;
|
17
|
+
background-color: inherit;
|
18
|
+
text-decoration: none;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
#browse-everything {
|
23
|
+
div {
|
24
|
+
background-color: white;
|
25
|
+
}
|
26
|
+
|
27
|
+
.modal-dialog {
|
28
|
+
// possibly this is fixing a bootstrap bug?
|
29
|
+
border-radius: $modal-content-border-radius;
|
30
|
+
}
|
31
|
+
|
32
|
+
.modal-header {
|
33
|
+
padding: 8px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.modal-footer {
|
37
|
+
justify-content: space-between;
|
38
|
+
}
|
39
|
+
|
40
|
+
.ev-files {
|
41
|
+
position: relative;
|
42
|
+
overflow-x: auto;
|
43
|
+
overflow-y: auto;
|
44
|
+
|
45
|
+
li {
|
46
|
+
overflow: hidden;
|
47
|
+
text-overflow: ellipsis;
|
48
|
+
.ev-file-name {
|
49
|
+
white-space: nowrap;
|
50
|
+
}
|
51
|
+
border-top: none;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
.ev-container li {
|
56
|
+
cursor: pointer;
|
57
|
+
}
|
58
|
+
|
59
|
+
.ev-body {
|
60
|
+
padding: 0;
|
61
|
+
}
|
62
|
+
|
63
|
+
.row {
|
64
|
+
margin: inherit;
|
65
|
+
}
|
66
|
+
|
67
|
+
.ev-providers {
|
68
|
+
label {
|
69
|
+
font-size: $h5-font-size;
|
70
|
+
font-weight: $headings-font-weight;
|
71
|
+
line-height: $headings-line-height;
|
72
|
+
margin-bottom: 0;
|
73
|
+
@extend .mr-2;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
.ev-files {
|
78
|
+
height: calc(90vh - 150px);
|
79
|
+
padding: 0;
|
80
|
+
|
81
|
+
li { @include ev-link; }
|
82
|
+
|
83
|
+
table {
|
84
|
+
margin: 0;
|
85
|
+
tr {
|
86
|
+
th {
|
87
|
+
padding-top: 0.5em;
|
88
|
+
padding-bottom: 0.5em;
|
89
|
+
}
|
90
|
+
td {
|
91
|
+
white-space: nowrap;
|
92
|
+
overflow: hidden;
|
93
|
+
text-overflow: ellipsis;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
.loading {
|
100
|
+
pointer-events: none;
|
101
|
+
opacity: 0.2;
|
102
|
+
}
|
103
|
+
|
104
|
+
.loading-progress {
|
105
|
+
position: absolute;
|
106
|
+
top: 8em;
|
107
|
+
left: 4em;
|
108
|
+
&.hidden {
|
109
|
+
display: none;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
// Massively large text instead of something more artistic
|
114
|
+
.loading-text {
|
115
|
+
font-size: 4em;
|
116
|
+
}
|
117
|
+
}
|
@@ -9,6 +9,7 @@
|
|
9
9
|
</tr>
|
10
10
|
</thead>
|
11
11
|
<% provider_contents.each_with_index do |file, index| %>
|
12
|
+
<% next if file.nil? %>
|
12
13
|
<% path = browse_everything_engine.contents_path(provider_name, file.id) %>
|
13
14
|
<% parent = params[:parent] %>
|
14
15
|
<% if file.container? || provider.config[:max_upload_file_size].blank? %>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<form class="form-inline">
|
2
2
|
<label target="provider-select">Source:</label>
|
3
|
-
|
3
|
+
<%# form-control class for bootstrap3, custom-select class for bootstrap4 %>
|
4
|
+
<select class="form-control custom-select" id="provider-select">
|
4
5
|
<% browser.providers.each_pair do |key, provider| %>
|
5
6
|
<option value="<%=browse_everything_engine.contents_path(key)%>">
|
6
7
|
<%= provider.name %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="modal-dialog">
|
1
|
+
<div class="modal-dialog modal-lg">
|
2
2
|
<div class="modal-content">
|
3
3
|
<div class="modal-header">
|
4
4
|
<h4 class="sr-only" id="beModalLabel">Select a provider in the list to browse your files.</h4>
|
@@ -11,7 +11,8 @@
|
|
11
11
|
<span class="loading-text">Loading...</span>
|
12
12
|
</div>
|
13
13
|
<div class="ev-browser row" aria-live="polite">
|
14
|
-
|
14
|
+
<%# col-xs-12 is bootstrap3, col-12 is bootstrap4 %>
|
15
|
+
<div class="col-xs-12 col-12 ev-files list">
|
15
16
|
<% if provider.present? %>
|
16
17
|
<% if provider.authorized? %>
|
17
18
|
<%= render :partial => 'files' %>
|
data/browse-everything.gemspec
CHANGED
@@ -21,23 +21,19 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency 'addressable', '~> 2.5'
|
23
23
|
spec.add_dependency 'aws-sdk-s3'
|
24
|
-
spec.add_dependency 'bootstrap-sass', '~> 3.2'
|
25
24
|
spec.add_dependency 'dropbox_api', '>= 0.1.10'
|
26
|
-
spec.add_dependency 'font-awesome-rails'
|
27
25
|
spec.add_dependency 'google-api-client', '~> 0.23'
|
28
|
-
spec.add_dependency 'google_drive', '
|
29
|
-
spec.add_dependency 'googleauth', '0.6.6'
|
30
|
-
spec.add_dependency 'rails', '>= 4.2'
|
26
|
+
spec.add_dependency 'google_drive', '>= 2.1', "< 4"
|
27
|
+
spec.add_dependency 'googleauth', '>= 0.6.6', '< 1.0'
|
28
|
+
spec.add_dependency 'rails', '>= 4.2', '< 6.0'
|
31
29
|
spec.add_dependency 'ruby-box'
|
32
|
-
spec.add_dependency 'sass-rails'
|
33
30
|
spec.add_dependency 'signet', '~> 0.8'
|
34
|
-
spec.add_dependency '
|
31
|
+
spec.add_dependency 'sprockets', '~> 3.7'
|
35
32
|
spec.add_dependency 'typhoeus'
|
36
33
|
|
37
34
|
spec.add_development_dependency 'bixby', '>= 1.0'
|
38
|
-
spec.add_development_dependency 'bundler', '
|
35
|
+
spec.add_development_dependency 'bundler', '>= 1.3'
|
39
36
|
spec.add_development_dependency 'capybara'
|
40
|
-
spec.add_development_dependency 'chromedriver-helper', '1.2.0'
|
41
37
|
spec.add_development_dependency 'coveralls'
|
42
38
|
spec.add_development_dependency 'engine_cart', '~> 2.0'
|
43
39
|
spec.add_development_dependency 'factory_bot_rails'
|
@@ -48,9 +44,11 @@ Gem::Specification.new do |spec|
|
|
48
44
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
49
45
|
spec.add_development_dependency 'rspec-its'
|
50
46
|
spec.add_development_dependency 'rspec-rails'
|
47
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
51
48
|
spec.add_development_dependency 'rubocop-rspec'
|
52
49
|
spec.add_development_dependency 'selenium-webdriver'
|
53
50
|
spec.add_development_dependency 'simplecov'
|
54
51
|
spec.add_development_dependency 'sqlite3'
|
52
|
+
spec.add_development_dependency 'webdrivers'
|
55
53
|
spec.add_development_dependency 'webmock'
|
56
54
|
end
|
data/karma.conf.js
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
// Karma configuration
|
2
|
+
// Generated on Mon Nov 19 2018 13:01:16 GMT-0600 (Central Standard Time)
|
3
|
+
|
4
|
+
module.exports = function(config) {
|
5
|
+
config.set({
|
6
|
+
|
7
|
+
// base path that will be used to resolve all patterns (eg. files, exclude)
|
8
|
+
basePath: '',
|
9
|
+
|
10
|
+
|
11
|
+
// frameworks to use
|
12
|
+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
13
|
+
frameworks: ['jasmine'],
|
14
|
+
|
15
|
+
|
16
|
+
// list of files / patterns to load in the browser
|
17
|
+
files: [
|
18
|
+
'spec/javascripts/helpers/jquery.js',
|
19
|
+
'app/assets/javascripts/**/*.js',
|
20
|
+
'spec/javascripts/behavior_spec.js'
|
21
|
+
],
|
22
|
+
|
23
|
+
|
24
|
+
// list of files / patterns to exclude
|
25
|
+
exclude: [
|
26
|
+
],
|
27
|
+
|
28
|
+
|
29
|
+
// preprocess matching files before serving them to the browser
|
30
|
+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
31
|
+
preprocessors: {
|
32
|
+
},
|
33
|
+
|
34
|
+
|
35
|
+
// test results reporter to use
|
36
|
+
// possible values: 'dots', 'progress'
|
37
|
+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
38
|
+
reporters: ['progress'],
|
39
|
+
|
40
|
+
|
41
|
+
// web server port
|
42
|
+
port: 9876,
|
43
|
+
|
44
|
+
|
45
|
+
// enable / disable colors in the output (reporters and logs)
|
46
|
+
colors: true,
|
47
|
+
|
48
|
+
|
49
|
+
// level of logging
|
50
|
+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
51
|
+
logLevel: config.LOG_INFO,
|
52
|
+
|
53
|
+
|
54
|
+
// enable / disable watching file and executing tests whenever any file changes
|
55
|
+
autoWatch: true,
|
56
|
+
|
57
|
+
|
58
|
+
// start these browsers
|
59
|
+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
60
|
+
browsers: ['ChromeHeadless'],
|
61
|
+
|
62
|
+
|
63
|
+
// Continuous Integration mode
|
64
|
+
// if true, Karma captures browsers, runs the tests and exits
|
65
|
+
singleRun: true,
|
66
|
+
|
67
|
+
// Concurrency level
|
68
|
+
// how many browser should be started simultaneous
|
69
|
+
concurrency: Infinity
|
70
|
+
})
|
71
|
+
}
|