meme_captain 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b6b008a912e49a8a06a17ed8183d4e757bc12714
4
+ data.tar.gz: f0006e0f34a1c31a68377bb53b337f37e82e57d9
5
+ SHA512:
6
+ metadata.gz: a40ccf7b7bfbc1d4abddec1127ca8f4ede2ff441ac8db8b7fd8942c9f4ec6a616c24dce338a8f6083b3578d1f16d665f5747512ce5f619cb3efd4d4b2ffaa2e6
7
+ data.tar.gz: bc280d6130ac000574a58aa184651525bbdc1b5e48f04c260063786b8e7e445ef56f1ecb20532fa94d96d9bcb77c6ae359f683e40176a7acbbcc876e18625ed8
data/.travis.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  language: ruby
3
3
  rvm:
4
- - 1.9.2
5
- - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.6
6
+ - 2.2.2
7
+ sudo: false
@@ -1,4 +1,4 @@
1
- require 'RMagick'
1
+ require 'rmagick'
2
2
 
3
3
  module MemeCaptain
4
4
 
@@ -1,4 +1,4 @@
1
- require 'RMagick'
1
+ require 'rmagick'
2
2
 
3
3
  module MemeCaptain
4
4
 
@@ -1,4 +1,4 @@
1
- require 'RMagick'
1
+ require 'rmagick'
2
2
 
3
3
  module MemeCaptain
4
4
 
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
- require 'RMagick'
3
+ require 'rmagick'
4
4
 
5
5
  module MemeCaptain
6
6
 
@@ -1,3 +1,3 @@
1
1
  module MemeCaptain
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/meme_captain.gemspec CHANGED
@@ -12,13 +12,14 @@ Gem::Specification.new do |s|
12
12
  s.homepage = 'https://github.com/mmb/meme_captain'
13
13
  s.authors = ['Matthew M. Boedicker']
14
14
  s.email = %w{matthewm@boedicker.org}
15
+ s.license = 'MIT'
15
16
 
16
- s.add_dependency 'mime-types'
17
- s.add_dependency 'rmagick'
17
+ s.add_dependency 'mime-types', '~> 2.5'
18
+ s.add_dependency 'rmagick', '~> 2.14.0'
18
19
 
19
- s.add_development_dependency 'rake'
20
- s.add_development_dependency 'rspec'
21
- s.add_development_dependency 'webmock'
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'
22
23
 
23
24
  s.files = `git ls-files`.split("\n")
24
25
  s.executables = %w{memecaptain}
Binary file
@@ -11,7 +11,7 @@ describe MemeCaptain::CaptionChoice do
11
11
  caption_choice2 = MemeCaptain::CaptionChoice.new(12, metrics,
12
12
  "the quick brown fox", 200, 100)
13
13
 
14
- caption_choice1.should be < caption_choice2
14
+ expect(caption_choice1 < caption_choice2).to be(true)
15
15
  end
16
16
 
17
17
  it 'should rank choices with higher point size higher' do
@@ -23,7 +23,7 @@ describe MemeCaptain::CaptionChoice do
23
23
  caption_choice2 = MemeCaptain::CaptionChoice.new(13, metrics,
24
24
  "the quick brown fox", 200, 100)
25
25
 
26
- caption_choice1.should be < caption_choice2
26
+ expect(caption_choice1 < caption_choice2).to be(true)
27
27
  end
28
28
 
29
29
  it 'should rank choices with less lines higher when the text fits' do
@@ -35,7 +35,7 @@ describe MemeCaptain::CaptionChoice do
35
35
  caption_choice2 = MemeCaptain::CaptionChoice.new(12, metrics,
36
36
  "the quick brown fox", 200, 100)
37
37
 
38
- caption_choice1.should be < caption_choice2
38
+ expect(caption_choice1 < caption_choice2).to be(true)
39
39
  end
40
40
 
41
41
  it 'should rank choices with more lines higher when the text does not fit' do
@@ -47,7 +47,7 @@ describe MemeCaptain::CaptionChoice do
47
47
  caption_choice2 = MemeCaptain::CaptionChoice.new(12, metrics,
48
48
  "the quick\nbrown fox", 200, 99)
49
49
 
50
- caption_choice1.should be < caption_choice2
50
+ expect(caption_choice1 < caption_choice2).to be(true)
51
51
  end
52
52
 
53
53
  end
data/spec/caption_spec.rb CHANGED
@@ -3,43 +3,43 @@ require 'meme_captain'
3
3
  describe MemeCaptain::Caption do
4
4
 
5
5
  it 'should quote backslashes for ImageMagick annotate' do
