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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ language: ruby
3
+ rvm:
4
+ - 1.9.2
5
+ - 1.9.3
data/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ 0.1.3 2012-06-06
2
+
3
+ Default super_sample to 1.0.
4
+
5
+ Add sample generator rake task.
6
+
7
+ Add travis ci and code climate.
8
+
9
+ Fix rubygems source.
10
+
1
11
  0.1.1 2012-04-26
2
12
 
3
13
  Update jQuery and fabric.js to latest versions.
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
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.
@@ -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
@@ -21,7 +21,7 @@ module MemeCaptain
21
21
 
22
22
  img.auto_orient!
23
23
 
24
- super_sample = options[:super_sample] || 2.0
24
+ super_sample = options[:super_sample] || 1.0
25
25
 
26
26
  text_layer = Magick::Image.new(
27
27
  img.page.width * super_sample, img.page.height * super_sample) {
@@ -1,3 +1,3 @@
1
1
  module MemeCaptain
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
28
28
  }.each { |g| s.add_dependency g }
29
29
 
30
30
  %w{
31
+ rake
31
32
  rspec
32
33
  webmock
33
34
  }.each { |g| s.add_development_dependency g }
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.2
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-01-19 00:00:00.000000000 Z
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: