jekyll-github-metadata 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-github-metadata/metadata_drop.rb +11 -2
- data/lib/jekyll-github-metadata/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: 2d8d2ce4921cd07e0f03e12cf2f8d954c5341c9f
|
4
|
+
data.tar.gz: 4daa57199bffc02ec016dab312dee3f821c1e2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2ffe6ce3c2c7c9f0d095bd5871798eead7c5f0b1807d42868f35acdff72613f5829832f6fc81c11a3a3c1d4146c315f785fed9f5dd213735603edd3cf460edf
|
7
|
+
data.tar.gz: bc2cfcd61f6a865769843ba6c97f4fd16fd5dcd7300f5b429829ee038f4a92656a241aba40dafbfab2d60694a3f8934494f528541482fb0ac2ec7066d01e0391
|
@@ -72,15 +72,24 @@ module Jekyll
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
def git_exe_path
|
76
|
+
ENV["PATH"].to_s.split(File::PATH_SEPARATOR).map { |path| File.join(path, "git") }.find { |path| File.exist?(path) }
|
77
|
+
end
|
78
|
+
|
79
|
+
def git_remotes
|
80
|
+
return [] if git_exe_path.nil?
|
81
|
+
`#{git_exe_path} remote --verbose`.to_s.strip.split("\n")
|
82
|
+
end
|
83
|
+
|
75
84
|
def git_remote_url
|
76
|
-
|
85
|
+
git_remotes.grep(%r{\Aorigin\t}).map do |remote|
|
77
86
|
remote.sub(/\Aorigin\t(.*) \([a-z]+\)/, "\\1")
|
78
87
|
end.uniq.first || ""
|
79
88
|
end
|
80
89
|
|
81
90
|
def nwo_from_git_origin_remote
|
82
91
|
return unless Jekyll.env == "development"
|
83
|
-
matches = git_remote_url.match %r{github.com(:|/)([\w-]+)/([\w
|
92
|
+
matches = git_remote_url.chomp(".git").match %r{github.com(:|/)([\w-]+)/([\w\.-]+)}
|
84
93
|
matches[2..3].join("/") if matches
|
85
94
|
end
|
86
95
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-github-metadata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|