Permalink
Browse files

upgrades version of ocotokit

  • Loading branch information...
1 parent 5e6baf9 commit 8273c5bafe26bad7fb32afc2b6669df9ebc5a672 @awilliams committed Jan 20, 2014
Showing with 12 additions and 6 deletions.
  1. +11 −5 bin/rtanque
  2. +1 −1 rtanque.gemspec
View
16 bin/rtanque
@@ -96,10 +96,16 @@ LONGDESC
end
def download_gist(gist_id, options)
- gist = Octokit.gist(gist_id)
- gist.files.values.map do |gist_file|
- gist_path = "#{BOT_DIR}/#{gist.user.login}.#{gist_id}/#{gist_file.filename}"
- create_file(gist_path, gist_file.content, options)
+ client = Octokit::Client.new
+ begin
+ gist = client.gist(gist_id)
+ rescue Octokit::NotFound
+ puts set_color("Error! Gist #{gist_id} not found. Please ensure the gist id is correct.", :red)
+ else
+ gist.files.attrs.each do |name, gist_file|
+ gist_path = "#{BOT_DIR}/#{gist.user.login}.#{gist_id}/#{name}"
+ create_file(gist_path, gist_file.content, options)
+ end
end
end
@@ -108,4 +114,4 @@ LONGDESC
end
end
-RTanqueCLI.start
+RTanqueCLI.start
View
2 rtanque.gemspec
@@ -24,7 +24,7 @@ Have fun competing against friends' tanks or the sample ones included. Maybe you
gem.add_dependency 'gosu', '~> 0.7.45'
gem.add_dependency 'configuration', '~> 1.3.2'
- gem.add_dependency 'octokit', '~> 1.23.0'
+ gem.add_dependency 'octokit', '~> 2.7.0'
gem.add_dependency 'thor', '~> 0.17.0'
gem.add_dependency 'texplay'

0 comments on commit 8273c5b

Please sign in to comment.