Skip to content

Commit 20417fd

Browse files
committed
Fix: rake, rspec, etc are non-dev dependencies
1 parent 44e1e1b commit 20417fd

8 files changed

Lines changed: 35 additions & 20 deletions

File tree

Gemfile.lock

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,31 @@ PATH
22
remote: bosh-stemcell
33
specs:
44
bosh-stemcell (0.0.0)
5+
rake
6+
rspec
7+
rspec-its
58

69
GEM
710
remote: https://rubygems.org/
811
specs:
12+
diff-lcs (1.6.2)
913
rake (13.3.1)
14+
rspec (3.13.2)
15+
rspec-core (~> 3.13.0)
16+
rspec-expectations (~> 3.13.0)
17+
rspec-mocks (~> 3.13.0)
18+
rspec-core (3.13.6)
19+
rspec-support (~> 3.13.0)
20+
rspec-expectations (3.13.5)
21+
diff-lcs (>= 1.2.0, < 2.0)
22+
rspec-support (~> 3.13.0)
23+
rspec-its (2.0.0)
24+
rspec-core (>= 3.13.0)
25+
rspec-expectations (>= 3.13.0)
26+
rspec-mocks (3.13.8)
27+
diff-lcs (>= 1.2.0, < 2.0)
28+
rspec-support (~> 3.13.0)
29+
rspec-support (3.13.7)
1030

1131
PLATFORMS
1232
ruby

bosh-stemcell/bosh-stemcell.gemspec

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ Gem::Specification.new do |spec|
1818
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
1919
spec.require_paths = %w[lib]
2020

21+
# TODO: separate stemcell specs from gem specs
22+
spec.add_dependency "rake"
23+
spec.add_dependency "rspec"
24+
spec.add_dependency "rspec-its"
25+
26+
# used only in gem's own specs
2127
spec.add_development_dependency "fakefs"
22-
spec.add_development_dependency "rake"
23-
spec.add_development_dependency "rspec"
24-
spec.add_development_dependency "rspec-its"
2528
spec.add_development_dependency "standard"
2629
spec.add_development_dependency "timecop"
2730
end

bosh-stemcell/lib/bosh/stemcell/build_environment.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def prepare_build
4141
def os_image_rspec_command
4242
[
4343
"cd #{STEMCELL_SPECS_DIR};",
44-
"bundle install;",
4544
"OS_IMAGE=#{os_image_tarball_path}",
4645
"bundle exec rspec -fd",
4746
"spec/os_image/#{operating_system_spec_name}_spec.rb"
@@ -51,7 +50,6 @@ def os_image_rspec_command
5150
def stemcell_rspec_command
5251
cmd = [
5352
"cd #{STEMCELL_SPECS_DIR};",
54-
"bundle install;",
5553
"STEMCELL_IMAGE=#{image_file_path}",
5654
"STEMCELL_WORKDIR=#{work_path}",
5755
"STEMCELL_INFRASTRUCTURE=#{infrastructure.name}",

bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require "bosh/stemcell/infrastructure"
44
require "bosh/stemcell/operating_system"
55
require "bosh/stemcell/definition"
6+
require "fakefs/spec_helpers"
67

78
module Bosh::Stemcell
89
describe BuildEnvironment do
@@ -185,7 +186,6 @@ module Bosh::Stemcell
185186
it "returns the correct command" do
186187
expected_rspec_command = [
187188
"cd #{stemcell_specs_dir};",
188-
"bundle install;",
189189
"OS_IMAGE=/some/os_image.tgz",
190190
"bundle exec rspec -fd",
191191
"spec/os_image/#{operating_system.name}_spec.rb"
@@ -204,7 +204,6 @@ module Bosh::Stemcell
204204
it "returns the correct command" do
205205
expected_rspec_command = [
206206
"cd #{stemcell_specs_dir};",
207-
"bundle install;",
208207
"STEMCELL_IMAGE=#{File.join(work_path, "fake-root-disk-image.raw")}",
209208
"STEMCELL_WORKDIR=#{work_path}",
210209
"STEMCELL_INFRASTRUCTURE=#{infrastructure.name}",

bosh-stemcell/spec/bosh/stemcell/stage_runner_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require "spec_helper"
2-
require "timecop"
32
require "bosh/stemcell/stage_runner"
3+
require "timecop"
4+
require "fakefs/spec_helpers"
45

56
module Bosh::Stemcell
67
describe StageRunner do

bosh-stemcell/spec/spec_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require "rspec"
22
require "rspec/its"
3-
require "fakefs/spec_helpers"
43
require "support/shellout_type_assertions"
54
require "tmpdir"
65

ci/tasks/build.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,14 @@ sudo chmod u+s "$(which sudo)"
8484
sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <<SUDO
8585
set -e
8686
87-
pushd "${REPO_ROOT}/bosh-stemcell"
88-
bundle install
89-
popd
90-
9187
cd "${REPO_ROOT}"
88+
bundle install
89+
9290
if [[ -z "$OS_IMAGE" ]]; then
93-
bundle exec rake stemcell:build[$IAAS,$HYPERVISOR,$OS_NAME,$OS_VERSION,$CANDIDATE_BUILD_NUMBER]
94-
rm -f ./tmp/base_os_image.tgz
91+
bundle exec rake stemcell:build[$IAAS,$HYPERVISOR,$OS_NAME,$OS_VERSION,$CANDIDATE_BUILD_NUMBER]
92+
rm -f ./tmp/base_os_image.tgz
9593
else
96-
bundle exec rake stemcell:build_with_local_os_image[$IAAS,$HYPERVISOR,$OS_NAME,$OS_VERSION,$OS_IMAGE,$CANDIDATE_BUILD_NUMBER]
94+
bundle exec rake stemcell:build_with_local_os_image[$IAAS,$HYPERVISOR,$OS_NAME,$OS_VERSION,$OS_IMAGE,$CANDIDATE_BUILD_NUMBER]
9795
fi
9896
SUDO
9997

ci/tasks/os-images/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ sudo chmod u+s "$(which sudo)"
3535
sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <<SUDO
3636
set -e
3737
38-
pushd "${REPO_ROOT}/bosh-stemcell"
39-
bundle install
40-
popd
41-
4238
pushd "${REPO_ROOT}"
39+
bundle install
4340
bundle exec rake stemcell:build_os_image[$OPERATING_SYSTEM_NAME,$OPERATING_SYSTEM_VERSION,$OS_IMAGE]
4441
popd
4542
SUDO

0 commit comments

Comments
 (0)