File: github_client.rb

package info (click to toggle)
ruby-graphlient 0.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,648 kB
  • sloc: ruby: 1,288; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
RSpec.shared_context 'Github Client', shared_context: :metadata do
  let(:endpoint) { 'https://api.github.com/graphql' }

  let(:headers) do
    {
      'Authorization' => "Bearer #{ENV['GITHUB_ACCESS_TOKEN']}",
      'Content-Type' => 'application/json'
    }
  end

  let(:client) do
    Graphlient::Client.new(
      endpoint,
      headers: headers,
      schema_path: File.expand_path("#{__dir__}/../schema/github.json")
    )
  end
end