pivo_flow 0.7.1 → 0.8
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 +5 -5
- data/.circleci/config.yml +9 -1
- data/CHANGELOG.md +6 -0
- data/lib/pivo_flow/state.rb +4 -2
- data/lib/pivo_flow/version.rb +1 -1
- data/spec/pivo_flow/state_spec.rb +21 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5f7dcca49848718602868e48648001b3e2a6f2757c6e9df5f4d25d51fd1a9956
|
4
|
+
data.tar.gz: df0d347dd0a6a4e88c1c0bd04400eddf245b531a41e195fb898362ab7f7b9c3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ab6bb9670e58dc28f713f1c56811a04bdecfccf1d0dbefa9b1aaa1da7d77973e4383c3b6d60052f3ddf6cc6eb5f2123a586579f151684c62d04509ffb4fae3f
|
7
|
+
data.tar.gz: e04ed5b10700124753a57812396096a3469be2011015808af09518c1ff9da7046bd4464654d343c19c9213000b4797a3f77d524d2166dae8a08311e3d11aa501
|
data/.circleci/config.yml
CHANGED
@@ -3,7 +3,15 @@ version: 2
|
|
3
3
|
.build_template: &build_definition
|
4
4
|
steps:
|
5
5
|
- checkout
|
6
|
-
-
|
6
|
+
- restore_cache:
|
7
|
+
keys:
|
8
|
+
- v2-pivo-flow-bundle-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pivo_flow.gemspec" }}
|
9
|
+
- v2-pivo-flow-bundle-{{ .Environment.CIRCLE_JOB }}-
|
10
|
+
- run: bundle check || bundle install
|
11
|
+
- save_cache:
|
12
|
+
key: v2-pivo-flow-bundle-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pivo_flow.gemspec" }}
|
13
|
+
paths:
|
14
|
+
- /usr/local/bundle
|
7
15
|
- run: bundle exec rspec --require spec_helper --format documentation --color spec
|
8
16
|
working_directory: ~/app
|
9
17
|
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
# 0.8 - 2018-12-29
|
6
|
+
|
7
|
+
## Fixed
|
8
|
+
|
9
|
+
* [Fix branches that have slashes in them](https://github.com/lubieniebieski/pivo_flow/pull/28)
|
10
|
+
|
5
11
|
# 0.7 - 2017-10-06
|
6
12
|
|
7
13
|
Thanks [David Balatero](https://github.com/dbalatero) for your help with this
|
data/lib/pivo_flow/state.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module PivoFlow
|
2
2
|
module State
|
3
|
-
|
3
|
+
module_function
|
4
4
|
|
5
5
|
def current_branch_name
|
6
6
|
Grit::Repo.new(Dir.pwd).head.name
|
@@ -11,7 +11,9 @@ module PivoFlow
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def current_story_id_file_path
|
14
|
-
|
14
|
+
flat_branch_name = current_branch_name.gsub('/', '--')
|
15
|
+
|
16
|
+
File.join(story_id_tmp_path, flat_branch_name)
|
15
17
|
end
|
16
18
|
|
17
19
|
def current_story_id
|
data/lib/pivo_flow/version.rb
CHANGED
@@ -1,36 +1,46 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe PivoFlow::State do
|
4
|
-
describe
|
5
|
-
|
6
|
-
|
7
|
-
end
|
4
|
+
describe '#current_story_id_file_path' do
|
5
|
+
it 'should return a path to a branch-based file name' do
|
6
|
+
with_branch_name 'cool-branch'
|
8
7
|
|
9
|
-
it "should return a path to a branch-based file name" do
|
10
8
|
expect(PivoFlow::State.current_story_id_file_path).to eq(
|
11
9
|
"#{Dir.pwd}/tmp/.pivo_flow/stories/cool-branch"
|
12
10
|
)
|
13
11
|
end
|
12
|
+
|
13
|
+
it 'should deal with slashes in the branch name' do
|
14
|
+
with_branch_name 'feature/my-cool-feature/a-thing'
|
15
|
+
|
16
|
+
expect(PivoFlow::State.current_story_id_file_path).to eq(
|
17
|
+
"#{Dir.pwd}/tmp/.pivo_flow/stories/feature--my-cool-feature--a-thing"
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def with_branch_name(name)
|
22
|
+
allow(PivoFlow::State).to receive(:current_branch_name) { name }
|
23
|
+
end
|
14
24
|
end
|
15
25
|
|
16
|
-
describe
|
26
|
+
describe '#current_story_id' do
|
17
27
|
let(:tmp_file) { "#{Dir.pwd}/tmp/.pivo_flow/stories/cool-branch" }
|
18
28
|
|
19
29
|
before do
|
20
|
-
allow(PivoFlow::State).to receive(:current_branch_name) {
|
30
|
+
allow(PivoFlow::State).to receive(:current_branch_name) { 'cool-branch' }
|
21
31
|
|
22
32
|
FileUtils.mkdir_p(PivoFlow::State.story_id_tmp_path)
|
23
|
-
File.write(tmp_file,
|
33
|
+
File.write(tmp_file, '123456')
|
24
34
|
end
|
25
35
|
|
26
36
|
after { FileUtils.remove_file(tmp_file) }
|
27
37
|
|
28
|
-
it
|
29
|
-
expect(PivoFlow::State.current_story_id).to eq(
|
38
|
+
it 'should read it from the tmp file' do
|
39
|
+
expect(PivoFlow::State.current_story_id).to eq('123456')
|
30
40
|
end
|
31
41
|
|
32
42
|
it "should return nil if there's no file for it yet" do
|
33
|
-
allow(PivoFlow::State).to receive(:current_branch_name) {
|
43
|
+
allow(PivoFlow::State).to receive(:current_branch_name) { 'different' }
|
34
44
|
|
35
45
|
expect(PivoFlow::State.current_story_id).to be_nil
|
36
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivo_flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Nowak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pivotal-tracker
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.7.3
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: Simple pivotal tracker integration for day to day work with git
|