softcover 1.1.27 → 1.1.28

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a5dbd74f8e322cdad06c5c45fe351ea5601abf0
4
- data.tar.gz: 7c03531a20b8bc23ba38e9b7d7fbbcecd48933c1
3
+ metadata.gz: 2a595d41a00ebfd6d31c66ff98999ba968fc50f4
4
+ data.tar.gz: 927fc97ebff447eea5e7bbb0ed648111dbe10f0d
5
5
  SHA512:
6
- metadata.gz: aec06635901ec87431a6b762ef8a2957858dd71581615d60bd7e42ddaa122e689d6a9d9a085cd0f837ba7896fed3033f8870a8b3d9cf0414c5b757cc87dc8d2b
7
- data.tar.gz: f6cea38508fbbd35086dbf1b400685bd4f27b5c75588507602ca44452a0ba3bbebae34d5c1282df48db27885e3771ae2bc0d683c4e0f4efc8b60008abbbf0f6a
6
+ metadata.gz: e02665fff8c2cce940765d939922832835b96708100b3d82f5098ee59d3027ca8eae923440b4fe423f5e01e1b1d1a79231ff3e24f0c64fb5fac73269dd0b8547
7
+ data.tar.gz: 215a3e8ca3c190dc834db897c86be2635f9f2c6b2a5cde568d3b5da2914223f8f6b591e17326cf75790a39d0466c75acd56debf0fc32872c6339161db935bf7e
@@ -43,10 +43,10 @@ most_recent = Dir["#{ENV['HOME']}/Desktop/*.png"].sort_by do |a|
43
43
  end.reverse.first
44
44
  response = 'y'
45
45
  if File.exist?(target) && !options[:force]
46
- puts "File #{target} already exists. Replace? [Y/n]"
46
+ puts "File #{target} already exists. Replace? [y/N]"
47
47
  response = gets.strip.downcase
48
48
  end
49
- unless response.downcase == 'n'
49
+ if response.downcase == 'y'
50
50
  FileUtils.mv(most_recent, target)
51
51
  system "git add #{target}"
52
52
  end
@@ -316,9 +316,11 @@ module Softcover
316
316
  first_child.replace(svg) unless svg == first_child
317
317
  output = svg.to_xhtml
318
318
  svg_filename = File.join(texmath_dir, "#{digest(output)}.svg")
319
+ svg_filename_abspath = File.join("#{Dir.pwd}", svg_filename)
319
320
  File.write(svg_filename, output)
320
321
  # Convert to PNG.
321
322
  png_filename = svg_filename.sub('.svg', '.png')
323
+ png_filename_abspath = svg_filename_abspath.sub('.svg', '.png')
322
324
  pngs << png_filename
323
325
  unless File.exist?(png_filename)
324
326
  unless options[:silent] || options[:quiet]
@@ -327,7 +329,7 @@ module Softcover
327
329
  svg_height = svg['style'].scan(/height: (.*?);/).flatten.first
328
330
  scale_factor = 8 # This scale factor turns out to look good.
329
331
  h = scale_factor * svg_height.to_f
330
- cmd = "#{inkscape} -f #{svg_filename} -e #{png_filename} -h #{h}pt"
332
+ cmd = "#{inkscape} -f #{svg_filename_abspath} -e #{png_filename_abspath} -h #{h}pt"
331
333
  if options[:silent]
332
334
  silence { silence_stream(STDERR) { system cmd } }
333
335
  else
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.1.27"
2
+ VERSION = "1.1.28"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softcover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.27
4
+ version: 1.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-21 00:00:00.000000000 Z
12
+ date: 2016-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic
@@ -1650,7 +1650,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1650
1650
  version: '0'
1651
1651
  requirements: []
1652
1652
  rubyforge_project:
1653
- rubygems_version: 2.4.5
1653
+ rubygems_version: 2.4.5.1
1654
1654
  signing_key:
1655
1655
  specification_version: 4
1656
1656
  summary: An ebook production system & sales and marketing platform for technical authors