kindlegen 2.9.1 → 2.9.2

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: 2f131b21f00af3380bcac9bde12449b396207d80
4
- data.tar.gz: 6be91ec3887a0fabe9f5b9b5d985291680da504e
3
+ metadata.gz: 5caf21ba8ba88d6157e62fde239ff86c54543946
4
+ data.tar.gz: 607916787bfab480976b0232caa52e7b15400880
5
5
  SHA512:
6
- metadata.gz: c8f5dded04a7f5b270bdf5293089f3729d8d1e1c4324857324f047819c8c3b911e6e6aeee13790dbde3d58fc6e029c2741d2993bedf12ba98abc09aceadf6b84
7
- data.tar.gz: f66ffabfdf5ceac593f54507cc121fbfb97a3734f174083fb55f52cfbe06cc82c92f228e7ea4b549c5a63f0ef12ceeb119bab09e6254826361bd44d668879ce1
6
+ metadata.gz: ef9f6a4c81581f111338f34f3da101439bede31d40201bf830fbb8d7b5203af73cfdf47abed7c8c4b99e8585a472c0a395db86b6c7b67d4313d20c8b79a3c398
7
+ data.tar.gz: 1555c0dbb87819a5f6a6c40f1a4a87105f2ae0daeac1aa3b80ab7ca556b21b6a2eebfa3bb8a8b506ecb9a7ad71459d4a5ce41f7f87ba7fa3faab90ffb3f8c092
data/lib/kindlegen.rb CHANGED
@@ -10,19 +10,30 @@ module Kindlegen
10
10
  h
11
11
  }
12
12
 
13
- #
14
- # Getting command path of kindlegen.
15
- #
16
- def self.command
13
+ #
14
+ # Getting command path of kindlegen.
15
+ #
16
+ def self.command
17
17
  Executables[:kindlegen]
18
- end
18
+ end
19
19
 
20
- #
21
- # Run kindlegen command with spacified parameters
22
- #
23
- # _params_:: array of command parameters.
24
- #
25
- def self.run( *params )
26
- systemu command + ' ' + params.join( ' ' )
27
- end
20
+ #
21
+ # Run kindlegen command with spacified parameters
22
+ #
23
+ # _params_:: array of command parameters.
24
+ #
25
+ def self.run( *params )
26
+ clean_env do
27
+ systemu(command + ' ' + params.join(' '))
28
+ end
29
+ end
30
+
31
+ private
32
+ def self.clean_env
33
+ env_backup = {}.tap{|e|ENV.each{|k,v| e[k] = v}}
34
+ ENV.keys.each{|key| ENV.delete(key)}
35
+ ret = yield
36
+ env_backup.each{|k,v| ENV[k] = v}
37
+ return ret
38
+ end
28
39
  end
@@ -1,3 +1,3 @@
1
1
  module Kindlegen
2
- VERSION = '2.9.1'
2
+ VERSION = '2.9.2'
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.1
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-13 00:00:00.000000000 Z
11
+ date: 2014-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.2.2
79
+ rubygems_version: 2.4.1
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Installing kindlegen command.