fnando-kitabu 0.3.2 → 0.3.3

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.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ PKG_FILES = %w(Rakefile kitabu.gemspec README.markdown) + Dir["{bin,lib,template
4
4
 
5
5
  spec = Gem::Specification.new do |s|
6
6
  s.name = "kitabu"
7
- s.version = "0.3.2"
7
+ s.version = "0.3.3"
8
8
  s.summary = "A framework for creating e-books from Markdown/Textile text markup using Ruby."
9
9
  s.authors = ["Nando Vieira"]
10
10
  s.email = ["fnando.vieira@gmail.com"]
data/kitabu.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency "unicode", ">= 0"
18
18
  s.add_dependency "main", ">= 0"
19
19
  s.add_dependency "ultraviolet", ">= 0"
20
- s.version = "0.3.2"
20
+ s.version = "0.3.3"
21
21
  s.require_paths = ["lib"]
22
22
  s.files = ["Rakefile",
23
23
  "kitabu.gemspec",
data/lib/kitabu/base.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Kitabu
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
 
4
4
  module Base
5
5
  DEFAULT_LAYOUT = 'boom'
@@ -105,13 +105,7 @@ class BlackCloth < RedCloth
105
105
  # Usage: figure(This is the caption). some_image.jpg
106
106
  def textile_figure(tag, attrs, cite, content)
107
107
  m, title = *attrs.match(/class="(.*?)"/)
108
- width, height = image_size(content)
109
- %(<p class="figure"><img style="width: #{width}px; height: #{height}px" src="../images/#{content}" alt="#{title}" /><br/><span class="caption">#{title}</span></p>)
110
- end
111
-
112
- def image_size(img)
113
- io = IO.popen("php -r '$info = getimagesize(\"images/#{img}\");echo $info[0].'x'.$info[1];'")
114
- io.read.split('x').map{|n| n.to_i}
108
+ %(<p class="figure"><img src="../images/#{content}" alt="#{title}" /><br/><span class="caption">#{title}</span></p>)
115
109
  end
116
110
 
117
111
  # overriding inline method
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fnando-kitabu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira