commit
b2d0feb00d
8 changed files with 21 additions and 14 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
* Display @ before mentions [#7324](https://github.com/diaspora/diaspora/pull/7324)
|
* Display @ before mentions [#7324](https://github.com/diaspora/diaspora/pull/7324)
|
||||||
* Simplify mentions in the publisher [#7302](https://github.com/diaspora/diaspora/pull/7302)
|
* Simplify mentions in the publisher [#7302](https://github.com/diaspora/diaspora/pull/7302)
|
||||||
* Remove chartbeat and mixpanel support [#7280](https://github.com/diaspora/diaspora/pull/7280)
|
* Remove chartbeat and mixpanel support [#7280](https://github.com/diaspora/diaspora/pull/7280)
|
||||||
|
* Upgrade to jQuery 3 [#7303](https://github.com/diaspora/diaspora/pull/7303)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
|
|
|
||||||
4
Gemfile
4
Gemfile
|
|
@ -86,13 +86,13 @@ gem "entypo-rails", "3.0.0"
|
||||||
# JavaScript
|
# JavaScript
|
||||||
|
|
||||||
gem "handlebars_assets", "0.23.1"
|
gem "handlebars_assets", "0.23.1"
|
||||||
gem "jquery-rails", "4.2.1"
|
gem "jquery-rails", "4.2.2"
|
||||||
gem "jquery-ui-rails", "5.0.5"
|
gem "jquery-ui-rails", "5.0.5"
|
||||||
gem "js-routes", "1.3.3"
|
gem "js-routes", "1.3.3"
|
||||||
gem "js_image_paths", "0.1.0"
|
gem "js_image_paths", "0.1.0"
|
||||||
|
|
||||||
source "https://rails-assets.org" do
|
source "https://rails-assets.org" do
|
||||||
gem "rails-assets-jquery", "2.2.4" # Should be kept in sync with jquery-rails
|
gem "rails-assets-jquery", "3.1.1" # Should be kept in sync with jquery-rails
|
||||||
|
|
||||||
gem "rails-assets-highlightjs", "9.9.0"
|
gem "rails-assets-highlightjs", "9.9.0"
|
||||||
gem "rails-assets-markdown-it", "8.3.0"
|
gem "rails-assets-markdown-it", "8.3.0"
|
||||||
|
|
|
||||||
10
Gemfile.lock
10
Gemfile.lock
|
|
@ -324,7 +324,7 @@ GEM
|
||||||
rake
|
rake
|
||||||
jasmine-core (2.5.2)
|
jasmine-core (2.5.2)
|
||||||
jasmine-jquery-rails (2.0.3)
|
jasmine-jquery-rails (2.0.3)
|
||||||
jquery-rails (4.2.1)
|
jquery-rails (4.2.2)
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
|
|
@ -540,7 +540,7 @@ GEM
|
||||||
rails-assets-jasmine (2.5.2)
|
rails-assets-jasmine (2.5.2)
|
||||||
rails-assets-jasmine-ajax (3.3.1)
|
rails-assets-jasmine-ajax (3.3.1)
|
||||||
rails-assets-jasmine (~> 2)
|
rails-assets-jasmine (~> 2)
|
||||||
rails-assets-jquery (2.2.4)
|
rails-assets-jquery (3.1.1)
|
||||||
rails-assets-jquery-colorbox (1.6.4)
|
rails-assets-jquery-colorbox (1.6.4)
|
||||||
rails-assets-jquery (>= 1.3.2)
|
rails-assets-jquery (>= 1.3.2)
|
||||||
rails-assets-jquery-fullscreen-plugin (0.5.0)
|
rails-assets-jquery-fullscreen-plugin (0.5.0)
|
||||||
|
|
@ -831,7 +831,7 @@ DEPENDENCIES
|
||||||
i18n-inflector-rails (= 1.0.7)
|
i18n-inflector-rails (= 1.0.7)
|
||||||
jasmine (= 2.5.2)
|
jasmine (= 2.5.2)
|
||||||
jasmine-jquery-rails (= 2.0.3)
|
jasmine-jquery-rails (= 2.0.3)
|
||||||
jquery-rails (= 4.2.1)
|
jquery-rails (= 4.2.2)
|
||||||
jquery-ui-rails (= 5.0.5)
|
jquery-ui-rails (= 5.0.5)
|
||||||
js-routes (= 1.3.3)
|
js-routes (= 1.3.3)
|
||||||
js_image_paths (= 0.1.0)
|
js_image_paths (= 0.1.0)
|
||||||
|
|
@ -878,7 +878,7 @@ DEPENDENCIES
|
||||||
rails-assets-fine-uploader (= 5.13.0)!
|
rails-assets-fine-uploader (= 5.13.0)!
|
||||||
rails-assets-highlightjs (= 9.9.0)!
|
rails-assets-highlightjs (= 9.9.0)!
|
||||||
rails-assets-jasmine-ajax (= 3.3.1)!
|
rails-assets-jasmine-ajax (= 3.3.1)!
|
||||||
rails-assets-jquery (= 2.2.4)!
|
rails-assets-jquery (= 3.1.1)!
|
||||||
rails-assets-jquery-placeholder (= 2.3.1)!
|
rails-assets-jquery-placeholder (= 2.3.1)!
|
||||||
rails-assets-jquery-textchange (= 0.2.3)!
|
rails-assets-jquery-textchange (= 0.2.3)!
|
||||||
rails-assets-markdown-it (= 8.3.0)!
|
rails-assets-markdown-it (= 8.3.0)!
|
||||||
|
|
@ -928,4 +928,4 @@ DEPENDENCIES
|
||||||
will_paginate (= 3.1.5)
|
will_paginate (= 3.1.5)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.14.5
|
1.14.6
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//= require jquery2
|
//= require jquery3
|
||||||
//= require handlebars.runtime
|
//= require handlebars.runtime
|
||||||
//= require templates
|
//= require templates
|
||||||
//= require main
|
//= require main
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,13 @@ module ApplicationHelper
|
||||||
def jquery_include_tag
|
def jquery_include_tag
|
||||||
buf = []
|
buf = []
|
||||||
if AppConfig.privacy.jquery_cdn?
|
if AppConfig.privacy.jquery_cdn?
|
||||||
version = Jquery::Rails::JQUERY_2_VERSION
|
version = Jquery::Rails::JQUERY_3_VERSION
|
||||||
buf << [javascript_include_tag("//code.jquery.com/jquery-#{version}.min.js")]
|
buf << [javascript_include_tag("//code.jquery.com/jquery-#{version}.min.js")]
|
||||||
buf << [nonced_javascript_tag("!window.jQuery && document.write(unescape('#{j javascript_include_tag('jquery2')}'));")]
|
buf << [
|
||||||
|
nonced_javascript_tag("!window.jQuery && document.write(unescape('#{j javascript_include_tag('jquery3')}'));")
|
||||||
|
]
|
||||||
else
|
else
|
||||||
buf << [javascript_include_tag("jquery2")]
|
buf << [javascript_include_tag("jquery3")]
|
||||||
end
|
end
|
||||||
buf << [javascript_include_tag("jquery_ujs")]
|
buf << [javascript_include_tag("jquery_ujs")]
|
||||||
buf << [nonced_javascript_tag("jQuery.ajaxSetup({'cache': false});")]
|
buf << [nonced_javascript_tag("jQuery.ajaxSetup({'cache': false});")]
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ module Diaspora
|
||||||
config.assets.precompile += %w(
|
config.assets.precompile += %w(
|
||||||
contact-list.js
|
contact-list.js
|
||||||
ie.js
|
ie.js
|
||||||
jquery2.js
|
jquery3.js
|
||||||
jquery_ujs.js
|
jquery_ujs.js
|
||||||
main.js
|
main.js
|
||||||
jsxc.js
|
jsxc.js
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ describe ApplicationHelper, :type => :helper do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'includes jquery.js from asset pipeline' do
|
it 'includes jquery.js from asset pipeline' do
|
||||||
expect(helper.jquery_include_tag).to match(/jquery2\.js/)
|
expect(helper.jquery_include_tag).to match(/jquery3\.js/)
|
||||||
expect(helper.jquery_include_tag).not_to match(/jquery\.com/)
|
expect(helper.jquery_include_tag).not_to match(/jquery\.com/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,10 @@ describe("app", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("setupAjaxErrorRedirect", function() {
|
describe("setupAjaxErrorRedirect", function() {
|
||||||
|
beforeEach(function() {
|
||||||
|
app.setupAjaxErrorRedirect();
|
||||||
|
});
|
||||||
|
|
||||||
it("redirects to /users/sign_in on 401 ajax responses", function() {
|
it("redirects to /users/sign_in on 401 ajax responses", function() {
|
||||||
spyOn(app, "_changeLocation");
|
spyOn(app, "_changeLocation");
|
||||||
$.ajax("/test");
|
$.ajax("/test");
|
||||||
|
|
@ -115,7 +119,6 @@ describe("app", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
app.stream = {basePath: function() { return "/stream"; }};
|
app.stream = {basePath: function() { return "/stream"; }};
|
||||||
app.notificationsCollection = {fetch: $.noop};
|
app.notificationsCollection = {fetch: $.noop};
|
||||||
spyOn(Backbone.history, "start");
|
|
||||||
this.link = $("<a href='/backbone-link' rel='backbone'>");
|
this.link = $("<a href='/backbone-link' rel='backbone'>");
|
||||||
spec.content().append(this.link);
|
spec.content().append(this.link);
|
||||||
app.setupBackboneLinks();
|
app.setupBackboneLinks();
|
||||||
|
|
@ -123,6 +126,7 @@ describe("app", function() {
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
app.stream = undefined;
|
app.stream = undefined;
|
||||||
|
Backbone.history.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls Backbone.history.navigate", function() {
|
it("calls Backbone.history.navigate", function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue