jekyll-remote-theme 0.2.0 → 0.2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cc2c47ff8ccf9e15d427a22ea84e807d8105005
|
4
|
+
data.tar.gz: 40aa99109b028ca1261c3d5b6e148a652e812ff8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30bfe47ab5d8826d34e3f6a3457cc3655e0f5a9d5398c2e9278bd284b9fdcd5b6870a4da846684e15a49232b695f7bf592dc6b4bda6917033d49a3dc65acac7f
|
7
|
+
data.tar.gz: dd9feb9f05c9740baf366cd9671f2fbeb6379b8633b32eb700dc8b604b4d3f053cf8a44590561a9fb14a4f4168a5da9b732f8f6316ef591fc32afd9f7c929633
|
data/lib/jekyll-remote-theme.rb
CHANGED
@@ -14,7 +14,6 @@ module Jekyll
|
|
14
14
|
class DownloadError < StandardError; end
|
15
15
|
|
16
16
|
autoload :Downloader, "jekyll-remote-theme/downloader"
|
17
|
-
autoload :Executor, "jekyll-remote-theme/executor"
|
18
17
|
autoload :MockGemspec, "jekyll-remote-theme/mock_gemspec"
|
19
18
|
autoload :Munger, "jekyll-remote-theme/munger"
|
20
19
|
autoload :Theme, "jekyll-remote-theme/theme"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-remote-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
@@ -117,7 +117,6 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- lib/jekyll-remote-theme.rb
|
119
119
|
- lib/jekyll-remote-theme/downloader.rb
|
120
|
-
- lib/jekyll-remote-theme/executor.rb
|
121
120
|
- lib/jekyll-remote-theme/mock_gemspec.rb
|
122
121
|
- lib/jekyll-remote-theme/munger.rb
|
123
122
|
- lib/jekyll-remote-theme/theme.rb
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "open3"
|
4
|
-
|
5
|
-
module Jekyll
|
6
|
-
module RemoteTheme
|
7
|
-
module Executor
|
8
|
-
class ExecutionError < StandardError; end
|
9
|
-
|
10
|
-
TIMEOUT = 3600
|
11
|
-
TIMEOUT_COMMANDS = %w(timeout gtimeout).freeze
|
12
|
-
|
13
|
-
def run_command(*cmds)
|
14
|
-
stdout, stderr, status = Open3.capture3(*cmds)
|
15
|
-
|
16
|
-
if status.exitstatus != 0
|
17
|
-
Jekyll.logger.error LOG_KEY, "Error running command #{cmds.join(" ")}"
|
18
|
-
Jekyll.logger.debug LOG_KEY, stdout
|
19
|
-
raise ExecutionError, stderr
|
20
|
-
end
|
21
|
-
|
22
|
-
stdout
|
23
|
-
end
|
24
|
-
|
25
|
-
def timeout_command
|
26
|
-
@timeout_command ||= begin
|
27
|
-
cmd = TIMEOUT_COMMANDS.find { |exe| executable_exists?(exe) }
|
28
|
-
cmd ? [cmd, TIMEOUT.to_s].freeze : [].freeze
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def executable_exists?(executable)
|
35
|
-
ENV["PATH"].split(File::PATH_SEPARATOR).any? do |dir|
|
36
|
-
exe = File.join(dir, executable)
|
37
|
-
File.file?(exe) && File.executable?(exe)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|