jekyll-git_metadata 0.0.3 → 0.1.0

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: 2d6f5f22b5d9d85f35612963c680ba3be76e8733
4
- data.tar.gz: 2d1b2684633c878009a7348db2f9d48fda8723b1
3
+ metadata.gz: c0280f1d68740d28eda7bbbc1cf45963a6fb88e5
4
+ data.tar.gz: 891fef742808bc08bdcaf827cb038896e3463385
5
5
  SHA512:
6
- metadata.gz: 20c466a7ba340ed374e24863e262842f0511047f2b8765c500567f67ab3646dd6e0fa8c483936005965f1429271a7ec3f73bb30f7cbdb76324e10015b4a3e9c2
7
- data.tar.gz: 0328e88b09de9be282afda68dae891721dc31896b4396e6f010bfe1a93d14ffb3efa1c06834d80da656d34319b99e33f95459cbaeb01ecf9ff764a8073c780cb
6
+ metadata.gz: be68cfb054fb105e6470e2e1f5aab39b671b81832b98b13c75cf80b1c3202bc6ff390f4a8257041cc9aeaa00c0746c09ab4ebfd189f6dc2b31c7d2efd0149b9b
7
+ data.tar.gz: 031245921d99b103ec49bdd94d296092a4a58a56226ed0512621788f89d6f2a95f2c44e62aac6e99f76cc04c57b8fdc792ae9453e2c094981c7c2a22fef325d7
data/README.md CHANGED
@@ -11,14 +11,14 @@ Expose Git metadata to Jekyll. Just like how Github exposes [repository metadata
11
11
  Add to your `Gemfile`:
12
12
 
13
13
  ```
14
- gem 'jekyll-autolink_email'
14
+ gem 'jekyll-git_metadata'
15
15
  ```
16
16
 
17
17
  Add to your `_config.yml`:
18
18
 
19
19
  ```yml
20
20
  gems:
21
- - jekyll-autolink_email
21
+ - jekyll-git_metadata
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "jekyll", '~> 2.0'
21
+ spec.add_dependency "jekyll", '~> 3.0'
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
24
  spec.add_development_dependency "rake"
@@ -11,11 +11,16 @@ module Jekyll
11
11
 
12
12
  Dir.chdir(site.source) do
13
13
  site.config['git'] = site_data
14
- (site.pages + site.posts).each do |page|
15
- page.data['git'] = page_data(page.path)
14
+ (site.pages + site.posts.docs).each do |page|
15
+ if page.is_a?(Jekyll::Page)
16
+ path = page.path
17
+ else
18
+ path = page.relative_path
19
+ end
20
+ page.data['git'] = page_data(path)
16
21
  end
17
22
  end
18
-
23
+
19
24
  end
20
25
 
21
26
  def site_data
@@ -42,7 +47,7 @@ module Jekyll
42
47
 
43
48
  def authors(file = nil)
44
49
  results = []
45
- cmd = 'git shortlog -se'
50
+ cmd = 'git shortlog -se HEAD'
46
51
  cmd << " -- #{file}" if file
47
52
  result = %x{ #{cmd} }
48
53
  result.lines.each do |line|
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module GitMetadata
3
- VERSION = "0.0.3"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-git_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Tse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-27 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.2.2
185
+ rubygems_version: 2.5.1
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Expose Git metadata to Jekyll.