DEV: Make Rubocop happy

DEV: Make Rubocop happy

I’m not sure why these things weren’t picked up by CI earlier.

diff --git a/lib/discourse_code_review/github_pr_service.rb b/lib/discourse_code_review/github_pr_service.rb
index 45bc26c..db66d9b 100644
--- a/lib/discourse_code_review/github_pr_service.rb
+++ b/lib/discourse_code_review/github_pr_service.rb
@@ -128,7 +128,7 @@ module DiscourseCodeReview
         )
 
         Enumerators::FlattenMerge
-          .new(enumerables) {|a, b|
+          .new(enumerables) { |a, b|
             a[0].created_at < b[0].created_at
           }
           .each(&blk)
diff --git a/lib/typed_data.rb b/lib/typed_data.rb
index 4bbfabe..86fce39 100644
--- a/lib/typed_data.rb
+++ b/lib/typed_data.rb
@@ -2,7 +2,7 @@
 
 module TypedData
   module TypedStruct
-    def self.new(base=Object, **attributes, &blk)
+    def self.new(base = Object, **attributes, &blk)
       ordered_attribute_keys = attributes.keys.sort
 
       Class.new(base) do
diff --git a/spec/discourse_code_review/lib/github_pr_service_spec.rb b/spec/discourse_code_review/lib/github_pr_service_spec.rb
index bcd234e..8a797c6 100644
--- a/spec/discourse_code_review/lib/github_pr_service_spec.rb
+++ b/spec/discourse_code_review/lib/github_pr_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 class MockPRQuerier
diff --git a/spec/discourse_code_review/lib/github_pr_syncer_spec.rb b/spec/discourse_code_review/lib/github_pr_syncer_spec.rb
index b42adaf..9f36532 100644
--- a/spec/discourse_code_review/lib/github_pr_syncer_spec.rb
+++ b/spec/discourse_code_review/lib/github_pr_syncer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 class MockGithubPRService
diff --git a/spec/lib/enumerators_spec.rb b/spec/lib/enumerators_spec.rb
index 9636c86..e47aac0 100644
--- a/spec/lib/enumerators_spec.rb
+++ b/spec/lib/enumerators_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 describe Enumerators::FlattenMerge do
@@ -7,7 +9,7 @@ describe Enumerators::FlattenMerge do
         .new([
           [0],
           [1],
-        ]) {|a, b| a < b }
+        ]) { |a, b| a < b }
         .to_a
 
     expect(result).to eq([0, 1])
@@ -18,7 +20,7 @@ describe Enumerators::FlattenMerge do
       Enumerators::FlattenMerge
         .new([
           [0, 1],
-        ]) {|a, b| a < b }
+        ]) { |a, b| a < b }
         .to_a
 
     expect(result).to eq([0, 1])
@@ -32,7 +34,7 @@ describe Enumerators::FlattenMerge do
           [0, 2, 4],
           [1, 3, 5],
           []
-        ]) {|a, b| a < b }
+        ]) { |a, b| a < b }
         .to_a
 
     expect(result).to eq([0, 1, 2, 3, 4, 5, 6])

GitHub sha: 277a589d

2 Likes