story_guard 0.0.2
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 +7 -0
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +49 -0
- data/Rakefile +7 -0
- data/bin/story_guard +12 -0
- data/lib/story_guard.rb +15 -0
- data/lib/story_guard/git_reader.rb +7 -0
- data/lib/story_guard/version.rb +3 -0
- data/scripts/release_version.sh +11 -0
- data/spec/spec_helper.rb +2 -0
- data/story_guard.gemspec +26 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5b1eb6e8c3bdbcd73e300fd09504ee4438aefce7
|
4
|
+
data.tar.gz: 38a593ed5832449fbda40e3f76daafa7452dcbc3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2087e71fe4f451d1e18caec3d174989fad472a1b317c08b370d24c74f76f03687a5b49b76678452311d3ad473bbf5c1c439d916fd56e046b613dabba83961647
|
7
|
+
data.tar.gz: 1bf5dbaa140b16646607e336b51f6b6c40768657d10b50eb519b079619b03c93baac6f5e2369ba56143e3b752f1d7dc6208285dba2fe431cb76ea9e502347664
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Shelby Doolittle
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# StoryExpress
|
2
|
+
|
3
|
+
Story Express delivers all the stories you've marked as finished.
|
4
|
+
We recommend to use it at the end of your CI build once the stories have been deployed to an environment where your PM can accept.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'story_express'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install story_express
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
**Currently only supports tracker projects.**
|
25
|
+
|
26
|
+
Story Express delivers stories that are found by grepping git logs for a story id.
|
27
|
+
So, to work with story express, include the story id in your commit message(s) for the commit(s) that finish a given story.
|
28
|
+
|
29
|
+
You need your tracker project id and a tracker API key.
|
30
|
+
Set the ```TRACKER_PROJECT_ID``` and ```TRACKER_TOKEN``` to your project id and API key respectively.
|
31
|
+
Then, running ```story_express``` will deliver all your finished stories.
|
32
|
+
|
33
|
+
```
|
34
|
+
TRACKER_PROJECT_ID=123456789 TRACKER_TOKEN=0123456789abcdef story_express
|
35
|
+
```
|
36
|
+
|
37
|
+
## TODO
|
38
|
+
|
39
|
+
* Support other agile tracking systems (JIRA primarily)
|
40
|
+
* Accept inputs as command-line arguments
|
41
|
+
* Allow for customization of matching commit messages
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
1. Fork it ( https://github.com/shelbyd/story_express/fork )
|
46
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
47
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
48
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
49
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/story_guard
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'story_guard'
|
4
|
+
require 'pivotal-tracker'
|
5
|
+
|
6
|
+
raise 'no TRACKER_PROJECT_ID defined' if ENV['TRACKER_PROJECT_ID'].nil?
|
7
|
+
raise 'no TRACKER_TOKEN defined' if ENV['TRACKER_TOKEN'].nil?
|
8
|
+
|
9
|
+
PivotalTracker::Client.token = ENV['TRACKER_TOKEN']
|
10
|
+
PivotalTracker::Client.use_ssl = true
|
11
|
+
|
12
|
+
StoryGuard.go!
|
data/lib/story_guard.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'story_guard/version'
|
2
|
+
require 'story_guard/git_reader'
|
3
|
+
|
4
|
+
module StoryGuard
|
5
|
+
def self.go!
|
6
|
+
project = PivotalTracker::Project.find(ENV['TRACKER_PROJECT_ID'])
|
7
|
+
stories = project.stories.all(state: %w(started finished delivered rejected), story_type: %w(bug feature))
|
8
|
+
puts 'The following stories are not accepted in tracker, but have commits'
|
9
|
+
stories.select do |story|
|
10
|
+
GitReader.grep_log(story.id).length > 0
|
11
|
+
end.each do |story|
|
12
|
+
puts "[#{story.id}] #{story.name} (#{story.url})"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
git co . &&
|
2
|
+
git pull -r &&
|
3
|
+
bundle exec rake &&
|
4
|
+
sed -i "s/VERSION.*/VERSION = \"$1\"/g" ./lib/story_guard/version.rb &&
|
5
|
+
git ci -am "version $1" &&
|
6
|
+
git tag $1 &&
|
7
|
+
git push &&
|
8
|
+
git push origin $1 &&
|
9
|
+
rm *.gem &&
|
10
|
+
gem build story_guard.gemspec &&
|
11
|
+
gem push "story_guard-$1.gem"
|
data/spec/spec_helper.rb
ADDED
data/story_guard.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'story_guard/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "story_guard"
|
8
|
+
spec.version = StoryGuard::VERSION
|
9
|
+
spec.authors = ["Shelby Doolittle"]
|
10
|
+
spec.email = ["shelby@shelbyd.com"]
|
11
|
+
spec.summary = %q{Story Guard lets you know which unaccepted stories have commits in your source control.}
|
12
|
+
spec.description = %q{Run story guard before you release to make sure that all your work is ready (or at least know what's not done).}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "pivotal-tracker", "~> 0.5"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.1"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: story_guard
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shelby Doolittle
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pivotal-tracker
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.1'
|
69
|
+
description: Run story guard before you release to make sure that all your work is
|
70
|
+
ready (or at least know what's not done).
|
71
|
+
email:
|
72
|
+
- shelby@shelbyd.com
|
73
|
+
executables:
|
74
|
+
- story_guard
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".gitignore"
|
79
|
+
- ".rspec"
|
80
|
+
- ".travis.yml"
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- bin/story_guard
|
86
|
+
- lib/story_guard.rb
|
87
|
+
- lib/story_guard/git_reader.rb
|
88
|
+
- lib/story_guard/version.rb
|
89
|
+
- scripts/release_version.sh
|
90
|
+
- spec/spec_helper.rb
|
91
|
+
- story_guard.gemspec
|
92
|
+
homepage: ''
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.4.2
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Story Guard lets you know which unaccepted stories have commits in your source
|
116
|
+
control.
|
117
|
+
test_files:
|
118
|
+
- spec/spec_helper.rb
|
119
|
+
has_rdoc:
|