Skip to content

Development QoL changes and bug fixes #159

Merged
elia merged 15 commits into
masterfrom
elia/misc-fixes
Feb 9, 2023
Merged

Development QoL changes and bug fixes #159
elia merged 15 commits into
masterfrom
elia/misc-fixes

Conversation

@elia

@elia elia commented Feb 6, 2023

Copy link
Copy Markdown
Member

Summary

A mixed bag, mostly development QoL and refactoring.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@elia elia self-assigned this Feb 6, 2023
elia added 5 commits February 7, 2023 18:44
- Concentrate all the rails-* commands under a single bin/rails
- let bin/rspec be less noisy with the sync
Allow going the other direction when coming back to solidus from
Stripe.
@elia
elia marked this pull request as ready for review February 7, 2023 18:09

@kennyadsl kennyadsl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment but all commits make sense to me. Thanks!

Comment thread Procfile.dev
@@ -1,2 +1,2 @@
web: unset PORT && bin/rails-sandbox server
installer: bin/rails-sandbox g solidus_stripe:install --force --watch
web: unset PORT && env RUBY_DEBUG_OPEN=true bin/rails-sandbox server

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a comment with usage instructions here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great call, added instructions to the readme under Development so it's even more visible.

elia added 7 commits February 8, 2023 12:43
To attach just use `rdbg --attach`.
In every place we used `client.request` we always ignored the response
object.
Otherwise the following error will be raised when using generators
from the rails engine:

/Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_core-3.3.0/lib/spree/core.rb:9:in `require': cannot load such file -- active_storage/engine (LoadError)
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_core-3.3.0/lib/spree/core.rb:9:in `<top (required)>'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_core-3.3.0/lib/spree_core.rb:3:in `require'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_core-3.3.0/lib/spree_core.rb:3:in `<top (required)>'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_core-3.3.0/lib/solidus_core.rb:3:in `require'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/solidus_core-3.3.0/lib/solidus_core.rb:3:in `<top (required)>'
	from /Users/elia/Code/Nebulab/solidus_stripe/lib/solidus_stripe/engine.rb:3:in `require'
	from /Users/elia/Code/Nebulab/solidus_stripe/lib/solidus_stripe/engine.rb:3:in `<top (required)>'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/command/actions.rb:19:in `require'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/command/actions.rb:19:in `require_application!'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/commands/generate/generate_command.rb:21:in `perform'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/command/base.rb:87:in `perform'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/command.rb:48:in `invoke'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/commands.rb:18:in `<top (required)>'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/engine/commands.rb:9:in `require'
	from /Users/elia/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.4.2/lib/rails/engine/commands.rb:9:in `<top (required)>'
	from /Users/elia/Code/Nebulab/solidus_stripe/bin//rails:35:in `require'
	from /Users/elia/Code/Nebulab/solidus_stripe/bin//rails:35:in `<main>'
The solidus code will always provide the "originator" option.
@elia
elia force-pushed the elia/misc-fixes branch 2 times, most recently from 62ba8b4 to 208d89a Compare February 8, 2023 14:38
order = Spree::TestingSupport::OrderWalkthrough.up_to(:delivery, user: nil)
visit '/'

allow_any_instance_of( # rubocop:disable RSpec/AnyInstance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, it looks like testing a guest order requires a lot of preparation. Probably it'd be nice to extract that into the testing support in core at some point.

The latest starter frontend requires the JS support provided in a
vanilla rails installation. Other options are being removed that are
not strictly necessary to build the dummy app.

The rails version is now taken from the gemspec's bundle.
@elia
elia force-pushed the elia/misc-fixes branch 3 times, most recently from a83995b to c6d9f9f Compare February 9, 2023 15:04
Update versions and stop using the deprecated cron option for
scheduled runs.
@elia
elia merged commit 5d19132 into master Feb 9, 2023
@elia
elia deleted the elia/misc-fixes branch February 9, 2023 16:13
@elia elia added this to the v5 milestone Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants