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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b6b008a912e49a8a06a17ed8183d4e757bc12714
4
- data.tar.gz: f0006e0f34a1c31a68377bb53b337f37e82e57d9
2
+ SHA256:
3
+ metadata.gz: 5edd684be8bf3e4e16efc36df7fc1bc0e0b586b49bf37fc986e0c1a9a655a534
4
+ data.tar.gz: 9d6f38081c90df4b2c54e9db68d56422c40faf83669a6a566d69a568053abda6
5
5
  SHA512:
6
- metadata.gz: a40ccf7b7bfbc1d4abddec1127ca8f4ede2ff441ac8db8b7fd8942c9f4ec6a616c24dce338a8f6083b3578d1f16d665f5747512ce5f619cb3efd4d4b2ffaa2e6
7
- data.tar.gz: bc280d6130ac000574a58aa184651525bbdc1b5e48f04c260063786b8e7e445ef56f1ecb20532fa94d96d9bcb77c6ae359f683e40176a7acbbcc876e18625ed8
6
+ metadata.gz: 8cff67ab31b784d57e71c86cd2d3348f177749e6dd7bcfe6f4dfe517e3aa3cd8cae3e6b6e6c5882c211160ce372b14d427b7e521e3ad9a978f9f4abb8545ef37
7
+ data.tar.gz: 8c21d18d78a18b6b0890ef3ecf154f6d4930f099c8c33a06bf1ca3ead3a510e61559289da7679eb65a0210a5c5489c3000c99fb269d526395ea74fdead36e26f
@@ -1,7 +1,8 @@
1
- ---
1
+ ---
2
2
  language: ruby
3
- rvm:
4
- - 2.0.0
5
- - 2.1.6
6
- - 2.2.2
3
+ rvm:
4
+ - 2.4.10
5
+ - 2.5.8
6
+ - 2.6.6
7
+ - 2.7.1
7
8
  sudo: false
@@ -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(gsub('\\', '\\\\\\').gsub('%', '\%'))
13
+ Caption.new(
14
+ gsub('\\', '\\\\\\').
15
+ gsub('%', '%%').
16
+ gsub(/^@/, '\@'))
14
17
  end
15
18
 
16
19
  # Whether the string contains any non-whitespace.
@@ -1,3 +1,3 @@
1
1
  module MemeCaptain
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -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', '~> 2.5'
18
- s.add_dependency 'rmagick', '~> 2.14.0'
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', '~> 10.4.2'
21
- s.add_development_dependency 'rspec', '~> 3.2.0'
22
- s.add_development_dependency 'webmock', '~> 1.21.0'
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}
@@ -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
- '\%foo\%bar\%')
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
@@ -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.1
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: 2015-04-25 00:00:00.000000000 Z
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: '2.5'
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: '2.5'
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: 2.14.0
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: 2.14.0
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: 10.4.2
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: 10.4.2
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.2.0
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.2.0
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: 1.21.0
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: 1.21.0
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
- rubyforge_project:
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