Permalink
Browse files

kickoff commit

  • Loading branch information...
0 parents commit aae47a17d84841cc70c9649a0fb7ad5789c2c31f @vinbarnes committed Feb 13, 2012
Showing with 124 additions and 0 deletions.
  1. +20 −0 LICENSE
  2. +54 −0 README.md
  3. +33 −0 bin/tp
  4. +17 −0 tracker_packer.gemspec
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (C) 2012 Kevin R. Barnes
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
54 README.md
@@ -0,0 +1,54 @@
+tracker_packer (`tp`)
+=====================
+
+`tp` is a dead-simple command-line utility for importing story templates into
+[Pivotal Tracker](http://pivotaltracker.com) to save precious time on
+your agile project. I mean, think of the velocity for heaven's sake!
+
+Usage:
+
+ tp --token=blah --project=123 --file=stories.yml
+
+will create stories in the project with ID of 123 based on the yaml
+template file provided. Upon completion, the newly created story IDs
+are displayed as output.
+
+Sample yaml template file:
+
+ ---
+ - :current_state: unstarted
+ :name: Provision server
+ - :current_state: unstarted
+ :name: Init git repo
+ - :current_state: unstarted
+ :name: Set gitosis permissions
+ - :current_state: unstarted
+ :name: Set vhost entry
+
+Really the only thing you need to provide is a story name. You can
+further customize and tailor your stories (or chores) by setting the
+desired attributes. See the PT API docs for more info.
+
+`tp` owes its simplicity to the wonderful [pivotal-tracker](https://github.com/jsmestad/pivotal-tracker) [gem](http://rubygems.org/gems/pivotal-tracker).
+
+In fact, there's nothing more to `tp` than slurping in yaml, looping
+and creating stories. This gem is overkill.
+
+Getting Started
+---------------
+
+* Installing:
+
+ gem install tracker_packer
+
+* Retrieving API token:
+
+ curl -u $USERNAME:$PASSWORD -X GET https://www.pivotaltracker.com/services/v3/tokens/active
+
+Additional Information
+----------------------
+
+* Pivotal API v3 Docs: <https://www.pivotaltracker.com/help/api?version=v3>
+
+* Documentation: <http://rdoc.info/projects/jsmestad/pivotal-tracker>
+
33 bin/tp
@@ -0,0 +1,33 @@
+#!/usr/bin/env ruby
+
+require 'pivotal-tracker'
+require 'optparse'
+
+options = {}
+OptionParser.new do |opts|
+ opts.program_name = 'tp'
+ opts.banner = "Usage: tp [options]"
+ opts.on("--token TOKEN",
+ "Pivotal Tracker token") do |token|
+ options[:token] = token
+ end
+ opts.on("--project PROJECT_ID",
+ "Pivotal Tracker project id") do |project|
+ options[:project] = project
+ end
+ opts.on("--file TEMPLATE_FILE",
+ "YAML template file containing stories") do |file|
+ options[:file] = file
+ end
+end.parse(ARGV)
+
+PivotalTracker::Client.token = options[:token]
+
+templates = YAML::load(File.read(options[:file]))
+
+project = PivotalTracker::Project.find(options[:project])
+puts "Packing..."
+
+ids = templates.map {|story| project.stories.create(story).id }
+puts "Stories created: "
+puts ids
17 tracker_packer.gemspec
@@ -0,0 +1,17 @@
+Gem::Specification.new do |s|
+ s.name = 'tracker_packer'
+ s.version = '0.0.1'
+ s.platform = Gem::Platform::RUBY
+ s.date = '2012-02-12'
+ s.summary = "Import story templates into Pivotal Tracker"
+ s.description = <<-message
+ `tp` is a dead-simple command-line utility for importing story templates into Pivotal Tracker.
+message
+ s.author = "Kevin R. Barnes"
+ s.email = 'vinbarnes@gmail.com'
+ s.executables = ['tp']
+ s.files = ['bin/tp']
+ s.add_runtime_dependency 'pivotal-tracker', ['>= 0.4.1']
+ s.rdoc_options = ['--exclude', 'lib']
+ s.homepage = 'https://github.com/vinbarnes/tracker_packer'
+end

0 comments on commit aae47a1

Please sign in to comment.