sufia 3.6.0 → 3.7.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -4
  3. data/Gemfile +0 -3
  4. data/History.md +29 -0
  5. data/README.md +2 -4
  6. data/SUFIA_VERSION +1 -1
  7. data/app/assets/javascripts/sufia/audio.js +28 -0
  8. data/app/assets/javascripts/sufia/single_use_link.js +35 -0
  9. data/app/assets/javascripts/sufia.js +2 -20
  10. data/app/assets/stylesheets/sufia-audio-overrides.css +9 -0
  11. data/app/assets/stylesheets/sufia.css.scss +1 -1
  12. data/app/assets/stylesheets/video-js.css +700 -433
  13. data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +0 -12
  14. data/app/controllers/concerns/sufia/users_controller_behavior.rb +12 -18
  15. data/app/controllers/dashboard_controller.rb +1 -2
  16. data/app/helpers/sufia_helper.rb +6 -5
  17. data/app/helpers/trophy_helper.rb +1 -1
  18. data/app/views/catalog/_index_partials/_default_group.html.erb +1 -2
  19. data/app/views/catalog/_results_pagination.html.erb +3 -3
  20. data/app/views/catalog/index.html.erb +0 -3
  21. data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +2 -2
  22. data/app/views/dashboard/_results_pagination.html.erb +5 -21
  23. data/app/views/dashboard/facet.html.erb +1 -1
  24. data/app/views/dashboard/index.html.erb +5 -35
  25. data/app/views/generic_files/_media_display.html.erb +4 -4
  26. data/app/views/layouts/sufia-two-column.html.erb +0 -16
  27. data/app/views/users/_contributions.html.erb +20 -28
  28. data/app/views/users/_profile_actions.html.erb +8 -9
  29. data/app/views/users/edit.html.erb +3 -6
  30. data/config/routes.rb +7 -8
  31. data/lib/sufia/version.rb +1 -1
  32. data/spec/controllers/users_controller_spec.rb +56 -20
  33. data/spec/features/browse_files_spec.rb +14 -12
  34. data/spec/helpers/sufia_helper_spec.rb +21 -0
  35. data/spec/models/generic_file_spec.rb +24 -66
  36. data/spec/models/user_spec.rb +16 -4
  37. data/sufia-models/app/models/checksum_audit_log.rb +0 -1
  38. data/sufia-models/app/models/concerns/sufia/user.rb +11 -21
  39. data/sufia-models/app/models/domain_term.rb +1 -6
  40. data/sufia-models/app/models/local_authority.rb +2 -10
  41. data/sufia-models/app/models/local_authority_entry.rb +0 -1
  42. data/sufia-models/app/models/single_use_link.rb +1 -3
  43. data/sufia-models/app/models/sufia/avatar_uploader.rb +22 -0
  44. data/sufia-models/app/models/sufia/avatar_validator.rb +8 -0
  45. data/sufia-models/app/models/trophy.rb +0 -2
  46. data/sufia-models/app/models/version_committer.rb +0 -1
  47. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb +8 -2
  48. data/sufia-models/lib/sufia/models/engine.rb +1 -3
  49. data/sufia-models/lib/sufia/models/generic_file.rb +7 -0
  50. data/sufia-models/lib/sufia/models/version.rb +1 -1
  51. data/sufia-models/lib/sufia/models.rb +1 -1
  52. data/sufia-models/sufia-models.gemspec +4 -8
  53. data/sufia.gemspec +1 -1
  54. data/tasks/sufia-dev.rake +0 -1
  55. data/vendor/assets/javascripts/video.js +129 -4569
  56. metadata +24 -23
  57. data/sufia-models/lib/sufia/models/active_record/deprecated_attr_accessible.rb +0 -16
  58. data/sufia-models/lib/sufia/models/active_support/core_ext/marshal.rb +0 -22
  59. data/tasks/sufia.rake +0 -173
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 600ffd64ac5050922d558df0919adff82b5c86e9
4
- data.tar.gz: 1c3206cbd65b85dfdbc75c37a0fd539aa577518e
3
+ metadata.gz: cd1c1d869e175044e6997471f0e6c3dcf2e89cbc
4
+ data.tar.gz: 8020119fe464f600fc9d645d543ded8f053da959
5
5
  SHA512:
6
- metadata.gz: f5b565ade76f51e2b2a89d291c0bea3413c90c4e7a3769fdf5d87baa16d727aa7bc3bd76719cb8722975402540187c703ec7df09adbc1d8f8c30a0eec84b25b6
7
- data.tar.gz: 40a89c2d24aa9a953991eeb6d7453ab3de9e4e935445a122680f791172c45aa85971c6ec977f84dfe010bf0817cf51668bdd264174f15e529847b14b4272baa4
6
+ metadata.gz: 051e1e361d4cf1403c1ad55619403efab4dae5a5c72d1d427034c1124a3f07ebebd9c2473c12c8f341b0464c8f1f603e87accb2bc8bfacac3dfd344c650a873c
7
+ data.tar.gz: df859a53507cff81e851d5f318990f7cc69f5db67fa70de01cbca865138c665b31f7ff5124915d9d6cd26d4da7679ecfd18f07791199fd41183476f7c74a4998
data/.travis.yml CHANGED
@@ -1,10 +1,7 @@
1
1
  language: ruby
