deploy_and_deliver 1.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +21 -0
- data/README +4 -13
- data/lib/deploy_and_deliver.rb +24 -0
- data/lib/deploy_and_deliver/recipes.rb +14 -32
- data/lib/deploy_and_deliver/version.rb +3 -0
- metadata +45 -45
- data/.gitignore +0 -1
- data/Rakefile +0 -56
- data/VERSION +0 -1
- data/deploy_and_deliver.gemspec +0 -44
- data/install.rb +0 -1
- data/recipes/deploy_and_deliver.rb +0 -1
data/MIT-LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
Copyright (c) 2011-2012 Daniel Morrison, Collective Idea
|
2
|
+
http://collectiveidea.com
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README
CHANGED
@@ -21,27 +21,18 @@ Then, inside the task for your demo platform, add
|
|
21
21
|
Installation
|
22
22
|
============
|
23
23
|
|
24
|
-
|
24
|
+
Add to your Gemfile
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Install as a gem:
|
30
|
-
|
31
|
-
gem install collectiveidea-deploy_and_deliver --source http://gems.github.com
|
26
|
+
gem 'deploy_and_deliver'
|
32
27
|
|
33
28
|
Add the following in your Capistrano config to load the recipes:
|
34
29
|
|
35
30
|
require 'deploy_and_deliver/recipes'
|
36
31
|
|
37
|
-
Bonus Output
|
38
|
-
============
|
39
|
-
|
40
|
-
|
41
|
-
As an added bonus, if you have Paul Dix's sax-machine gem installed (it's a SAX object parser that uses nokogiri), you'll even get a brief summary report of the delivered stories in your cap output.
|
42
|
-
|
43
32
|
|
44
33
|
Credits
|
45
34
|
=======
|
46
35
|
|
47
36
|
Pluginized and Gemified by Collective Idea (http://collectiveidea.com) based on code from Mike Dalessio, Pivotal Labs (http://pivotallabs.com/users/miked/blog/articles/702-deliver-tracker-stories-from-capistrano)
|
37
|
+
|
38
|
+
Later updated to use the pivotal-tracker gem.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'pivotal-tracker'
|
2
|
+
|
3
|
+
module DeployAndDeliver
|
4
|
+
class Project
|
5
|
+
attr_reader :project
|
6
|
+
|
7
|
+
def initialize(context)
|
8
|
+
PivotalTracker::Client.use_ssl = context[:pivotal_tracker_ssl]
|
9
|
+
PivotalTracker::Client.token = context[:pivotal_tracker_token]
|
10
|
+
@project = PivotalTracker::Project.find(context[:pivotal_tracker_project_id])
|
11
|
+
end
|
12
|
+
|
13
|
+
def deliver_and_report
|
14
|
+
stories = project.stories.all(:current_state => 'finished')
|
15
|
+
stories.each{|story| story.update :current_state => 'delivered'}
|
16
|
+
|
17
|
+
puts "* delivered #{stories.size} stories (#{stories.inject{|sum=0, story| sum + story.estimate}} points)"
|
18
|
+
stories.each do |story|
|
19
|
+
puts " - #{story.story_type.capitalize}: #{story.name} (#{story.estimate} #{story.estimate == 1 ? "point" : "points"})"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -1,42 +1,24 @@
|
|
1
1
|
Capistrano::Configuration.instance.load do
|
2
2
|
|
3
3
|
namespace :pivotal_tracker do
|
4
|
+
def deliverer
|
5
|
+
@deliverer ||= DeployAndDeliver::Project.new(self)
|
6
|
+
end
|
7
|
+
|
4
8
|
desc "deliver your project's 'finished' stories"
|
5
9
|
task :deliver_stories do
|
6
|
-
require 'rubygems'
|
7
|
-
require 'active_resource'
|
8
|
-
|
9
|
-
class Story < ActiveResource::Base ; end
|
10
|
-
|
11
|
-
protocol = self[:pivotal_tracker_ssl] ? 'https' : 'http'
|
12
|
-
Story.site = "#{protocol}://www.pivotaltracker.com/services/v3/projects/:project_id"
|
13
|
-
Story.headers['X-TrackerToken'] = pivotal_tracker_token
|
14
|
-
|
15
10
|
puts "* delivering tracker stories ..."
|
16
|
-
|
11
|
+
deliverer.deliver_and_report
|
12
|
+
end
|
17
13
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
element :description
|
26
|
-
end
|
27
|
-
class Stories
|
28
|
-
include SAXMachine
|
29
|
-
elements :story, :as => :stories, :class => Story
|
30
|
-
end
|
31
|
-
doc = Stories.parse(response.body)
|
32
|
-
puts "* delivered #{doc.stories.length} stories"
|
33
|
-
doc.stories.each do |story|
|
34
|
-
puts " - #{story.story_type}: #{story.name} (#{story.estimate} points)"
|
35
|
-
end
|
36
|
-
rescue LoadError => e
|
37
|
-
puts "* stories delivered."
|
38
|
-
end
|
14
|
+
desc "Mark the deploy with a release story"
|
15
|
+
task :mark_release do
|
16
|
+
story = @deliverer.project.stories.create(
|
17
|
+
:name => "#{ENV['USER']} released to #{stage} at #{Time.now.strftime("%x %X")}",
|
18
|
+
:story_type => "release"
|
19
|
+
)
|
20
|
+
story.update(:current_state => "accepted")
|
39
21
|
end
|
40
22
|
end
|
41
23
|
|
42
|
-
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploy_and_deliver
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
version: 1.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.1.0
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Daniel Morrison
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
date: 2012-02-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: pivotal-tracker
|
16
|
+
requirement: &70112628451740 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.4.1
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70112628451740
|
21
25
|
description: Mark Pivotal Tracker stories as Delivered on deploy.
|
22
26
|
email: daniel@collectiveidea.com
|
23
27
|
executables: []
|
24
|
-
|
25
28
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
29
|
+
extra_rdoc_files:
|
28
30
|
- README
|
29
|
-
|
30
|
-
|
31
|
-
- README
|
32
|
-
- Rakefile
|
33
|
-
- VERSION
|
34
|
-
- deploy_and_deliver.gemspec
|
35
|
-
- install.rb
|
31
|
+
- MIT-LICENSE
|
32
|
+
files:
|
36
33
|
- lib/deploy_and_deliver/recipes.rb
|
37
|
-
-
|
38
|
-
|
39
|
-
|
34
|
+
- lib/deploy_and_deliver/version.rb
|
35
|
+
- lib/deploy_and_deliver.rb
|
36
|
+
- MIT-LICENSE
|
37
|
+
- README
|
38
|
+
homepage: https://github.com/collectiveidea/deploy_and_deliver
|
40
39
|
licenses: []
|
41
|
-
|
42
40
|
post_install_message:
|
43
|
-
rdoc_options:
|
41
|
+
rdoc_options:
|
44
42
|
- --charset=UTF-8
|
45
|
-
require_paths:
|
43
|
+
require_paths:
|
46
44
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
none: false
|
47
|
+
requirements:
|
48
|
+
- - ! '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
segments:
|
52
52
|
- 0
|
53
|
-
|
54
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
hash: -4201837437687559996
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
segments:
|
59
61
|
- 0
|
60
|
-
|
62
|
+
hash: -4201837437687559996
|
61
63
|
requirements: []
|
62
|
-
|
63
64
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.
|
65
|
+
rubygems_version: 1.8.10
|
65
66
|
signing_key:
|
66
67
|
specification_version: 3
|
67
68
|
summary: Capistrano recipes for Pivotal Tracker
|
68
69
|
test_files: []
|
69
|
-
|
data/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
pkg
|
data/Rakefile
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "deploy_and_deliver"
|
8
|
-
gem.summary = %Q{Capistrano recipes for Pivotal Tracker}
|
9
|
-
gem.description = %Q{Mark Pivotal Tracker stories as Delivered on deploy.}
|
10
|
-
gem.email = "daniel@collectiveidea.com"
|
11
|
-
gem.homepage = "http://github.com/collectiveidea/deploy_and_deliver"
|
12
|
-
gem.authors = ["Daniel Morrison"]
|
13
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
|
-
end
|
15
|
-
Jeweler::GemcutterTasks.new
|
16
|
-
rescue LoadError
|
17
|
-
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
18
|
-
end
|
19
|
-
|
20
|
-
require 'rake/testtask'
|
21
|
-
Rake::TestTask.new(:test) do |test|
|
22
|
-
test.libs << 'lib' << 'test'
|
23
|
-
test.pattern = 'test/**/*_test.rb'
|
24
|
-
test.verbose = true
|
25
|
-
end
|
26
|
-
|
27
|
-
begin
|
28
|
-
require 'rcov/rcovtask'
|
29
|
-
Rcov::RcovTask.new do |test|
|
30
|
-
test.libs << 'test'
|
31
|
-
test.pattern = 'test/**/*_test.rb'
|
32
|
-
test.verbose = true
|
33
|
-
end
|
34
|
-
rescue LoadError
|
35
|
-
task :rcov do
|
36
|
-
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
task :test => :check_dependencies
|
41
|
-
|
42
|
-
task :default => :test
|
43
|
-
|
44
|
-
require 'rake/rdoctask'
|
45
|
-
Rake::RDocTask.new do |rdoc|
|
46
|
-
if File.exist?('VERSION')
|
47
|
-
version = File.read('VERSION')
|
48
|
-
else
|
49
|
-
version = ""
|
50
|
-
end
|
51
|
-
|
52
|
-
rdoc.rdoc_dir = 'rdoc'
|
53
|
-
rdoc.title = "deploy_and_deliver #{version}"
|
54
|
-
rdoc.rdoc_files.include('README*')
|
55
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
-
end
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.3
|
data/deploy_and_deliver.gemspec
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{deploy_and_deliver}
|
8
|
-
s.version = "1.0.3"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Daniel Morrison"]
|
12
|
-
s.date = %q{2011-04-22}
|
13
|
-
s.description = %q{Mark Pivotal Tracker stories as Delivered on deploy.}
|
14
|
-
s.email = %q{daniel@collectiveidea.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"README"
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
".gitignore",
|
20
|
-
"README",
|
21
|
-
"Rakefile",
|
22
|
-
"VERSION",
|
23
|
-
"deploy_and_deliver.gemspec",
|
24
|
-
"install.rb",
|
25
|
-
"lib/deploy_and_deliver/recipes.rb",
|
26
|
-
"recipes/deploy_and_deliver.rb"
|
27
|
-
]
|
28
|
-
s.homepage = %q{http://github.com/collectiveidea/deploy_and_deliver}
|
29
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
30
|
-
s.require_paths = ["lib"]
|
31
|
-
s.rubygems_version = %q{1.3.6}
|
32
|
-
s.summary = %q{Capistrano recipes for Pivotal Tracker}
|
33
|
-
|
34
|
-
if s.respond_to? :specification_version then
|
35
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
36
|
-
s.specification_version = 3
|
37
|
-
|
38
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
39
|
-
else
|
40
|
-
end
|
41
|
-
else
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
data/install.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
puts IO.read(File.join(File.dirname(__FILE__), 'README'))
|
@@ -1 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'deploy_and_deliver', 'recipes'))
|