Class: Gitpaint::GithubClient
- Inherits:
-
Object
- Object
- Gitpaint::GithubClient
- Includes:
- Singleton
- Defined in:
- lib/gitpaint/github_client.rb
Class Method Summary collapse
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize ⇒ GithubClient
constructor
A new instance of GithubClient.
Constructor Details
#initialize ⇒ GithubClient
Returns a new instance of GithubClient.
5 6 7 |
# File 'lib/gitpaint/github_client.rb', line 5 def initialize @client = Octokit::Client.new access_token: Config.instance.config.token end |
Class Method Details
.custom_ssh_script(dir) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/gitpaint/github_client.rb', line 13 def self.custom_ssh_script dir File.open "#{dir}/custom.sh", 'w' do |f| f.write "#!/bin/sh\n" f.write 'ssh -i "%s" "$@"' % config.ssh_key end FileUtils.chmod '+x', "#{dir}/custom.sh" end |
Instance Method Details
#client ⇒ Object
9 10 11 |
# File 'lib/gitpaint/github_client.rb', line 9 def client @client end |