Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Support no_proxy environment variable #14

Merged
merged 1 commit into from
Apr 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk add --update \
openssh-client \
ruby-json \
ca-certificates
RUN gem install octokit --no-rdoc --no-ri
RUN gem install octokit httpclient --no-rdoc --no-ri

ADD assets/ /opt/resource/
RUN chmod +x /opt/resource/*
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
source 'https://rubygems.org'

gem 'octokit'
gem 'httpclient'

group :development do
gem 'pry'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ GEM
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
http_parser.rb (0.6.0)
httpclient (2.8.0)
method_source (0.8.2)
multi_json (1.11.2)
multipart-post (2.0.0)
Expand Down Expand Up @@ -73,6 +74,7 @@ PLATFORMS
ruby

DEPENDENCIES
httpclient
octokit
pry
puffing-billy
Expand Down
2 changes: 1 addition & 1 deletion assets/lib/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

require 'rubygems'
require 'json'
require 'octokit'
require_relative 'common'
require 'octokit'

repo = Repository.new(name: input['source']['repo'])

Expand Down
6 changes: 6 additions & 0 deletions assets/lib/common.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# encoding: utf-8

require 'faraday'
# httpclient and excon are the only Faraday adpater which support
# the no_proxy environment variable atm
::Faraday.default_adapter= :httpclient

require 'octokit'
require 'fileutils'

Expand Down
2 changes: 1 addition & 1 deletion assets/lib/in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

require 'rubygems'
require 'json'
require_relative 'common'
require 'octokit'
require 'English'
require_relative 'common'

def uri
input['source']['uri'] || "https://github.com/#{input['source']['repo']}"
Expand Down
2 changes: 1 addition & 1 deletion assets/lib/out.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

require 'rubygems'
require 'json'
require 'octokit'
require_relative 'common'
require 'octokit'

raise %(`status` "#{input['params']['status']}" is not supported -- only success, failure, error, or pending) unless %w(success failure error pending).include?(input['params']['status'])
raise '`path` required in `params`' unless input['params'].key?('path')
Expand Down