bard 0.8.20 → 0.8.21
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +1 -1
- data/VERSION +1 -1
- data/bard.gemspec +4 -4
- data/features/bard_check.feature +1 -1
- data/features/bard_deploy.feature +1 -1
- data/features/bard_pull.feature +15 -6
- data/features/bard_push.feature +10 -4
- data/features/step_definitions/git_steps.rb +10 -10
- data/features/support/env.rb +6 -1
- data/lib/bard.rb +3 -3
- data/lib/bard/error.rb +1 -1
- metadata +3 -3
data/.gitmodules
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.21
|
data/bard.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bard}
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.21"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Micah Geisel", "Nick Hogle"]
|
12
|
-
s.date = %q{2010-02
|
12
|
+
s.date = %q{2010-03-02}
|
13
13
|
s.default_executable = %q{bard}
|
14
14
|
s.description = %q{This immaculate work of engineering genius allows mere mortals to collaborate with beings of transcendent intelligence like Micah, Michael, and Nick.}
|
15
15
|
s.email = %q{info@botandrose.com}
|
@@ -65,8 +65,8 @@ Gem::Specification.new do |s|
|
|
65
65
|
s.rubygems_version = %q{1.3.5}
|
66
66
|
s.summary = %q{Tools for collaborating with Bot and Rose Design.}
|
67
67
|
s.test_files = [
|
68
|
-
"spec/
|
69
|
-
"spec/
|
68
|
+
"spec/spec_helper.rb",
|
69
|
+
"spec/bard_spec.rb"
|
70
70
|
]
|
71
71
|
|
72
72
|
if s.respond_to? :specification_version then
|
data/features/bard_check.feature
CHANGED
@@ -53,7 +53,7 @@ Feature: Bard can check its environment for missing dependencies and potential p
|
|
53
53
|
|
54
54
|
Scenario: Bard check detects master branch checked out
|
55
55
|
Given a shared rails project
|
56
|
-
And I am on the master branch
|
56
|
+
And I am on the "master" branch
|
57
57
|
When I type "bard check"
|
58
58
|
Then I should see the fatal error "master branch"
|
59
59
|
|
@@ -2,7 +2,7 @@ Feature: Bard deploy should fold the integration branch into master and perform
|
|
2
2
|
|
3
3
|
Scenario: Bard deploy detects non-fast-forward merge from integration to master
|
4
4
|
Given a shared rails project
|
5
|
-
And on development_b, a commit
|
5
|
+
And on development_b, a commit on the "master" branch
|
6
6
|
And on development_b, I type "git push origin master"
|
7
7
|
And a commit
|
8
8
|
When I type "bard deploy"
|
data/features/bard_pull.feature
CHANGED
@@ -52,6 +52,14 @@ Feature: bard pull
|
|
52
52
|
Then I should see the warning "Someone has pushed some changes"
|
53
53
|
And the "integration" branch should be a fast-forward from the "development_b:integration" branch
|
54
54
|
|
55
|
+
Scenario: Bard pull from a topic branch
|
56
|
+
Given on development_b, a commit on the "topic" branch
|
57
|
+
And on development_b, I am on the "topic" branch
|
58
|
+
And on development_b, I type "bard push"
|
59
|
+
And I am on the "topic" branch
|
60
|
+
When I type "bard pull"
|
61
|
+
Then the "topic" branch should match the "development_b:topic" branch
|
62
|
+
|
55
63
|
Scenario: Trying to bard pull when not in the project root
|
56
64
|
Given I am in a subdirectory
|
57
65
|
When I type "bard pull"
|
@@ -65,13 +73,14 @@ Feature: bard pull
|
|
65
73
|
Then I should see the fatal error "You have uncommitted changes!"
|
66
74
|
And the "integration" branch should not match the "development_b:integration" branch
|
67
75
|
|
68
|
-
Scenario: Trying to bard pull when
|
69
|
-
Given on development_b, a commit
|
70
|
-
And on development_b, I
|
71
|
-
And I
|
76
|
+
Scenario: Trying to bard pull when on the "master" branch
|
77
|
+
Given on development_b, a commit on the "master" branch
|
78
|
+
And on development_b, I am on the "master" branch
|
79
|
+
And on development_b, I type "git push origin master"
|
80
|
+
And I am on the "master" branch
|
72
81
|
When I type "bard pull"
|
73
|
-
Then I should see the fatal error "
|
74
|
-
And the "
|
82
|
+
Then I should see the fatal error "on the master branch"
|
83
|
+
And the "master" branch should not match the "development_b:master" branch
|
75
84
|
|
76
85
|
Scenario: Pulling in a change that includes a migration on a dev machine
|
77
86
|
Given on development_b, a commit with a new migration
|
data/features/bard_push.feature
CHANGED
@@ -8,6 +8,12 @@ Feature: bard push
|
|
8
8
|
And on staging, I type "bard stage"
|
9
9
|
Then the "integration" branch should match the "staging:integration" branch
|
10
10
|
|
11
|
+
Scenario: Uploading local changes onto a remote topic branch
|
12
|
+
Given a commit on the "topic" branch
|
13
|
+
And I am on the "topic" branch
|
14
|
+
When I type "bard push"
|
15
|
+
Then the "topic" branch should match the "origin/topic" branch
|
16
|
+
|
11
17
|
Scenario: Pushing a change that includes a migration
|
12
18
|
Given on staging, a staging database
|
13
19
|
And a commit with a new migration
|
@@ -68,11 +74,11 @@ Feature: bard push
|
|
68
74
|
Then I should see the fatal error "root directory"
|
69
75
|
|
70
76
|
Scenario: Trying to bard push when not on the integration branch
|
71
|
-
Given a commit
|
72
|
-
And I am on
|
77
|
+
Given a commit on the "master" branch
|
78
|
+
And I am on the "master" branch
|
73
79
|
When I type "bard push"
|
74
|
-
Then I should see the fatal error "
|
75
|
-
And the "
|
80
|
+
Then I should see the fatal error "on the master branch"
|
81
|
+
And the "master" branch should not match the "origin/master" branch
|
76
82
|
|
77
83
|
Scenario: Trying to bard push with a dirty working directory
|
78
84
|
Given a commit
|
@@ -1,9 +1,9 @@
|
|
1
|
-
Given /^I am on
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
Given /^I am on the "([^\"]+)" branch$/ do |branch|
|
2
|
+
if `git branch` =~ / #{branch}$/
|
3
|
+
type "git checkout #{branch}"
|
4
|
+
else
|
5
|
+
type "git checkout -b #{branch}"
|
6
|
+
end
|
7
7
|
end
|
8
8
|
|
9
9
|
Given /^there is no integration branch$/ do
|
@@ -28,12 +28,12 @@ Given /^a commit$/ do
|
|
28
28
|
type "git commit -am'test commit'"
|
29
29
|
end
|
30
30
|
|
31
|
-
Given /^a commit
|
31
|
+
Given /^a commit on the "([^\"]+)" branch$/ do |branch|
|
32
|
+
Given %(I am on the "#{branch}" branch)
|
32
33
|
text = (rand * 100000000).round
|
33
|
-
type "
|
34
|
-
type "echo '#{text}' > master_#{text}_file"
|
34
|
+
type "echo '#{text}' > #{branch}_#{text}_file"
|
35
35
|
type "git add ."
|
36
|
-
type "git commit -am 'testing
|
36
|
+
type "git commit -am 'testing #{branch} change'"
|
37
37
|
type "git checkout integration"
|
38
38
|
end
|
39
39
|
|
data/features/support/env.rb
CHANGED
@@ -33,7 +33,12 @@ Dir.chdir 'tmp' do
|
|
33
33
|
`git clone --recursive origin.git #{env}`
|
34
34
|
Dir.chdir env do
|
35
35
|
FileUtils.cp "config/database.sample.yml", "config/database.yml"
|
36
|
-
`
|
36
|
+
`grb track master`
|
37
|
+
`git checkout master`
|
38
|
+
unless env == "production"
|
39
|
+
`grb track integration`
|
40
|
+
`git checkout integration`
|
41
|
+
end
|
37
42
|
end
|
38
43
|
end
|
39
44
|
FileUtils.mkdir "fixtures"
|
data/lib/bard.rb
CHANGED
@@ -50,7 +50,7 @@ class Bard < Thor
|
|
50
50
|
|
51
51
|
warn NonFastForwardError unless fast_forward_merge?
|
52
52
|
|
53
|
-
run_crucial "git pull --rebase origin
|
53
|
+
run_crucial "git pull --rebase origin #{current_branch}"
|
54
54
|
run_crucial "rake bootstrap:test"
|
55
55
|
end
|
56
56
|
|
@@ -62,7 +62,7 @@ class Bard < Thor
|
|
62
62
|
raise SubmoduleUnpushedError if submodule_unpushed?
|
63
63
|
raise NonFastForwardError unless fast_forward_merge?
|
64
64
|
|
65
|
-
run_crucial "git push origin
|
65
|
+
run_crucial "git push origin #{current_branch}", true
|
66
66
|
|
67
67
|
run_crucial_via_bard "bard stage"
|
68
68
|
end
|
@@ -113,7 +113,7 @@ class Bard < Thor
|
|
113
113
|
auto_update!
|
114
114
|
check_dependencies
|
115
115
|
raise NotInProjectRootError unless File.directory? ".git"
|
116
|
-
raise
|
116
|
+
raise OnMasterBranchError if current_branch == "master"
|
117
117
|
raise WorkingTreeDirtyError unless `git status`.include? "working directory clean"
|
118
118
|
end
|
119
119
|
end
|
data/lib/bard/error.rb
CHANGED
@@ -5,7 +5,7 @@ class Bard < Thor
|
|
5
5
|
"NonFastForwardError" => "Someone has pushed some changes since you last pulled.\n Kindly run bard pull, ensure that your your changes still work, and try again",
|
6
6
|
"MasterNonFastForwardError" => "The master branch has advanced since last deploy, probably due to a bugfix.\n Rebase your integration branch on top of it, and check for breakage.",
|
7
7
|
"NotInProjectRootError" => "You are not in the project's root directory!",
|
8
|
-
"
|
8
|
+
"OnMasterBranchError" => "You are on the master branch!\n This is almost always a bad idea. Please work on a topic branch. If you have made changes on this branch, please see Micah for assistance.",
|
9
9
|
"WorkingTreeDirtyError" => "You have uncommitted changes!\n Please run git commit before attempting to push or pull.",
|
10
10
|
"StagingDetachedHeadError" => "The staging server is on a detached HEAD!\n Please see Micah for assistance.",
|
11
11
|
"TestsFailedError" => "Automated tests failed!\n See http://integrity.botandrose.com/ for more info."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-02
|
13
|
+
date: 2010-03-02 00:00:00 -08:00
|
14
14
|
default_executable: bard
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -181,5 +181,5 @@ signing_key:
|
|
181
181
|
specification_version: 3
|
182
182
|
summary: Tools for collaborating with Bot and Rose Design.
|
183
183
|
test_files:
|
184
|
-
- spec/bard_spec.rb
|
185
184
|
- spec/spec_helper.rb
|
185
|
+
- spec/bard_spec.rb
|