jekyll_version_plugin 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +9 -6
- data/jekyll_version_plugin.gemspec +1 -1
- data/lib/project_version_tag.rb +1 -1
- data/spec/project_version_tag_spec.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc5371b539ad99125d29732e6269b33d26a4b927
|
4
|
+
data.tar.gz: ec641e5218d09f6e121778a610fd0f353ae00aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d124e1673754cff8223959f88c58d1c0760f9b8bda923286c3fc114e6e2e6b2d31fbe3fe8678cf77e051b17eb46b6fc2492111aea92df68d1525d2758fc005e9
|
7
|
+
data.tar.gz: ebac6aed07690cf48de721245c4fcdc75451908ed4f872003fbbf5b97d7ba6ee82f0975fcce0f711943651f81f8ab5baf6e0f686cfa2f7f7e66e9a1b9d700e92
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
## jekyll-version-plugin
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/rob-murray/jekyll-version-plugin.svg)](https://travis-ci.org/rob-murray/jekyll-version-plugin)
|
4
|
-
[![Gem Version](https://badge.fury.io/rb/
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/jekyll_version_plugin.svg)](http://badge.fury.io/rb/jekyll_version_plugin)
|
5
5
|
|
6
6
|
### Description
|
7
7
|
|
@@ -9,13 +9,16 @@ A Liquid tag plugin for [Jekyll](http://jekyllrb.com/) that renders a version id
|
|
9
9
|
|
10
10
|
Identify and highlight the build of your project by calling the tag from your Jekyll project.
|
11
11
|
|
12
|
+
```ruby
|
13
|
+
# this Jekyll view code will generate ...
|
14
|
+
<p>Build: {% project_version %}</p>
|
15
|
+
```
|
16
|
+
|
12
17
|
```html
|
18
|
+
<!-- this html -->
|
13
19
|
<p>Build: 3.0.0-5-ga189420</p>
|
14
20
|
```
|
15
21
|
|
16
|
-
```ruby
|
17
|
-
<p>Build: {% project_version %}</p>
|
18
|
-
```
|
19
22
|
|
20
23
|
### Features
|
21
24
|
|
@@ -36,7 +39,7 @@ As mentioned by [Jekyll's documentation](http://jekyllrb.com/docs/plugins/#insta
|
|
36
39
|
Add the `jekyll_version_plugin` to your site `_config.yml` file for Jekyll to import the plugin as a gem.
|
37
40
|
|
38
41
|
```ruby
|
39
|
-
gems: [jekyll_version_plugin]
|
42
|
+
gems: ['jekyll_version_plugin']
|
40
43
|
```
|
41
44
|
|
42
45
|
#### Manual import
|
@@ -63,7 +66,7 @@ This will simply output the version number, you can then apply your own styling
|
|
63
66
|
|
64
67
|
Happy path is a `git` repo with releases that are tagged, if this is the case then the output will be something like this;
|
65
68
|
|
66
|
-
`3.0.0-5-ga189420`
|
69
|
+
`3.0.0` or `3.0.0-5-ga189420`
|
67
70
|
|
68
71
|
If the repository does not have any `tags` then it will grab the short sha of the last commit, for example;
|
69
72
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'jekyll_version_plugin'
|
7
|
-
spec.version = '1.0.
|
7
|
+
spec.version = '1.0.2'
|
8
8
|
spec.authors = ['Rob Murray']
|
9
9
|
spec.email = ['robmurray17@gmail.com']
|
10
10
|
spec.summary = %q{A Liquid tag plugin for Jekyll that renders a version identifier for your Jekyll site, sourced from the git repository.}
|
data/lib/project_version_tag.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Jekyll::ProjectVersionTag do
|
4
4
|
let(:git_test_command) { 'git rev-parse' }
|
5
|
-
let(:git_tag_command) { ' git describe --tags ' }
|
5
|
+
let(:git_tag_command) { ' git describe --tags --always ' }
|
6
6
|
let(:git_last_commit_command) { ' git rev-parse --short HEAD ' }
|
7
7
|
let(:context) { nil }
|
8
8
|
|
@@ -26,7 +26,7 @@ describe Jekyll::ProjectVersionTag do
|
|
26
26
|
before do
|
27
27
|
allow(subject).to receive(:`).with(git_last_commit_command).and_return(nil)
|
28
28
|
allow(subject).to receive(:`).with(git_tag_command).and_return(nil)
|
29
|
-
allow(subject).to receive(:command_succeeded?).and_return(true)
|
29
|
+
allow(subject).to receive(:command_succeeded?).and_return(true)
|
30
30
|
end
|
31
31
|
|
32
32
|
it 'returns an unable to read project message' do
|
@@ -38,7 +38,7 @@ describe Jekyll::ProjectVersionTag do
|
|
38
38
|
before do
|
39
39
|
allow(subject).to receive(:`).with(git_last_commit_command).and_return('abcdefg')
|
40
40
|
allow(subject).to receive(:`).with(git_tag_command).and_return(nil)
|
41
|
-
allow(subject).to receive(:command_succeeded?).and_return(true)
|
41
|
+
allow(subject).to receive(:command_succeeded?).and_return(true)
|
42
42
|
end
|
43
43
|
|
44
44
|
it 'returns the last commit sha' do
|
@@ -49,7 +49,7 @@ describe Jekyll::ProjectVersionTag do
|
|
49
49
|
context 'given a git repository with a commit and a tag' do
|
50
50
|
before do
|
51
51
|
allow(subject).to receive(:`).with(git_tag_command).and_return('v1.0.0')
|
52
|
-
allow(subject).to receive(:command_succeeded?).and_return(true)
|
52
|
+
allow(subject).to receive(:command_succeeded?).and_return(true)
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'returns the last commit sha' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_version_plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Murray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.4.6
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: A Liquid tag plugin for Jekyll that renders a version identifier for your
|