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

Neighborhood: Bump to Ruby 3.1 #1163

Merged
merged 3 commits into from
Mar 2, 2023
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
3.1.3
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 2.7.7p221
ruby 3.1.3p185

BUNDLED WITH
2.1.4
2.2.33
4 changes: 2 additions & 2 deletions app/views/furniture_placements/_furniture_placement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
label: t('icons.edit'),
href: [:edit, furniture_placement.room.space, furniture_placement.room, furniture_placement],
method: :get,
title: t('.edit_title', { name: furniture_placement.furniture.model_name.human.titleize })) %>
title: t('.edit_title', name: furniture_placement.furniture.model_name.human.titleize)) %>
<%- end %>

<%= render IconButtonComponent.new(
label: t('icons.remove'),
href: [furniture_placement.room.space, furniture_placement.room, furniture_placement],
title: t('.remove_title', { name: furniture_placement.furniture.model_name.human.titleize }),
title: t('.remove_title', name: furniture_placement.furniture.model_name.human.titleize),
method: :delete,
confirm: t('.confirm_destroy')) %>
</header>
Expand Down
2 changes: 1 addition & 1 deletion config/breadcrumbs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
end

crumb :edit_room do |room|
link t("helpers.submit.room.edit", {room_name: room.name}), [:edit, room.space, room]
link t("helpers.submit.room.edit", room_name: room.name), [:edit, room.space, room]
parent :room, room
end

Expand Down
6 changes: 2 additions & 4 deletions spec/furniture/marketplace/marketplace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
it { is_expected.to have_many(:carts).inverse_of(:marketplace).dependent(:destroy) }

describe "#destroy" do
subject(:destroy) { -> { marketplace.destroy } }

let(:marketplace) { create(:marketplace, :with_orders) }
let(:orders) { marketplace.orders }

context "when there are `Order`s" do
it { is_expected.not_to raise_error }
it { is_expected.not_to change(orders, :count) }
specify { expect { marketplace.destroy }.not_to raise_error }
specify { expect { marketplace.destroy }.not_to change(orders, :count) }
end
end
end
11 changes: 5 additions & 6 deletions spec/models/feature_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
require "rails_helper"
RSpec.describe Feature do
subject(:Feature) { Feature }
describe ".enabled?(feature_name)" do
it "is only true when the feature name is set to 'true' in the ENV" do
stub_const("ENV", {"FEATURE_FOO" => "true", "FEATURE_BAR" => "yes"})
before { stub_const("ENV", "FEATURE_FOO" => "true", "FEATURE_BAR" => "yes") }

expect(Feature.enabled?(:foo)).to be_truthy
expect(Feature.enabled?(:bar)).not_to be_truthy
expect(Feature.enabled?(:baz)).not_to be_truthy
end
it { is_expected.to be_enabled(:foo) }
it { is_expected.not_to be_enabled(:bar) }
it { is_expected.not_to be_enabled(:baz) }
end
end
4 changes: 2 additions & 2 deletions spec/requests/authentication_methods_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "swagger_helper"

RSpec.describe "/authentication_methods/", type: :request do
RSpec.describe "/authentication_methods/" do
path "/authentication_methods" do
include ApiHelpers::Path

Expand Down Expand Up @@ -40,7 +40,7 @@
authentication_method = AuthenticationMethod.find(data[:authentication_method][:id])
expect(authentication_method).to be_present
expect(authentication_method.person).to be_present
expect(authentication_method.person).to eq(person)
expect(authentication_method.person).to eql(person)

expect(data[:authentication_method])
.to eq(id: authentication_method.id,
Expand Down