module RoboPigeon::Jira class Client @enabled = true @api_key = ENV['JIRA_TOKEN'] class << self attr_accessor :api_key, :api_url, :enabled, :last_created_ticket def jira_request Faraday.new(url: RoboPigeon::Jira::Client.api_url) do |faraday| faraday.adapter Faraday.default_adapter faraday.headers['Content-Type'] = 'application/json' faraday.headers['Authorization'] = 'Basic ' + RoboPigeon::Jira::Client.api_key end end end end end