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

Implement CorsViewMixin #145

Merged
merged 7 commits into from
Dec 21, 2017
Merged

Implement CorsViewMixin #145

merged 7 commits into from
Dec 21, 2017

Conversation

pedrokiefer
Copy link
Contributor

Fix #41!

@evandroeisinger
Copy link

Great contribution!

@codecov
Copy link

codecov bot commented Dec 19, 2017

Codecov Report

Merging #145 into master will increase coverage by 3.55%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #145      +/-   ##
=========================================
+ Coverage   80.95%   84.5%   +3.55%     
=========================================
  Files           7       9       +2     
  Lines         357     413      +56     
  Branches       65      72       +7     
=========================================
+ Hits          289     349      +60     
+ Misses         44      42       -2     
+ Partials       24      22       -2
Impacted Files Coverage Δ
aiohttp_cors/__init__.py 100% <100%> (ø) ⬆️
aiohttp_cors/cors_config.py 79.56% <100%> (-3.14%) ⬇️
aiohttp_cors/mixin.py 100% <100%> (ø)
aiohttp_cors/preflight_handler.py 100% <100%> (ø)
aiohttp_cors/urldispatcher_router_adapter.py 79.05% <100%> (+1.51%) ⬆️
aiohttp_cors/abc.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 566c48e...ff41ddf. Read the comment docs.

@asvetlov
Copy link
Member

@pedrokiefer please take a look on https://codecov.io/gh/aio-libs/aiohttp-cors/pull/145/diff
Or install codecov browser extension to see test coverage just in github diff tab.
Yellow and red lines should be covered.

@asvetlov
Copy link
Member

P.S. I like the PR in general, usage snippet looks pretty elegant.

@pedrokiefer
Copy link
Contributor Author

@asvetlov thanks, i'll work on those issues tomorrow.

@asvetlov
Copy link
Member

I see many duplications (copy-pastes from cors_config.py).
Would you refactor the code to avoid it?

@pedrokiefer
Copy link
Contributor Author

My first try was reusing cors_config.py methods, and it failed miserably. Now that I've got a working version, with tests in place, might be easier to get it right.

Do you have any objection on extracting _preflight_handler, _parse_request_headers and _parse_request_method to another class, and composing both the mixin and _CorsConfigImpl ?

@asvetlov
Copy link
Member

Do you have any objection on extracting _preflight_handler, _parse_request_headers and _parse_request_method to another class, and composing both the mixin and _CorsConfigImpl

Love the idea. Especially love underscore prefix for proposed names :)

@pedrokiefer
Copy link
Contributor Author

Done! :)

@asvetlov
Copy link
Member

Cool!
Let me make a final review and merge tomorrow.

@asvetlov asvetlov merged commit 9e0c757 into aio-libs:master Dec 21, 2017
@asvetlov
Copy link
Member

Thanks!
Initiated 0.6.0 release

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