rake-jekyll 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34adea1c4aa6357e8735d2119bc6fc910874f103
4
- data.tar.gz: 74368dd9521f0084fcc4bcb6dac9a54825035930
3
+ metadata.gz: e10e3e33be1203cbf0bf52796a3e1656d21c9d46
4
+ data.tar.gz: 82fdf6429da1b35aa3cdfa173a090c6c9acc9346
5
5
  SHA512:
6
- metadata.gz: 62acbf2b7d729061c672eb7729799158937a7e2fbe8d38163cff4ba9e033a6de25f83a178c6fde53ced69ca42ae21b058d00a89ebd65fa54b4f4370e6883f215
7
- data.tar.gz: 6a3eaaf4fff13b9973448f6f6e9a6ebc8dd6ef48b2f4b2361c690f171ae085c6fe92bca2356ff1dd079b27308cd47255641747e0c9410cf6bd20973c5c6ceb7b
6
+ metadata.gz: b22bf29cf1a9ab34801a273f91db759e34093cf04781ea0381f5dd49b8069601d2a39da462dfb1c23e53cdd957859996e29c2d8404f0a02d04a988f58d0948fb
7
+ data.tar.gz: a57ba8f2b4b0d115096700d843ebf3964ee68a85e3b17f76d6fb7757284ae0afbefb90d1263302f5fb6571a19786f07e95cf5b05d5c41098519199979c948b0c
@@ -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}/frames"]
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
- system "bundle exec jekyll build --destination #{dest_dir}"
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
@@ -1,5 +1,5 @@
1
1
  module Rake
2
2
  module Jekyll
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
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.3
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-02-09 00:00:00.000000000 Z
11
+ date: 2015-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake