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

Maintenance #237

Merged
merged 1 commit into from
May 17, 2024
Merged
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
14 changes: 6 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
fail-fast: false
matrix:
ruby:
- '2.7'
- '3.3'
- '3.2'

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -43,10 +44,8 @@ jobs:
fail-fast: false
matrix:
ruby:
- '3.0'
- '2.7'
- '2.6'
- '2.5'
- '3.3'
- '3.2'
- jruby

steps:
Expand Down Expand Up @@ -83,9 +82,8 @@ jobs:
fail-fast: false
matrix:
ruby:
- '2.7'
- '2.6'
- '2.5'
- '3.3'
- '3.2'

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
/spec/reports/
/tmp/

Gemfile.lock

# rspec failure tracking
.rspec_status
19 changes: 18 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,21 @@ source "https://rubygems.org"
gemspec

gem "rake", "~> 12.0"
gem "rspec", "~> 3.0"

gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rake"
gem "rubocop-rspec"

gem "aruba"
gem "cucumber"

gem "guard-bundler"
gem "guard-cucumber"
gem "guard-rspec"
gem "guard-rubocop"

gem "pry"

gem "rspec", ">= 3.9"
gem "simplecov", ">= 0.18.5"
196 changes: 0 additions & 196 deletions Gemfile.lock

This file was deleted.

19 changes: 1 addition & 18 deletions bundler-toolbox.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,5 @@ Gem::Specification.new do |spec|

spec.add_dependency "dry-cli", "~> 0.6.0"
spec.add_dependency "rubytoolbox-api", ">= 0.2.0"

spec.add_development_dependency "rubocop"
spec.add_development_dependency "rubocop-performance"
spec.add_development_dependency "rubocop-rake"
spec.add_development_dependency "rubocop-rspec"

spec.add_development_dependency "aruba"
spec.add_development_dependency "cucumber"

spec.add_development_dependency "guard-bundler"
spec.add_development_dependency "guard-cucumber"
spec.add_development_dependency "guard-rspec"
spec.add_development_dependency "guard-rubocop"

spec.add_development_dependency "pry"

spec.add_development_dependency "rspec", ">= 3.9"
spec.add_development_dependency "simplecov", ">= 0.18.5"
spec.metadata["rubygems_mfa_required"] = "true"
end
2 changes: 1 addition & 1 deletion lib/bundler/toolbox/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def with_environment(new_environment)
raise ArgumentError, "Unknown environment #{new_environment}! Known: #{KNOWN_ENVIRONMENTS.inspect}"
end

old_environment = ENV["BUNDLER_TOOLBOX_ENVIRONMENT"]
old_environment = ENV.fetch("BUNDLER_TOOLBOX_ENVIRONMENT", nil)
ENV["BUNDLER_TOOLBOX_ENVIRONMENT"] = new_environment

begin
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/toolbox/plugins/rubygems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Gem::Commands::ToolboxCommand < Gem::Command
def initialize
super "toolbox", "Hello World"
super("toolbox", "Hello World")
end

def execute
Expand Down
10 changes: 5 additions & 5 deletions spec/bundler/toolbox/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

RSpec.describe Bundler::Toolbox::CLI do
around do |example|
original = ENV["BUNDLER_TOOLBOX_ENVIRONMENT"]
original = ENV.fetch("BUNDLER_TOOLBOX_ENVIRONMENT", nil)
begin
example.run
ensure
Expand All @@ -21,15 +21,15 @@ def invoke(*args)
it "returns #{environment} when BUNDLER_TOOLBOX_ENVIRONMENT is #{environment}" do
ENV["BUNDLER_TOOLBOX_ENVIRONMENT"] = environment

expect(described_class.execution_environment).to be == environment
expect(described_class.execution_environment).to eq environment
end
end

[nil, "foo", true, 42].each do |environment|
it "returns 'unknown' when BUNDLER_TOOLBOX_ENVIRONMENT is #{environment.inspect}" do
ENV["BUNDLER_TOOLBOX_ENVIRONMENT"] = environment.to_s

expect(described_class.execution_environment).to be == "unknown"
expect(described_class.execution_environment).to eq "unknown"
end
end
end
Expand All @@ -49,15 +49,15 @@ def invoke(*args)
block_env = described_class.execution_environment
end

expect(block_env).to be == chosen_env
expect(block_env).to eq chosen_env
end

it "changes environment back to the previous after block has run" do
ENV["BUNDLER_TOOLBOX_ENVIRONMENT"] = "bundler"

described_class.with_environment("rubygems") { "do nothing" }

expect(described_class.execution_environment).to be == "bundler"
expect(described_class.execution_environment).to eq "bundler"
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/toolbox_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe Bundler::Toolbox do
it "has a version number" do
expect(Bundler::Toolbox::VERSION).not_to be nil
expect(Bundler::Toolbox::VERSION).not_to be_nil
end

describe Bundler::Toolbox::FixtureAdapter do
Expand Down
Loading