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

Allow providing an override env in Request.verify #35

Merged
merged 1 commit into from
Feb 1, 2017

Conversation

mmeisinger
Copy link

@mmeisinger mmeisinger commented Jan 31, 2017

Enable specifying an explicit override environment "env" in the Request.verify() and call in order to avoid a pop from the environment stack. This makes cases with thread concurrency deterministic and avoids the Environment.current() stack access.

Example:

import itunesiap
response = itunesiap.verify(receipt, apple_shared_secret, env=itunesiap.env.production)

@codecov-io
Copy link

codecov-io commented Jan 31, 2017

Codecov Report

Merging #35 into master will increase coverage by 0.07%.

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage    89.3%   89.36%   +0.07%     
==========================================
  Files           8        8              
  Lines         327      329       +2     
==========================================
+ Hits          292      294       +2     
  Misses         35       35

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 81f31e7...910ec00. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 89.362% when pulling 910ec00 on mmeisinger:override_env into 81f31e7 on youknowone:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 89.362% when pulling 910ec00 on mmeisinger:override_env into 81f31e7 on youknowone:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 89.362% when pulling 910ec00 on mmeisinger:override_env into 81f31e7 on youknowone:master.

@coveralls
Copy link

coveralls commented Jan 31, 2017

Coverage Status

Coverage increased (+0.07%) to 89.362% when pulling 910ec00 on mmeisinger:override_env into 81f31e7 on youknowone:master.

@youknowone youknowone merged commit f99182a into youknowone:master Feb 1, 2017
@youknowone
Copy link
Owner

youknowone commented Feb 1, 2017

Thanks, this is a nice fix for the mis-designed env api.

@youknowone
Copy link
Owner

The global environment stack is deprecated now.
Now this is the major way to run itunesiap.

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.

None yet

5 participants