rake-jekyll 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +2 -2
- data/lib/rake-jekyll/git_deploy_task.rb +18 -0
- data/lib/rake-jekyll/version.rb +1 -1
- 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: e10e3e33be1203cbf0bf52796a3e1656d21c9d46
|
4
|
+
data.tar.gz: 82fdf6429da1b35aa3cdfa173a090c6c9acc9346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b22bf29cf1a9ab34801a273f91db759e34093cf04781ea0381f5dd49b8069601d2a39da462dfb1c23e53cdd957859996e29c2d8404f0a02d04a988f58d0948fb
|
7
|
+
data.tar.gz: a57ba8f2b4b0d115096700d843ebf3964ee68a85e3b17f76d6fb7757284ae0afbefb90d1263302f5fb6571a19786f07e95cf5b05d5c41098519199979c948b0c
|
data/README.adoc
CHANGED
@@ -12,7 +12,7 @@ ifdef::env-github[:idprefix: user-content-]
|
|
12
12
|
|
13
13
|
image:https://inch-ci.org/github/{gh-name}.svg?branch={gh-branch}&style={badge-style}[Inline docs, link="http://inch-ci.org/github/{gh-name}"]
|
14
14
|
image:https://img.shields.io/gem/v/{gem-name}.svg?style={badge-style}[Gem Version, link="https://rubygems.org/gems/{gem-name}"]
|
15
|
-
image:https://img.shields.io/badge/yard-docs-blue.svg?style={badge-style}[Yard Docs, link="http://www.rubydoc.info/github/{gh-name}/
|
15
|
+
image:https://img.shields.io/badge/yard-docs-blue.svg?style={badge-style}[Yard Docs, link="http://www.rubydoc.info/github/{gh-name}/{gh-branch}"]
|
16
16
|
|
17
17
|
|
18
18
|
== Installation
|
@@ -78,7 +78,7 @@ Rake::Jekyll::GitDeployTask.new(:deploy) do |t|
|
|
78
78
|
|
79
79
|
# Run this command to build the site.
|
80
80
|
t.jekyll_build = ->(dest_dir) {
|
81
|
-
|
81
|
+
Rake.sh "bundle exec jekyll build --destination #{dest_dir}"
|
82
82
|
}
|
83
83
|
# Use the default committer (configured in git) when available.
|
84
84
|
t.override_committer = false
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
require 'tmpdir'
|
3
|
+
require 'uri'
|
3
4
|
|
4
5
|
module Rake::Jekyll
|
5
6
|
##
|
@@ -55,6 +56,16 @@ module Rake::Jekyll
|
|
55
56
|
sh "git push -q #{remote_url} #{branch}:#{branch}"
|
56
57
|
end
|
57
58
|
|
59
|
+
##
|
60
|
+
# Runs the system command +cmd+ using +Rake.sh+, but filters sensitive
|
61
|
+
# data (userinfo part of URIs) in the output message.
|
62
|
+
def sh(*cmd, &block)
|
63
|
+
Rake.rake_output_message(filter_sensitive_data(cmd.join(' '))) if verbose
|
64
|
+
verbose false do
|
65
|
+
Rake.sh(*cmd, &block)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
58
69
|
private
|
59
70
|
|
60
71
|
def parse_name_email(str)
|
@@ -64,6 +75,13 @@ module Rake::Jekyll
|
|
64
75
|
end
|
65
76
|
end
|
66
77
|
end
|
78
|
+
|
79
|
+
def filter_sensitive_data(str)
|
80
|
+
URI.extract(str).each_with_object(str.dup) do |uri, s|
|
81
|
+
filtered = URI.parse(uri).tap { |u| u.userinfo &&= '***:***' }.to_s
|
82
|
+
s.gsub!(uri, filtered)
|
83
|
+
end
|
84
|
+
end
|
67
85
|
end
|
68
86
|
|
69
87
|
include GitCommands
|
data/lib/rake-jekyll/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Jirutka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|