Skip to content

Commit

Permalink
lint: Fix rubocop offense
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Apr 2, 2024
1 parent 2b4568a commit 1560bdb
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 33 deletions.
2 changes: 2 additions & 0 deletions lib/grist/client.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "grist/http"
require "grist/endpoint"

Expand Down
2 changes: 2 additions & 0 deletions lib/grist/endpoint.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "grist/endpoint/organization"
require "grist/endpoint/workspace"

Expand Down
2 changes: 2 additions & 0 deletions lib/grist/endpoint/organization.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Grist
module Endpoint
module Organization
Expand Down
2 changes: 2 additions & 0 deletions lib/grist/endpoint/workspace.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Grist
module Endpoint
module Workspace
Expand Down
2 changes: 2 additions & 0 deletions lib/grist/http.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Grist
module HTTP
def get(path, **_params)
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/grist/client_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"

RSpec.describe Grist::Client do
Expand Down
54 changes: 28 additions & 26 deletions spec/lib/grist/endpoint/organization_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"

RSpec.describe Grist::Endpoint::Organization do
Expand All @@ -20,20 +22,20 @@

it "returns the response" do
expect(subject.organizations).to eq([
{
"id" => 42,
"name" => "Grist Labs",
"domain" => "gristlabs",
"owner" => {
"id" => 101,
"name" => "Helga Hufflepuff",
"picture" => "null"
},
"access" => "owners",
"createdAt" => "2019-09-13T15:42:35.000Z",
"updatedAt" => "2019-09-13T15:42:35.000Z"
}
])
{
"id" => 42,
"name" => "Grist Labs",
"domain" => "gristlabs",
"owner" => {
"id" => 101,
"name" => "Helga Hufflepuff",
"picture" => "null"
},
"access" => "owners",
"createdAt" => "2019-09-13T15:42:35.000Z",
"updatedAt" => "2019-09-13T15:42:35.000Z"
}
])
end
end
end
Expand All @@ -55,18 +57,18 @@

it "returns the response" do
expect(subject.organization(id)).to eq({
"id" => 42,
"name" => "Grist Labs",
"domain" => "gristlabs",
"owner" => {
"id" => 101,
"name" => "Helga Hufflepuff",
"picture" => "null"
},
"access" => "owners",
"createdAt" => "2019-09-13T15:42:35.000Z",
"updatedAt" => "2019-09-13T15:42:35.000Z"
})
"id" => 42,
"name" => "Grist Labs",
"domain" => "gristlabs",
"owner" => {
"id" => 101,
"name" => "Helga Hufflepuff",
"picture" => "null"
},
"access" => "owners",
"createdAt" => "2019-09-13T15:42:35.000Z",
"updatedAt" => "2019-09-13T15:42:35.000Z"
})
end
end
end
Expand Down
15 changes: 8 additions & 7 deletions spec/lib/grist/endpoint/workspace_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"

RSpec.describe Grist::Endpoint::Workspace do
Expand Down Expand Up @@ -51,14 +53,13 @@
describe "#manage_workspace_access" do
let(:id) { 42 }
let(:body) do
{"delta" => {
"users" => [
"[email protected]" => "owner",
{ "delta" => {
"users" => [
"[email protected]" => "owner",

"[email protected]" => "viewer"
]
}
}
"[email protected]" => "viewer"
]
} }
end

it "calls the patch method with the correct path" do
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/grist/http_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"

RSpec.describe Grist::HTTP do
Expand Down

0 comments on commit 1560bdb

Please sign in to comment.