pivotal-git-tracker 0.2.2 → 0.2.3

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: 52e8cb306b9416e25d8ed8c27d1029484f8e8b87
4
- data.tar.gz: 66b5c1f14c63ecc518d07eb6ee430ceb09a77b16
3
+ metadata.gz: 04afbbdc0ca515c5ceed6ea612de0588c9a7bfe6
4
+ data.tar.gz: e022fd448465c950d1aad32d2f826eb0e363b3c4
5
5
  SHA512:
6
- metadata.gz: 4dce0a202a62e8c5302ad81632735b56d674f87206802e24376928f2faebb1cb1fccdcb407400caad756f0219db5d4f03091c09851744eba294a8894d5e62164
7
- data.tar.gz: 92e64a0e87ce9208786c51abe5f72daa6ee2295d013b619f50155867407ae2cab5421b93f92e733d1916c86d5876388037f654ec92b8290637cf0bed81c51f99
6
+ metadata.gz: 6abf78ac34fe20589a466852b60e3fff274d6a0335ff4b54e442b7f42ede661d2d91d715af4f644efab3c168bfb819ff3a69c50ad0176d265a15a258ca5466fd
7
+ data.tar.gz: 711fffa457d6721cb5d349d2096467c60c8e1835a69a277be2f3befdf84a2304aa1b91db11eeda5c595921ccadf6f844928cc8cdfcc5570154be7c19166c521a
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - "2.2.2"
data/Gemfile CHANGED
@@ -5,7 +5,4 @@ gemspec
5
5
 
6
6
  group :tracker do
7
7
  gem 'pivotal-tracker', '~> 0.5', '>= 0.5.10'
8
- gem 'happymapper'
9
- gem 'nokogiri'
10
- gem 'rest-client'
11
8
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pivotal-git-tracker (0.1.0)
4
+ pivotal-git-tracker (0.2.3)
5
5
  pivotal-tracker (>= 0.5.10)
6
6
 
7
7
  GEM
@@ -86,10 +86,10 @@ PLATFORMS
86
86
 
87
87
  DEPENDENCIES
88
88
  guard-rspec
89
- happymapper
90
- nokogiri
91
89
  pivotal-git-tracker!
92
90
  pivotal-tracker (~> 0.5, >= 0.5.10)
93
91
  rake
94
- rest-client
95
92
  rspec
93
+
94
+ BUNDLED WITH
95
+ 1.10.6
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ # Build status
2
+ [![Build Status](https://travis-ci.org/myTomorrows/pivotal-git-tracker.svg)](https://travis-ci.org/myTomorrows/pivotal-git-tracker)
3
+
1
4
  # Tracker::Git
2
5
 
3
6
  Update Pivotal Tracker depending on your local Git repository.
@@ -10,7 +10,7 @@ module Tracker
10
10
  def latest_log(options = {})
11
11
  branch = options.fetch(:branch, 'HEAD')
12
12
  remote_branch = options[:remote_branch]
13
- commits = `git log -n 100 #{[remote_branch, branch].compact.join('..')} --grep='#' --oneline`
13
+ commits = `git log -n 50 #{[remote_branch, branch].compact.join('..')} --grep='#' --oneline`
14
14
  commits.scan(/#([0-9]{9})/).flatten
15
15
  end
16
16
  end
@@ -35,8 +35,10 @@ module Tracker
35
35
 
36
36
  def add_label(story, label)
37
37
  labels = (story.labels || '').split(',')
38
- labels << label
39
- story.update(labels: labels.join(','))
38
+ unless labels.any?{|label| label =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/}
39
+ labels << label
40
+ story.update(labels: labels.join(','))
41
+ end
40
42
  end
41
43
 
42
44
  def comment(story, server_name)
@@ -1,3 +1,3 @@
1
1
  module Tracker
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -10,11 +10,11 @@ describe Tracker::Git do
10
10
 
11
11
  context 'from history' do
12
12
  before do
13
- expect(git).to receive(:`).with("git log -n 100 HEAD --grep='#' --oneline") { '#100 #99' }
13
+ expect(git).to receive(:`).with("git log -n 50 HEAD --grep='#' --oneline") { '#123456789 #987654321' }
14
14
  end
15
15
 
16
16
  it 'gets latest x logs' do
17
- expect(git.latest_log).to eq(['100', '99'])
17
+ expect(git.latest_log).to eq(['123456789', '987654321'])
18
18
  end
19
19
  end
20
20
 
@@ -60,6 +60,11 @@ describe Tracker::Project do
60
60
  expect(story).to receive(:update).with(labels: 'foo,label')
61
61
  project.add_label(story, 'label')
62
62
  end
63
+ it 'doesnt add a second version label' do
64
+ expect(story).to receive(:labels) { 'v1.0.1' }
65
+ expect(story).not_to receive(:update)
66
+ project.add_label(story, 'v1.0.2')
67
+ end
63
68
  end
64
69
 
65
70
  context 'there is already two labels on the story' do
@@ -77,10 +82,14 @@ describe Tracker::Project do
77
82
  let(:notes_stub) { double }
78
83
  let(:server_name) {'spot instance' }
79
84
 
80
- before { allow(notes_stub).to receive(:create).with( hash_including(:text => "Delivered by script to #{server_name}")) }
81
- before { expect(story).to receive(:notes) { notes_stub } }
82
85
 
83
86
  it 'comment story with server' do
87
+ expect(story).to receive(:notes) { notes_stub }
88
+ expect(notes_stub).to receive(:all) { [] }
89
+
90
+ expect(story).to receive(:notes) { notes_stub }
91
+ allow(notes_stub).to receive(:create).with( hash_including(:text => "Delivered by script to #{server_name}"))
92
+
84
93
  project.comment story, server_name
85
94
  end
86
95
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-git-tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Panse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2015-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pivotal-tracker
@@ -77,6 +77,7 @@ files:
77
77
  - ".gitignore"
78
78
  - ".rakeTasks"
79
79
  - ".rspec"
80
+ - ".travis.yml"
80
81
  - Gemfile
81
82
  - Gemfile.lock
82
83
  - Guardfile