Skip to content

Commit

Permalink
Merge pull request #1722 from wwahammy/update-to-ruby-3
Browse files Browse the repository at this point in the history
Update to Ruby 3
  • Loading branch information
wwahammy authored Sep 3, 2024
2 parents 5b918fe + fe7a265 commit e8019e5
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
env:
# this version used for running various tools
tool_node_version: "16.x"
tool_ruby_version: "2.7.8"
tool_ruby_version: "3.0.6"
jobs:
eslint:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04]
ruby: [2.7.8]
ruby: [3.0.6]
node: [16.x]
fail-fast: false

2 changes: 1 addition & 1 deletion .github/workflows/single-matrix-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
# this version used for running various tools
tool_node_version: "16.x"
tool_ruby_version: "2.7.8"
tool_ruby_version: "3.0.6"
jobs:
changes:
name: "Check for file changes"
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.8
3.0.6
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem 'jbuilder', '~> 2.11'
gem 'bootsnap', '~> 1.18', require: false # Large rails application booting enhancer
gem 'hamster', '~> 3.0' # Thread-safe collection classes for Ruby
gem 'puma', '~> 5.6'
gem 'rake', '~> 12.3.2'
gem 'rake'
gem 'sassc-rails', '~> 2.1', '>= 2.1.2'
gem 'sassc', '~> 2.0', '>= 2.0.1'
gem 'stripe', '~> 1.58' # January 19, 2017 version of the Stripe API https://stripe.com/docs/api
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ GEM
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.1.1)
rake (12.3.3)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand Down Expand Up @@ -532,7 +532,7 @@ DEPENDENCIES
rack-timeout (~> 0.6.3)
rails (= 6.1.7.8)
rails-i18n (~> 6.0.0, ~> 6)
rake (~> 12.3.2)
rake
react_on_rails (= 12.6.0)
rspec (~> 3.13.0)
rspec-json_expectations (~> 2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-b
#### Ruby install

```bash
rbenv install 2.7.8
rbenv install 3.0.6
```

#### Setup project
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started_wsl2.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ These include:

* PostgreSQL 12 (10 probably works)
* NodeJS 14 (we require 14 because we want the full internationalization built-in)
* Ruby 2.7.8
* Ruby 3.0.6

There are a few optional tools that make working on Houdini easier:

Expand Down Expand Up @@ -118,7 +118,7 @@ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-b
#### Ruby install

```bash
rbenv install 2.7.8
rbenv install 3.0.6
```

> Note: if a build failure occurs, installing the following packages may solve
Expand Down
10 changes: 5 additions & 5 deletions spec/controllers/support/shared_user_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ def __create_associate(host)
u
end

def send(method, *args)
def send(method, action, args={})
case method
when :get
get(*args)
get(action, **args)
when :post
post(*args)
post(action, **args)
when :delete
delete(*args)
delete(action, **args)
when :put
put(*args)
put(action, **args)
end
end

Expand Down
8 changes: 4 additions & 4 deletions spec/legacy_lib/insert/insert_charge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
currency: 'usd',
description: 'our statement<> blah-no-way',
statement_descriptor: 'our statement blah-n',
metadata: nil }, stripe_account: nonprofit.stripe_account_id).and_wrap_original { |m, *args| m.call(*args) }
metadata: nil }, {stripe_account: nonprofit.stripe_account_id}).and_wrap_original { |m, *args| m.call(*args) }
StripeMockHelper.prepare_card_error(:card_declined)

finished_result = InsertCharge.with_stripe(amount: 100,
Expand All @@ -196,7 +196,7 @@
currency: 'usd',
description: 'our statement<> blah-no-way',
statement_descriptor: 'our statement blah-n',
metadata: nil }, stripe_account: nonprofit.stripe_account_id).and_wrap_original { |m, *args| m.call(*args) }
metadata: nil }, {stripe_account: nonprofit.stripe_account_id}).and_wrap_original { |m, *args| m.call(*args) }
StripeMockHelper.prepare_error(Stripe::StripeError.new('blah'), :new_charge)

finished_result = InsertCharge.with_stripe(amount: 100,
Expand Down Expand Up @@ -236,7 +236,7 @@
currency: 'usd',
description: 'our statement<> blah-no-way',
statement_descriptor: 'our statement blah-n',
metadata: nil }, stripe_account: nonprofit.stripe_account_id).and_wrap_original { |m, *args|
metadata: nil }, {stripe_account: nonprofit.stripe_account_id}).and_wrap_original { |m, *args|
a = m.call(*args)
stripe_charge_id = a['id']
a
Expand Down Expand Up @@ -280,7 +280,7 @@
currency: 'usd',
description: 'our statement<> blah-no-way',
statement_descriptor: 'our statement blah-n',
metadata: nil }, stripe_account: nonprofit.stripe_account_id).and_wrap_original { |m, *args|
metadata: nil }, {stripe_account: nonprofit.stripe_account_id}).and_wrap_original { |m, *args|
a = m.call(*args)
stripe_charge_id = a['id']
a
Expand Down
6 changes: 3 additions & 3 deletions spec/legacy_lib/insert/insert_tickets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def success_expectations
expect(Houdini.event_publisher).to receive(:announce).with(:trx_assignment_created, any_args).ordered
expect(Houdini.event_publisher).to receive(:announce).with(:transaction_created, any_args).ordered
result = InsertTickets.create(tickets: [{ quantity: 1, ticket_level_id: ticket_level.id }], nonprofit_id: nonprofit.id, supporter_id: supporter.id, token: source_token.token, event_id: event.id, kind: 'offsite', offsite_payment: { kind: 'check', check_number: 'fake_checknumber' }, current_user: user)

expected = generate_expected_tickets(payment_id: result['payment'].id,
nonprofit: nonprofit,
supporter: supporter,
Expand Down Expand Up @@ -391,7 +391,7 @@ def success(other_elements = {})
success_expectations
expect(Houdini.event_publisher).to receive(:announce).with(:ticket_level_created, any_args).twice
expect(Houdini.event_publisher).to receive(:announce).with(:event_discount_created, any_args)

expect(Houdini.event_publisher).to receive(:announce).with(:stripe_transaction_charge_created, any_args).ordered
expect(Houdini.event_publisher).to receive(:announce).with(:payment_created, any_args).ordered
expect(Houdini.event_publisher).to receive(:announce).with(:stripe_transaction_created, any_args).ordered
Expand Down Expand Up @@ -421,7 +421,7 @@ def success(other_elements = {})
currency: 'usd',
description: 'Tickets The event of Wonders',
statement_descriptor: 'Tickets The event of W',
metadata: { kind: 'Ticket', event_id: event.id, nonprofit_id: nonprofit.id } }, stripe_account: nonprofit.stripe_account_id).and_wrap_original { |m, *args|
metadata: { kind: 'Ticket', event_id: event.id, nonprofit_id: nonprofit.id } }, {stripe_account: nonprofit.stripe_account_id}).and_wrap_original { |m, *args|
a = m.call(*args)
stripe_charge_id = a['id']
a
Expand Down

0 comments on commit e8019e5

Please sign in to comment.