Skip to content

Commit

Permalink
Merge pull request #8 from epzilla/master
Browse files Browse the repository at this point in the history
Add Zoidberg your X is bad meme
  • Loading branch information
henrrrik committed Apr 21, 2016
2 parents cad19aa + 81bc194 commit f7ff7d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ end


* `Y U NO <text>` - Generates the Y U NO GUY with the bottom caption of <text>
* `I don't always <something> but when i do <text>` - Generates The Most Interesting man in the World
* `I don't always <something> but when i do <text>` - Generates The Most Interesting man in the World
* `<text> (SUCCESS|NAILED IT)` - Generates success kid with the top caption of <text>
* `<text> ALL the <things>` - Generates ALL THE THINGS
* `<text> TOO DAMN <high>` - Generates THE RENT IS TOO DAMN HIGH guy
Expand All @@ -59,6 +59,7 @@ end
* `<text> SHUT UP AND TAKE MY MONEY` - generates Shut Up and Take My Money Fry
* `YOU KNOW WHAT REALLY GRINDS MY GEARS? <text>` - "generates Peter Griffin News
* `"<text> CHALLENGE ACCEPTED"` - generates Challenge Accepted guy
* `"YOUR <text> IS BAD"` - generates Zoidberg Your x is bad and you should feel bad


## License
Expand Down
5 changes: 5 additions & 0 deletions lib/lita/handlers/imgflip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Imgflip < Handler
route %r{(.*) (SHUT UP AND TAKE MY MONEY)}i, :meme_take_my_money, help: { ".. SHUT UP AND TAKE MY MONEY" => "generates Shut Up and Take My Money Fry meme." }
route %r{(YOU KNOW WHAT REALLY GRINDS MY GEARS[?,]?) (.*)}i, :meme_grinds_my_gears, help: { "YOU KNOW WHAT REALLY GRINDS MY GEARS? .." => "generates Peter Griffin News meme." }
route %r{(.*) (CHALLENGE ACCEPTED)}i, :meme_challenge_accepted, help: { ".. CHALLENGE ACCEPTED" => "generated Challenge Accepted face meme." }
route %r{(YOUR\b.*)\b(IS BAD)(.*)}i, :meme_zoidberg_feel_bad, help: { "YOUR.. IS BAD AND YOU SHOULD FEEL BAD" => "generates Zoidberg Your .. is bad and you should feel bad meme" }

def meme_y_u_no(response)
generate_meme(response, 61527)
Expand Down Expand Up @@ -148,6 +149,10 @@ def meme_challenge_accepted(response)
generate_meme(response, 24792)
end

def meme_zoidberg_feel_bad(response)
generate_meme(response, 35747)
end

private

def khanify(phrase)
Expand Down
1 change: 1 addition & 0 deletions spec/lita/handlers/imgflip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
it { is_expected.to route_command("blah i too like to live dangerously").to(:meme_live_dangerously) }
it { is_expected.to route_command("blah shut up and take my money!").to(:meme_take_my_money) }
it { is_expected.to route_command("you know what really grinds my gears? blah").to(:meme_grinds_my_gears) }
it { is_expected.to route_command("your blah is bad").to(:meme_zoidberg_feel_bad) }

it "sets the username and password to nil by default" do
expect(Lita.config.handlers.imgflip.username).to be_nil
Expand Down

0 comments on commit f7ff7d9

Please sign in to comment.