Skip to content

Commit 2d11ae2

Browse files
committed
bosh-stemcell: move deps to gemspec remove unused gems
- add Rakefile for gem - update testing to use `rake spec` - dev dependency gems are removed from cache - add rake task to cover --tag shellout_types - remove `logger` gem as it is not used - remove vendored gems as the only gem needed now is `rake`
1 parent 6f0a721 commit 2d11ae2

39 files changed

Lines changed: 35 additions & 99 deletions

.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/ruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
- name: test-bosh-stemcell
1212
run: |
1313
bundle install
14-
bundle exec rspec
14+
bundle exec rake
1515
working-directory: bosh-stemcell/

Gemfile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
source 'https://rubygems.org'
22

3-
group :development, :test do
4-
gem 'bosh-stemcell', path: 'bosh-stemcell'
5-
gem 'fakefs'
6-
gem 'logging'
7-
gem 'rake'
8-
gem 'rspec'
9-
gem 'rspec-instafail'
10-
gem 'rspec-its'
11-
gem 'timecop'
12-
end
3+
gem 'rake'
4+
gem 'bosh-stemcell', path: 'bosh-stemcell'

Gemfile.lock

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,14 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
diff-lcs (1.6.2)
10-
fakefs (3.2.1)
11-
little-plugger (1.1.4)
12-
logging (2.4.0)
13-
little-plugger (~> 1.1)
14-
multi_json (~> 1.14)
15-
multi_json (1.19.1)
169
rake (13.3.1)
17-
rspec (3.13.2)
18-
rspec-core (~> 3.13.0)
19-
rspec-expectations (~> 3.13.0)
20-
rspec-mocks (~> 3.13.0)
21-
rspec-core (3.13.6)
22-
rspec-support (~> 3.13.0)
23-
rspec-expectations (3.13.5)
24-
diff-lcs (>= 1.2.0, < 2.0)
25-
rspec-support (~> 3.13.0)
26-
rspec-instafail (1.0.0)
27-
rspec
28-
rspec-its (2.0.0)
29-
rspec-core (>= 3.13.0)
30-
rspec-expectations (>= 3.13.0)
31-
rspec-mocks (3.13.8)
32-
diff-lcs (>= 1.2.0, < 2.0)
33-
rspec-support (~> 3.13.0)
34-
rspec-support (3.13.7)
35-
timecop (0.9.10)
3610

3711
PLATFORMS
3812
ruby
3913

4014
DEPENDENCIES
4115
bosh-stemcell!
42-
fakefs
43-
logging
4416
rake
45-
rspec
46-
rspec-instafail
47-
rspec-its
48-
timecop
4917

5018
BUNDLED WITH
5119
2.5.23

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,23 +174,23 @@ locally, run:
174174
```shell
175175
bundle install --local
176176
cd /opt/bosh/bosh-stemcell
177-
OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rspec spec/ --tag shellout_types
177+
OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rake spec:shellout_types
178178
```
179179

180180
If on macOS, run:
181181

182182
```shell
183-
OSX=true OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rspec spec/ --tag shellout_types
183+
OSX=true OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rake spec:shellout_types
184184
```
185185

186186
### How to run tests for BOSH Linux Stemcell Builder
187187

188188
The BOSH Linux Stemcell Builder code itself can be tested with the following command's:
189189

190190
```shell
191-
bundle install --local
192191
cd /opt/bosh/bosh-stemcell
193-
bundle exec rspec spec/
192+
bundle install
193+
bundle exec rake
194194
```
195195

196196
## Troubleshooting

Rakefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require 'json'
2-
require 'logging'
32

43
namespace :stemcell do
54
desc 'Build a base OS image for use in stemcells'

bosh-stemcell/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec

bosh-stemcell/Rakefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require "rspec/core/rake_task"
2+
3+
task default: [:spec]
4+
5+
RSpec::Core::RakeTask.new(:spec)
6+
7+
namespace :spec do
8+
RSpec::Core::RakeTask.new(:shellout_types) do |t|
9+
t.rspec_opts = "--tag shellout_types"
10+
end
11+
end

bosh-stemcell/bosh-stemcell.gemspec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,12 @@ Gem::Specification.new do |spec|
1919
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
2020
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
2121
spec.require_paths = %w[lib]
22+
23+
spec.add_development_dependency 'fakefs'
24+
spec.add_development_dependency 'rake'
25+
spec.add_development_dependency 'rspec'
26+
spec.add_development_dependency 'rspec-instafail'
27+
spec.add_development_dependency 'rspec-its'
28+
spec.add_development_dependency 'standard'
29+
spec.add_development_dependency 'timecop'
2230
end

0 commit comments

Comments
 (0)