Permalink
Browse files

In the event of a missing stack environment variable, assume cflinuxfs2

[#96138062]

Signed-off-by: Anthony Emengo <aemengo@pivotal.io>
  • Loading branch information...
crawsible authored and aemengo committed Jun 12, 2015
1 parent 1b9f66b commit 7f91e7f3a5b50ee1a426e4d2a8c6bffb592a6d25
View
@@ -64,7 +64,7 @@ def dependency_satisfies_current_stack(dependency)
end
def stack
ENV['CF_STACK'] || 'lucid64'
ENV['CF_STACK'] || 'cflinuxfs2'
end
end
end
@@ -24,7 +24,7 @@ def run_download_dependency
version: 0
uri: file://#{original_url}
cf_stacks:
- lucid64
- cflinuxfs2
md5: #{md5}
MANIFEST
end
@@ -26,19 +26,19 @@ def run_translate
version: 1.9.3
uri: http://thong.co.nz/file.tgz
cf_stacks:
- lucid64
- cflinuxfs2
-
name: ruby
version: 2.1.1
uri: http://some.other.repo/ruby-two-one-one.tgz
cf_stacks:
- lucid64
- cflinuxfs2
-
name: jruby
version: 1.9.3::1.7.0
uri: http://another.repo/jruby_1.9.3_jdk_1.7.0.tgz
cf_stacks:
- lucid64
- cflinuxfs2
MANIFEST
}
@@ -25,9 +25,9 @@ module CompileExtensions
'name' => 'both_stacks_widget'
},
{
'match' => /lucid_stack_widget/,
'match' => /cflinuxfs2_stack_widget/,
'version' => '1',
'name' => 'lucid_stack_widget'
'name' => 'cflinuxfs2_stack_widget'
},
],
'dependencies' => [
@@ -45,9 +45,9 @@ module CompileExtensions
},
{
'version' => '1',
'name' => 'lucid_stack_widget',
'uri' => 'lucid_stack_dep',
'cf_stacks' => ['lucid64']
'name' => 'cflinuxfs2_stack_widget',
'uri' => 'cflinuxfs2_stack_dep',
'cf_stacks' => ['cflinuxfs2']
},
]
@@ -97,15 +97,15 @@ module CompileExtensions
ENV.delete('CF_STACK')
end
context 'dependency that matches the lucid64 stack' do
let(:original_url) { 'lucid_stack_widget' }
context 'dependency that matches the cflinuxfs2 stack' do
let(:original_url) { 'cflinuxfs2_stack_widget' }
specify do
expect(matching_dependency['uri']).to eql('lucid_stack_dep')
expect(matching_dependency['uri']).to eql('cflinuxfs2_stack_dep')
end
end
context 'dependency that does not match the lucid64 stack' do
context 'dependency that does not match the cflinuxfs2 stack' do
let(:original_url) { 'first_stack_widget' }
specify do
@@ -140,19 +140,19 @@ module CompileExtensions
'version' => 'one',
'name' => 'my_dog',
'uri' => 'my_dog_has_fleas-v1',
'cf_stacks' => ['lucid64']
'cf_stacks' => ['cflinuxfs2']
},
{
'version' => 'two',
'name' => 'green',
'uri' => 'i_do_not_like_green_eggs_and_ham-v2',
'cf_stacks' => ['lucid64']
'cf_stacks' => ['cflinuxfs2']
},
{
'version' => '1.9.3',
'name' => 'ruby',
'uri' => 'http://cf.buildpacks.com/ruby-1.9.3.tgz',
'cf_stacks' => ['lucid64']
'cf_stacks' => ['cflinuxfs2']
}
]
}

0 comments on commit 7f91e7f

Please sign in to comment.