Skip to content

Commit edec639

Browse files
committed
refactor: fix rubocop offenses
1 parent d8e5118 commit edec639

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

lib/apollo-federation/enum.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def inaccessible
2121

2222
def policy(policies)
2323
add_directive(
24-
name: "policy",
24+
name: 'policy',
2525
arguments: [
2626
name: 'policies',
2727
values: policies,
28-
]
28+
],
2929
)
3030
end
3131
end

lib/apollo-federation/field.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ def add_v2_directives(shareable: nil, inaccessible: nil, override: nil, tags: []
8080

8181
if policy
8282
add_directive(
83-
name: "policy",
83+
name: 'policy',
8484
arguments: [
8585
name: 'policies',
86-
values: policy[:policies]
87-
]
86+
values: policy[:policies],
87+
],
8888
)
8989
end
9090

lib/apollo-federation/interface.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def tag(name:)
2828

2929
def policy(policies)
3030
add_directive(
31-
name: "policy",
31+
name: 'policy',
3232
arguments: [
3333
name: 'policies',
3434
values: policies,
35-
]
35+
],
3636
)
3737
end
3838

lib/apollo-federation/object.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def tag(name:)
3434

3535
def policy(policies)
3636
add_directive(
37-
name: "policy",
37+
name: 'policy',
3838
arguments: [
3939
name: 'policies',
4040
values: policies,
41-
]
41+
],
4242
)
4343
end
4444

lib/apollo-federation/scalar.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def inaccessible
2121

2222
def policy(policies)
2323
add_directive(
24-
name: "policy",
24+
name: 'policy',
2525
arguments: [
2626
name: 'policies',
2727
values: policies,
28-
]
28+
],
2929
)
3030
end
3131
end

spec/apollo-federation/service_field_v2_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def execute_sdl(schema)
295295
end
296296

297297
expect(execute_sdl(schema)).to match_sdl(
298-
<<~GRAPHQL,
298+
<<~GRAPHQL,
299299
extend schema
300300
@link(url: "https://specs.apollo.dev/federation/v2.6", import: ["@inaccessible", "@policy", "@tag"])
301301
@@ -308,7 +308,7 @@ def execute_sdl(schema)
308308
position: Position
309309
}
310310
GRAPHQL
311-
)
311+
)
312312
end
313313

314314
context 'with a custom link namespace provided' do
@@ -689,7 +689,7 @@ def execute_sdl(schema)
689689
end
690690

691691
expect(execute_sdl(schema)).to match_sdl(
692-
<<~GRAPHQL,
692+
<<~GRAPHQL,
693693
extend schema
694694
@link(url: "https://specs.apollo.dev/federation/v2.6", import: ["@inaccessible", "@policy", "@tag"])
695695
@@ -701,7 +701,7 @@ def execute_sdl(schema)
701701
upc: String!
702702
}
703703
GRAPHQL
704-
)
704+
)
705705
end
706706

707707
it 'returns valid SDL for interface types' do
@@ -909,7 +909,7 @@ def execute_sdl(schema)
909909
end
910910

911911
expect(execute_sdl(schema)).to match_sdl(
912-
<<~GRAPHQL,
912+
<<~GRAPHQL,
913913
extend schema
914914
@link(url: "https://specs.apollo.dev/federation/v2.6", import: ["@inaccessible", "@policy", "@tag"])
915915
@@ -918,7 +918,7 @@ def execute_sdl(schema)
918918
PEN
919919
}
920920
GRAPHQL
921-
)
921+
)
922922
end
923923

924924
it 'returns valid SDL for inaccessible enum types' do
@@ -1033,7 +1033,7 @@ def execute_sdl(schema)
10331033
end
10341034

10351035
expect(execute_sdl(schema)).to match_sdl(
1036-
<<~GRAPHQL,
1036+
<<~GRAPHQL,
10371037
extend schema
10381038
@link(url: "https://specs.apollo.dev/federation/v2.6", import: ["@inaccessible", "@policy", "@tag"])
10391039
@@ -1047,7 +1047,7 @@ def execute_sdl(schema)
10471047
10481048
scalar UPC @policy(policies: [["private"]])
10491049
GRAPHQL
1050-
)
1050+
)
10511051
end
10521052

10531053
it 'returns valid SDL for inaccessible scalar types' do
@@ -1591,7 +1591,7 @@ def execute_sdl(schema)
15911591
end
15921592

15931593
expect(execute_sdl(schema)).to match_sdl(
1594-
<<~GRAPHQL,
1594+
<<~GRAPHQL,
15951595
extend schema
15961596
@link(url: "https://specs.apollo.dev/federation/v2.6", import: ["@inaccessible", "@policy", "@tag"])
15971597
@@ -1600,7 +1600,7 @@ def execute_sdl(schema)
16001600
isStock: Boolean! @policy(policies: [["private"]])
16011601
}
16021602
GRAPHQL
1603-
)
1603+
)
16041604
end
16051605

16061606
it 'returns valid SDL for @interfaceObject directives' do

0 commit comments

Comments
 (0)