kindlegen 2.5.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/ext/kindlegen/extconf.rb +9 -11
- data/lib/kindlegen.rb +8 -7
- data/lib/kindlegen/version.rb +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
data/ext/kindlegen/extconf.rb
CHANGED
@@ -7,26 +7,22 @@ File::open('Makefile', 'w') do |w|
|
|
7
7
|
tarball = case RbConfig::CONFIG['host_os']
|
8
8
|
when /mac|darwin/i
|
9
9
|
unzip = 'unzip'
|
10
|
-
"
|
10
|
+
"KindleGen_Mac_i386_v2_7.zip"
|
11
11
|
when /linux|cygwin/i
|
12
12
|
unzip = 'tar zxf'
|
13
|
-
"kindlegen_linux_2.
|
13
|
+
"kindlegen_linux_2.6_i386_v2_7.tar.gz"
|
14
14
|
else
|
15
15
|
STDERR.puts "Host OS unsupported!"
|
16
16
|
exit(1)
|
17
17
|
end
|
18
18
|
|
19
|
-
config = RbConfig::CONFIG.merge(
|
19
|
+
config = RbConfig::CONFIG.merge({
|
20
20
|
"unzip" => unzip,
|
21
21
|
"tarball" => tarball
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
w.puts RbConfig.expand(DATA.read, config.merge('bindir' => bindir) )
|
27
|
-
else
|
28
|
-
w.puts RbConfig.expand(DATA.read, config)
|
29
|
-
end
|
22
|
+
})
|
23
|
+
|
24
|
+
bindir = File.join(File.expand_path('../../..', __FILE__), "bin")
|
25
|
+
w.puts RbConfig.expand(DATA.read, config.merge('bindir' => bindir))
|
30
26
|
end
|
31
27
|
|
32
28
|
|
@@ -38,6 +34,7 @@ TARBALL = $(tarball)
|
|
38
34
|
CURL = curl
|
39
35
|
UNZIP = $(unzip)
|
40
36
|
CP = cp -a
|
37
|
+
MKDIR = mkdir -p
|
41
38
|
|
42
39
|
all:
|
43
40
|
|
@@ -50,4 +47,5 @@ $(TARBALL):
|
|
50
47
|
$(CURL) $(AMAZON)/$(TARBALL) -o $(TARBALL)
|
51
48
|
|
52
49
|
install: $(TARGET)
|
50
|
+
$(MKDIR) $(BINDIR)
|
53
51
|
$(CP) $(TARGET) $(BINDIR)
|
data/lib/kindlegen.rb
CHANGED
@@ -3,17 +3,18 @@ require 'pathname'
|
|
3
3
|
require 'systemu'
|
4
4
|
|
5
5
|
module Kindlegen
|
6
|
+
Root = Pathname.new(File.expand_path('../..', __FILE__))
|
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
|
+
|
6
13
|
#
|
7
14
|
# Getting command path of kindlegen.
|
8
|
-
# If it required under gem, returning path in the extension.
|
9
|
-
# Not if, it return simply 'kindlegen' so you have to copy the command into $PATH.
|
10
15
|
#
|
11
16
|
def self.command
|
12
|
-
|
13
|
-
(Pathname( __FILE__ ).parent + '../ext/kindlegen/kindlegen').to_s
|
14
|
-
else
|
15
|
-
'kindlegen'
|
16
|
-
end
|
17
|
+
Executables[:kindlegen]
|
17
18
|
end
|
18
19
|
|
19
20
|
#
|
data/lib/kindlegen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kindlegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: systemu
|