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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2518a73158217de0d7bf436053945f088d3b0942
4
- data.tar.gz: ce532ba44729b680de838f62645d410a02c6ab5a
3
+ metadata.gz: dc5371b539ad99125d29732e6269b33d26a4b927
4
+ data.tar.gz: ec641e5218d09f6e121778a610fd0f353ae00aca
5
5
  SHA512:
6
- metadata.gz: d96a557101b0860b1234963e31d7b876f5b1b40b0e264c335932efa8c622c551a150ee6054c4bc49a21c7050ac1a56912a849d1748be533f3ce15cfcfc5a7948
7
- data.tar.gz: 6b4303466d2c699de6f5502f7b4b22a3df3dd634dec35a34d868673759eee960350a50bf62fe19fc6e2594db01f455507e3b4efcc785f3b89ba8ab68e20963e1
6
+ metadata.gz: d124e1673754cff8223959f88c58d1c0760f9b8bda923286c3fc114e6e2e6b2d31fbe3fe8678cf77e051b17eb46b6fc2492111aea92df68d1525d2758fc005e9
7
+ data.tar.gz: ebac6aed07690cf48de721245c4fcdc75451908ed4f872003fbbf5b97d7ba6ee82f0975fcce0f711943651f81f8ab5baf6e0f686cfa2f7f7e66e9a1b9d700e92
data/.travis.yml CHANGED
@@ -4,5 +4,6 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - 2.1.0
7
+ - 2.2.0
7
8
  - ruby-head
8
9
  script: 'bundle exec rake'
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/jekyll-version-plugin.svg)](http://badge.fury.io/rb/jekyll-version-plugin)
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.1'
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.}
@@ -23,7 +23,7 @@ module Jekyll
23
23
  end
24
24
 
25
25
  def git_describe
26
- tagged_version = %x{ git describe --tags }
26
+ tagged_version = %x{ git describe --tags --always }
27
27
 
28
28
  if command_succeeded?
29
29
  tagged_version
@@ -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) # argh
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) # argh
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) # argh
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.1
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: 2014-06-07 00:00:00.000000000 Z
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.2.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