Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make gem releasable without bundling #33

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
engines:
bundler-audit:
enabled: false
duplication:
enabled: true
config:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,7 @@ Cassette::Client.cache.backend.clear
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Releasing

You can use the `./scripts/docker-release.sh` to push a version to rubygems
12 changes: 6 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env rake
require 'bundler/gem_tasks'

require 'rspec/core/rake_task'

require 'cassette/version'
require 'bundler/gem_tasks'

RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = '--format RspecJunitFormatter --out spec/reports/rspec.xml --format documentation --color'
if defined?(RSpec)
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = '--format RspecJunitFormatter --out spec/reports/rspec.xml --format documentation --color'
end
end
11 changes: 11 additions & 0 deletions scripts/docker-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

RELEASE_ARGS="${@:-rake release}"
IMAGE=ruby:2.6

docker run -it --rm \
-w /app \
-v $(pwd):/app \
-v $HOME/.gem:/root/.gem \
$IMAGE \
$RELEASE_ARGS
15 changes: 15 additions & 0 deletions scripts/docker-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

TEST_ARGS="${@:-bundle exec rspec spec}"
IMAGE=ruby:2.6

docker volume create cassette-gems && \
docker run -it --rm \
-w /app \
-v $(pwd):/app \
-v $HOME/.gem:/root/.gem \
-v cassette-gems:/gems \
-e BUNDLE_PATH=/gems \
-e BUNDLE_JOBS=4 \
$IMAGE \
$TEST_ARGS