bard 0.5.1 → 0.5.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.
- data/VERSION +1 -1
- data/bard.gemspec +1 -1
- data/features/bard_check.feature +7 -0
- data/features/step_definitions/check_steps.rb +6 -0
- data/lib/bard.rb +1 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/bard.gemspec
CHANGED
data/features/bard_check.feature
CHANGED
@@ -37,6 +37,13 @@ Feature: Bard can check its environment for missing dependencies and potential p
|
|
37
37
|
When I type "bard check ."
|
38
38
|
Then I should see the fatal error "missing submodule"
|
39
39
|
|
40
|
+
Scenario: Bard check detects submodules with detached heads
|
41
|
+
Given a shared rails project
|
42
|
+
And a submodule
|
43
|
+
And the submodule has a detached head
|
44
|
+
When I type "bard check ."
|
45
|
+
Then I should see the fatal error "submodule has a detached head"
|
46
|
+
|
40
47
|
Scenario: Bard check detects missing gems
|
41
48
|
Given a shared rails project
|
42
49
|
And I have committed a set of changes that adds the test gem as a dependency
|
@@ -40,6 +40,12 @@ Given /^the submodule is missing$/ do
|
|
40
40
|
type "mkdir submodule"
|
41
41
|
end
|
42
42
|
|
43
|
+
Given /^the submodule has a detached head$/ do
|
44
|
+
Dir.chdir "submodule" do
|
45
|
+
type "git checkout `git rev-parse HEAD`"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
43
49
|
Given /^my "([^\"]*)" environment variable is "([^\"]*)"$/ do |key, value|
|
44
50
|
@env ||= Hash.new
|
45
51
|
@env[key] = value
|
data/lib/bard.rb
CHANGED
@@ -143,6 +143,7 @@ class Bard < Thor
|
|
143
143
|
errors << "pending migrations" if stdout.include? "pending migrations"
|
144
144
|
|
145
145
|
errors << "missing submodule" if `git submodule status` =~ /^-/
|
146
|
+
errors << "submodule has a detached head" unless system 'git submodule foreach "git symbolic-ref HEAD"'
|
146
147
|
errors << "missing gems" if `rake gems` =~ /\[ \]/
|
147
148
|
errors << "you shouldn't be working on the master branch" if `cat .git/HEAD`.include? "refs/heads/master"
|
148
149
|
errors << "missing integration branch" if `git branch` !~ /\bintegration\b/
|