Browse files

1.9.x fix for ext-less gists

  • Loading branch information...
1 parent bd3a4c8 commit 77f428f2111ee4ff270b94874e30b74cf2a6887f @sorah sorah committed with Feb 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gist.rb
View
2 lib/gist.rb
@@ -137,7 +137,7 @@ def copy(content)
# an appropriate payload for POSTing to gist.github.com
def data(name, ext, content, private_gist)
return {
- 'file_ext[gistfile1]' => ext,
+ 'file_ext[gistfile1]' => ext ? ext : '.txt',
'file_name[gistfile1]' => name,
'file_contents[gistfile1]' => content
}.merge(private_gist ? { 'action_button' => 'private' } : {}).merge(auth)

0 comments on commit 77f428f

Please sign in to comment.