lib/socialcast-git-extensions/git.rb in socialcast-git-extensions-3.0.0.pre vs lib/socialcast-git-extensions/git.rb in socialcast-git-extensions-3.0.0.pre2

- old
+ new

@@ -3,10 +3,11 @@ module Socialcast module Gitx module Git RESERVED_BRANCHES = %w{ HEAD master staging prototype next_release } + private def assert_not_protected_branch!(branch, action) raise "Cannot #{action} reserved branch" if RESERVED_BRANCHES.include?(branch) || aggregate_branch?(branch) end # lookup the current branch of the PWD @@ -59,12 +60,12 @@ removed_branches end # integrate a branch into a destination aggregate branch - def integrate_branch(branch, destination_branch = 'staging') - assert_not_protected_branch!(branch, 'integrate') - raise "Only aggregate branches are allowed for integration: #{AGGREGATE_BRANCHES}" unless aggregate_branch?(destination_branch) + def integrate_branch(branch, destination_branch) + assert_not_protected_branch!(branch, 'integrate') unless aggregate_branch?(destination_branch) + raise "Only aggregate branches are allowed for integration: #{AGGREGATE_BRANCHES}" unless aggregate_branch?(destination_branch) || destination_branch == Socialcast::Gitx::BASE_BRANCH say "Integrating " say "#{branch} ", :green say "into " say destination_branch, :green