Unverified Commit 1702cc1c authored by Benjamin Neff's avatar Benjamin Neff

Merge branch 'release/0.6.3.0'

parents 55219372 3d992160
......@@ -86,3 +86,6 @@ diaspora.iml
# Dolphin's directory's preferences files
*.directory
# WebTranslateIt
.wti
......@@ -3,3 +3,4 @@
--color
--tag ~performance
--order random
--require spec_helper
This diff is collapsed.
......@@ -4,7 +4,7 @@ gem "rails", "4.2.7.1"
# Legacy Rails features, remove me!
# responders (class level)
gem "responders", "2.2.0"
gem "responders", "2.3.0"
# Appserver
......@@ -13,19 +13,18 @@ gem "unicorn-worker-killer", "0.4.4"
# Federation
gem "diaspora_federation-rails", "0.1.4"
gem "diaspora_federation-rails", "0.1.7"
# API and JSON
gem "acts_as_api", "0.4.3"
gem "json", "1.8.3"
gem "json-schema", "2.6.2"
gem "json-schema", "2.7.0"
# Authentication
gem "devise", "4.2.0"
gem "devise_lastseenable", "0.0.6"
gem "devise-token_authenticatable", "0.5.2"
# Captcha
......@@ -33,16 +32,15 @@ gem "simple_captcha2", "0.4.0", require: "simple_captcha"
# Background processing
gem "sidekiq", "4.1.4"
gem "sinatra", "1.4.7"
gem "sidekiq", "4.2.2"
# Scheduled processing
gem "sidekiq-cron", "0.4.2"
gem "sidekiq-cron", "0.4.4"
# Compression
gem "uglifier", "3.0.1"
gem "uglifier", "3.0.2"
# Configuration
......@@ -57,7 +55,7 @@ gem "rack-cors", "0.4.0", require: "rack/cors"
gem "bootstrap-sass", "3.3.7"
gem "compass-rails", "2.0.5"
gem "sass-rails", "5.0.6"
gem "autoprefixer-rails", "6.4.0.2"
gem "autoprefixer-rails", "6.5.1"
gem "bootstrap-switch-rails", "3.3.3"
# Database
......@@ -66,7 +64,7 @@ group :mysql, optional: true do
gem "mysql2", "0.4.4"
end
group :postgresql, optional: true do
gem "pg", "0.18.4"
gem "pg", "0.19.0"
end
......@@ -74,10 +72,9 @@ gem "activerecord-import", "0.15.0"
# File uploading
gem "fog", "1.38.0", require: "fog/aws"
gem "carrierwave", "0.11.2"
gem "fog", "1.38.0"
gem "mini_magick", "4.5.1"
gem "remotipart", "1.2.1"
# GUID generation
gem "uuid", "2.3.8"
......@@ -88,32 +85,35 @@ gem "entypo-rails", "3.0.0.pre.rc2"
# JavaScript
gem "backbone-on-rails", "1.2.0.0"
gem "handlebars_assets", "0.23.1"
gem "jquery-rails", "4.1.1"
gem "jquery-rails", "4.2.1"
gem "jquery-ui-rails", "5.0.5"
gem "js_image_paths", "0.1.0"
gem "js-routes", "1.2.9"
source "https://rails-assets.org" do
gem "rails-assets-jquery", "2.2.1" # Should be kept in sync with jquery-rails
gem "rails-assets-jquery", "2.2.4" # Should be kept in sync with jquery-rails
gem "rails-assets-markdown-it", "7.0.0"
gem "rails-assets-markdown-it", "8.2.2"
gem "rails-assets-markdown-it-hashtag", "0.4.0"
gem "rails-assets-markdown-it-diaspora-mention", "1.0.0"
gem "rails-assets-markdown-it-sanitizer", "0.4.2"
gem "rails-assets-markdown-it-diaspora-mention", "1.1.0"
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.1"
gem "rails-assets-markdown-it-sub", "1.0.0"
gem "rails-assets-markdown-it-sup", "1.0.0"
gem "rails-assets-highlightjs", "9.6.0"
gem "rails-assets-highlightjs", "9.7.0"
gem "rails-assets-backbone", "1.3.3"
gem "rails-assets-bootstrap-markdown", "2.10.0"
gem "rails-assets-corejs-typeahead", "1.0.1"
gem "rails-assets-fineuploader-dist", "5.11.0"
# jQuery plugins
gem "rails-assets-jquery-placeholder", "2.3.1"
gem "rails-assets-jquery-textchange", "0.2.3"
gem "rails-assets-perfect-scrollbar", "0.6.12"
gem "rails-assets-autosize", "3.0.17"
gem "rails-assets-autosize", "3.0.20"
gem "rails-assets-blueimp-gallery", "2.21.3"
end
......@@ -132,12 +132,20 @@ gem "leaflet-rails", "0.7.7"
# Parsing
gem "nokogiri", "1.6.8"
gem "nokogiri", "1.6.8.1"
gem "redcarpet", "3.3.4"
gem "twitter-text", "1.14.0"
gem "ruby-oembed", "0.10.1"
gem "open_graph_reader", "0.6.1"
# RTL support
gem "string-direction", "1.2.0"
# Security Headers
gem "secure_headers", "3.5.0"
# Services
gem "omniauth", "1.3.1"
......@@ -155,8 +163,8 @@ gem "openid_connect", "0.12.0"
gem "active_model_serializers", "0.9.5"
# XMPP chat dependencies
gem "diaspora-prosody-config", "0.0.5"
gem "rails-assets-diaspora_jsxc", "0.1.5.develop.1", source: "https://rails-assets.org"
gem "diaspora-prosody-config", "0.0.7"
gem "rails-assets-diaspora_jsxc", "0.1.5.develop.7", source: "https://rails-assets.org"
# Tags
......@@ -164,7 +172,7 @@ gem "acts-as-taggable-on", "3.5.0"
# URIs and HTTP
gem "addressable", "2.3.8", require: "addressable/uri"
gem "addressable", "2.4.0", require: "addressable/uri"
gem "faraday", "0.9.2"
gem "faraday_middleware", "0.10.0"
gem "faraday-cookie_jar", "0.0.6"
......@@ -173,9 +181,9 @@ gem "typhoeus", "1.1.0"
# Views
gem "gon", "6.1.0"
gem "hamlit", "2.5.0"
gem "hamlit", "2.7.5"
gem "mobile-fu", "1.3.1"
gem "will_paginate", "3.1.0"
gem "will_paginate", "3.1.5"
gem "rails-timeago", "2.11.0"
# Logging
......@@ -212,10 +220,6 @@ group :production do # we don"t install these on travis to speed up test runs
gem "rack-google-analytics", "1.2.0"
gem "rack-piwik", "0.3.0", require: "rack/piwik"
# Click-jacking protection
gem "rack-protection", "1.5.3"
# Process management
gem "eye", "0.8.1"
......@@ -241,8 +245,8 @@ group :development do
# Linters
gem "rubocop", "0.40.0"
gem "haml_lint", "0.18.1"
gem "pronto", "0.7.0"
gem "haml_lint", "0.18.2"
gem "pronto", "0.7.1"
gem "pronto-eslint", "0.7.0"
gem "pronto-rubocop", "0.7.0"
gem "pronto-haml", "0.7.0"
......@@ -250,7 +254,7 @@ group :development do
# Preloading environment
gem "spring", "1.7.2"
gem "spring", "2.0.0"
gem "spring-commands-rspec", "1.0.4"
gem "spring-commands-cucumber", "1.0.1"
......@@ -268,14 +272,14 @@ group :test do
# RSpec (unit tests, some integration tests)
gem "fixture_builder", "0.4.1"
gem "fuubar", "2.1.1"
gem "fuubar", "2.2.0"
gem "test_after_commit", "1.1.0"
# Cucumber (integration tests)
gem "capybara", "2.7.1"
gem "capybara", "2.10.1"
gem "database_cleaner", "1.5.3"
gem "poltergeist", "1.10.0"
gem "poltergeist", "1.11.0"
gem "cucumber-api-steps", "0.13", require: false
gem "json_spec", "1.1.4"
......@@ -287,7 +291,7 @@ group :test do
gem "webmock", "2.1.0", require: false
gem "shoulda-matchers", "3.1.1"
gem "diaspora_federation-test", "0.1.4"
gem "diaspora_federation-test", "0.1.7"
# Coverage
gem 'coveralls', require: false
......@@ -295,13 +299,13 @@ end
group :development, :test do
# RSpec (unit tests, some integration tests)
gem "rspec-rails", "3.5.1"
gem "rspec-rails", "3.5.2"
# Cucumber (integration tests)
gem "cucumber-rails", "1.4.4", require: false
gem "cucumber-rails", "1.4.5", require: false
# Jasmine (client side application tests (JS))
gem "jasmine", "2.4.0"
gem "jasmine", "2.5.1"
gem "jasmine-jquery-rails", "2.0.3"
gem "rails-assets-jasmine-ajax", "3.2.0", source: "https://rails-assets.org"
gem "sinon-rails", "1.15.0"
......
This diff is collapsed.
......@@ -90,6 +90,7 @@ var app = {
setupHeader: function() {
if(app.currentUser.authenticated()) {
app.notificationsCollection = new app.collections.Notifications();
app.header = new app.views.Header();
$("header").prepend(app.header.el);
app.header.render();
......@@ -114,6 +115,7 @@ var app = {
// so we use Backbone.history.navigate instead.
var change = Backbone.history.navigate(link.attr("href").substring(1) ,true);
if(change === undefined) { Backbone.history.loadUrl(link.attr("href").substring(1)); }
app.notificationsCollection.fetch();
});
},
......
app.collections.Notifications = Backbone.Collection.extend({
model: app.models.Notification,
// URL parameter
/* eslint-disable camelcase */
url: Routes.notifications({per_page: 10, page: 1}),
/* eslint-enable camelcase */
page: 2,
perPage: 5,
unreadCount: 0,
unreadCountByType: {},
timeout: 300000, // 5 minutes
initialize: function() {
this.fetch();
setInterval(this.pollNotifications.bind(this), this.timeout);
Diaspora.BrowserNotification.requestPermission();
},
pollNotifications: function() {
var unreadCountBefore = this.unreadCount;
this.fetch();
this.once("finishedLoading", function() {
if (unreadCountBefore < this.unreadCount) {
Diaspora.BrowserNotification.spawnNotification(
Diaspora.I18n.t("notifications.new_notifications", {count: this.unreadCount}));
}
}, this);
},
fetch: function(options) {
options = options || {};
options.remove = false;
options.merge = true;
options.parse = true;
Backbone.Collection.prototype.fetch.apply(this, [options]);
},
fetchMore: function() {
var hasMoreNotifications = (this.page * this.perPage) <= this.length;
// There are more notifications to load on the current page
if (hasMoreNotifications) {
this.page++;
// URL parameter
/* eslint-disable camelcase */
var route = Routes.notifications({per_page: this.perPage, page: this.page});
/* eslint-enable camelcase */
this.fetch({url: route, pushBack: true});
}
},
/**
* Adds new models to the collection at the end or at the beginning of the collection and
* then fires an event for each model of the collection. It will fire a different event
* based on whether the models were added at the end (typically when the scroll triggers to load more
* notifications) or at the beginning (new notifications have been added to the front of the list).
*/
set: function(items, options) {
options = options || {};
options.at = options.pushBack ? this.length : 0;
// Retreive back the new created models
var models = [];
var accu = function(model) { models.push(model); };
this.on("add", accu);
Backbone.Collection.prototype.set.apply(this, [items, options]);
this.off("add", accu);
if (options.pushBack) {
models.forEach(function(model) { this.trigger("pushBack", model); }.bind(this));
} else {
// Fires events in the reverse order so that the first event is prepended in first position
models.reverse();
models.forEach(function(model) { this.trigger("pushFront", model); }.bind(this));
}
this.trigger("finishedLoading");
},
parse: function(response) {
this.unreadCount = response.unread_count;
this.unreadCountByType = response.unread_count_by_type;
return _.map(response.notification_list, function(item) {
/* eslint-disable new-cap */
var model = new this.model(item);
/* eslint-enable new-cap */
model.on("userChangedUnreadStatus", this.onChangedUnreadStatus.bind(this));
model.on("change:unread", function() { this.trigger("update"