letter_avatar 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/letter_avatar/avatar.rb +0 -1
- data/lib/letter_avatar/version.rb +1 -1
- data/lib/letter_avatar.rb +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91cab30f2c39951229dd104c9f0b109a8c4370ff
|
4
|
+
data.tar.gz: 4d4e7095dfe310a486bbb454a692666406e72eb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9175fff72b9223e4afed6f37d1c436c58a3be3117e9ac58cd3df6766742ed2b711167475c556d203dea76baba9b764bff96c4ca92fb6871a0dfa0ee09a01eabc
|
7
|
+
data.tar.gz: 145ea83f81b4e0294ca021de7d25c58f3c18a7076c733ef004c4ce8eeac1a6681320411f01d942a0dac75d2f7118f5c2ca2e14345f9548fd7158d3c17745dced
|
data/CHANGELOG.md
CHANGED
data/lib/letter_avatar/avatar.rb
CHANGED
data/lib/letter_avatar.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'posix/spawn'
|
2
|
+
|
1
3
|
require "letter_avatar/version"
|
2
4
|
require "letter_avatar/configuration"
|
3
5
|
require "letter_avatar/avatar"
|
@@ -41,9 +43,14 @@ module LetterAvatar
|
|
41
43
|
|
42
44
|
def self.execute(cmd)
|
43
45
|
cmd = cmd.join(' ') if cmd.is_a?(Array)
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
if Gem.win_platform?
|
47
|
+
require "open3"
|
48
|
+
_stdout_str, err = Open3.capture3(cmd.tr("'", '"'))
|
49
|
+
else
|
50
|
+
pid, _stdin, _stdout, stderr = POSIX::Spawn.popen4(cmd)
|
51
|
+
Process.waitpid(pid)
|
52
|
+
err = stderr.read
|
53
|
+
end
|
47
54
|
if err != nil && err.length > 0
|
48
55
|
raise ExecutionError.new("letter_avatar execution error (when calling '#{cmd}'): '#{err.strip}'")
|
49
56
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letter_avatar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- discourse developers
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-02-
|
14
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: posix-spawn
|