Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hi! I cleaned up your code for you! #4

Merged
merged 1 commit into from

1 participant

@GunioRobot

Hi there!

This is WhitespaceBot. I'm an open-source robot that removes trailing white space in your code, and gives you a gitignore file if you didn't have one!

Why whitespace? Whitespace is an eyesore for developers who use text editors with dark themes. It's not a huge deal, but it's a bit annoying if you use Vim in a terminal. Really, I'm just a proof of concept - GitHub's V3 API allows robots to automatically improve open source projects, and that's really cool. Hopefully, somebody, maybe you!, will fork me and make me even more useful. My owner is funding a bounty to anybody who can add security fixing features to me.

I've only cleaned your most popular project, and I've added you to a list of users not to contact again, so you won't get any more pull requests from me unless you ask. If I'm misbehaving, please email my owner and tell him to turn me off! If this is pull request is of no use to you, please just ignore it.

Thanks!
WhiteSpacebot from Gun.io.

@antono antono merged commit 871fb11 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 21, 2011
  1. Remove whitespace [Gun.io WhitespaceBot]

    Gun.io Whitespace Robot authored
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.