meme_captain 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -0
- data/ChangeLog +10 -0
- data/Gemfile +1 -1
- data/README.md +3 -0
- data/Rakefile +38 -0
- data/lib/meme_captain/meme.rb +1 -1
- data/lib/meme_captain/version.rb +1 -1
- data/meme_captain.gemspec +1 -0
- data/spec/assets/me_gusta.png +0 -0
- data/spec/assets/otter.gif +0 -0
- data/spec/assets/town_crier.jpg +0 -0
- metadata +24 -2
data/ChangeLog
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/mmb/meme_captain.png)](https://travis-ci.org/mmb/meme_captain)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/mmb/meme_captain.png)](https://codeclimate.com/github/mmb/meme_captain)
|
3
|
+
|
1
4
|
Ruby gem to create meme images (images with text added).
|
2
5
|
|
3
6
|
Runs locally and has no web dependencies.
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'tempfile'
|
2
|
+
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
require 'meme_captain'
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec)
|
8
|
+
|
9
|
+
task :default => :spec
|
10
|
+
|
11
|
+
desc 'Generate various sample memes and open them in a browser'
|
12
|
+
task 'sample' do
|
13
|
+
source_images = {
|
14
|
+
gif: File.read(File.join(%w{spec assets otter.gif})),
|
15
|
+
jpg: File.read(File.join(%w{spec assets town_crier.jpg})),
|
16
|
+
png: File.read(File.join(%w{spec assets me_gusta.png})),
|
17
|
+
}
|
18
|
+
|
19
|
+
words = %w{the quick brown fox jumped over the lazy dog}.cycle
|
20
|
+
|
21
|
+
dir = Dir.mktmpdir
|
22
|
+
|
23
|
+
word_tests = [1] +(5..50).step(5).to_a
|
24
|
+
|
25
|
+
html = File.join(dir, 'sample.html')
|
26
|
+
open(html, 'w') do |f|
|
27
|
+
source_images.each do |ext, data|
|
28
|
+
word_tests.each do |num_words|
|
29
|
+
img_file = File.join(dir, "i#{num_words}.#{ext}")
|
30
|
+
puts img_file
|
31
|
+
MemeCaptain.meme_top_bottom(data, words.take(num_words).join(' '), nil, font: 'Impact-Regular').write(img_file)
|
32
|
+
f.write("<img src=\"#{img_file}\">\n")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
`open #{html}`
|
38
|
+
end
|
data/lib/meme_captain/meme.rb
CHANGED
data/lib/meme_captain/version.rb
CHANGED
data/meme_captain.gemspec
CHANGED
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meme_captain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bson_ext
|
@@ -187,6 +187,22 @@ dependencies:
|
|
187
187
|
- - ! '>='
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: rake
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ! '>='
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0'
|
198
|
+
type: :development
|
199
|
+
prerelease: false
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ! '>='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
190
206
|
- !ruby/object:Gem::Dependency
|
191
207
|
name: rspec
|
192
208
|
requirement: !ruby/object:Gem::Requirement
|
@@ -228,10 +244,12 @@ extensions: []
|
|
228
244
|
extra_rdoc_files: []
|
229
245
|
files:
|
230
246
|
- .gitignore
|
247
|
+
- .travis.yml
|
231
248
|
- COPYING
|
232
249
|
- ChangeLog
|
233
250
|
- Gemfile
|
234
251
|
- README.md
|
252
|
+
- Rakefile
|
235
253
|
- bin/memecaptain
|
236
254
|
- config.ru
|
237
255
|
- doc/lightweight_front_end.md
|
@@ -273,6 +291,9 @@ files:
|
|
273
291
|
- public/thumbs_1339811279.jpg
|
274
292
|
- public/tmp/.gitignore
|
275
293
|
- script/thumb_sprites.rb
|
294
|
+
- spec/assets/me_gusta.png
|
295
|
+
- spec/assets/otter.gif
|
296
|
+
- spec/assets/town_crier.jpg
|
276
297
|
- spec/caption_choice_spec.rb
|
277
298
|
- spec/caption_spec.rb
|
278
299
|
- spec/image_list/fetch_spec.rb
|
@@ -309,3 +330,4 @@ signing_key:
|
|
309
330
|
specification_version: 3
|
310
331
|
summary: create meme images
|
311
332
|
test_files: []
|
333
|
+
has_rdoc:
|