Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from ninoseki/fix-ruby2.7-warnings
Browse files Browse the repository at this point in the history
fix: fix Ruby 2.7 warnings
  • Loading branch information
ninoseki committed Jul 18, 2020
2 parents e0d5235 + fe849d8 commit 1b2739d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/hachi/clients/artifact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def delete_by_id(id)
#
# @return [Array]
#
def search(attributes, range: "all")
def search( range: "all", **attributes)
_search("/api/case/artifact/_search", attributes: attributes, range: range) { |json| json }
end

Expand Down
2 changes: 1 addition & 1 deletion lib/hachi/clients/case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create(title:, description:, severity: nil, start_date: nil, owner: nil, fla
#
# @return [Hash]
#
def search(attributes, range: "all")
def search(range: "all", **attributes)
_search("/api/case/_search", attributes: attributes, range: range) { |json| json }
end

Expand Down
2 changes: 1 addition & 1 deletion lib/hachi/models/alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(title:, description:, severity: nil, date: nil, tags: nil, tlp: n
@type = type
@source = source
@source_ref = source_ref || SecureRandom.hex(10)
@artifacts = artifacts.nil? ? nil : artifacts.map { |a| Artifact.new a }
@artifacts = artifacts.nil? ? nil : artifacts.map { |a| Artifact.new(**a) }
@follow = follow

validate_date if date
Expand Down
2 changes: 1 addition & 1 deletion spec/clients/alert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
let(:attributes) { { title: "Updated", description: "Updated" } }

it do
res = api.alert.update(id_to_update, attributes)
res = api.alert.update(id_to_update, **attributes)
expect(res).to be_a(Hash)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/clients/case_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}

it do
res = api.case.update(id_to_update, attributes)
res = api.case.update(id_to_update, **attributes)
expect(res).to be_a(Hash)
end
end
Expand Down

0 comments on commit 1b2739d

Please sign in to comment.