diff --git a/Gemfile b/Gemfile index 03df0334787..c3c6e63892a 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem "uglifier", :git => "https://github.com/lautis/uglifier.git" group :development do gem "rack" gem "rest-client" - gem "github_api", "0.4.11" + gem "github_api" gem "ember-docs", :git => "https://github.com/emberjs/docs-generator.git" gem "kicker" end diff --git a/Gemfile.lock b/Gemfile.lock index 7acad33a36d..9de13de359f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,30 +33,30 @@ GIT GEM remote: http://rubygems.org/ specs: - addressable (2.2.8) colored (1.2) execjs (1.4.0) multi_json (~> 1.0) - faraday (0.7.6) - addressable (~> 2.2) + faraday (0.8.1) multipart-post (~> 1.1) - rack (~> 1.1) - github_api (0.4.11) - faraday (~> 0.7.6) + github_api (0.5.4) + faraday (~> 0.8.0) hashie (~> 1.2.0) multi_json (~> 1.3) nokogiri (~> 1.5.2) - oauth2 (~> 0.5.2) + oauth2 (~> 0.7) hashie (1.2.0) + httpauth (0.1) kicker (2.5.0) rb-fsevent mime-types (1.18) multi_json (1.3.6) multipart-post (1.1.5) nokogiri (1.5.3) - oauth2 (0.5.2) - faraday (~> 0.7) + oauth2 (0.7.1) + faraday (~> 0.8) + httpauth (~> 0.1) multi_json (~> 1.0) + rack (~> 1.4) rack (1.4.1) rake (0.9.2.2) rb-fsevent (0.9.1) @@ -70,7 +70,7 @@ PLATFORMS DEPENDENCIES colored ember-docs! - github_api (= 0.4.11) + github_api kicker rack rake-pipeline! diff --git a/lib/github_uploader.rb b/lib/github_uploader.rb index 9de01e8f8f2..bf8b9341981 100644 --- a/lib/github_uploader.rb +++ b/lib/github_uploader.rb @@ -64,21 +64,21 @@ def upload_file(filename, description, file) gh = Github.new :user => @username, :repo => @repo, :oauth_token => @token # remvove previous download with the same name - gh.repos.downloads do |download| + gh.repos.downloads.list @username, @repo do |download| if filename == download.name - gh.repos.delete_download @username, @repo, download.id + gh.repos.downloads.delete @username, @repo, download.id break end end # step 1 - hash = gh.repos.create_download @username, @repo, + hash = gh.repos.downloads.create @username, @repo, "name" => filename, "size" => File.size(file), "description" => description # step 2 - gh.repos.upload hash, file + gh.repos.downloads.upload hash, file return true end