gplan 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +33 -0
- data/gplan.gemspec +2 -2
- data/lib/printer.rb +7 -1
- data/test/unit/dependency_test.rb +13 -0
- metadata +14 -6
- checksums.yaml +0 -7
- data/gplan-0.1.3.gem +0 -0
data/README.md
CHANGED
@@ -50,6 +50,39 @@ PR:TITLE
|
|
50
50
|
|
51
51
|
Note: unmatched PRs are github pull requests that doesn't have a matching planbox story
|
52
52
|
|
53
|
+
### HTML Release notes
|
54
|
+
|
55
|
+
To ouput release notes as HTML
|
56
|
+
|
57
|
+
gplan -h
|
58
|
+
|
59
|
+
They will look something like this...
|
60
|
+
|
61
|
+
![image](https://cloud.githubusercontent.com/assets/2390653/7012015/0a6e47b0-dc7c-11e4-8ec0-ad8b39c14e94.png)
|
62
|
+
|
63
|
+
|
64
|
+
## Dependency
|
65
|
+
|
66
|
+
Gplan will detect dependencies based on a Github PR. It will find it using this logic
|
67
|
+
|
68
|
+
1. Does the PR contain a markup header (ie. some number of #'s) followed by some variation of the word dependency?
|
69
|
+
|
70
|
+
example:
|
71
|
+
```
|
72
|
+
## Dependencies
|
73
|
+
you must run a rake task
|
74
|
+
```
|
75
|
+
Note that this will include everything from the '##' to the next '##' or the end of the PR body
|
76
|
+
|
77
|
+
2. Does the PR contain a line that starts with "depends on"? then that line will be included
|
78
|
+
|
79
|
+
example:
|
80
|
+
```
|
81
|
+
Depends on #123
|
82
|
+
```
|
83
|
+
|
84
|
+
3. Does the PR contain the label "Has Dependency"?
|
85
|
+
|
53
86
|
## Tests
|
54
87
|
|
55
88
|
To run tests:
|
data/gplan.gemspec
CHANGED
@@ -3,8 +3,8 @@ $:.unshift lib unless $:.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'gplan'
|
6
|
-
s.version = '0.1.
|
7
|
-
s.date = '2015-04-
|
6
|
+
s.version = '0.1.4'
|
7
|
+
s.date = '2015-04-06'
|
8
8
|
s.authors = ["Jeff Koenig"]
|
9
9
|
s.email = 'jkoenig311@gmail.com'
|
10
10
|
s.homepage = 'https://github.com/el-jefe-/gplan'
|
data/lib/printer.rb
CHANGED
@@ -44,12 +44,18 @@ class Printer
|
|
44
44
|
# find dependency based on blocks
|
45
45
|
unless story['blocks'].nil?
|
46
46
|
story['blocks'].each do |block|
|
47
|
-
if block.match(/(^(
|
47
|
+
if block.split("\n")[0].match(/(^(#* *depend(s|ent|ency|encies|encys)))/i)
|
48
48
|
return block
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
# find a line starting with 'depends on' in body
|
54
|
+
if story['body']
|
55
|
+
dependency = story['body'].match(/^(depends +on.*)/i)
|
56
|
+
return dependency[0] if dependency
|
57
|
+
end
|
58
|
+
|
53
59
|
return if story['labels'].nil?
|
54
60
|
# else find dependency based on labels
|
55
61
|
if story['labels'].to_s.match /Has Dependency/i
|
@@ -43,6 +43,12 @@ class DependencyTest < UnitTest
|
|
43
43
|
Printer.new.get_dependency(story).must_equal dependency
|
44
44
|
end
|
45
45
|
|
46
|
+
it 'starting with depends on' do
|
47
|
+
dependency = 'Depends on #123'
|
48
|
+
body = "This is a PR about things and dependencies\n#{dependency}\nmoar stuff"
|
49
|
+
story = {'body' => body}
|
50
|
+
Printer.new.get_dependency(story).must_equal dependency
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
describe 'dont show blocks' do
|
@@ -52,6 +58,13 @@ class DependencyTest < UnitTest
|
|
52
58
|
story = stub_story_with_block dependency
|
53
59
|
Printer.new.get_dependency(story).must_equal nil
|
54
60
|
end
|
61
|
+
|
62
|
+
it 'when depends is on another line of a block' do
|
63
|
+
dependency = "## To QA:\n"+
|
64
|
+
"depends on suff"
|
65
|
+
story = stub_story_with_block dependency
|
66
|
+
Printer.new.get_dependency(story).must_equal nil
|
67
|
+
end
|
55
68
|
end
|
56
69
|
|
57
70
|
describe 'dependency flag' do
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gplan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Jeff Koenig
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
12
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: httparty
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: haml
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rake
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -64,7 +71,7 @@ files:
|
|
64
71
|
- bin/gplan
|
65
72
|
- bin/releasenotes.html
|
66
73
|
- fixtures/vcr_cassettes/github_pull_requests.yml
|
67
|
-
- gplan-0.1.
|
74
|
+
- gplan-0.1.4.gem
|
68
75
|
- gplan.gemspec
|
69
76
|
- lib/github.rb
|
70
77
|
- lib/gplan.rb
|
@@ -76,26 +83,27 @@ files:
|
|
76
83
|
- test/unit/dependency_test.rb
|
77
84
|
homepage: https://github.com/el-jefe-/gplan
|
78
85
|
licenses: []
|
79
|
-
metadata: {}
|
80
86
|
post_install_message:
|
81
87
|
rdoc_options: []
|
82
88
|
require_paths:
|
83
89
|
- lib
|
84
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
85
92
|
requirements:
|
86
93
|
- - '>='
|
87
94
|
- !ruby/object:Gem::Version
|
88
95
|
version: '0'
|
89
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
90
98
|
requirements:
|
91
99
|
- - '>='
|
92
100
|
- !ruby/object:Gem::Version
|
93
101
|
version: '0'
|
94
102
|
requirements: []
|
95
103
|
rubyforge_project:
|
96
|
-
rubygems_version:
|
104
|
+
rubygems_version: 1.8.28
|
97
105
|
signing_key:
|
98
|
-
specification_version:
|
106
|
+
specification_version: 3
|
99
107
|
summary: Creates release notes from the git log and planbox
|
100
108
|
test_files: []
|
101
109
|
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 43c8051408d4828bfe25d3dffa8b618da215d17d
|
4
|
-
data.tar.gz: a06bb0ad26db3c187539255259abf0c3c50a5926
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 7a194113296b337a4489607b68d4c6d3563e77e5bec0935dd70934e167c54bc0584c645fa11ec4ca5e237482f645f20653300479b6e022b1dcdb8746cf82569f
|
7
|
-
data.tar.gz: fea17a6bce3a35c00ef5379c87ba614e23044d5a3e8131900d663bad35c96f857c2ac34facf51179817186879f36f6995785f61593c8f6d65e93786a1b87defd
|
data/gplan-0.1.3.gem
DELETED
Binary file
|