Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove whitespace [Gun.io WhitespaceBot]

  • Loading branch information...
commit a2b7dcd952159bc3be6974ec482c5027b8daf08a 1 parent 1933f84
Gun.io Whitespace Robot authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/pastie.rb
View
14 lib/pastie.rb
@@ -26,13 +26,13 @@ def self.menus
end
end
end
- end
+ end
class PasteSelection < EditTabCommand
- def execute
+ def execute
text = doc.selection? ? doc.selected_text : doc.to_s
- resp = paste_text(text)
-
+ resp = paste_text(text)
+
# Copy url to clipboard or show message
if(storage['auto_copy_to_clipboard'] && resp)
Redcar.app.clipboard << resp
@@ -50,11 +50,11 @@ def storage
@storage.set_default('auto_copy_to_clipboard', 'true')
@storage
end
-
+
def paste_text(text)
uri = URI.parse('http://gist.github.com/api/v1/xml/new')
req = Net::HTTP::Post.new(uri.path)
-
+
# In case of auth fail just post as anonymous
req.basic_auth(storage['login'] + '/token', storage['token'])
req.set_form_data({ "files[#{tab.title}]" => text })
@@ -66,7 +66,7 @@ def paste_text(text)
end
end
end
-
+
class SelectService < Redcar::Command
def execute
Please sign in to comment.
Something went wrong with that request. Please try again.