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: f143d51ba614a2d6ee6050d17b36942e09f3a6ba
4
- data.tar.gz: 6920fee94da6e9cdc86e84fb64a80991ea8d1e84
3
+ metadata.gz: 6cc2c47ff8ccf9e15d427a22ea84e807d8105005
4
+ data.tar.gz: 40aa99109b028ca1261c3d5b6e148a652e812ff8
5
5
  SHA512:
6
- metadata.gz: 1e0c47f5100f3abb9948fc3c24cd5dbba8673ddc3f554793b278d4cc7f7d53a3257a1dd684d7122330d999145540d338008b289aec938ccd92be94460ab6e2ea
7
- data.tar.gz: 136a0edffff8009838810ac562ea521f2fa01a39ea4222382f5f6c03cbb11b85caaa60c357deba097d5f8504b06c45e05f366ad6ad996f8e7c56135b5eac003e
6
+ metadata.gz: 30bfe47ab5d8826d34e3f6a3457cc3655e0f5a9d5398c2e9278bd284b9fdcd5b6870a4da846684e15a49232b695f7bf592dc6b4bda6917033d49a3dc65acac7f
7
+ data.tar.gz: dd9feb9f05c9740baf366cd9671f2fbeb6379b8633b32eb700dc8b604b4d3f053cf8a44590561a9fb14a4f4168a5da9b732f8f6316ef591fc32afd9f7c929633
@@ -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"
@@ -3,8 +3,6 @@
3
3
  module Jekyll
4
4
  module RemoteTheme
5
5
  class Downloader
6
- include RemoteTheme::Executor
7
-
8
6
  HOST = "https://codeload.github.com".freeze
9
7
  PROJECT_URL = "https://github.com/benbalter/jekyll-remote-theme".freeze
10
8
  TYPHOEUS_OPTIONS = {
@@ -20,7 +20,7 @@ module Jekyll
20
20
  end
21
21
 
22
22
  Jekyll.logger.info LOG_KEY, "Using theme #{theme.name_with_owner}"
23
- return if munged?
23
+ return theme if munged?
24
24
 
25
25
  downloader.run
26
26
  configure_theme
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module RemoteTheme
5
- VERSION = "0.2.0".freeze
5
+ VERSION = "0.2.1".freeze
6
6
  end
7
7
  end
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.0
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