meme_generator 1.8 → 1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data.tar.gz.sig +0 -0
  2. data/History.txt +11 -0
  3. data/lib/meme.rb +51 -41
  4. metadata +4 -4
  5. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,14 @@
1
+ === 1.9 / 2010-03-28
2
+
3
+ * Minor Enhancements
4
+ * meme_generator will use pasteboard if it is installed. This allows memes
5
+ to easily be used in any OS X app which handles image data.
6
+ * Added Challenge Accepted. Pull Request #27 by Mark Turner.
7
+
8
+ * Bug Fix
9
+ * Only add the default line when it is present. Pull Request #26 by Matt
10
+ Margolis.
11
+
1
12
  === 1.8 / 2011-03-22
2
13
 
3
14
  * Minor Enhancements
@@ -16,7 +16,7 @@ class Meme
16
16
  ##
17
17
  # Every meme generator needs a version
18
18
 
19
- VERSION = '1.8'
19
+ VERSION = '1.9'
20
20
 
21
21
  ##
22
22
  # For statistics!
@@ -52,43 +52,44 @@ class Meme
52
52
  end
53
53
 
54
54
  # keep generators in alphabetical order
55
- advice_dog 'ANTEATER', 41191, 'anteater'
56
- advice_dog 'A_DODSON', 106375, 'Antoine-Dodson'
57
- advice_dog 'A_DOG', 940, 'Advice-Dog'
58
- advice_dog 'A_FATHER', 1436, 'High-Expectations-Asian-Father'
59
- advice_dog 'BEAR-GRYLLS', 89714, 'Bear-Grylls'
60
- advice_dog 'BUTTHURT_DWELLER', 1438, 'Butthurt-Dweller'
61
- advice_dog 'B_FROG', 1211, 'Foul-Bachelorette-Frog'
62
- advice_dog 'B_FROG2', 1045, 'Foul-Bachelor-Frog'
63
- advice_dog 'COOL_STORY_HOUSE', 16948, 'cool-story-bro-house'
64
- advice_dog 'CREEPER', 173501, 'Minecraft-Creeper'
65
- advice_dog 'C_WOLF', 931, 'Courage-Wolf'
66
- advice_dog 'F_FRY', 84688, 'Futurama-Fry'
67
- advice_dog 'G_GRANDPA', 185650, 'Grumpy-Grandpa'
68
- advice_dog 'H_MERMAID', 405224, 'Hipster-Mermaid'
69
- advice_dog 'I_DONT_ALWAYS', 38926, 'The-Most-Interesting-Man-in-the-World'
70
- advice_dog 'I_WOLF', 926, 'Insanity-Wolf'
71
- advice_dog 'J_DUCREUX', 1356, 'Joseph-Ducreux'
72
- advice_dog 'KEANU', 47718, 'Keanu-reeves'
73
- advice_dog 'MINECRAFT', 122309, 'Minecraft'
74
- advice_dog 'O-RLY-OWL', 117041, 'O-RLY-OWL', 'ORLY???'
75
- advice_dog 'OBAMA', 1332, 'Obama-'
76
- advice_dog 'PHILOSORAPTOR', 984, 'Philosoraptor'
77
- advice_dog 'P_OAK', 24321, 'Professor-Oak'
78
- advice_dog 'SCUMBAG', 364688, 'Scumbag-Steve'
79
- advice_dog 'SERIOUS_FISH', 6374627,'Spongebob-Serious-Fish'
80
- advice_dog 'SNOB', 2994, 'Snob'
81
- advice_dog 'SPARTA', 1013, 'sparta'
82
- advice_dog 'SPIDERMAN', 1037, 'Question-Spiderman'
83
- advice_dog 'SWEDISH_CHEF', 186651, 'Swedish-Chef'
84
- advice_dog 'S_AWKWARD_PENGUIN', 983, 'Socially-Awkward-Penguin'
85
- advice_dog 'TOWNCRIER', 434537, 'Towncrier'
86
- advice_dog 'TROLLFACE', 1030, 'Troll-Face'
87
- advice_dog 'UNICORN_BOY', 57022, 'unicorn-boy'
88
- advice_dog 'US_POINT', 131083, 'Uncle-Sam-Point', 'I WANT YOU'
89
- advice_dog 'V_BABY', 11140, 'Victory-Baby'
90
- advice_dog 'XZIBIT', 3114, 'XZIBIT'
91
- advice_dog 'Y_U_NO', 165241, 'Y-U-NO', 'Y U NO'
55
+ advice_dog 'ANTEATER', 41191, 'anteater'
56
+ advice_dog 'A_DODSON', 106375, 'Antoine-Dodson'
57
+ advice_dog 'A_DOG', 940, 'Advice-Dog'
58
+ advice_dog 'A_FATHER', 1436, 'High-Expectations-Asian-Father'
59
+ advice_dog 'BEAR-GRYLLS', 89714, 'Bear-Grylls'
60
+ advice_dog 'BUTTHURT_DWELLER', 1438, 'Butthurt-Dweller'
61
+ advice_dog 'B_FROG', 1211, 'Foul-Bachelorette-Frog'
62
+ advice_dog 'B_FROG2', 1045, 'Foul-Bachelor-Frog'
63
+ advice_dog 'CHALLENGE_ACCEPTED', 275025, 'Challenge-Accepted'
64
+ advice_dog 'COOL_STORY_HOUSE', 16948, 'cool-story-bro-house'
65
+ advice_dog 'CREEPER', 173501, 'Minecraft-Creeper'
66
+ advice_dog 'C_WOLF', 931, 'Courage-Wolf'
67
+ advice_dog 'F_FRY', 84688, 'Futurama-Fry'
68
+ advice_dog 'G_GRANDPA', 185650, 'Grumpy-Grandpa'
69
+ advice_dog 'H_MERMAID', 405224, 'Hipster-Mermaid'
70
+ advice_dog 'I_DONT_ALWAYS', 38926, 'The-Most-Interesting-Man-in-the-World'
71
+ advice_dog 'I_WOLF', 926, 'Insanity-Wolf'
72
+ advice_dog 'J_DUCREUX', 1356, 'Joseph-Ducreux'
73
+ advice_dog 'KEANU', 47718, 'Keanu-reeves'
74
+ advice_dog 'MINECRAFT', 122309, 'Minecraft'
75
+ advice_dog 'O-RLY-OWL', 117041, 'O-RLY-OWL', 'ORLY???'
76
+ advice_dog 'OBAMA', 1332, 'Obama-'
77
+ advice_dog 'PHILOSORAPTOR', 984, 'Philosoraptor'
78
+ advice_dog 'P_OAK', 24321, 'Professor-Oak'
79
+ advice_dog 'SCUMBAG', 364688, 'Scumbag-Steve'
80
+ advice_dog 'SERIOUS_FISH', 6374627,'Spongebob-Serious-Fish'
81
+ advice_dog 'SNOB', 2994, 'Snob'
82
+ advice_dog 'SPARTA', 1013, 'sparta'
83
+ advice_dog 'SPIDERMAN', 1037, 'Question-Spiderman'
84
+ advice_dog 'SWEDISH_CHEF', 186651, 'Swedish-Chef'
85
+ advice_dog 'S_AWKWARD_PENGUIN', 983, 'Socially-Awkward-Penguin'
86
+ advice_dog 'TOWNCRIER', 434537, 'Towncrier'
87
+ advice_dog 'TROLLFACE', 1030, 'Troll-Face'
88
+ advice_dog 'UNICORN_BOY', 57022, 'unicorn-boy'
89
+ advice_dog 'US_POINT', 131083, 'Uncle-Sam-Point', 'I WANT YOU'
90
+ advice_dog 'V_BABY', 11140, 'Victory-Baby'
91
+ advice_dog 'XZIBIT', 3114, 'XZIBIT'
92
+ advice_dog 'Y_U_NO', 165241, 'Y-U-NO', 'Y U NO'
92
93
 
