ruby-upworthy 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/upworthy.rb +375 -373
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: baec45fc53307c3d6e13e3845f36fa4603a5a4f812c55fa011a0ac8251ab1fcd
|
4
|
+
data.tar.gz: c7d83c2d0f81adbaed7c5acd9d9d80ba893b938539128b159e7f524cbe7505b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f56dc574d14d7c057e4ef30f1c12397d21b434fa419fd53a3d5a20547fef51f9c4bf8e0cb7828430a2d0621a300dff8b5d88f0dac2b8bd012c8f51c55e961eae
|
7
|
+
data.tar.gz: fef4c764aff19e50a4ebd1b6dac65af1cc161ec0967ad9e76b06908e8bb5eb8c3fce7cf1b24483a378e040288f213719322fb027410a1980e097cc767e098fee
|
data/lib/upworthy.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# upworthy.rb
|
2
4
|
# Author: William Woodruff
|
3
5
|
# A Ruby translation of Mike Lacher's Upworthy Generator
|
@@ -7,400 +9,400 @@
|
|
7
9
|
# @author William Woodruff
|
8
10
|
# @since 0.0.1
|
9
11
|
module Upworthy
|
10
|
-
|
11
|
-
|
12
|
+
# @private
|
13
|
+
VERSION = "1.0.0"
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
15
|
+
# @private
|
16
|
+
HEADLINES = [
|
17
|
+
"You %<imploreaudio>s the %<creationadjective>s %<creationaudio>s this %<actoradjective>s %<actor>s %<createdsynonym>s",
|
18
|
+
"You %<implorevisual>s the %<creationadjective>s %<creationvisual>s this %<actoradjective>s %<actor>s %<createdsynonym>s",
|
19
|
+
"Here is what happens when a %<actor>s %<action>s",
|
20
|
+
"That moment when a %<actor>s %<action>s",
|
21
|
+
"I wish I was more %<pasttenseshocked>s by what a %<actoradjective>s %<actor>s %<revealed>s, but I'm not",
|
22
|
+
"What happens when one %<actoradjective>s %<actor>s %<action>s",
|
23
|
+
"Try not to %<yourreaction>s when you %<verbaudio>s %<audiofragmentwitharticle>s",
|
24
|
+
"You will %<yourreaction>s when you see what a %<actoradjective>s %<actor>s %<createdsynonym>s",
|
25
|
+
"Think %<preconception>s? Maybe you should listen to this %<actoradjective>s %<actor>s",
|
26
|
+
"Some call it %<positivethingwitharticle>s. They call it %<negativethingwitharticle>s",
|
27
|
+
"I thought it was %<negativethingwitharticle>s. But then I saw this %<creationadjective>s %<creationvisual>s",
|
28
|
+
"I'll never look at this %<actoradjective>s %<actor>s the same way again",
|
29
|
+
"If you can watch this and not feel %<pasttenseshocked>s, then %<youremadeofstone>s",
|
30
|
+
"What this %<actoradjective>s %<actor>s did is genius",
|
31
|
+
"Listen to %<audiofragmentwitharticle>s and try to tell me %<preconception>s",
|
32
|
+
"Watch a %<actoradjective>s %<actor>s become a %<greatperson>s with %<creationaudio>s",
|
33
|
+
"Before you say %<preconception>s, listen to %<audiofragmentwitharticle>s from a %<actor>s",
|
34
|
+
"My %<jawhitthefloor>s after hearing %<audiofragmentwitharticle>s",
|
35
|
+
].freeze
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
37
|
+
# @private
|
38
|
+
CONTENT = {
|
39
|
+
jawhitthefloor: [
|
40
|
+
"jaw hit the floor",
|
41
|
+
"heart broke",
|
42
|
+
"head hurt",
|
43
|
+
"heart is breaking",
|
44
|
+
"brain exploded",
|
45
|
+
"stomach sank",
|
46
|
+
"tears keep flowing",
|
47
|
+
"faith in humanity shattered",
|
48
|
+
"hope for the world plummeted",
|
49
|
+
"faith in humanity soared",
|
50
|
+
"confidence in the next generation is stronger than ever",
|
51
|
+
"disgust hit new lows",
|
52
|
+
],
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
greatperson: [
|
55
|
+
"hero",
|
56
|
+
"inspiration",
|
57
|
+
"role model",
|
58
|
+
"legend",
|
59
|
+
],
|
58
60
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
youremadeofstone: [
|
62
|
+
"you're made of stone",
|
63
|
+
"you have no emotions",
|
64
|
+
"you are stronger than I am",
|
65
|
+
"you are made of ice",
|
66
|
+
"you have a heart of coal",
|
67
|
+
],
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
69
|
+
positivethingwitharticle: [
|
70
|
+
"the solution to world peace",
|
71
|
+
"just another day",
|
72
|
+
"the miracle of life",
|
73
|
+
"the key to happiness",
|
74
|
+
"a miracle",
|
75
|
+
"a godsend",
|
76
|
+
"the greatest thing that's ever happened",
|
77
|
+
"the solution to climate change",
|
78
|
+
"the answer to all our prayers",
|
79
|
+
"what we've been waiting for",
|
80
|
+
"the answer to world hunger",
|
81
|
+
"the cure for childhood obesity",
|
82
|
+
"a miracle drug",
|
83
|
+
"a masterpiece",
|
84
|
+
"the end of polio",
|
85
|
+
"the cure for cancer",
|
86
|
+
"the key to peace in the Middle East",
|
87
|
+
"the end of all wars",
|
88
|
+
"a victory against homophobia",
|
89
|
+
"the end of racism",
|
90
|
+
],
|
89
91
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
92
|
+
negativethingwitharticle: [
|
93
|
+
"an inescapable curse",
|
94
|
+
"a living nightmare",
|
95
|
+
"the worst-case scenario",
|
96
|
+
"the world's greatest tragedy",
|
97
|
+
"a killer of children",
|
98
|
+
"a travesty",
|
99
|
+
"a menace to equality",
|
100
|
+
"a homophobic nightmare",
|
101
|
+
"education's enemy",
|
102
|
+
"a deadly poison",
|
103
|
+
"a silent genocide",
|
104
|
+
"the worst kind of discrimination",
|
105
|
+
"an ecological disaster",
|
106
|
+
"a disaster",
|
107
|
+
"a threat to all of us",
|
108
|
+
],
|
107
109
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
110
|
+
preconception: [
|
111
|
+
"discrimination is over",
|
112
|
+
"America is the best country",
|
113
|
+
"Africa is getting better",
|
114
|
+
"partisian politics are killing America",
|
115
|
+
"we're winning the war on terror",
|
116
|
+
"the economy is better",
|
117
|
+
"America's disparity in income is all bad",
|
118
|
+
"babies can't be racist",
|
119
|
+
"there aren't pedophiles in your neighborhood",
|
120
|
+
"things are better than they used to be",
|
121
|
+
"things used to be better when you were a kid",
|
122
|
+
"polio isn't a threat in the US",
|
123
|
+
"you're not racist",
|
124
|
+
"you're not homophobic",
|
125
|
+
"you've never discriminated against someone",
|
126
|
+
"you're not a misogynist",
|
127
|
+
"homophobia is on the decline",
|
128
|
+
"babies can't be homophobic",
|
129
|
+
"computers made the world a better place",
|
130
|
+
"you're not addicted to your cell phone",
|
131
|
+
"we're not in a housing bubble",
|
132
|
+
"you have job security",
|
133
|
+
"you could never die in a fire",
|
134
|
+
],
|
133
135
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
136
|
+
yourreaction: [
|
137
|
+
"let your jaw hit the floor",
|
138
|
+
"gasp",
|
139
|
+
"get angry",
|
140
|
+
"lose your breath",
|
141
|
+
"cry",
|
142
|
+
"weep",
|
143
|
+
"scream",
|
144
|
+
"dig your fingernails into your desk",
|
145
|
+
"punch your monitor",
|
146
|
+
"do a double take",
|
147
|
+
"shout with rage",
|
148
|
+
"groan",
|
149
|
+
"roll your eyes",
|
150
|
+
"get upset",
|
151
|
+
"be mortified",
|
152
|
+
"rage",
|
153
|
+
],
|
152
154
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
155
|
+
verbaudio: [
|
156
|
+
"hear",
|
157
|
+
"listen to",
|
158
|
+
],
|
157
159
|
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
160
|
+
audiofragmentwitharticle: [
|
161
|
+
"this one word",
|
162
|
+
"these two sentences",
|
163
|
+
"these six words",
|
164
|
+
"this one statement",
|
165
|
+
"this one sentence",
|
166
|
+
"this one question",
|
167
|
+
"these two questions",
|
168
|
+
"these five words",
|
169
|
+
"this one declaration",
|
170
|
+
"these two words",
|
171
|
+
"the second half of the third sentence",
|
172
|
+
"the fifth and seventh words",
|
173
|
+
"the first word and the last word",
|
174
|
+
"the second sentence",
|
175
|
+
"these twelve words",
|
176
|
+
"this battlecry",
|
177
|
+
"these five nouns",
|
178
|
+
"this one verb",
|
179
|
+
"the eighth word",
|
180
|
+
"the first word and the second sentence",
|
181
|
+
"the third question",
|
182
|
+
"these nine words",
|
183
|
+
"the last sentence",
|
184
|
+
],
|
183
185
|
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
186
|
+
pasttenseshocked: %w[
|
187
|
+
surprised
|
188
|
+
revolted
|
189
|
+
outraged
|
190
|
+
disgusted
|
191
|
+
depressed
|
192
|
+
],
|
191
193
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
194
|
+
revealed: %w[
|
195
|
+
revealed
|
196
|
+
exposed
|
197
|
+
documented
|
198
|
+
proved
|
199
|
+
publicized
|
200
|
+
],
|
199
201
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
202
|
+
imploreaudio: [
|
203
|
+
"won't believe",
|
204
|
+
"have to hear",
|
205
|
+
"don't want to have to think about",
|
206
|
+
"should really think about listening to",
|
207
|
+
"don't want to hear",
|
208
|
+
"absolutely have to listen to",
|
209
|
+
"won't really understand what's happening in the world until you hear",
|
210
|
+
"need to drop everything and hear",
|
211
|
+
"can't imagine",
|
212
|
+
"can't fathom",
|
213
|
+
"can't begin to understand",
|
214
|
+
],
|
213
215
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
216
|
+
implorevisual: [
|
217
|
+
"won't believe",
|
218
|
+
"need to see",
|
219
|
+
"should really think about watching",
|
220
|
+
"can't imagine",
|
221
|
+
"can't fathom",
|
222
|
+
"can't begin to understand",
|
223
|
+
],
|
222
224
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
225
|
+
creationvisual: [
|
226
|
+
"short film",
|
227
|
+
"music video",
|
228
|
+
"twenty second video",
|
229
|
+
"ten second video",
|
230
|
+
"vlog",
|
231
|
+
"one minute video",
|
232
|
+
"fifty second video",
|
233
|
+
"forty second video",
|
234
|
+
],
|
233
235
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
236
|
+
creationaudio: [
|
237
|
+
"one word",
|
238
|
+
"two sentences",
|
239
|
+
"three sentences",
|
240
|
+
"five words",
|
241
|
+
"two words",
|
242
|
+
"three words",
|
243
|
+
"four words",
|
244
|
+
"three sentences",
|
245
|
+
"one question",
|
246
|
+
"one declaration",
|
247
|
+
"six words",
|
248
|
+
"ten words",
|
249
|
+
"two words and a question",
|
250
|
+
],
|
249
251
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
252
|
+
creationadjective: [
|
253
|
+
"hilarious",
|
254
|
+
"mindblowing",
|
255
|
+
"scarily-accurate",
|
256
|
+
"heartwrenching",
|
257
|
+
"tearjerking",
|
258
|
+
"saddening",
|
259
|
+
"shocking",
|
260
|
+
"amazing",
|
261
|
+
"awe-inspiring",
|
262
|
+
"troubling",
|
263
|
+
"jaw-dropping",
|
264
|
+
"brain-exploding",
|
265
|
+
"tear-inducing",
|
266
|
+
"outrageous",
|
267
|
+
"pioneering",
|
268
|
+
"revolutionary",
|
269
|
+
"ridiculous",
|
270
|
+
"sobering",
|
271
|
+
],
|
270
272
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
273
|
+
actor: [
|
274
|
+
"new mom",
|
275
|
+
"seventh-grader",
|
276
|
+
"physicist",
|
277
|
+
"bullied teen",
|
278
|
+
"science teacher",
|
279
|
+
"eight year-old",
|
280
|
+
"man",
|
281
|
+
"woman",
|
282
|
+
"comedian",
|
283
|
+
"former model",
|
284
|
+
"single dad",
|
285
|
+
"former drug addict",
|
286
|
+
"veteran",
|
287
|
+
"Holocaust survivor",
|
288
|
+
"trailblazer",
|
289
|
+
"mother of three",
|
290
|
+
"LGBT activist",
|
291
|
+
"NBA coach",
|
292
|
+
"converted racist",
|
293
|
+
"former klansman",
|
294
|
+
"witness to a murder",
|
295
|
+
"tween",
|
296
|
+
"high schooler",
|
297
|
+
"cheerleader",
|
298
|
+
"late night host",
|
299
|
+
"teacher",
|
300
|
+
"actor",
|
301
|
+
"oscar winner",
|
302
|
+
"millennial",
|
303
|
+
"doctor",
|
304
|
+
"talk show host",
|
305
|
+
"actress",
|
306
|
+
"stand-up comedian",
|
307
|
+
"child star",
|
308
|
+
"beauty queen",
|
309
|
+
"model",
|
310
|
+
"blogger",
|
311
|
+
"mommy blogger",
|
312
|
+
"criminologist",
|
313
|
+
"sociologist",
|
314
|
+
"cancer survivor",
|
315
|
+
"cancer patient",
|
316
|
+
"father of three",
|
317
|
+
"teacher",
|
318
|
+
"kindergartener",
|
319
|
+
"author",
|
320
|
+
"poet",
|
321
|
+
"teenager",
|
322
|
+
"criminal",
|
323
|
+
"convict",
|
324
|
+
"police officer",
|
325
|
+
"plastic surgeon",
|
326
|
+
"mayor",
|
327
|
+
"city councilman",
|
328
|
+
"senator",
|
329
|
+
"animal rights activist",
|
330
|
+
"community organizer",
|
331
|
+
"music teacher",
|
332
|
+
"pianist",
|
333
|
+
"director",
|
334
|
+
"fashonista",
|
335
|
+
],
|
334
336
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
337
|
+
actoradjective: [
|
338
|
+
"homeless",
|
339
|
+
"bullied",
|
340
|
+
"disgraced",
|
341
|
+
"trailblazing",
|
342
|
+
"transgender",
|
343
|
+
"fearless",
|
344
|
+
"introverted",
|
345
|
+
"legendary",
|
346
|
+
"forgotten",
|
347
|
+
"iconic",
|
348
|
+
"disabled",
|
349
|
+
"blind",
|
350
|
+
"autistic",
|
351
|
+
"gay",
|
352
|
+
"queer",
|
353
|
+
"famous",
|
354
|
+
"extroverted",
|
355
|
+
"angry",
|
356
|
+
"nostalgic",
|
357
|
+
"slandered",
|
358
|
+
"iconoclastic",
|
359
|
+
"outraged",
|
360
|
+
"unstoppable",
|
361
|
+
"barrier-smashing",
|
362
|
+
"unknown",
|
363
|
+
"inspiring",
|
364
|
+
"",
|
365
|
+
"",
|
366
|
+
"",
|
367
|
+
],
|
366
368
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
369
|
+
action: [
|
370
|
+
"won't give up",
|
371
|
+
"doesn't take no for an answer",
|
372
|
+
"says what none of us will",
|
373
|
+
"lays it all out",
|
374
|
+
"talks about the elephant in the room",
|
375
|
+
"gets real about the biggest problem in America",
|
376
|
+
"refuses to be silent",
|
377
|
+
"starts a revolution",
|
378
|
+
"doesn't worry about what anyone thinks",
|
379
|
+
"stands up to the critics",
|
380
|
+
"doesn't accept bullying",
|
381
|
+
"throws political correctness out the window",
|
382
|
+
"says what we've all thought",
|
383
|
+
"speaks up for the voiceless",
|
384
|
+
"stands up for the people who can't",
|
385
|
+
"knows when it's time to make a stand",
|
386
|
+
"won't retreat",
|
387
|
+
],
|
386
388
|
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
389
|
+
createdsynonym: [
|
390
|
+
"made",
|
391
|
+
"wrote",
|
392
|
+
"created",
|
393
|
+
"found",
|
394
|
+
"delighted the internet with",
|
395
|
+
"came up with",
|
396
|
+
],
|
397
|
+
}.freeze
|
396
398
|
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
399
|
+
# Generates a new clickbait headline.
|
400
|
+
# @example
|
401
|
+
# Upworthy.headline # => "Watch an extroverted police officer become a legend with six words"
|
402
|
+
# @return [String] the headline
|
403
|
+
def self.headline
|
404
|
+
content = Hash[CONTENT.map { |k, v| [k, v.sample] }]
|
403
405
|
|
404
|
-
|
405
|
-
|
406
|
+
(HEADLINES.sample % content).gsub(" ", " ")
|
407
|
+
end
|
406
408
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-upworthy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Woodruff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby translation of http://www.upworthygenerator.com/.
|
14
14
|
email: william@tuffbizz.com
|
@@ -34,7 +34,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
34
34
|
requirements:
|
35
35
|
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: 2.3.0
|
38
38
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - ">="
|
@@ -42,9 +42,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
44
|
rubyforge_project:
|
45
|
-
rubygems_version: 2.
|
45
|
+
rubygems_version: 2.7.6
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: ruby-upworthy - Generate clickbait titles.
|
49
49
|
test_files: []
|
50
|
-
has_rdoc:
|