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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b350121f60c42f397e7fdef1b4f240937620822
4
- data.tar.gz: 6a3dab5096d696c4c723cad7fc4c969539579a50
3
+ metadata.gz: 14c84ef203967d9fb3800b97ead160f2a669cbb2
4
+ data.tar.gz: 23e66cef4eb5e8aa9dd629722227a752a476ef88
5
5
  SHA512:
6
- metadata.gz: abe550440d4abfb8bc1ccf31744f8bb678ecbac9bdfcd5ae40fc22da348705cbeb127a737afc263d339345f35757846e7defbdca78f00402194f9a1e158b7447
7
- data.tar.gz: aaf334e7aa677723d3fac8dbe1c7361265b9cde59932c5ae8927f200412e1e6351c408c3e5e5cfca476b71ae3a9f7a891c46cd7982434b181f703a71aa87670b
6
+ metadata.gz: 49e6ae3f34fd5524d4f25743a0fb01c76d23da84857a63bfa6d3cd42328731b519996526bc602b61debfd4430e616ad757d32e962e3b924b034d0c7f1a393051
7
+ data.tar.gz: f5e5c0b6b3725164936e950d8eef9e4f1f751a3cc2ecb7f159d6704c3b8bfea54533722b7043e8e94f889cee678c294937cbd1c6ea20f78091623480422170a8
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
+ *.swp
2
3
  /pkg/*
3
4
  /.bundle
4
5
  /vendor/bundle
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
+ sudo: false
3
+ cache: bundler
2
4
  rvm:
3
- - 2.1.5
4
- - 2.2.0
5
- - 2.2.1
5
+ - 2.1.7
6
+ - 2.2.3
6
7
  # NOTE the build step is required to run the tests
7
8
  script: bundle exec rake build test
@@ -4,34 +4,51 @@
4
4
 
5
5
  require 'rbconfig'
6
6
  File::open('Makefile', 'w') do |w|
7
- tarball = case RbConfig::CONFIG['host_os']
7
+ case RbConfig::CONFIG['host_os']
8
8
  when /mac|darwin/i
9
9
  unzip = 'unzip'
10
- "KindleGen_Mac_i386_v2_9.zip"
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
- "kindlegen_linux_2.6_i386_v2_9.tar.gz"
14
+ tarball = 'kindlegen_linux_2.6_i386_v2_9.tar.gz'
15
+ target = 'kindlegen'
14
16
  when /mingw32/i
15
17
  unzip = 'unzip'
16
- "kindlegen_win32_v2_9.zip"
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
- bindir = File.join(File.expand_path('../../..', __FILE__), "bin")
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 = kindlegen
51
+ TARGET = $(target)
35
52
  BINDIR = $(bindir)
36
53
  TARBALL = $(tarball)
37
54
  CURL = curl
@@ -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
- Executables[:kindlegen]
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 + ' ' + params.join(' '))
23
+ Open3.capture3("#{command} #{params.join(' ')}")
28
24
  end
29
25
  end
30
26
 
@@ -1,3 +1,3 @@
1
1
  module Kindlegen
2
- VERSION = '2.9.5' unless const_defined?(:VERSION)
2
+ VERSION = '2.9.6' unless const_defined?(:VERSION)
3
3
  end
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.5
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-03-12 00:00:00.000000000 Z
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.