93
94
  vertical 'BATMAN', 148359, 'batman-panal-ryan'
94
95
  vertical 'INCEPTION', 107949, 'Inception'
@@ -162,10 +163,11 @@ class Meme
162
163
  res = nil
163
164
  location = nil
164
165
 
165
- # Put the default line in front unless theres more than 1 text input.
166
- args.unshift(@default_line) unless args.size > 1
166
+ # Prepend the default line if this meme has one and we only had 1 text input
167
+ args.unshift @default_line if @default_line and args.size <= 1
167
168
 
168
- raise Error, "two lines are required for #{@generator_name}" unless args.size > 1
169
+ raise Error, "two lines are required for #{@generator_name}" unless
170
+ args.size > 1
169
171
 
170
172
  post_data = { 'templateType' => @template_type,
171
173
  'templateID' => @template_id,
@@ -212,6 +214,14 @@ class Meme
212
214
  # clipboard.
213
215
 
214
216
  def paste link
217
+ require 'pasteboard'
218
+
219
+ clipboard = Pasteboard.new
220
+
221
+ jpeg = fetch link
222
+
223
+ clipboard.put_jpeg_url jpeg, link
224
+ rescue LoadError
215
225
  clipboard = %w{
216
226
  /usr/bin/pbcopy
217
227
  /usr/bin/xclip
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meme_generator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 8
9
- version: "1.8"
8
+ - 9
9
+ version: "1.9"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Hodel
@@ -35,7 +35,7 @@ cert_chain:
35
35
  x52qPcexcYZR7w==
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2011-03-22 00:00:00 -07:00
38
+ date: 2011-03-28 00:00:00 -07:00
39
39
  default_executable:
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file