2
- before_install:
3
- - sudo apt-get install libclamav-dev clamav-data clamav-daemon
4
- - sudo freshclam -v
5
2
  rvm:
3
+ - "2.1.0"
6
4
  - "2.0.0"
7
- - "2.1.0-preview2"
8
5
  env:
9
6
  global:
10
7
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile CHANGED
@@ -8,9 +8,6 @@ gem 'kaminari', github: 'harai/kaminari', branch: 'route_prefix_prototype'
8
8
  gem 'sufia-models', path: './sufia-models'
9
9
 
10
10
  group :development, :test do
11
- gem 'devise'
12
- # gem 'byebug'
13
- gem 'clamav'
14
11
  gem 'sqlite3'
15
12
  gem 'rspec-rails'
16
13
  gem 'launchy' unless ENV['TRAVIS']
data/History.md CHANGED
@@ -1,4 +1,33 @@
1
1
  # History of Sufia releases
2
+ ## 3.7.0
3
+
4
+ * The UsersController needs to set @trophies to a list of GenericFiles [Justin Coyne]
5
+ * Removed patches for rails 3 [Justin Coyne]
6
+ * Short-circuit freshclam for a faster build [Michael J. Giarlo]
7
+ * Use blacklight 4.5 methods for accessing the search_session. Fixes #296 [Justin Coyne]
8
+ * Test with ruby 2.1.0 final release [Justin Coyne]
9
+ * Simplify tests for GenericFile#related_files [Justin Coyne]
10
+ * Remove duplicate includes. Fixes #289 [Justin Coyne]
11
+ * Remove non-functioning rake tasks … [Justin Coyne]
12
+ * Better documentation for GenericFile#related_files [ci skip] [Justin Coyne]
13
+ * Linked in handle seems to have been missed in the permitted attibiute… … [Carolyn Cole]
14
+ * Updated: - Don't need to exlicity add 'jettywrapper' to Gemfile b/c added by hydra:head generator (called by sufia generator)
15
+ - Don't need to remove public/index.html (Rails 4 presumably)
16
+ - Run `rake jetty:clean` instead of hydra:jetty generator -- does the same thing
17
+ - Added note that fits can be installed with homebrew (and may require adding a symlink)
18
+ [David Chandek-Stark]
19
+ * Upgrade blacklight to 4.6 [Justin Coyne]
20
+ * Allowing the link to either be sufia based or blacklight based [Carolyn Cole]
21
+ * Removing extra_head_content, and paginate deprication warnings [Carolyn Cole]
22
+ * Remove deprecated method paginate_rsolr_response. Fixes #312 [Justin Coyne]
23
+ * Moving single use link java script into asset pipeline. [Carolyn Cole]
24
+ * Update to blacklight 4.7 [Justin Coyne]
25
+ * Modifying how zclip works when a flash player is not present, since t… … [Carolyn Cole]
26
+ * Upgrading video.js to the latest version so it will work in firefox, … … [Carolyn Cole]
27
+ * Removing hard coded asset paths, which do not work in production. Whi… … [Carolyn Cole]
28
+ * Fixing audiojs to only display if audio is not supported by the brows… … [Carolyn Cole]
29
+
30
+ ## 3.6.0
2
31
 
3
32
  ## 3.4.0
4
33
  * Handle facets with 3 or more words [Jeremy Friesen]
data/README.md CHANGED
@@ -42,7 +42,6 @@ Sufia has the following features:
42
42
  ```
43
43
  gem 'sufia'
44
44
  gem 'kaminari', github: 'harai/kaminari', branch: 'route_prefix_prototype' # required to handle pagination properly in dashboard. See https://github.com/amatsuda/kaminari/pull/322
45
- gem 'jettywrapper'
46
45
  gem 'font-awesome-sass-rails'
47
46
  ```
48
47
  Then `bundle install`
@@ -52,7 +51,6 @@ Note the line with kaminari listed as a dependency. This is a temporary fix to
52
51
  ### Run the sufia generator
53
52
  ```
54
53
  rails g sufia -f
55
- rm public/index.html
56
54
  ```
57
55
 
58
56
  ### Run the migrations
@@ -63,7 +61,7 @@ rake db:migrate
63
61
 
64
62
  ### Get a copy of hydra-jetty
65
63
  ```
66
- rails g hydra:jetty
64
+ rake jetty:clean
67
65
  rake jetty:config
68
66
  rake jetty:start
69
67
  ```
@@ -95,7 +93,7 @@ Add this line:
95
93
  Turbolinks does not mix well with Blacklight.
96
94
 
97
95
  ### Install Fits.sh
98
- 1. Go to http://code.google.com/p/fits/downloads/list and download a copy of fits & unpack it somewhere on your Machine.
96
+ 1. Go to http://code.google.com/p/fits/downloads/list and download a copy of fits & unpack it somewhere on your machine. You can also install fits on OSX with homebrew `brew install fits` (you may also have to create a symlink from `fits.sh -> fits` in the next step).
99
97
  1. Give your system access to fits
100
98
  1. By adding the path to fits.sh to your excutable PATH. (ex. in your .bashrc)
101
99
  * OR
data/SUFIA_VERSION CHANGED
@@ -1 +1 @@
1
- 3.6.0
1
+ 3.7.0
@@ -0,0 +1,28 @@
1
+ function initialize_audio() {
2
+
3
+ var test_audio= document.createElement("audio") //try and create sample audio element
4
+ var audiosupport= (test_audio.play)? true : false
5
+
6
+ if (audiosupport){
7
+ $('audio').each(function() {
8
+ this.controls = true;
9
+ });
10
+ }else {
11
+ $('audio').each(function() {
12
+ $(this).attr("preload","auto");
13
+ });
14
+ audiojs.events.ready(function() {
15
+ var as = audiojs.createAll({
16
+ imageLocation: '/assets/player-graphics.gif',
17
+ swfLocation: '/assets/audiojs.swf'
18
+ });
19
+
20
+ // remove html 5 player from veiw on firefox and safari
21
+ $('.audiojs').addClass('no-audio-background')
22
+ $('.audiojs .play-pause').addClass('hide')
23
+ $('.audiojs .scrubber').addClass('hide')
24
+ $('.audiojs .time').addClass('hide')
25
+
26
+ });
27
+ };
28
+ }
@@ -0,0 +1,35 @@
1
+ function getSingleUse(id) {
2
+ var rurl = window.location.protocol+"//"+window.location.host;
3
+ var resp = $.ajax({
4
+ headers: { Accept: "application/javascript" },
5
+ type: 'get',
6
+ url: rurl + "/single_use_link/generate_show/" + id.slice(10),
7
+ async: false
8
+ });
9
+ return rurl + resp.responseText;
10
+ }
11
+
12
+ // short hand for $(document).ready();
13
+ $(function() {
14
+ ZeroClipboard.setDefaults({ moviePath: "/assets/ZeroClipboard.swf" });
15
+ $.each($(".copypaste"), function(idx, item) {
16
+ var clip = new ZeroClipboard();
17
+ clip.on("dataRequested", function(client, args) {
18
+ clip.setText(getSingleUse(this.id));
19
+ })
20
+ clip.on("complete", function(client, args) {
21
+ alert("A single use link to " + args.text + " was copied to your clipboard.")
22
+ })
23
+ clip.on("noflash", function(client, args) {
24
+ $(item).bind('click', function(e) {
25
+ alert("Your single-use link (please copy): " + getSingleUse(item.id));
26
+ } );
27
+ })
28
+ clip.on("wrongflash", function(client, args) {
29
+ $(item).bind('click', function(e) {
30
+ alert("Your single-use link (please copy): " + getSingleUse(item.id));
31
+ } );
32
+ })
33
+ clip.glue($("#" + this.id))
34
+ })
35
+ });
@@ -44,6 +44,8 @@ limitations under the License.
44
44
  //= require sufia/batch_select_all
45
45
  //= require sufia/multiForm
46
46
  //= require sufia/edit_metadata
47
+ //= require sufia/single_use_link
48
+ //= require sufia/audio
47
49
  //= require hydra/batch_select
48
50
  //= require hydra_collections
49
51
 
@@ -174,23 +176,3 @@ function preg_quote( str ) {
174
176
 
175
177
  return (str+'').replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
176
178
  }
177
-
178
-
179
- function initialize_audio() {
180
-
181
- if (navigator.userAgent.match("Chrome")){
182
- $('audio').each(function() {
183
- this.controls = true;
184
- });
185
- }else {
186
- $('audio').each(function() {
187
- $(this).attr("preload","auto");
188
- });
189
- audiojs.events.ready(function() {
190
- var as = audiojs.createAll({
191
- imageLocation: '/assets/player-graphics.gif',
192
- swfLocation: '/assets/audiojs.swf'
193
- });
194
- });
195
- };
196
- }
@@ -0,0 +1,9 @@
1
+
2
+ .no-audio-background {
3
+ background: none;
4
+ box-shadow: none;
5
+ }
6
+
7
+ .span40 .audiojs audio {
8
+ left: 10px;
9
+ }
@@ -10,7 +10,7 @@
10
10
  *= require audio-js
11
11
  *= require dashboard
12
12
  *= require jquery-ui
13
+ *= require sufia-audio-overrides
13
14
  */
14
15
 
15
16
  @import 'font-awesome';
16
-