tampon 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +18 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +47 -0
- data/VERSION +1 -0
- data/features/step_definitions/tampon_steps.rb +0 -0
- data/features/support/env.rb +15 -0
- data/features/tampon.feature +6 -0
- data/lib/capistrano/helpers/tampon_helper.rb +61 -0
- data/lib/capistrano/tampon.rb +123 -0
- data/recipes/tampon_recipes.rb +1 -0
- data/tampon.gemspec +82 -0
- data/test/helper.rb +20 -0
- data/test/test_tampon.rb +6 -0
- data/test/test_tampon_helpers.rb +109 -0
- metadata +178 -0
data/.document
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
gem 'capistrano'
|
6
|
+
gem 'stringex'
|
7
|
+
# Add dependencies to develop your gem here.
|
8
|
+
# Include everything needed to run rake, tests, features, etc.
|
9
|
+
group :development do
|
10
|
+
gem "shoulda", "~> 3.0.0.beta2"
|
11
|
+
gem 'active_support'
|
12
|
+
gem 'i18n'
|
13
|
+
gem 'minitest-rg'
|
14
|
+
gem "cucumber", ">= 0"
|
15
|
+
gem "bundler", "~> 1.0.0"
|
16
|
+
gem "jeweler", "~> 1.6.4"
|
17
|
+
gem "rcov", ">= 0"
|
18
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Spencer Markowski
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= tampon
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to tampon
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
|
+
* Fork the project
|
10
|
+
* Start a feature/bugfix branch
|
11
|
+
* Commit and push until you are happy with your contribution
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2011 Spencer Markowski. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "tampon"
|
18
|
+
gem.homepage = "http://github.com/esmarkowski/tampon"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Gitflow enabled capistrano}
|
21
|
+
gem.description = %Q{An unrestictive way to deploy using gitflow and capistrano}
|
22
|
+
gem.email = "spencer@theablefew.com"
|
23
|
+
gem.authors = ["Spencer Markowski"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
require 'rcov/rcovtask'
|
36
|
+
Rcov::RcovTask.new do |test|
|
37
|
+
test.libs << 'test'
|
38
|
+
test.pattern = 'test/**/test_*.rb'
|
39
|
+
test.verbose = true
|
40
|
+
test.rcov_opts << '--exclude "gems/*"'
|
41
|
+
end
|
42
|
+
|
43
|
+
require 'cucumber/rake/task'
|
44
|
+
Cucumber::Rake::Task.new(:features)
|
45
|
+
|
46
|
+
task :default => :test
|
47
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.2
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
begin
|
3
|
+
Bundler.setup(:default, :development)
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
$stderr.puts e.message
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
+
exit e.status_code
|
8
|
+
end
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
11
|
+
require 'tampon'
|
12
|
+
|
13
|
+
require 'test/unit/assertions'
|
14
|
+
|
15
|
+
World(Test::Unit::Assertions)
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module Helpers
|
3
|
+
module TamponHelper
|
4
|
+
|
5
|
+
def who
|
6
|
+
(`git config user.name` || `whoami`).chomp
|
7
|
+
end
|
8
|
+
|
9
|
+
def tags
|
10
|
+
`git tag`.split("\n").compact
|
11
|
+
end
|
12
|
+
|
13
|
+
def non_release_tags
|
14
|
+
tags - releases
|
15
|
+
end
|
16
|
+
|
17
|
+
def current_branch
|
18
|
+
branches.select{|b| b =~ /^\*\s/}.first.gsub(/^\*\s/,"")
|
19
|
+
end
|
20
|
+
|
21
|
+
def branches
|
22
|
+
`git branch --no-color`.split("\n")
|
23
|
+
end
|
24
|
+
|
25
|
+
def version_tag_prefix
|
26
|
+
`git config gitflow.prefix.versiontag`.split("\n").first
|
27
|
+
end
|
28
|
+
|
29
|
+
def releases
|
30
|
+
tags.select{|t| t =~ /^#{version_tag_prefix}(\d+)/}
|
31
|
+
end
|
32
|
+
|
33
|
+
def latest_release
|
34
|
+
releases.sort{|x,y| x.split(version_tag_prefix).last <=> y.split(version_tag_prefix).last}.last
|
35
|
+
end
|
36
|
+
|
37
|
+
def available_tags
|
38
|
+
Capistrano::CLI.ui.say "Available Tags:"
|
39
|
+
Capistrano::CLI.ui.say "#{non_release_tags.join("\n")}"
|
40
|
+
end
|
41
|
+
|
42
|
+
def available_releases
|
43
|
+
Capistrano::CLI.ui.say "\nAvailable Releases:"
|
44
|
+
Capistrano::CLI.ui.say "#{releases.join("\n")}"
|
45
|
+
end
|
46
|
+
|
47
|
+
def banner
|
48
|
+
|
49
|
+
<<-BANNER
|
50
|
+
\nTampon for Gitflow
|
51
|
+
,-------------.
|
52
|
+
(o) _ __ _____ )--.
|
53
|
+
`-------------' )
|
54
|
+
( /
|
55
|
+
`---'
|
56
|
+
BANNER
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
require 'capistrano'
|
2
|
+
require 'capistrano/helpers/tampon_helper'
|
3
|
+
require 'stringex'
|
4
|
+
|
5
|
+
module Capistrano
|
6
|
+
class Tampon
|
7
|
+
include Capistrano::Helpers::TamponHelper
|
8
|
+
|
9
|
+
def self.load_into(capistrano_configuration)
|
10
|
+
capistrano_configuration.load do
|
11
|
+
before "deploy:update_code", "gitflow:calculate_tag"
|
12
|
+
before "gitflow:calculate_tag", "gitflow:verify_up_to_date"
|
13
|
+
|
14
|
+
namespace :tampon do
|
15
|
+
|
16
|
+
def deploy_from
|
17
|
+
if stage == :production
|
18
|
+
from_destination = Capistrano::CLI.ui.ask "\nRelease to deploy: [#{current_branch}] ".color(:yellow).bright.to_url
|
19
|
+
elsif stage == :staging
|
20
|
+
create_tag = Capistrano::CLI.ui.ask("Do you want to tag deployment? [y/N]").to_url
|
21
|
+
return next_tag if create_tag
|
22
|
+
from_destination = Capistrano::CLI.ui.ask "\nBranch, tag or release to deploy: [#{current_branch}] ".color(:yellow).bright.to_url
|
23
|
+
end
|
24
|
+
return from_destination
|
25
|
+
end
|
26
|
+
|
27
|
+
def next_tag
|
28
|
+
hwhen = Date.today.to_s
|
29
|
+
what = Capistrano::CLI.ui.ask("What does this release introduce? (this will be normalized and used in the tag for this release) ").to_url
|
30
|
+
new_staging_tag = "#{hwhen}-#{who}-#{what}"
|
31
|
+
puts "Tagging current branch for deployment to staging as '#{new_staging_tag}'"
|
32
|
+
system "git tag -a -m 'tagging current code for deployment to staging' #{new_staging_tag}"
|
33
|
+
end
|
34
|
+
|
35
|
+
def using_git?
|
36
|
+
fetch(:scm, :git).to_sym == :git
|
37
|
+
end
|
38
|
+
|
39
|
+
task :verify_up_to_date do
|
40
|
+
if using_git?
|
41
|
+
set :local_branch, `git branch --no-color 2> /dev/null | sed -e '/^[^*]/d'`.gsub(/\* /, '').chomp
|
42
|
+
set :local_sha, `git log --pretty=format:%H HEAD -1`.chomp
|
43
|
+
set :origin_sha, `git log --pretty=format:%H #{local_branch} -1`
|
44
|
+
unless local_sha == origin_sha
|
45
|
+
abort """
|
46
|
+
Your #{local_branch} branch is not up to date with origin/#{local_branch}.
|
47
|
+
Please make sure you have pulled and pushed all code before deploying:
|
48
|
+
|
49
|
+
git pull origin #{local_branch}
|
50
|
+
# run tests, etc
|
51
|
+
git push origin #{local_branch}
|
52
|
+
|
53
|
+
"""
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
desc "Calculate the tag to deploy"
|
59
|
+
task :calculate_tag do
|
60
|
+
if using_git?
|
61
|
+
# make sure we have any other deployment tags that have been pushed by others so our auto-increment code doesn't create conflicting tags
|
62
|
+
`git fetch`
|
63
|
+
|
64
|
+
if respond_to?("tag_#{stage}")
|
65
|
+
send "tag_#{stage}"
|
66
|
+
|
67
|
+
system "git push --tags origin #{local_branch}"
|
68
|
+
if $? != 0
|
69
|
+
abort "git push failed"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
desc "Mark the current code as a staging/qa release"
|
76
|
+
task :tag_staging do
|
77
|
+
#current_sha = `git log --pretty=format:%H HEAD -1`
|
78
|
+
#last_staging_tag_sha = if last_staging_tag
|
79
|
+
# `git log --pretty=format:%H #{last_staging_tag} -1`
|
80
|
+
# end
|
81
|
+
|
82
|
+
#if last_staging_tag_sha == current_sha
|
83
|
+
# puts "Not re-tagging staging because latest tag (#{last_staging_tag}) already points to HEAD"
|
84
|
+
# new_staging_tag = last_staging_tag
|
85
|
+
#else
|
86
|
+
#
|
87
|
+
staging_destination = deploy_from
|
88
|
+
|
89
|
+
#end
|
90
|
+
|
91
|
+
set :branch, new_staging_tag
|
92
|
+
end
|
93
|
+
|
94
|
+
desc "Push the approved tag to production. Pass in tag to deploy with '-s tag=staging-YYYY-MM-DD-X-feature'."
|
95
|
+
task :tag_production do
|
96
|
+
|
97
|
+
production_destination = deploy_from
|
98
|
+
|
99
|
+
really_deploy = Capistrano::CLI.ui.ask("Do you really want to deploy #{production_destination}? [y/N]").to_url
|
100
|
+
|
101
|
+
exit(1) unless really_deploy =~ /^[Yy]$/
|
102
|
+
|
103
|
+
set :branch, production_destination
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
namespace :deploy do
|
108
|
+
namespace :pending do
|
109
|
+
task :compare do
|
110
|
+
#gitflow.commit_log
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
if Capistrano::Configuration.instance
|
122
|
+
Capistrano::Tampon.load_into(Capistrano::Configuration.instance)
|
123
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
data/tampon.gemspec
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{tampon}
|
8
|
+
s.version = "0.1.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Spencer Markowski"]
|
12
|
+
s.date = %q{2011-08-18}
|
13
|
+
s.description = %q{An unrestictive way to deploy using gitflow and capistrano}
|
14
|
+
s.email = %q{spencer@theablefew.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"LICENSE.txt",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"features/step_definitions/tampon_steps.rb",
|
27
|
+
"features/support/env.rb",
|
28
|
+
"features/tampon.feature",
|
29
|
+
"lib/capistrano/helpers/tampon_helper.rb",
|
30
|
+
"lib/capistrano/tampon.rb",
|
31
|
+
"recipes/tampon_recipes.rb",
|
32
|
+
"tampon.gemspec",
|
33
|
+
"test/helper.rb",
|
34
|
+
"test/test_tampon.rb",
|
35
|
+
"test/test_tampon_helpers.rb"
|
36
|
+
]
|
37
|
+
s.homepage = %q{http://github.com/esmarkowski/tampon}
|
38
|
+
s.licenses = ["MIT"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubygems_version = %q{1.6.2}
|
41
|
+
s.summary = %q{Gitflow enabled capistrano}
|
42
|
+
|
43
|
+
if s.respond_to? :specification_version then
|
44
|
+
s.specification_version = 3
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<capistrano>, [">= 0"])
|
48
|
+
s.add_runtime_dependency(%q<stringex>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<shoulda>, ["~> 3.0.0.beta2"])
|
50
|
+
s.add_development_dependency(%q<active_support>, [">= 0"])
|
51
|
+
s.add_development_dependency(%q<i18n>, [">= 0"])
|
52
|
+
s.add_development_dependency(%q<minitest-rg>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
54
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
55
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
56
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
57
|
+
else
|
58
|
+
s.add_dependency(%q<capistrano>, [">= 0"])
|
59
|
+
s.add_dependency(%q<stringex>, [">= 0"])
|
60
|
+
s.add_dependency(%q<shoulda>, ["~> 3.0.0.beta2"])
|
61
|
+
s.add_dependency(%q<active_support>, [">= 0"])
|
62
|
+
s.add_dependency(%q<i18n>, [">= 0"])
|
63
|
+
s.add_dependency(%q<minitest-rg>, [">= 0"])
|
64
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
67
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
+
end
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<capistrano>, [">= 0"])
|
71
|
+
s.add_dependency(%q<stringex>, [">= 0"])
|
72
|
+
s.add_dependency(%q<shoulda>, ["~> 3.0.0.beta2"])
|
73
|
+
s.add_dependency(%q<active_support>, [">= 0"])
|
74
|
+
s.add_dependency(%q<i18n>, [">= 0"])
|
75
|
+
s.add_dependency(%q<minitest-rg>, [">= 0"])
|
76
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
77
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
78
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
79
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
require 'minitest-rg'
|
13
|
+
require 'active_support/core_ext'
|
14
|
+
|
15
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
16
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
17
|
+
require 'capistrano/tampon'
|
18
|
+
|
19
|
+
class Test::Unit::TestCase
|
20
|
+
end
|
data/test/test_tampon.rb
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestTamponHelpers < Test::Unit::TestCase
|
4
|
+
context "when intialized" do
|
5
|
+
setup do
|
6
|
+
class HelperMethods
|
7
|
+
include Capistrano::Helpers::TamponHelper
|
8
|
+
end
|
9
|
+
|
10
|
+
@test_class = HelperMethods.new
|
11
|
+
|
12
|
+
end
|
13
|
+
context "tags" do
|
14
|
+
|
15
|
+
|
16
|
+
should "respond_to who" do
|
17
|
+
assert_respond_to @test_class, :who
|
18
|
+
end
|
19
|
+
|
20
|
+
should "not be blank" do
|
21
|
+
puts "\ncurrent user: #{@test_class.who}"
|
22
|
+
assert_equal false, @test_class.who.blank?
|
23
|
+
end
|
24
|
+
|
25
|
+
should 'tags should be an Array' do
|
26
|
+
puts "\nall tags: #{@test_class.tags}"
|
27
|
+
assert @test_class.tags.kind_of?(Array)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
context "then non-release tags" do
|
33
|
+
|
34
|
+
should "respond_to non_release_tags" do
|
35
|
+
assert_respond_to @test_class, :non_release_tags
|
36
|
+
end
|
37
|
+
|
38
|
+
should "return an Array" do
|
39
|
+
assert @test_class.non_release_tags.kind_of?(Array)
|
40
|
+
end
|
41
|
+
|
42
|
+
should 'should be test-non-release-tag' do
|
43
|
+
assert_equal 'test-non-release-tag', @test_class.non_release_tags.last
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
context "branches" do
|
49
|
+
|
50
|
+
should "respond_to :branches" do
|
51
|
+
assert_respond_to @test_class, :branches
|
52
|
+
end
|
53
|
+
|
54
|
+
should 'not be blank' do
|
55
|
+
assert_equal false, @test_class.branches.empty?
|
56
|
+
end
|
57
|
+
|
58
|
+
should "respond to :current_branch" do
|
59
|
+
assert_respond_to @test_class, :current_branch
|
60
|
+
end
|
61
|
+
|
62
|
+
should "show the current branch" do
|
63
|
+
puts "\ncurrent branch: #{@test_class.current_branch}"
|
64
|
+
assert_equal "develop", @test_class.current_branch
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
context "version tag prefix" do
|
70
|
+
|
71
|
+
should "respond_to version_tag_prefix" do
|
72
|
+
assert_respond_to @test_class, :version_tag_prefix
|
73
|
+
end
|
74
|
+
|
75
|
+
should "be 'v'" do
|
76
|
+
assert_equal "v", @test_class.version_tag_prefix
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
context "releases" do
|
82
|
+
|
83
|
+
should "respond to releases" do
|
84
|
+
assert_respond_to @test_class, :releases
|
85
|
+
end
|
86
|
+
|
87
|
+
should "only begin with the version tag prefix" do
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
should 'display all available releases' do
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
should 'display latest release' do
|
96
|
+
assert_equal 'v1.4.1', @test_class.latest_release
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
should 'display banner' do
|
102
|
+
puts @test_class.banner
|
103
|
+
assert_nothing_raised do
|
104
|
+
@test_class.banner
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
metadata
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tampon
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Spencer Markowski
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-18 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: capistrano
|
17
|
+
requirement: &70301988202360 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *70301988202360
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: stringex
|
28
|
+
requirement: &70301988201620 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70301988201620
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: shoulda
|
39
|
+
requirement: &70301988200920 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 3.0.0.beta2
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70301988200920
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: active_support
|
50
|
+
requirement: &70301988200040 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *70301988200040
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: i18n
|
61
|
+
requirement: &70301988199100 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
type: :development
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *70301988199100
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: minitest-rg
|
72
|
+
requirement: &70301988178700 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: *70301988178700
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: cucumber
|
83
|
+
requirement: &70301988174600 !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: *70301988174600
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: bundler
|
94
|
+
requirement: &70301988115320 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ~>
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.0.0
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: *70301988115320
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: jeweler
|
105
|
+
requirement: &70301988113420 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.6.4
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: *70301988113420
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rcov
|
116
|
+
requirement: &70301988112520 !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
type: :development
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: *70301988112520
|
125
|
+
description: An unrestictive way to deploy using gitflow and capistrano
|
126
|
+
email: spencer@theablefew.com
|
127
|
+
executables: []
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files:
|
130
|
+
- LICENSE.txt
|
131
|
+
- README.rdoc
|
132
|
+
files:
|
133
|
+
- .document
|
134
|
+
- Gemfile
|
135
|
+
- LICENSE.txt
|
136
|
+
- README.rdoc
|
137
|
+
- Rakefile
|
138
|
+
- VERSION
|
139
|
+
- features/step_definitions/tampon_steps.rb
|
140
|
+
- features/support/env.rb
|
141
|
+
- features/tampon.feature
|
142
|
+
- lib/capistrano/helpers/tampon_helper.rb
|
143
|
+
- lib/capistrano/tampon.rb
|
144
|
+
- recipes/tampon_recipes.rb
|
145
|
+
- tampon.gemspec
|
146
|
+
- test/helper.rb
|
147
|
+
- test/test_tampon.rb
|
148
|
+
- test/test_tampon_helpers.rb
|
149
|
+
has_rdoc: true
|
150
|
+
homepage: http://github.com/esmarkowski/tampon
|
151
|
+
licenses:
|
152
|
+
- MIT
|
153
|
+
post_install_message:
|
154
|
+
rdoc_options: []
|
155
|
+
require_paths:
|
156
|
+
- lib
|
157
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
+
none: false
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
segments:
|
164
|
+
- 0
|
165
|
+
hash: -447222479694616839
|
166
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
|
+
none: false
|
168
|
+
requirements:
|
169
|
+
- - ! '>='
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
requirements: []
|
173
|
+
rubyforge_project:
|
174
|
+
rubygems_version: 1.6.2
|
175
|
+
signing_key:
|
176
|
+
specification_version: 3
|
177
|
+
summary: Gitflow enabled capistrano
|
178
|
+
test_files: []
|