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

Add revoke method to Screenboard #46

Merged
merged 5 commits into from
Jun 17, 2015
Merged

Conversation

allegrem
Copy link
Contributor

@allegrem allegrem commented May 5, 2015

@yannmh
Copy link
Member

yannmh commented May 8, 2015

Looks great. Thanks @allegrem

@allegrem
Copy link
Contributor Author

I will add some tests for this PR as soon as possible

- This method allow to revoke the public access of a shared
screenboard
@allegrem allegrem force-pushed the allegrem/revoke-screenboard branch from 5b13c6f to ea95011 Compare June 4, 2015 22:08
@@ -553,6 +554,17 @@ def _compare_screenboard(board1, board2):

share_res = dog.Screenboard.share(get_res['id'])
assert share_res['board_id'] == get_res['id']
public_url = share_res['public_url'].replace('8080', '5000')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The replace('8080', '5000') is a bit annoying, but I can't find a way to get rid of it in local env. Any idea @yannmh ? I guess it would work when testing against the staging env.

Copy link
Member

Choose a reason for hiding this comment

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

I am usually testing against staging or a prod demo account, so I never experienced this inconvenience before.
Still, I don't think we should commit this extra line: it's too much conditioned by your environment thus it could easily break in a different scenario (i.e. testing from your VM or not).

An other option would be to make this more flexible using an environment variable like we do to set the Datadog URL ? What do you think ?

@allegrem allegrem force-pushed the allegrem/revoke-screenboard branch from ea95011 to 1abe36b Compare June 5, 2015 21:52
out = json.loads(out)
assert out['board_id'] == screenboard['id']
# Verify it's actually shared
public_url = out['public_url'].replace('8080', '5000')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same here @yannmh

- Add tests for 'screenboard revoke' command
- Also add tests for 'screenboard share' command
@allegrem allegrem force-pushed the allegrem/revoke-screenboard branch from 1abe36b to 77b3556 Compare June 5, 2015 22:05
@@ -9,6 +9,7 @@
import time
import tempfile
import unittest
import urllib2
Copy link
Member

Choose a reason for hiding this comment

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

Let's use requests instead. Easier, shorter and compatible Python 2.6—3.4 (not the case for urllib2) !

@yannmh
Copy link
Member

yannmh commented Jun 17, 2015

Thanks for the new feature @allegrem 💥
I've added two small suggestions. Let me know what you think about it.

@yannmh yannmh self-assigned this Jun 17, 2015
Matthieu Allegre added 2 commits June 17, 2015 15:06
@allegrem
Copy link
Contributor Author

I fixed everything you suggested @yannmh . Ready to merge?

@yannmh
Copy link
Member

yannmh commented Jun 17, 2015

👍 !

allegrem added a commit that referenced this pull request Jun 17, 2015
@allegrem allegrem merged commit 7a6ce8d into master Jun 17, 2015
@allegrem allegrem deleted the allegrem/revoke-screenboard branch June 17, 2015 17:51
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.

2 participants