lib/hackerone/client/report.rb in hackerone-client-0.15.0 vs lib/hackerone/client/report.rb in hackerone-client-0.16.0

- old
+ new

@@ -1,9 +1,11 @@ -require_relative './resource_helper' -require_relative './weakness' -require_relative './activity' +# frozen_string_literal: true +require_relative "./resource_helper" +require_relative "./weakness" +require_relative "./activity" + module HackerOne module Client class Report include ResourceHelper @@ -116,11 +118,11 @@ weakness.to_owasp end # Bounty writeups just use the key, and not the label value. def writeup_classification - classification_label().split("-").first + classification_label.split("-").first end def activities if ships = relationships.fetch(:activities, {}).fetch(:data, []) ships.map do |activity_data| @@ -302,10 +304,10 @@ type: assignee_type, } request_body[:id] = assignee_id if assignee_id response = HackerOne::Client::Api.hackerone_api_connection.put do |req| - req.headers['Content-Type'] = 'application/json' + req.headers["Content-Type"] = "application/json" req.url "reports/#{id}/assignee" req.body = { data: request_body }.to_json end unless response.success? fail("Unable to assign report #{id} to #{assignee_type} with id '#{assignee_id}'. Response status: #{response.status}, body: #{response.body}")