Skip to content

Fix multipart filename for ActionDispatch::Http::UploadedFile TempFile#598

Merged
jnunemaker merged 2 commits intojnunemaker:masterfrom
zherr:fix-action-dispatch-filename
Aug 27, 2018
Merged

Fix multipart filename for ActionDispatch::Http::UploadedFile TempFile#598
jnunemaker merged 2 commits intojnunemaker:masterfrom
zherr:fix-action-dispatch-filename

Conversation

@zherr
Copy link
Contributor

@zherr zherr commented Jul 2, 2018

Closes #597

@zherr zherr force-pushed the fix-action-dispatch-filename branch 2 times, most recently from 173b40a to 442192c Compare July 2, 2018 19:47
@zherr zherr force-pushed the fix-action-dispatch-filename branch from 442192c to 30d9036 Compare July 12, 2018 14:51
@zherr
Copy link
Contributor Author

zherr commented Aug 24, 2018

I'll CC @TheSmartnik here as they seem active in reviewing PRs as of late. I would greatly appreciate your input!

@TheSmartnik
Copy link
Collaborator

TheSmartnik commented Aug 27, 2018

Hi @zherr ,
I don't know how qualified I'm to review your pr here, but it looks great, thanks!
RestClient solves the problem the same way for 9 years (should've looked at it when implemented the feature 😩), already. So I think we are good.

The only thing that bothers me is expose_dsl_globally. It looks very much unnecessary here.

@zherr
Copy link
Contributor Author

zherr commented Aug 27, 2018

Thanks for taking a look @TheSmartnik.

As for expose_dsl_globally, this is purely a testing configuration for rspec, and won’t have any affect outside of running tests. Docs can be seen here: https://relishapp.com/rspec/rspec-core/v/3-8/docs/configuration/global-namespace-dsl

I’m hoping this one could get merged and released. @jnunemaker , when you have a few minutes, would you reviewing this one?

@TheSmartnik
Copy link
Collaborator

TheSmartnik commented Aug 27, 2018

@zherr thanks for the link!
What I don't like about expose_dsl_globally is that we are changing default behavior without any requirement or reason.

What problems will it bring? It may lead to inconsistent style of specs.
Some will start with Rspec.describe some with describe. You yourself changed only two files, while number of specs is much greater.

Why consistency is important? It saves you from thinking about unneeded things. Imagine a newcomer that codes in ruby for a couple of years and doesn't know RSpec 2 syntax. He'll start to write a spec, but some start with Rspec.describe, others with describe. How should he start? Why some are different that the others? All those questions and no good answer for them. Instead he could spend time actually writing code.

@zherr zherr force-pushed the fix-action-dispatch-filename branch from 49552d9 to 350d153 Compare August 27, 2018 14:41
@zherr
Copy link
Contributor Author

zherr commented Aug 27, 2018

@TheSmartnik check out the latest commit: 30d9036

I've made the use of the RSpec DSL consistent, to avoid the possible confusion as you outlined.

@jnunemaker jnunemaker merged commit 350d153 into jnunemaker:master Aug 27, 2018
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