lita-imgflip 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1834ecefdef1725c937d312ae3a6f594bcb1c71
4
- data.tar.gz: eeb2d3cf95297326c406e8b924193aecf6afee8f
3
+ metadata.gz: 280829d7d9153c1f4baf8cecb2ffbfb02aa95d2c
4
+ data.tar.gz: 239bda7511ed9b6a1b8c2055ce17df5ffb4faf51
5
5
  SHA512:
6
- metadata.gz: 791b432678f8dbe4744bca7e45a7eaad001d715abb2047edfa16e694849b61618d7b631ebd96619f22bf902ccfb03d5857dc3ecf03dec38ceb4b87fb63ea7d91
7
- data.tar.gz: 8067cf49e040f5745c71e56cf3fad092b074a7279d30c16fbcc1e0547ce95104883890f3368e951b98b8a202a95baaa3dc832c9c1aff8387c5b24331d9270801
6
+ metadata.gz: 57104b3efb832ef8e552828c2f102e43d4e859e8066b1e773123298fd21c402ddd28d5c2c787d8d571df2db813519bbd7d2712b2667832c123f827dae1fd895f
7
+ data.tar.gz: a653086f759e7784da4ad63cbf8aeb1b8a139f75fadab57a3f31e1e7ab2169915e6fcdd8b8ba7b9ff212f74bfb932aa90d10d8f73efcdf813483a5e545fa2117
data/README.md CHANGED
@@ -58,6 +58,7 @@ end
58
58
  * `<text> I TOO LIKE TO LIVE DANGEROUSLY` - generates I Too Like to Live Dangerously
59
59
  * `<text> SHUT UP AND TAKE MY MONEY` - generates Shut Up and Take My Money Fry
60
60
  * `YOU KNOW WHAT REALLY GRINDS MY GEARS? <text>` - "generates Peter Griffin News
61
+ * `"<text> CHALLENGE ACCEPTED"` - generates Challenge Accepted guy
61
62
 
62
63
 
63
64
  ## License
@@ -4,40 +4,37 @@ module Lita
4
4
  module Handlers
5
5
  class Imgflip < Handler
6
6
 
7
- def self.default_config(config)
8
- config.command_only = true
9
- config.username = nil
10
- config.password = nil
11
- end
12
-
13
- route %r{(Y U NO) (.+)}i, :meme_y_u_no, help: { "Y U NO..." => "generates Y U NO meme"}
14
- route %r{(I DON'?T ALWAYS .*) (BUT WHEN I DO,? .*)}i, :meme_i_dont_always, help: { "I DON'T ALWAYS .. BUT WHEN I DO, .." => "generates The Most Interesting Man in the World meme"}
15
- route %r{(.*)(O\s?RLY\??.*)}i, :meme_orly, help: { "..O RLY.." => "generates O RLY meme" }
16
- route %r{(.*)(SUCCESS|NAILED IT.*)}, :meme_success, help: { "..SUCCESS.." => "(case sensitive) generates SUCCESS meme", "..NAILED IT.." => "generates NAILED IT meme" }
17
- route %r{(.*) (ALL the .*)}, :meme_all_the, help: { "ALL the.." => "(case sensitive) generates ALL the <things> meme" }
18
- route %r{(.*) (\w+\sTOO DAMN .*)}i, :meme_too_damn, help: { "TOO DAMN.." => "generates TOO DAMN meme" }
19
- route %r{(GOOD NEWS EVERYONE[,.!]?) (.*)}i, :meme_good_news, help: { "GOOD NEWS EVERYONE.." => "generates GOOD NEWS EVERYONE meme" }
20
- route %r{(NOT SURE IF .*) (OR .*)}i, :meme_not_sure_if, help: { "NOT SURE IF.. OR.." => "generates NOT SURE IF .. OR meme" }
21
- route %r{(YO DAWG .*) (SO .*)}i, :meme_yo_dawg, help: { "YO DAWG.." => "generates YO DAWG meme" }
22
- route %r{(ALL YOUR .*) (ARE BELONG TO US)}i, :meme_are_belong, help: { "ALL YOUR.. ARE BELONG TO US" => "generates ALL YOUR.. ARE BELONG TO US meme" }
23
- route %r{(.*) (You'?re gonna have a bad time)}i, :meme_bad_time, help: { ".. You're going have a bad time" => "generates You're gonna have a bad time meme" }
24
- route %r{(one does not simply) (.*)}i, :meme_simply, help: { "one does not simply.." => "generates one does not simply.. meme" }
25
- route %r{(grumpy cat) (.*),(.*)}i, :meme_grumpy_cat, help: { "grumpy cat .. , .." => "generates grumpy cat .. , .. meme" }
26
- route %r{(it looks like you're|it looks like you) (.*)}i, :meme_looks_like, help: { "it looks like you're .." => "generates it looks like you're .. meme", "it looks like you.." => "(case insensitive) generates it looks like you.. meme" }
27
- route %r{(AM I THE ONLY ONE AROUND HERE) (.*)}i, :meme_am_i_only, help: { "AM I THE ONLY ONE AROUND HERE.." => "generates AM I THE ONLY ONE AROUND HERE.. meme" }
28
- route %r{(.*)(NOT IMPRESSED*)}i, :meme_not_impressed, help: { "..NOT IMPRESSED" => "generates ..NOT IMPRESSED meme" }
29
- route %r{(PREPARE YOURSELF) (.*)}i, :meme_prepare_yourself, help: { "PREPARE YOURSELF.." => "generates PREPARE YOURSELF.. meme" }
30
- route %r{(WHAT IF I TOLD YOU) (.*)}i, :meme_what_if_i, help: { "WHAT IF I TOLD YOU.." => "generates WHAT IF I TOLD YOU.. meme" }
31
- route %r{(.*) (BETTER DRINK MY OWN PISS)}i, :meme_better_drink, help: { "..BETTER DRINK MY OWN PISS" => "generates ..BETTER DRINK MY OWN PISS meme" }
32
- route %r{^khanify (.*)}i, :meme_khanify, help: { "khanify ..." => "generates khan meme" }
33
- route %r{(.*,) (.* EVERYWHERE)}i, :meme_everywhere, help: { ".., .. EVERYWHERE" => "generates X, X everywhere meme" }
34
- route %r{(.*) (THAT WOULD BE GREAT)}i, :meme_would_be_great, help: { ".. THAT WOULD BE GREAT" => "generates Bill Lumbergh meme" }
35
- route %r{(.*) (AIN'?T NOBODY GOT TIME FOR THAT)}i, :meme_time_for_that, help: { ".. AIN'T NOBODY GOT TIME FOR THAT" => "generates Sweet Brown meme." }
36
- route %r{(.*) (I TOO LIKE TO LIVE DANGEROUSLY)}i, :meme_live_dangerously, help: { ".. I TOO LIKE TO LIVE DANGEROUSLY" => "generates I Too Like to Live Dangerously meme." }
37
- 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." }
38
- 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." }
39
-
40
-
7
+ config :command_only, default: true
8
+ config :username, default: nil
9
+ config :password, default: nil
10
+
11
+ route %r{(Y U NO) (.+)}i, :meme_y_u_no, help: { "Y U NO..." => "generates Y U NO meme"}
12
+ route %r{(I DON'?T ALWAYS .*) (BUT WHEN I DO,? .*)}i, :meme_i_dont_always, help: { "I DON'T ALWAYS .. BUT WHEN I DO, .." => "generates The Most Interesting Man in the World meme"}
13
+ route %r{(.*) (O\s?RLY\??.*)}i, :meme_orly, help: { "..O RLY.." => "generates O RLY meme" }
14
+ route %r{(.*)(SUCCESS|NAILED IT.*)}, :meme_success, help: { "..SUCCESS.." => "(case sensitive) generates SUCCESS meme", "..NAILED IT.." => "generates NAILED IT meme" }
15
+ route %r{(.*) (ALL the .*)} , :meme_all_the, help: { "ALL the.." => "(case sensitive) generates ALL the <things> meme" }
16
+ route %r{(.*) (\w+\sTOO DAMN .*)}i, :meme_too_damn, help: { "TOO DAMN.." => "generates TOO DAMN meme" }
17
+ route %r{(GOOD NEWS EVERYONE[,.!]?) (.*)}i, :meme_good_news, help: { "GOOD NEWS EVERYONE.." => "generates GOOD NEWS EVERYONE meme" }
18
+ route %r{(NOT SURE IF .*) (OR .*)}i, :meme_not_sure_if, help: { "NOT SURE IF.. OR.." => "generates NOT SURE IF .. OR meme" }
19
+ route %r{(YO DAWG .*) (SO .*)}i, :meme_yo_dawg, help: { "YO DAWG.." => "generates YO DAWG meme" }
20
+ route %r{(ALL YOUR .*) (ARE BELONG TO US)}i, :meme_are_belong, help: { "ALL YOUR.. ARE BELONG TO US" => "generates ALL YOUR.. ARE BELONG TO US meme" }
21
+ route %r{(.*) (You'?re gonna have a bad time)}i, :meme_bad_time, help: { ".. You're gonna have a bad time" => "generates You're gonna have a bad time meme" }
22
+ route %r{(one does not simply) (.*)}i, :meme_simply, help: { "one does not simply.." => "generates one does not simply.. meme" }
23
+ route %r{(grumpy cat) (.*),(.*)}i, :meme_grumpy_cat, help: { "grumpy cat .. , .." => "generates grumpy cat .. , .. meme" }
24
+ route %r{(it looks like you're|it looks like you) (.*)}i, :meme_looks_like, help: { "it looks like you're .." => "generates it looks like you're .. meme", "it looks like you.." => "(case insensitive) generates it looks like you.. meme" }
25
+ route %r{(AM I THE ONLY ONE AROUND HERE) (.*)}i, :meme_am_i_only, help: { "AM I THE ONLY ONE AROUND HERE.." => "generates AM I THE ONLY ONE AROUND HERE.. meme" }
26
+ route %r{(.*)(NOT IMPRESSED*)}i, :meme_not_impressed, help: { "..NOT IMPRESSED" => "generates ..NOT IMPRESSED meme" }
27
+ route %r{(PREPARE YOURSELF) (.*)}i, :meme_prepare_yourself, help: { "PREPARE YOURSELF.." => "generates PREPARE YOURSELF.. meme" }
28
+ route %r{(WHAT IF I TOLD YOU) (.*)}i, :meme_what_if_i, help: { "WHAT IF I TOLD YOU.." => "generates WHAT IF I TOLD YOU.. meme" }
29
+ route %r{(.*) (BETTER DRINK MY OWN PISS)}i, :meme_better_drink, help: { "..BETTER DRINK MY OWN PISS" => "generates ..BETTER DRINK MY OWN PISS meme" }
30
+ route %r{^khanify (.*)}i, :meme_khanify, help: { "khanify ..." => "generates khan meme" }
31
+ route %r{(.*,) (.* EVERYWHERE)}i, :meme_everywhere, help: { ".., .. EVERYWHERE" => "generates X, X everywhere meme" }
32
+ route %r{(.*) (THAT WOULD BE GREAT)}i, :meme_would_be_great, help: { ".. THAT WOULD BE GREAT" => "generates Bill Lumbergh meme" }
33
+ route %r{(.*) (AIN'?T NOBODY GOT TIME FOR THAT)}i, :meme_time_for_that, help: { ".. AIN'T NOBODY GOT TIME FOR THAT" => "generates Sweet Brown meme." }
34
+ route %r{(.*) (I TOO LIKE TO LIVE DANGEROUSLY)}i, :meme_live_dangerously, help: { ".. I TOO LIKE TO LIVE DANGEROUSLY" => "generates I Too Like to Live Dangerously meme." }
35
+ 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." }
36
+ 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." }
37
+ route %r{(.*) (CHALLENGE ACCEPTED)}i, :meme_challenge_accepted, help: { ".. CHALLENGE ACCEPTED" => "generated Challenge Accepted face meme." }
41
38
 
42
39
  def meme_y_u_no(response)
43
40
  generate_meme(response, 61527)
@@ -147,12 +144,16 @@ module Lita
147
144
  generate_meme(response, 12361203)
148
145
  end
149
146
 
147
+ def meme_challenge_accepted(response)
148
+ generate_meme(response, 24792)
149
+ end
150
+
150
151
  private
151
152
 
152
153
  def khanify(phrase)
153
154
  shouty_phrase = phrase.upcase
154
155
  last_vowel_index = shouty_phrase.rindex(/[AEIOU]/) || -1 # default to final consonant
155
- last_vowel = shouty_phrase[last_vowel_index]
156
+ last_vowel = shouty_phrase[last_vowel_index]
156
157
  "#{shouty_phrase[0..last_vowel_index]}#{10.times.map{ last_vowel }.join}#{shouty_phrase[last_vowel_index..-1]}!!!!"
157
158
  end
158
159
 
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-imgflip"
3
- spec.version = "1.1.0"
3
+ spec.version = "1.1.1"
4
4
  spec.authors = ["Henrik Sjökvist"]
5
5
  spec.email = ["henrik.sjokvist@gmail.com"]
6
6
  spec.description = %q{A Lita handler for generating meme images using imgflip.com.}
7
- spec.summary = %q{A Lita handler for generating meme images using imgflip.com.}
7
+ spec.summary = spec.description
8
8
  spec.homepage = "https://github.com/henrrrik/lita-imgflip"
9
9
  spec.license = "MIT"
10
10
 
@@ -15,9 +15,9 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.add_runtime_dependency "lita", "~> 4.0"
17
17
 
18
- spec.add_development_dependency "bundler", "~> 1.3"
19
- spec.add_development_dependency "rake"
20
- spec.add_development_dependency "rspec", ">= 3.0.0.beta1"
21
- spec.add_development_dependency "simplecov"
22
- spec.add_development_dependency "coveralls"
18
+ spec.add_development_dependency "bundler", "~> 1.11"
19
+ spec.add_development_dependency "rake", "~> 11.1", ">= 11.1.2"
20
+ spec.add_development_dependency "rspec", "~> 3.4", ">= 3.4.0"
21
+ spec.add_development_dependency "simplecov", "~> 0.11", ">= 0.11.2"
22
+ spec.add_development_dependency "coveralls", "~> 0.8", ">= 0.8.13"
23
23
  end
@@ -1,6 +1,6 @@
1
1
  require "simplecov"
2
2
  require "coveralls"
3
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
3
+ SimpleCov.formatters = [
4
4
  SimpleCov::Formatter::HTMLFormatter,
5
5
  Coveralls::SimpleCov::Formatter
6
6
  ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-imgflip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Sjökvist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-11 00:00:00.000000000 Z
11
+ date: 2016-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -30,70 +30,94 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.3'
33
+ version: '1.11'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.3'
40
+ version: '1.11'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '11.1'
45
48
  - - ">="
46
49
  - !ruby/object:Gem::Version
47
- version: '0'
50
+ version: 11.1.2
48
51
  type: :development
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '11.1'
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '0'
60
+ version: 11.1.2
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rspec
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.4'
59
68
  - - ">="
60
69
  - !ruby/object:Gem::Version
61
- version: 3.0.0.beta1
70
+ version: 3.4.0
62
71
  type: :development
63
72
  prerelease: false
64
73
  version_requirements: !ruby/object:Gem::Requirement
65
74
  requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '3.4'
66
78
  - - ">="
67
79
  - !ruby/object:Gem::Version
68
- version: 3.0.0.beta1
80
+ version: 3.4.0
69
81
  - !ruby/object:Gem::Dependency
70
82
  name: simplecov
71
83
  requirement: !ruby/object:Gem::Requirement
72
84
  requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '0.11'
73
88
  - - ">="
74
89
  - !ruby/object:Gem::Version
75
- version: '0'
90
+ version: 0.11.2
76
91
  type: :development
77
92
  prerelease: false
78
93
  version_requirements: !ruby/object:Gem::Requirement
79
94
  requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.11'
80
98
  - - ">="
81
99
  - !ruby/object:Gem::Version
82
- version: '0'
100
+ version: 0.11.2
83
101
  - !ruby/object:Gem::Dependency
84
102
  name: coveralls
85
103
  requirement: !ruby/object:Gem::Requirement
86
104
  requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '0.8'
87
108
  - - ">="
88
109
  - !ruby/object:Gem::Version
89
- version: '0'
110
+ version: 0.8.13
90
111
  type: :development
91
112
  prerelease: false
92
113
  version_requirements: !ruby/object:Gem::Requirement
93
114
  requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.8'
94
118
  - - ">="
95
119
  - !ruby/object:Gem::Version
96
- version: '0'
120
+ version: 0.8.13
97
121
  description: A Lita handler for generating meme images using imgflip.com.
98
122
  email:
99
123
  - henrik.sjokvist@gmail.com
@@ -133,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
157
  version: '0'
134
158
  requirements: []
135
159
  rubyforge_project:
136
- rubygems_version: 2.4.4
160
+ rubygems_version: 2.2.2
137
161
  signing_key:
138
162
  specification_version: 4
139
163
  summary: A Lita handler for generating meme images using imgflip.com.