6
- MemeCaptain::Caption.new('\\foo\\bar\\').annotate_quote.should ==
7
- '\\\\foo\\\\bar\\\\'
6
+ expect(MemeCaptain::Caption.new('\\foo\\bar\\').annotate_quote).to eq(
7
+ '\\\\foo\\\\bar\\\\')
8
8
  end
9
9
 
10
10
  it 'should quote percent signs for ImageMagick annotate' do
11
- MemeCaptain::Caption.new('%foo%bar%').annotate_quote.should ==
12
- '\%foo\%bar\%'
11
+ expect(MemeCaptain::Caption.new('%foo%bar%').annotate_quote).to eq(
12
+ '\%foo\%bar\%')
13
13
  end
14
14
 
15
15
  it 'should be drawable if it contains at least one non-whitespace character' do
16
- MemeCaptain::Caption.new('a').should be_drawable
16
+ expect(MemeCaptain::Caption.new('a').drawable?).to be(true)
17
17
  end
18
18
 
19
19
  it 'should not be drawable if it is all whitespace' do
20
- MemeCaptain::Caption.new(' ').should_not be_drawable
20
+ expect(MemeCaptain::Caption.new(' ').drawable?).to be(false)
21
21
  end
22
22
 
23
23
  it 'should not be drawable if it is empty' do
24
- MemeCaptain::Caption.new('').should_not be_drawable
24
+ expect(MemeCaptain::Caption.new('').drawable?).to be(false)
25
25
  end
26
26
 
27
27
  it 'should not be drawable if it is nil' do
28
- MemeCaptain::Caption.new(nil).should_not be_drawable
28
+ expect(MemeCaptain::Caption.new(nil).drawable?).to be(false)
29
29
  end
30
30
 
31
31
  it 'should wrap a string into two roughly equal lines' do
32
- MemeCaptain::Caption.new(
33
- 'the quick brown fox jumped over the lazy dog').wrap(2).should ==
34
- "the quick brown fox\njumped over the lazy dog"
32
+ expect(MemeCaptain::Caption.new(
33
+ 'the quick brown fox jumped over the lazy dog').wrap(2)).to eq(
34
+ "the quick brown fox\njumped over the lazy dog")
35
35
  end
36
36
 
37
37
  it 'should wrap a string into as many lines as it can' do
38
- MemeCaptain::Caption.new('foo bar').wrap(3).should == "foo\nbar"
38
+ expect(MemeCaptain::Caption.new('foo bar').wrap(3)).to eq("foo\nbar")
39
39
  end
40
40
 
41
41
  it 'should not wrap text with no whitespace' do
42
- MemeCaptain::Caption.new('foobar').wrap(2).should == 'foobar'
42
+ expect(MemeCaptain::Caption.new('foobar').wrap(2)).to eq('foobar')
43
43
  end
44
44
 
45
45
  end
@@ -12,8 +12,10 @@ describe MemeCaptain, '.meme_top_bottom' do
12
12
  :body => Base64.decode64(
13
13
  'iVBORw0KGgoAAAANSUhEUgAAAcwAAAAyAgMAAACsWgPIAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBHwQoJY1iyrwAAAAJUExURQAAAAAAAP///4Pdz9IAAAABdFJOUwBA5thmAAAAAWJLR0QB/wIt3gAAAHpJREFUWIXt1zESgCAMRNE03s9mG+9ns6e0EaKCqDOWf4sUJOHREvqciOn7Us0cEZiYmJhnc7HtVbJtS5LsVRo09DScZzmSG5iYmJit2RTVlduGquS920hFvxRMTEzMRzOv6TfKheMX9ThMTEzMnvlj5ld/S0xMTMxjNoGjc3pdi6L4AAAAAElFTkSuQmCC'))
14
14
 
15
+ font = File.expand_path('../assets/Coda-Heavy.ttf', __FILE__)
15
16
  i = MemeCaptain.meme_top_bottom(
16
- open('http://memecaptain.com/good.jpg'), 'top text', 'bottom text')
17
+ open('http://memecaptain.com/good.jpg'), 'top text', 'bottom text',
18
+ font: font)
17
19
  end
18
20
 
19
21
  end
data/spec/memebg_spec.rb CHANGED
@@ -7,8 +7,8 @@ describe MemeCaptain, '.memebg' do
7
7
  colors = %w{red blue yellow #bada55}
8
8
  m = MemeCaptain.memebg(size, colors, 20)
9
9
 
10
- m.columns.should == size
11
- m.rows.should == size
10
+ expect(m.columns).to eq(size)
11
+ expect(m.rows).to eq(size)
12
12
  end
13
13
 
14
14
  end
@@ -4,26 +4,26 @@ describe MemeCaptain::TextPos do
4
4
 
5
5
  it 'should store the required fields' do
6
6
  t = MemeCaptain::TextPos.new('text', 0, 25, 50, 100)
7
- t.text.should == 'text'
8
- t.x.should == 0
9
- t.y.should == 25
10
- t.width.should == 50
11
- t.height.should == 100
7
+ expect(t.text).to eq('text')
8
+ expect(t.x).to eq(0)
9
+ expect(t.y).to eq(25)
10
+ expect(t.width).to eq(50)
11
+ expect(t.height).to eq(100)
12
12
  end
13
13
 
14
14
  it 'should store the max_lines option' do
15
- MemeCaptain::TextPos.new('text', 0, 25, 50, 100,
16
- :max_lines => 10).max_lines.should == 10
15
+ expect(MemeCaptain::TextPos.new('text', 0, 25, 50, 100,
16
+ :max_lines => 10).max_lines).to eq(10)
17
17
  end
18
18
 
19
19
  it 'should store the min_pointsize option' do
20
- MemeCaptain::TextPos.new('text', 0, 25, 50, 100,
21
- :min_pointsize => 11).min_pointsize.should == 11
20
+ expect(MemeCaptain::TextPos.new('text', 0, 25, 50, 100,
21
+ :min_pointsize => 11).min_pointsize).to eq(11)
22
22
  end
23
23
 
24
24
  it 'should pass store additional options in draw_options' do
25
- MemeCaptain::TextPos.new('text', 0, 25, 50, 100,
26
- :font => 'Comic Sans').draw_options[:font].should == 'Comic Sans'
25
+ expect(MemeCaptain::TextPos.new('text', 0, 25, 50, 100,
26
+ :font => 'Comic Sans').draw_options[:font]).to eq('Comic Sans')
27
27
  end
28
28
 
29
29
  end
metadata CHANGED
@@ -1,96 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meme_captain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matthew M. Boedicker
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2015-04-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mime-types
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: '2.5'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
26
+ version: '2.5'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rmagick
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: '0'
33
+ version: 2.14.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: '0'
40
+ version: 2.14.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0'
47
+ version: 10.4.2
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: '0'
54
+ version: 10.4.2
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
- version: '0'
61
+ version: 3.2.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
- version: '0'
68
+ version: 3.2.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: webmock
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
- version: '0'
75
+ version: 1.21.0
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
- version: '0'
82
+ version: 1.21.0
94
83
  description: create meme images
95
84
  email:
96
85
  - matthewm@boedicker.org
@@ -99,8 +88,8 @@ executables:
99
88
  extensions: []
100
89
  extra_rdoc_files: []
101
90
  files:
102
- - .gitignore
103
- - .travis.yml
91
+ - ".gitignore"
92
+ - ".travis.yml"
104
93
  - COPYING
105
94
  - ChangeLog
106
95
  - Gemfile
@@ -118,6 +107,7 @@ files:
118
107
  - lib/meme_captain/text_pos.rb
119
108
  - lib/meme_captain/version.rb
120
109
  - meme_captain.gemspec
110
+ - spec/assets/Coda-Heavy.ttf
121
111
  - spec/assets/me_gusta.png
122
112
  - spec/assets/otter.gif
123
113
  - spec/assets/town_crier.jpg
@@ -127,28 +117,27 @@ files:
127
117
  - spec/memebg_spec.rb
128
118
  - spec/text_pos_spec.rb
129
119
  homepage: https://github.com/mmb/meme_captain
130
- licenses: []
120
+ licenses:
121
+ - MIT
122
+ metadata: {}
131
123
  post_install_message:
132
124
  rdoc_options: []
133
125
  require_paths:
134
126
  - lib
135
127
  required_ruby_version: !ruby/object:Gem::Requirement
136
- none: false
137
128
  requirements:
138
- - - ! '>='
129
+ - - ">="
139
130
  - !ruby/object:Gem::Version
140
131
  version: '0'
141
132
  required_rubygems_version: !ruby/object:Gem::Requirement
142
- none: false
143
133
  requirements:
144
- - - ! '>='
134
+ - - ">="
145
135
  - !ruby/object:Gem::Version
146
136
  version: '0'
147
137
  requirements: []
148
138
  rubyforge_project:
149
- rubygems_version: 1.8.23
139
+ rubygems_version: 2.2.2
150
140
  signing_key:
151
- specification_version: 3
141
+ specification_version: 4
152
142
  summary: create meme images
153
143
  test_files: []
154
- has_rdoc: