kindlegen 2.9.5 → 2.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +4 -3
- data/ext/kindlegen/extconf.rb +25 -8
- data/lib/kindlegen.rb +2 -6
- data/lib/kindlegen/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14c84ef203967d9fb3800b97ead160f2a669cbb2
|
4
|
+
data.tar.gz: 23e66cef4eb5e8aa9dd629722227a752a476ef88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49e6ae3f34fd5524d4f25743a0fb01c76d23da84857a63bfa6d3cd42328731b519996526bc602b61debfd4430e616ad757d32e962e3b924b034d0c7f1a393051
|
7
|
+
data.tar.gz: f5e5c0b6b3725164936e950d8eef9e4f1f751a3cc2ecb7f159d6704c3b8bfea54533722b7043e8e94f889cee678c294937cbd1c6ea20f78091623480422170a8
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/ext/kindlegen/extconf.rb
CHANGED
@@ -4,34 +4,51 @@
|
|
4
4
|
|
5
5
|
require 'rbconfig'
|
6
6
|
File::open('Makefile', 'w') do |w|
|
7
|
-
|
7
|
+
case RbConfig::CONFIG['host_os']
|
8
8
|
when /mac|darwin/i
|
9
9
|
unzip = 'unzip'
|
10
|
-
|
10
|
+
tarball = 'KindleGen_Mac_i386_v2_9.zip'
|
11
|
+
target = 'kindlegen'
|
11
12
|
when /linux|cygwin/i
|
12
13
|
unzip = 'tar -zx --no-same-owner -f'
|
13
|
-
|
14
|
+
tarball = 'kindlegen_linux_2.6_i386_v2_9.tar.gz'
|
15
|
+
target = 'kindlegen'
|
14
16
|
when /mingw32/i
|
15
17
|
unzip = 'unzip'
|
16
|
-
|
18
|
+
# Abort if either `unzip' or `curl' if not found
|
19
|
+
`where #{unzip}`
|
20
|
+
unless ($?.success?)
|
21
|
+
STDERR.puts "The program `unzip' not found. Aborting."
|
22
|
+
exit(1)
|
23
|
+
end
|
24
|
+
`where curl`
|
25
|
+
unless ($?.success?)
|
26
|
+
STDERR.puts "The program `curl` not found. Aborting."
|
27
|
+
exit(1)
|
28
|
+
end
|
29
|
+
tarball = 'kindlegen_win32_v2_9.zip'
|
30
|
+
target = 'kindlegen.exe'
|
17
31
|
else
|
18
32
|
STDERR.puts "Host OS unsupported!"
|
19
33
|
exit(1)
|
20
34
|
end
|
21
35
|
|
36
|
+
bindir = File.join(File.expand_path('../../..', __FILE__), "bin")
|
37
|
+
|
22
38
|
config = RbConfig::CONFIG.merge({
|
23
39
|
"unzip" => unzip,
|
24
|
-
"tarball" => tarball
|
40
|
+
"tarball" => tarball,
|
41
|
+
"target" => target,
|
42
|
+
"bindir" => bindir,
|
25
43
|
})
|
26
44
|
|
27
|
-
|
28
|
-
w.puts RbConfig.expand(DATA.read, config.merge('bindir' => bindir))
|
45
|
+
w.puts RbConfig.expand(DATA.read, config)
|
29
46
|
end
|
30
47
|
|
31
48
|
|
32
49
|
__END__
|
33
50
|
AMAZON = http://kindlegen.s3.amazonaws.com
|
34
|
-
TARGET =
|
51
|
+
TARGET = $(target)
|
35
52
|
BINDIR = $(bindir)
|
36
53
|
TARBALL = $(tarball)
|
37
54
|
CURL = curl
|
data/lib/kindlegen.rb
CHANGED
@@ -5,16 +5,12 @@ require 'open3'
|
|
5
5
|
module Kindlegen
|
6
6
|
Root = Pathname.new(File.expand_path('../..', __FILE__))
|
7
7
|
Bin = Root.join('bin')
|
8
|
-
Executables = Bin.children.inject({}) { |h, p|
|
9
|
-
h[p.basename.to_s.to_sym] = p.to_s
|
10
|
-
h
|
11
|
-
}
|
12
8
|
|
13
9
|
#
|
14
10
|
# Getting command path of kindlegen.
|
15
11
|
#
|
16
12
|
def self.command
|
17
|
-
|
13
|
+
Bin.join('kindlegen')
|
18
14
|
end
|
19
15
|
|
20
16
|
#
|
@@ -24,7 +20,7 @@ module Kindlegen
|
|
24
20
|
#
|
25
21
|
def self.run( *params )
|
26
22
|
clean_env do
|
27
|
-
Open3.capture3(command
|
23
|
+
Open3.capture3("#{command} #{params.join(' ')}")
|
28
24
|
end
|
29
25
|
end
|
30
26
|
|
data/lib/kindlegen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kindlegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.4.5
|
80
|
+
rubygems_version: 2.4.5.1
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Installing kindlegen command.
|