meme_captain 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +6 -5
- data/lib/meme_captain/caption.rb +4 -1
- data/lib/meme_captain/version.rb +1 -1
- data/meme_captain.gemspec +5 -5
- data/spec/caption_spec.rb +10 -1
- data/spec/meme_captain_spec.rb +12 -0
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5edd684be8bf3e4e16efc36df7fc1bc0e0b586b49bf37fc986e0c1a9a655a534
|
4
|
+
data.tar.gz: 9d6f38081c90df4b2c54e9db68d56422c40faf83669a6a566d69a568053abda6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cff67ab31b784d57e71c86cd2d3348f177749e6dd7bcfe6f4dfe517e3aa3cd8cae3e6b6e6c5882c211160ce372b14d427b7e521e3ad9a978f9f4abb8545ef37
|
7
|
+
data.tar.gz: 8c21d18d78a18b6b0890ef3ecf154f6d4930f099c8c33a06bf1ca3ead3a510e61559289da7679eb65a0210a5c5489c3000c99fb269d526395ea74fdead36e26f
|
data/.travis.yml
CHANGED
data/lib/meme_captain/caption.rb
CHANGED
@@ -10,7 +10,10 @@ module MemeCaptain
|
|
10
10
|
|
11
11
|
# Return the contents of the string quoted for ImageMagick annotate.
|
12
12
|
def annotate_quote
|
13
|
-
Caption.new(
|
13
|
+
Caption.new(
|
14
|
+
gsub('\\', '\\\\\\').
|
15
|
+
gsub('%', '%%').
|
16
|
+
gsub(/^@/, '\@'))
|
14
17
|
end
|
15
18
|
|
16
19
|
# Whether the string contains any non-whitespace.
|
data/lib/meme_captain/version.rb
CHANGED
data/meme_captain.gemspec
CHANGED
@@ -14,12 +14,12 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.email = %w{matthewm@boedicker.org}
|
15
15
|
s.license = 'MIT'
|
16
16
|
|
17
|
-
s.add_dependency 'mime-types', '~>
|
18
|
-
s.add_dependency 'rmagick', '~>
|
17
|
+
s.add_dependency 'mime-types', '~> 3.3.1'
|
18
|
+
s.add_dependency 'rmagick', '~> 4.1.2'
|
19
19
|
|
20
|
-
s.add_development_dependency 'rake', '~>
|
21
|
-
s.add_development_dependency 'rspec', '~> 3.
|
22
|
-
s.add_development_dependency 'webmock', '~>
|
20
|
+
s.add_development_dependency 'rake', '~> 13.0.1'
|
21
|
+
s.add_development_dependency 'rspec', '~> 3.9.0'
|
22
|
+
s.add_development_dependency 'webmock', '~> 3.8.3'
|
23
23
|
|
24
24
|
s.files = `git ls-files`.split("\n")
|
25
25
|
s.executables = %w{memecaptain}
|
data/spec/caption_spec.rb
CHANGED
@@ -9,7 +9,16 @@ describe MemeCaptain::Caption do
|
|
9
9
|
|
10
10
|
it 'should quote percent signs for ImageMagick annotate' do
|
11
11
|
expect(MemeCaptain::Caption.new('%foo%bar%').annotate_quote).to eq(
|
12
|
-
'
|
12
|
+
'%%foo%%bar%%')
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should quote attribute percent escapes' do
|
16
|
+
expect(MemeCaptain::Caption.new('%m %m %b %#').annotate_quote).to eq(
|
17
|
+
'%%m %%m %%b %%#')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should quote an @ symbol if it is the first character' do
|
21
|
+
expect(MemeCaptain::Caption.new('@hi').annotate_quote).to eq('\@hi')
|
13
22
|
end
|
14
23
|
|
15
24
|
it 'should be drawable if it contains at least one non-whitespace character' do
|
data/spec/meme_captain_spec.rb
CHANGED
@@ -18,4 +18,16 @@ describe MemeCaptain, '.meme_top_bottom' do
|
|
18
18
|
font: font)
|
19
19
|
end
|
20
20
|
|
21
|
+
context 'when one of the captions starts with an @ symbol' do
|
22
|
+
it 'generates the image' do
|
23
|
+
font = File.expand_path('../assets/Coda-Heavy.ttf', __FILE__)
|
24
|
+
src_image = File.expand_path('../assets/town_crier.jpg', __FILE__)
|
25
|
+
|
26
|
+
expect do
|
27
|
+
File.open(src_image) do |f|
|
28
|
+
MemeCaptain.meme_top_bottom(f, '@foo', '@bar', font: font)
|
29
|
+
end
|
30
|
+
end.to_not raise_exception
|
31
|
+
end
|
32
|
+
end
|
21
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meme_captain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew M. Boedicker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.3.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rmagick
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.1.2
|
34
34
|
type: :runtime
|
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:
|
40
|
+
version: 4.1.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 13.0.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 13.0.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.
|
61
|
+
version: 3.9.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.
|
68
|
+
version: 3.9.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.8.3
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.8.3
|
83
83
|
description: create meme images
|
84
84
|
email:
|
85
85
|
- matthewm@boedicker.org
|
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.2.2
|
138
|
+
rubygems_version: 3.0.3
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: create meme images
|