Class: Bard::CLI::CI::GithubActions::Client

Inherits:
Struct
  • Object
show all
Defined in:
lib/bard/ci/github_actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



121
122
123
# File 'lib/bard/ci/github_actions.rb', line 121

def project_name
  @project_name
end

Instance Method Details

#get(path, params = {}) ⇒ Object



122
123
124
125
126
127
# File 'lib/bard/ci/github_actions.rb', line 122

def get path, params={}
  request(path) do |uri|
    uri.query = URI.encode_www_form(params)
    Net::HTTP::Get.new(uri)
  end
end

#post(path, params = {}) ⇒ Object



129
130
131
132
133
134
135
# File 'lib/bard/ci/github_actions.rb', line 129

def post path, params={}
  request(path) do |uri|
    Net::HTTP::Post.new(uri).tap do |r|
      r.body = JSON.dump(params)
    end
  end
end