From: Tom Hughes Date: Thu, 24 Jun 2021 07:43:18 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/3177' X-Git-Tag: live~2541 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/8d76be71bbb8a799cbf0627dee170f26ade5a11f?ds=inline;hp=-c Merge remote-tracking branch 'upstream/pull/3177' --- 8d76be71bbb8a799cbf0627dee170f26ade5a11f diff --combined .rubocop.yml index 49fba1d0c,628589d69..aa60df305 --- a/.rubocop.yml +++ b/.rubocop.yml @@@ -7,7 -7,7 +7,7 @@@ require - rubocop-rake AllCops: - TargetRubyVersion: 2.5 + TargetRubyVersion: 2.7 NewCops: enable Exclude: - 'vendor/**/*' @@@ -58,6 -58,9 +58,9 @@@ Rails/HttpPositionalArguments Rails/InverseOf: Enabled: false + Rails/ReflectionClassName: + Enabled: false + Rails/SkipsModelValidations: Exclude: - 'db/migrate/*.rb' diff --combined .rubocop_todo.yml index f7ee886c9,e922a4b79..a0b57f586 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@@ -19,7 -19,7 +19,7 @@@ require # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Layout/LineLength: - Max: 254 + Max: 270 # Offense count: 36 # Configuration parameters: AllowSafeAssignment. @@@ -142,6 -142,10 +142,10 @@@ Rails/HelperInstanceVariable Exclude: - 'app/helpers/title_helper.rb' + Rails/LexicallyScopedActionFilter: + Exclude: + - 'app/controllers/oauth2_applications_controller.rb' + # Offense count: 5 # Configuration parameters: Include. # Include: db/migrate/*.rb diff --combined Gemfile.lock index 4f74eda01,1effb0b34..d7b7f441e --- a/Gemfile.lock +++ b/Gemfile.lock @@@ -74,19 -74,19 +74,19 @@@ GE activerecord (>= 3.2, < 7.0) rake (>= 10.4, < 14.0) ast (2.4.2) - autoprefixer-rails (10.2.5.0) - execjs (< 2.8.0) + autoprefixer-rails (10.2.5.1) + execjs (> 0) aws-eventstream (1.1.1) - aws-partitions (1.457.0) - aws-sdk-core (3.114.0) + aws-partitions (1.470.0) + aws-sdk-core (3.114.3) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.43.0) + aws-sdk-kms (1.44.0) aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.94.1) + aws-sdk-s3 (1.96.1) aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) @@@ -115,12 -115,12 +115,12 @@@ bootstrap_form (4.5.0) actionpack (>= 5.2) activemodel (>= 5.2) - brakeman (5.0.1) + brakeman (5.0.4) browser (5.3.1) builder (3.2.4) bzip2-ffi (1.1.0) ffi (~> 1.0) - cancancan (3.2.1) + cancancan (3.3.0) canonical-rails (0.2.11) rails (>= 4.1, < 6.2) capybara (3.35.3) @@@ -135,7 -135,7 +135,7 @@@ coderay (1.1.3) composite_primary_keys (13.0.0) activerecord (~> 6.1.0) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) config (3.1.0) deep_merge (~> 1.2, >= 1.2.1) dry-validation (~> 1.0, >= 1.0.0) @@@ -151,13 -151,17 +151,17 @@@ activerecord (>= 3.0, < 6.2) delayed_job (>= 3.0, < 5) docile (1.4.0) + doorkeeper (5.5.1) + railties (>= 5) + doorkeeper-i18n (5.2.2) + doorkeeper (>= 5.2) dry-configurable (0.12.1) concurrent-ruby (~> 1.0) dry-core (~> 0.5, >= 0.5.0) - dry-container (0.7.2) + dry-container (0.8.0) concurrent-ruby (~> 1.0) dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.5.0) + dry-core (0.6.0) concurrent-ruby (~> 1.0) dry-equalizer (0.3.0) dry-inflector (0.2.0) @@@ -194,27 -198,23 +198,27 @@@ rubocop smart_properties erubi (1.10.0) - execjs (2.7.0) + execjs (2.8.1) exifr (1.3.9) factory_bot (6.2.0) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faraday (1.4.1) + faraday (1.4.2) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-net_http (1.0.1) faraday-net_http_persistent (1.1.0) - ffi (1.15.0) + ffi (1.15.3) ffi-libarchive (1.0.17) ffi (~> 1.0) fspath (3.1.2) @@@ -229,7 -229,7 +233,7 @@@ http_accept_language (2.1.1) i18n (1.8.10) concurrent-ruby (~> 1.0) - i18n-js (3.8.2) + i18n-js (3.8.3) i18n (>= 0.6.6) image_optim (0.30.0) exifr (~> 1.2, >= 1.2.2) @@@ -255,7 -255,7 +259,7 @@@ thor (>= 0.14, < 2.0) json (2.5.1) jwt (2.2.3) - kgio (2.11.3) + kgio (2.11.4) kramdown (2.3.1) rexml libxml-ruby (3.2.1) @@@ -265,7 -265,7 +269,7 @@@ logstasher (2.1.5) activesupport (>= 5.2) request_store - loofah (2.9.1) + loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@@ -275,14 -275,14 +279,14 @@@ method_source (1.0.0) mini_magick (4.11.0) mini_mime (1.0.3) - mini_portile2 (2.5.1) + mini_portile2 (2.5.3) minitest (5.14.4) msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nio4r (2.5.7) - nokogiri (1.11.4) + nokogiri (1.11.7) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.5) @@@ -339,7 -339,7 +343,7 @@@ popper_js (1.16.0) progress (3.6.0) public_suffix (4.0.6) - puma (5.3.1) + puma (5.3.2) nio4r (~> 2.0) quad_tile (1.0.1) r2 (0.2.7) @@@ -399,23 -399,23 +403,23 @@@ rexml (3.2.5) rinku (2.0.6) rotp (6.2.0) - rubocop (1.15.0) + rubocop (1.17.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.5.0, < 2.0) + rubocop-ast (>= 1.7.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.5.0) + rubocop-ast (1.7.0) parser (>= 3.0.1.1) - rubocop-minitest (0.12.1) + rubocop-minitest (0.13.0) rubocop (>= 0.90, < 2.0) rubocop-performance (1.11.3) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.10.1) + rubocop-rails (2.11.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) @@@ -458,7 -458,7 +462,7 @@@ actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - strong_migrations (0.7.6) + strong_migrations (0.7.7) activerecord (>= 5) thor (1.1.0) tilt (2.0.10) @@@ -474,7 -474,7 +478,7 @@@ addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) @@@ -508,6 -508,8 +512,8 @@@ DEPENDENCIE dalli debug_inspector delayed_job_active_record + doorkeeper + doorkeeper-i18n erb_lint factory_bot_rails faraday diff --combined config/locales/en.yml index 094a6e9c1,b397c8586..6ebeb3746 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -21,6 -21,9 +21,9 @@@ en client_application: create: Register update: Update + doorkeeper_application: + create: Register + update: Update redaction: create: Create redaction update: Save redaction @@@ -95,6 -98,11 +98,11 @@@ latitude: "Latitude" longitude: "Longitude" language: "Language" + doorkeeper/application: + name: Name + redirect_uri: Redirect URIs + confidential: Confidential application? + scopes: Permissions friend: user: "User" friend: "Friend" @@@ -138,6 -146,9 +146,9 @@@ pass_crypt: "Password" pass_crypt_confirmation: "Confirm Password" help: + doorkeeper/application: + confidential: "Application will be used where the client secret can be kept confidential (native mobile apps and single page apps are not confidential)" + redirect_uri: "Use one line per URI" trace: tagstring: comma delimited user_block: @@@ -480,6 -491,11 +491,11 @@@ comment: Comment newer_comments: "Newer Comments" older_comments: "Older Comments" + doorkeeper: + flash: + applications: + create: + notice: Application Registered. friendships: make_friend: heading: "Add %{user} as a friend?" @@@ -1535,6 -1551,7 +1551,6 @@@ unknown token: "That confirmation code has expired or does not exist." reconfirm_html: "If you need us to resend the confirmation email, click here." confirm_resend: - success_html: "We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping.

If you use an antispam system which sends confirmation requests then please make sure you whitelist %{sender} as we are unable to reply to any confirmation requests." failure: "User %{name} not found." confirm_email: heading: Confirm a change of email address @@@ -1543,9 -1560,6 +1559,9 @@@ success: "Confirmed your change of email address!" failure: "An email address has already been confirmed with this token." unknown_token: "That confirmation code has expired or does not exist." + resend_success_flash: + confirmation_sent: We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping. + whitelist: If you use an antispam system which sends confirmation requests then please make sure you whitelist %{sender} as we are unable to reply to any confirmation requests. messages: inbox: title: "Inbox" @@@ -1668,6 -1682,9 +1684,6 @@@ wikipedia: title: Login with Wikipedia alt: Login with a Wikipedia Account - yahoo: - title: Login with Yahoo - alt: Login with a Yahoo OpenID wordpress: title: Login with Wordpress alt: Login with a Wordpress OpenID @@@ -2220,10 -2237,8 +2236,10 @@@ tagged_with: " tagged with %{tags}" empty_html: "Nothing here yet. Upload a new trace or learn more about GPS tracing on the wiki page." upload_trace: "Upload a trace" - see_all_traces: "See all traces" - see_my_traces: "See my traces" + all_traces: "All Traces" + my_traces: "My Traces" + traces_from: "Public Traces from %{user}" + remove_tag_filter: "Remove Tag Filter" destroy: scheduled_for_deletion: "Trace scheduled for deletion" make_public: @@@ -2275,6 -2290,14 +2291,14 @@@ flash: "You've revoked the token for %{application}" permissions: missing: "You have not permitted the application access to this facility" + scopes: + read_prefs: Read user preferences + write_prefs: Modify user preferences + write_diary: Create diary entries, comments and make friends + write_api: Modify the map + read_gpx: Read private GPS traces + write_gpx: Upload GPS traces + write_notes: Modify notes oauth_clients: new: title: "Register a new application" @@@ -2314,6 -2337,52 +2338,52 @@@ flash: "Updated the client information successfully" destroy: flash: "Destroyed the client application registration" + oauth2_applications: + index: + title: "My client applications" + no_applications_html: "Do you have an application you would like to register for use with us using the %{oauth2} standard? You must register your application before it can make OAuth requests to this service." + oauth_2: "OAuth 2" + new: "Register new application" + name: "Name" + permissions: "Permissions" + application: + edit: "Edit" + delete: "Delete" + confirm_delete: "Delete this application?" + new: + title: "Register a new application" + edit: + title: "Edit your application" + show: + edit: "Edit" + delete: "Delete" + confirm_delete: "Delete this application?" + client_id: "Client ID" + client_secret: "Client Secret" + client_secret_warning: "Make sure to save this secret - it will not be accessible again" + permissions: "Permissions" + redirect_uris: "Redirect URIs" + not_found: + sorry: "Sorry, that application could not be found." + oauth2_authorizations: + new: + title: "Authorization required" + introduction: "Authorize %{application} to access your account with the following permissions?" + authorize: "Authorize" + deny: "Deny" + error: + title: "An error has occurred" + show: + title: "Authorization code" + oauth2_authorized_applications: + index: + title: "My authorized applications" + application: "Application" + permissions: "Permissions" + no_applications_html: "You have not yet authorized any %{oauth2} applications." + application: + revoke: "Revoke Access" + confirm_revoke: "Revoke access for this application?" users: new: title: "Sign Up" @@@ -2334,6 -2403,8 +2404,6 @@@ auth no password: "With third party authentication a password is not required, but some extra tools or server may still need one." continue: Sign Up terms accepted: "Thanks for accepting the new contributor terms!" - terms declined: "We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see this wiki page." - terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined terms: title: "Terms" heading: "Terms" @@@ -2356,10 -2427,6 +2426,10 @@@ france: "France" italy: "Italy" rest_of_world: "Rest of the world" + terms_declined_flash: + terms_declined_html: We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see %{terms_declined_link}. + terms_declined_link: this wiki page + terms_declined_url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined no_such_user: title: "No such user" heading: "The user %{user} does not exist" @@@ -2375,7 -2442,6 +2445,6 @@@ my profile: My Profile my settings: My Settings my comments: My Comments - oauth settings: oauth settings blocks on me: Blocks on Me blocks by me: Blocks by Me send message: Send Message @@@ -2477,6 -2543,9 +2546,9 @@@ save changes button: Save Changes make edits public button: Make all my edits public return to profile: Return to profile + oauth1 settings: OAuth 1 settings + oauth2 applications: OAuth 2 applications + oauth2 authorizations: OAuth 2 authorizations flash update success confirm needed: "User information updated successfully. Check your email for a note to confirm your new email address." flash update success: "User information updated successfully." set_home: