]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/3177'
authorTom Hughes <tom@compton.nu>
Thu, 24 Jun 2021 07:43:18 +0000 (08:43 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 24 Jun 2021 07:43:18 +0000 (08:43 +0100)
1  2 
.rubocop.yml
.rubocop_todo.yml
Gemfile.lock
config/locales/en.yml

diff --combined .rubocop.yml
index 49fba1d0c64ac68501da202c0bad105599bdbe1f,628589d69804f91bd396244c9fb79305d3c0f0fd..aa60df305e2613659f470ffcafb57dce3c22941e
@@@ -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 f7ee886c99cbf23ebec6cd5fa465707c2f2a589c,e922a4b79594ba72e02ef0f427e5a9f35887b320..a0b57f586badc5006e2b9ba7f7f52395a526b374
@@@ -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 4f74eda016c84074898937e20a479d30691156c9,1effb0b3407cac4115b6bd5b82ffc34ff873fd81..d7b7f441e7b6adae1d6826188440a016a0d8fe42
@@@ -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)
      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)
      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)
        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)
        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)
      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)
        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)
      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)
      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)
      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)
      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)
        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)
        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 094a6e9c1c40687d90d313d776ae2d9303362903,b397c8586eff41007d5ba5c47ee0b6966082085e..6ebeb3746bd11eff8b1ee3290cdc84f225fe3749
@@@ -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
          latitude: "Latitude"
          longitude: "Longitude"
          language: "Language"
+       doorkeeper/application:
+         name: Name
+         redirect_uri: Redirect URIs
+         confidential: Confidential application?
+         scopes: Permissions
        friend:
          user: "User"
          friend: "Friend"
          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:
        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?"
        unknown token: "That confirmation code has expired or does not exist."
        reconfirm_html: "If you need us to resend the confirmation email, <a href=\"%{reconfirm}\">click here</a>."
      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.<br /><br />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
        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"
          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
        tagged_with: " tagged with %{tags}"
        empty_html: "Nothing here yet. <a href='%{upload_link}'>Upload a new trace</a> or learn more about GPS tracing on the <a href='https://wiki.openstreetmap.org/wiki/Beginners_Guide_1.2'>wiki page</a>."
        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:
        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"
        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"
        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 <a href=\"%{url}\">this wiki page</a>."
 -      terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined
      terms:
        title: "Terms"
        heading: "Terms"
          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"
        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
        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: