kanoko 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/lib/kanoko/application/convert.rb +14 -6
- data/lib/kanoko/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: 6e06aef66d2ca5109287482d2bf1af0e9eca9c9b
|
4
|
+
data.tar.gz: 5d15008c9d6a21f35c7d238e209afb8d5c05a144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5943356d20ed7a4d4f00304556a6674aebb341561a7cae3cf81647eac5597ece28412a0cd523676fd388612819e8fbf0f33f2cc8c297b472c21c9ac267133226
|
7
|
+
data.tar.gz: c6f898e698853a842e51bb7b0ddaa3504cae0bacafd8394d8e4a1d0fc68efaa1432248e1a1938c6ee4273acc0c52309a4ed9d12c458c80e4e95cef6b072f8920
|
data/.travis.yml
CHANGED
@@ -115,15 +115,11 @@ module Kanoko
|
|
115
115
|
end
|
116
116
|
|
117
117
|
Tempfile.create(dst_name) do |dst_file|
|
118
|
-
|
119
|
-
{ "OMP_NUM_THREADS" => "1" },
|
120
|
-
'convert',
|
121
|
-
'-depth', '8',
|
118
|
+
result = system *system_command(
|
122
119
|
convert_options,
|
123
120
|
"#{src_type}#{src_file.path}",
|
124
121
|
dst_file.path,
|
125
|
-
|
126
|
-
result = system *system_command
|
122
|
+
)
|
127
123
|
|
128
124
|
unless result
|
129
125
|
logger.error "command fail $?=#{$CHILD_STATUS.inspect}"
|
@@ -138,6 +134,18 @@ module Kanoko
|
|
138
134
|
|
139
135
|
private
|
140
136
|
|
137
|
+
def system_command(options, src_path, dst_path)
|
138
|
+
[
|
139
|
+
{ "OMP_NUM_THREADS" => "1" },
|
140
|
+
'convert',
|
141
|
+
'-depth', '8',
|
142
|
+
'-background', 'none',
|
143
|
+
options,
|
144
|
+
src_path,
|
145
|
+
dst_path,
|
146
|
+
].flatten
|
147
|
+
end
|
148
|
+
|
141
149
|
def http_get(uri)
|
142
150
|
retries = 2
|
143
151
|
req = Net::HTTP::Get.new(uri.request_uri)
|
data/lib/kanoko/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kanoko
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.6.3
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: kanoko is a active image generater library.
|