From: Thibaut Girka Date: Wed, 20 Nov 2019 14:36:09 +0000 (+0100) Subject: Merge branch 'master' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=ff67385cfbfd6f5403b2f8b58407dc730dc7e694;p=mastodon.git Merge branch 'master' into glitch-soc/merge-upstream Conflicts: - README.md discarded upstream changes - app/controllers/api/v1/bookmarks_controller.rb finally merged upstream, some code style fixes and slightly changed pagination code - app/controllers/application_controller.rb changed upstream to always return HTML error pages slight conflict caused by theming code - app/models/bookmark.rb finally merged upstream, no real conflict - spec/controllers/api/v1/bookmarks_controller_spec.rb finally merged upstream, slightly changed pagination code --- ff67385cfbfd6f5403b2f8b58407dc730dc7e694 diff --cc Gemfile index d904f5176,158e8d236..015a4d577 --- a/Gemfile +++ b/Gemfile @@@ -101,11 -100,9 +101,11 @@@ gem 'json-ld', git: 'https://github.com gem 'json-ld-preloaded', '~> 3.0' gem 'rdf-normalize', '~> 0.3' +gem 'redcarpet', '~> 3.4' + group :development, :test do gem 'fabrication', '~> 2.20' - gem 'fuubar', '~> 2.4' + gem 'fuubar', '~> 2.5' gem 'i18n-tasks', '~> 0.9', require: false gem 'pry-byebug', '~> 3.7' gem 'pry-rails', '~> 0.3' diff --cc app/controllers/application_controller.rb index 92339ce2f,e19d5b142..599c64062 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@@ -211,13 -136,6 +211,7 @@@ class ApplicationController < ActionCon end def respond_with_error(code) - respond_to do |format| - format.any { head code } - - format.html do - use_pack 'error' - render "errors/#{code}", layout: 'error', status: code - end - end ++ use_pack 'error' + render "errors/#{code}", layout: 'error', status: code end end diff --cc config/i18n-tasks.yml index e3bede60d,c2d6a7838..1e223fbde --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@@ -59,5 -59,7 +59,8 @@@ ignore_unused - 'errors.429' - 'admin.accounts.roles.*' - 'admin.action_logs.actions.*' + - 'themes.*' - 'statuses.attached.*' + + ignore_inconsistent_interpolations: + - '*.one' diff --cc package.json index 70b58a950,a86b18eac..545c5f731 --- a/package.json +++ b/package.json @@@ -70,11 -69,10 +70,11 @@@ "@babel/plugin-transform-react-jsx-source": "^7.5.0", "@babel/plugin-transform-runtime": "^7.5.5", "@babel/preset-env": "^7.7.1", - "@babel/preset-react": "^7.6.3", - "@babel/runtime": "^7.7.1", - "@clusterws/cws": "^0.15.2", + "@babel/preset-react": "^7.7.0", + "@babel/runtime": "^7.7.2", + "@clusterws/cws": "^0.16.0", "array-includes": "^3.0.3", + "atrament": "^0.2.3", "arrow-key-navigation": "^1.0.2", "autoprefixer": "^9.6.1", "axios": "^0.19.0", @@@ -99,9 -97,8 +99,9 @@@ "exif-js": "^2.3.0", "express": "^4.17.1", "file-loader": "^4.2.0", + "favico.js": "^0.3.10", "font-awesome": "^4.7.0", - "glob": "^7.1.5", + "glob": "^7.1.6", "history": "^4.10.1", "http-link-header": "^1.0.2", "immutable": "^3.8.2", diff --cc spec/controllers/api/v1/accounts/credentials_controller_spec.rb index e9466e4ed,ebd462a03..4fa6fbcf4 --- a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb @@@ -59,11 -59,22 +59,24 @@@ describe Api::V1::Accounts::Credentials end end + describe 'with empty source list' do + before do + patch :update, params: { + display_name: "I'm a cat", + source: {}, + }, as: :json + end + + it 'returns http success' do + expect(response).to have_http_status(200) + end + end + describe 'with invalid data' do before do - patch :update, params: { note: 'This is too long. ' * 30 } + note = 'This is too long. ' + note = note + 'a' * (Account::MAX_NOTE_LENGTH - note.length + 1) + patch :update, params: { note: note } end it 'returns http unprocessable entity' do