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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -4
- data/Gemfile +0 -3
- data/History.md +29 -0
- data/README.md +2 -4
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia/audio.js +28 -0
- data/app/assets/javascripts/sufia/single_use_link.js +35 -0
- data/app/assets/javascripts/sufia.js +2 -20
- data/app/assets/stylesheets/sufia-audio-overrides.css +9 -0
- data/app/assets/stylesheets/sufia.css.scss +1 -1
- data/app/assets/stylesheets/video-js.css +700 -433
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +0 -12
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +12 -18
- data/app/controllers/dashboard_controller.rb +1 -2
- data/app/helpers/sufia_helper.rb +6 -5
- data/app/helpers/trophy_helper.rb +1 -1
- data/app/views/catalog/_index_partials/_default_group.html.erb +1 -2
- data/app/views/catalog/_results_pagination.html.erb +3 -3
- data/app/views/catalog/index.html.erb +0 -3
- data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +2 -2
- data/app/views/dashboard/_results_pagination.html.erb +5 -21
- data/app/views/dashboard/facet.html.erb +1 -1
- data/app/views/dashboard/index.html.erb +5 -35
- data/app/views/generic_files/_media_display.html.erb +4 -4
- data/app/views/layouts/sufia-two-column.html.erb +0 -16
- data/app/views/users/_contributions.html.erb +20 -28
- data/app/views/users/_profile_actions.html.erb +8 -9
- data/app/views/users/edit.html.erb +3 -6
- data/config/routes.rb +7 -8
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/users_controller_spec.rb +56 -20
- data/spec/features/browse_files_spec.rb +14 -12
- data/spec/helpers/sufia_helper_spec.rb +21 -0
- data/spec/models/generic_file_spec.rb +24 -66
- data/spec/models/user_spec.rb +16 -4
- data/sufia-models/app/models/checksum_audit_log.rb +0 -1
- data/sufia-models/app/models/concerns/sufia/user.rb +11 -21
- data/sufia-models/app/models/domain_term.rb +1 -6
- data/sufia-models/app/models/local_authority.rb +2 -10
- data/sufia-models/app/models/local_authority_entry.rb +0 -1
- data/sufia-models/app/models/single_use_link.rb +1 -3
- data/sufia-models/app/models/sufia/avatar_uploader.rb +22 -0
- data/sufia-models/app/models/sufia/avatar_validator.rb +8 -0
- data/sufia-models/app/models/trophy.rb +0 -2
- data/sufia-models/app/models/version_committer.rb +0 -1
- data/sufia-models/lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb +8 -2
- data/sufia-models/lib/sufia/models/engine.rb +1 -3
- data/sufia-models/lib/sufia/models/generic_file.rb +7 -0
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/lib/sufia/models.rb +1 -1
- data/sufia-models/sufia-models.gemspec +4 -8
- data/sufia.gemspec +1 -1
- data/tasks/sufia-dev.rake +0 -1
- data/vendor/assets/javascripts/video.js +129 -4569
- metadata +24 -23
- data/sufia-models/lib/sufia/models/active_record/deprecated_attr_accessible.rb +0 -16
- data/sufia-models/lib/sufia/models/active_support/core_ext/marshal.rb +0 -22
- data/tasks/sufia.rake +0 -173
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd1c1d869e175044e6997471f0e6c3dcf2e89cbc
|
|
4
|
+
data.tar.gz: 8020119fe464f600fc9d645d543ded8f053da959
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 051e1e361d4cf1403c1ad55619403efab4dae5a5c72d1d427034c1124a3f07ebebd9c2473c12c8f341b0464c8f1f603e87accb2bc8bfacac3dfd344c650a873c
|
|
7
|
+
data.tar.gz: df859a53507cff81e851d5f318990f7cc69f5db67fa70de01cbca865138c665b31f7ff5124915d9d6cd26d4da7679ecfd18f07791199fd41183476f7c74a4998
|
data/.travis.yml
CHANGED
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
|
-
|
|
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
|
|
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.
|
|
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
|
-
}
|