kindlegen 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,10 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  *.tar.gz
6
+ Makefile
7
+ ext/kindlegen/Kindle*
8
+ ext/kindlegen/Sample*
9
+ ext/kindlegen/Multimedia*
10
+ ext/kindlegen/Readme*
11
+ ext/kindlegen/Release*
12
+ ext/kindlegen/kindlegen
@@ -23,7 +23,7 @@ CURL = curl
23
23
  TARX = tar zxf
24
24
  CP = cp
25
25
 
26
- all: install
26
+ all:
27
27
 
28
28
  $(TARGET): $(TARBALL)
29
29
  $(TARX) $(TARBALL)
@@ -1,5 +1,26 @@
1
1
  require "kindlegen/version"
2
+ require 'pathname'
2
3
 
3
4
  module Kindlegen
4
- # Your code goes here...
5
+ #
6
+ # Getting command path of kindlegen.
7
+ # If it required under gem, returning path in the extension.
8
+ # Not if, it return simply 'kindlegen' so you have to copy the command into $PATH.
9
+ #
10
+ def self.command
11
+ if __FILE__.include? 'gems'
12
+ (Pathname( __FILE__ ).parent + '../ext/kindlegen/kindlegen').to_s
13
+ else
14
+ 'kindlegen'
15
+ end
16
+ end
17
+
18
+ #
19
+ # Run kindlegen command with spacified parameters
20
+ #
21
+ # _params_:: array of command parameters.
22
+ #
23
+ def self.run( *params )
24
+ system command, *params
25
+ end
5
26
  end
@@ -1,3 +1,3 @@
1
1
  module Kindlegen
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
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: 1.2.3
4
+ version: 1.2.4
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: 2011-12-01 00:00:00.000000000 Z
12
+ date: 2011-12-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Installing kindlegen command, downloading tar.gz file from amazon.com,
15
15
  and extracting it and copy kindlegen command to bin.