Skip to content

Commit

Permalink
Merge branch 'master' into glitch-soc/merge-upstream
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ClearlyClaire committed Nov 20, 2019
2 parents 707c491 + 8dfc45f commit ff67385
Show file tree
Hide file tree
Showing 953 changed files with 9,200 additions and 2,698 deletions.
Empty file added .cache/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Mastodon Meta Discussion Board
url: https://discourse.joinmastodon.org/
about: Please ask and answer questions here.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If your contributions are accepted into Mastodon, you can request to be paid thr

## Bug reports

Bug reports and feature suggestions can be submitted to [GitHub Issues](https://github.com/tootsuite/mastodon/issues). Please make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected in the past using the search function. Please also use descriptive, concise titles.
Bug reports and feature suggestions must use descriptive and concise titles and be submitted to [GitHub Issues](https://github.com/tootsuite/mastodon/issues). Please use the search function to make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected.

## Translations

Expand Down
16 changes: 8 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gem 'makara', '~> 0.4'
gem 'pghero', '~> 2.3'
gem 'dotenv-rails', '~> 2.7'

gem 'aws-sdk-s3', '~> 1.52', require: false
gem 'aws-sdk-s3', '~> 1.55', require: false
gem 'fog-core', '<= 2.1.0'
gem 'fog-openstack', '~> 0.3', require: false
gem 'paperclip', '~> 6.0'
Expand Down Expand Up @@ -68,11 +68,11 @@ gem 'oj', '~> 3.9'
gem 'ostatus2', '~> 2.0'
gem 'ox', '~> 2.11'
gem 'parslet'
gem 'parallel', '~> 1.17'
gem 'parallel', '~> 1.18'
gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c'
gem 'pundit', '~> 2.1'
gem 'premailer-rails'
gem 'rack-attack', '~> 6.1'
gem 'rack-attack', '~> 6.2'
gem 'rack-cors', '~> 1.0', require: 'rack/cors'
gem 'rails-i18n', '~> 5.1'
gem 'rails-settings-cached', '~> 0.6'
Expand All @@ -88,7 +88,7 @@ gem 'sidekiq-bulk', '~>0.2.0'
gem 'simple-navigation', '~> 4.1'
gem 'simple_form', '~> 5.0'
gem 'sprockets-rails', '~> 3.2', require: 'sprockets/railtie'
gem 'stoplight', '~> 2.1.3'
gem 'stoplight', '~> 2.2.0'
gem 'strong_migrations', '~> 0.4'
gem 'tty-command', '~> 0.9', require: false
gem 'tty-prompt', '~> 0.19', require: false
Expand All @@ -105,7 +105,7 @@ 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'
Expand All @@ -119,7 +119,7 @@ end
group :test do
gem 'capybara', '~> 3.29'
gem 'climate_control', '~> 0.2'
gem 'faker', '~> 2.6'
gem 'faker', '~> 2.7'
gem 'microformats', '~> 4.1'
gem 'rails-controller-testing', '~> 1.0'
gem 'rspec-sidekiq', '~> 3.0'
Expand All @@ -137,9 +137,9 @@ group :development do
gem 'letter_opener', '~> 1.7'
gem 'letter_opener_web', '~> 1.3'
gem 'memory_profiler'
gem 'rubocop', '~> 0.75', require: false
gem 'rubocop', '~> 0.76', require: false
gem 'rubocop-rails', '~> 2.3', require: false
gem 'brakeman', '~> 4.6', require: false
gem 'brakeman', '~> 4.7', require: false
gem 'bundler-audit', '~> 0.6', require: false

gem 'capistrano', '~> 3.11'
Expand Down
63 changes: 32 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,27 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.3.4)
sshkit (>= 1.6.1, != 1.7.0)
annotate (3.0.2)
annotate (3.0.3)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 13.0)
rake (>= 10.4, < 14.0)
arel (9.0.0)
ast (2.4.0)
attr_encrypted (3.1.0)
encryptor (~> 3.0.0)
av (0.9.0)
cocaine (~> 0.5.3)
aws-eventstream (1.0.3)
aws-partitions (1.230.0)
aws-sdk-core (3.72.0)
aws-partitions (1.240.0)
aws-sdk-core (3.78.0)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.228.0)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.25.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.52.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sdk-s3 (1.55.0)
aws-sdk-core (~> 3, >= 3.77.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
Expand All @@ -132,7 +132,7 @@ GEM
ffi (~> 1.10.0)
bootsnap (1.4.5)
msgpack (~> 1.0)
brakeman (4.6.1)
brakeman (4.7.1)
browser (2.6.1)
builder (3.2.3)
bullet (6.0.2)
Expand Down Expand Up @@ -188,7 +188,7 @@ GEM
css_parser (1.7.0)
addressable
debug_inspector (0.0.3)
derailed_benchmarks (1.4.1)
derailed_benchmarks (1.4.2)
benchmark-ips (~> 2)
get_process_mem (~> 0)
heapy (~> 0)
Expand Down Expand Up @@ -218,7 +218,7 @@ GEM
docile (1.3.2)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
doorkeeper (5.2.1)
doorkeeper (5.2.2)
railties (>= 5)
dotenv (2.7.5)
dotenv-rails (2.7.5)
Expand All @@ -240,7 +240,7 @@ GEM
tzinfo
excon (0.62.0)
fabrication (2.20.2)
faker (2.6.0)
faker (2.7.0)
i18n (>= 1.6, < 1.8)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
Expand All @@ -263,10 +263,10 @@ GEM
fugit (1.1.6)
et-orbi (~> 1.1, >= 1.1.6)
raabro (~> 1.1)
fuubar (2.4.1)
fuubar (2.5.0)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
get_process_mem (0.2.4)
get_process_mem (0.2.5)
ffi (~> 1.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -304,7 +304,7 @@ GEM
domain_name (~> 0.5)
http-form_data (2.1.1)
http_accept_language (2.1.1)
httplog (1.3.2)
httplog (1.3.3)
rack (>= 1.0)
rainbow (>= 2.0.0)
i18n (1.7.0)
Expand All @@ -322,7 +322,7 @@ GEM
idn-ruby (0.1.0)
ipaddress (0.8.3)
iso-639 (0.2.8)
jaro_winkler (1.5.3)
jaro_winkler (1.5.4)
jmespath (1.4.0)
json (2.2.0)
json-canonicalization (0.1.0)
Expand Down Expand Up @@ -380,7 +380,7 @@ GEM
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.12.2)
minitest (5.13.0)
msgpack (1.3.1)
multi_json (1.13.1)
multipart-post (2.1.1)
Expand All @@ -390,7 +390,7 @@ GEM
net-ssh (>= 2.6.5, < 6.0.0)
net-ssh (5.2.0)
nio4r (2.5.1)
nokogiri (1.10.4)
nokogiri (1.10.5)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.1)
nokogiri (~> 1.8, >= 1.8.4)
Expand Down Expand Up @@ -425,7 +425,7 @@ GEM
paperclip-av-transcoder (0.6.4)
av (~> 0.9.0)
paperclip (>= 2.5.2)
parallel (1.17.0)
parallel (1.18.0)
parallel_tests (2.29.2)
parallel
parser (2.6.5.0)
Expand Down Expand Up @@ -461,9 +461,10 @@ GEM
activesupport (>= 3.0.0)
raabro (1.1.6)
rack (2.0.7)
rack-attack (6.1.0)
rack-attack (6.2.1)
rack (>= 1.0, < 3)
rack-cors (1.0.3)
rack-cors (1.0.6)
rack (>= 1.6.0)
rack-protection (2.0.7)
rack
rack-proxy (0.6.5)
Expand Down Expand Up @@ -504,7 +505,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.3)
rake (13.0.1)
rdf (3.0.12)
hamster (~> 3.0)
link_header (~> 0.0, >= 0.0.8)
Expand Down Expand Up @@ -560,7 +561,7 @@ GEM
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.9.0)
rubocop (0.75.1)
rubocop (0.76.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.6)
Expand Down Expand Up @@ -619,7 +620,7 @@ GEM
net-ssh (>= 2.8.0)
stackprof (0.2.13)
statsd-ruby (1.4.0)
stoplight (2.1.3)
stoplight (2.2.0)
streamio-ffmpeg (3.0.2)
multi_json (~> 1.8)
strong_migrations (0.4.2)
Expand Down Expand Up @@ -684,12 +685,12 @@ DEPENDENCIES
active_record_query_trace (~> 1.7)
addressable (~> 2.7)
annotate (~> 3.0)
aws-sdk-s3 (~> 1.52)
aws-sdk-s3 (~> 1.55)
better_errors (~> 2.5)
binding_of_caller (~> 0.7)
blurhash (~> 0.1)
bootsnap (~> 1.4)
brakeman (~> 4.6)
brakeman (~> 4.7)
browser
bullet (~> 6.0)
bundler-audit (~> 0.6)
Expand All @@ -712,12 +713,12 @@ DEPENDENCIES
doorkeeper (~> 5.2)
dotenv-rails (~> 2.7)
fabrication (~> 2.20)
faker (~> 2.6)
faker (~> 2.7)
fast_blank (~> 1.0)
fastimage
fog-core (<= 2.1.0)
fog-openstack (~> 0.3)
fuubar (~> 2.4)
fuubar (~> 2.5)
goldfinger (~> 2.1)
hamlit-rails (~> 0.2)
health_check!
Expand Down Expand Up @@ -755,7 +756,7 @@ DEPENDENCIES
ox (~> 2.11)
paperclip (~> 6.0)
paperclip-av-transcoder (~> 0.6)
parallel (~> 1.17)
parallel (~> 1.18)
parallel_tests (~> 2.29)
parslet
pg (~> 1.1)
Expand All @@ -768,7 +769,7 @@ DEPENDENCIES
pry-rails (~> 0.3)
puma (~> 4.2)
pundit (~> 2.1)
rack-attack (~> 6.1)
rack-attack (~> 6.2)
rack-cors (~> 1.0)
rails (~> 5.2.3)
rails-controller-testing (~> 1.0)
Expand All @@ -782,7 +783,7 @@ DEPENDENCIES
rqrcode (~> 0.10)
rspec-rails (~> 3.9)
rspec-sidekiq (~> 3.0)
rubocop (~> 0.75)
rubocop (~> 0.76)
rubocop-rails (~> 2.3)
ruby-progressbar (~> 1.10)
sanitize (~> 5.1)
Expand All @@ -795,7 +796,7 @@ DEPENDENCIES
simplecov (~> 0.17)
sprockets-rails (~> 3.2)
stackprof
stoplight (~> 2.1.3)
stoplight (~> 2.2.0)
streamio-ffmpeg (~> 3.0)
strong_migrations (~> 0.4)
thor (~> 0.20)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/accounts/credentials_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def account_params
end

def user_settings_params
return nil unless params.key?(:source)
return nil if params[:source].blank?

source_params = params.require(:source)

Expand Down
13 changes: 4 additions & 9 deletions app/controllers/api/v1/bookmarks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ def cached_bookmarks
end

def results
@_results ||= account_bookmarks.paginate_by_max_id(
@_results ||= account_bookmarks.paginate_by_id(
limit_param(DEFAULT_STATUSES_LIMIT),
params[:max_id],
params[:since_id]
params_slice(:max_id, :since_id, :min_id)
)
end

Expand All @@ -42,15 +41,11 @@ def insert_pagination_headers
end

def next_path
if records_continue?
api_v1_bookmarks_url pagination_params(max_id: pagination_max_id)
end
api_v1_bookmarks_url pagination_params(max_id: pagination_max_id) if records_continue?
end

def prev_path
unless results.empty?
api_v1_bookmarks_url pagination_params(since_id: pagination_since_id)
end
api_v1_bookmarks_url pagination_params(min_id: pagination_since_id) unless results.empty?
end

def pagination_max_id
Expand Down
10 changes: 2 additions & 8 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,7 @@ def current_skin
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
6 changes: 4 additions & 2 deletions app/helpers/admin/action_logs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def icon_for_log(log)
'flag'
when 'DomainBlock'
'lock'
when 'DomainAllow'
'plus-circle'
when 'EmailDomainBlock'
'envelope'
when 'Status'
Expand Down Expand Up @@ -86,7 +88,7 @@ def linkable_log_target(record)
record.shortcode
when 'Report'
link_to "##{record.id}", admin_report_path(record)
when 'DomainBlock', 'EmailDomainBlock'
when 'DomainBlock', 'DomainAllow', 'EmailDomainBlock'
link_to record.domain, "https://#{record.domain}"
when 'Status'
link_to record.account.acct, ActivityPub::TagManager.instance.url_for(record)
Expand All @@ -99,7 +101,7 @@ def log_target_from_history(type, attributes)
case type
when 'CustomEmoji'
attributes['shortcode']
when 'DomainBlock', 'EmailDomainBlock'
when 'DomainBlock', 'DomainAllow', 'EmailDomainBlock'
link_to attributes['domain'], "https://#{attributes['domain']}"
when 'Status'
tmp_status = Status.new(attributes.except('reblogs_count', 'favourites_count'))
Expand Down
Loading

0 comments on commit ff67385

Please sign in to comment.