softcover 1.5.3 → 1.5.4

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
  SHA256:
3
- metadata.gz: 2ecb8fbb2b03dd49ec7f772e16bcb5dc87daaf13047d50f2b2db64618aadca1b
4
- data.tar.gz: 5c363924218c7e5ef4f1b3e40e8a94d830091d332b6d71671dc13fdbe0fe1bc8
3
+ metadata.gz: 95a45fce7eae8e93eb3b0a56703d497fb40e2e4c772eac4603065ee7ccf39cf4
4
+ data.tar.gz: de8f8449d1b3a7f44b3cad3e9904a71c4bc4b2ce8cb0954b204a35fdfdc90b97
5
5
  SHA512:
6
- metadata.gz: bff3dd33606a168dc455f84c7fca7ee38387cf9117a5bd8a2106484a80d04437bd99e904379ecad0515565236a1f3867a68cce82c37ea6cd3ae7a1227b2f9fc7
7
- data.tar.gz: 75b360168f94f56eb06c945aa3ad4b4218ba78760251cee49caac8de9316137fafd542f8987a1afca59da2bd77953ff5ef4fcfc7c47b2add0d57bda9c3d31cdc
6
+ metadata.gz: 1fe24f58b5de598b545a56df146a3e4ed42b7932b67a3cb74189cb50e4282630be43832bce6072c59a47abe2063ca9c0df09f168ec6087648a0f8be77445a8e6
7
+ data.tar.gz: 7d51446cf004542c57149fe3fc6a0378dacaf33a4784f49a4e8f42c9b1853a6f48d9253e25dc6869b37fe63a67f46ab72166469fea25445f1ec8d974ec7b2128
@@ -44,6 +44,7 @@ module Softcover
44
44
  [:java, 'Java'],
45
45
  [:zip, 'zip'],
46
46
  [:epubcheck, 'EpubCheck'],
47
+ [:python2, 'Python 2']
47
48
  ]
48
49
  end
49
50
 
@@ -91,6 +92,8 @@ module Softcover
91
92
  message += " ∟ Unzip and place epubcheck-4.0.2/ in a directory on your path"
92
93
  when :inkscape
93
94
  message = "Inkscape (http://inkscape.org/)"
95
+ when :python2
96
+ message = "Configure your shell so that `python` runs Python 2"
94
97
  else
95
98
  raise "Unknown label #{label}"
96
99
  end
@@ -103,6 +106,7 @@ module Softcover
103
106
  # Simulate working for given time.
104
107
  # `softcover check` is more satisfying if it looks like it's doing work.
105
108
  def simulate_work(time)
109
+ return
106
110
  sleep time unless Softcover::test?
107
111
  end
108
112
 
@@ -274,6 +274,12 @@ module Softcover::Utils
274
274
  else
275
275
  ""
276
276
  end
277
+ when :python2
278
+ python = get_filename(:python)
279
+ # Python 2 stupidly outputs the version number to STDERR instead of STDOUT.
280
+ require 'open3'
281
+ stdout, stderr, status = Open3.capture3("#{python} --version")
282
+ stderr.match(/Python 2/) ? python : ""
277
283
  else
278
284
  get_filename(label)
279
285
  end
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.5.3"
2
+ VERSION = "1.5.4"
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.5.3
4
+ version: 1.5.4
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: 2018-07-03 00:00:00.000000000 Z
12
+ date: 2018-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic