browse-everything 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +4 -0
  3. data/.travis.yml +6 -0
  4. data/README.md +19 -3
  5. data/Rakefile +0 -9
  6. data/app/assets/javascripts/browse_everything/behavior.js +413 -0
  7. data/app/assets/stylesheets/_browse_everything_bootstrap3.scss +122 -0
  8. data/app/assets/stylesheets/_browse_everything_bootstrap4.scss +117 -0
  9. data/app/assets/stylesheets/browse_everything/_browse_everything.scss +2 -116
  10. data/app/views/browse_everything/_providers.html.erb +2 -1
  11. data/app/views/browse_everything/index.html.erb +3 -2
  12. data/browse-everything.gemspec +0 -3
  13. data/karma.conf.js +71 -0
  14. data/lib/browse-everything.rb +0 -2
  15. data/lib/browse_everything.rb +10 -5
  16. data/lib/browse_everything/version.rb +1 -1
  17. data/lib/generators/browse_everything/install_generator.rb +1 -7
  18. data/spec/javascripts/behavior_spec.js +1 -3
  19. data/spec/javascripts/helpers/jquery.js +11008 -0
  20. data/spec/javascripts/karma_spec.rb +16 -0
  21. data/spec/lib/browse_everything_spec.rb +7 -0
  22. data/spec/test_app_templates/Gemfile.extra +7 -0
  23. data/spec/test_app_templates/lib/generators/test_app_generator.rb +7 -1
  24. metadata +11 -56
  25. data/app/assets/javascripts/browse_everything/behavior.js.coffee +0 -342
  26. data/app/assets/stylesheets/browse_everything.scss +0 -6
  27. data/app/helpers/font_awesome_version_helper.rb +0 -17
  28. data/lib/generators/browse_everything/assets_generator.rb +0 -13
  29. data/lib/generators/browse_everything/templates/browse_everything.scss +0 -6
  30. data/spec/javascripts/jasmine_spec.rb +0 -21
  31. data/spec/javascripts/support/jasmine.yml +0 -124
  32. data/spec/javascripts/support/jasmine_helper.rb +0 -16
@@ -0,0 +1,122 @@
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
+ &.detail {
63
+ }
64
+
65
+ &.list ul {
66
+ @include content-columns(3);
67
+ }
68
+ }
69
+
70
+ .ev-container li {
71
+ cursor: pointer;
72
+ }
73
+
74
+ .ev-body {
75
+ padding: 0;
76
+ }
77
+
78
+ .ev-providers {
79
+ padding: 4px;
80
+ }
81
+
82
+ .ev-files {
83
+ table {
84
+ width: 100%;
85
+ max-width: 100%;
86
+ tr {
87
+ width: 100%;
88
+ max-width: 100%;
89
+ td {
90
+ white-space: nowrap;
91
+ overflow: hidden;
92
+ text-overflow: ellipsis;
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ .ev-files {
99
+ height: 50vh;
100
+ li { @include ev-link; }
101
+ }
102
+
103
+ .ev-providers {
104
+ select { width: 30% }
105
+ }
106
+
107
+ .loading {
108
+ pointer-events: none;
109
+ opacity: 0.2;
110
+ }
111
+
112
+ .loading-progress {
113
+ position: absolute;
114
+ top: 8em;
115
+ left: 4em;
116
+ }
117
+
118
+ // Massively large text instead of something more artistic
119
+ .loading-text {
120
+ font-size: 4em;
121
+ }
122
+ }
@@ -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
+ }
@@ -1,116 +1,2 @@
1
- @import "jquery.treetable";
2
- @import "jquery.treetable.theme.browse";
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";
@@ -1,6 +1,7 @@
1
1
  <form class="form-inline">
2
2
  <label target="provider-select">Source:</label>
3
- <select class="form-control" id="provider-select">
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
- <div class="<%=fa3or4('fa3','fa4')%> col-xs-12 ev-files list">
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' %>
@@ -21,15 +21,12 @@ 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
26
  spec.add_dependency 'google_drive', '~> 2.1'
29
27
  spec.add_dependency 'googleauth', '0.6.6'
30
28
  spec.add_dependency 'rails', '>= 4.2'
31
29
  spec.add_dependency 'ruby-box'
32
- spec.add_dependency 'sass-rails'
33
30
  spec.add_dependency 'signet', '~> 0.8'
34
31
  spec.add_dependency 'thor', '~> 0.19'
35
32
  spec.add_dependency 'typhoeus'
@@ -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
+ }