Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Issue 10689144: Extensions Docs Server: Samples zip files (Closed)

Created:
8 years, 5 months ago by cduvall
Modified:
8 years, 5 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, clintstaley, chebert
Visibility:
Public.

Description

Extensions Docs Server: Samples zip files Implemented a zip_data_source which will zip a directory given to it. This required some changes to LocalFetcher so it would behave like SubversionFetcher when given a path to a directory. BUG=131095 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=146390

Patch Set 1 : #

Total comments: 17

Patch Set 2 : reworked #

Patch Set 3 : Recursive file listing in fetchers #

Patch Set 4 : basic samples page #

Patch Set 5 : better sample page #

Total comments: 24

Patch Set 6 : Samples page with full links and descriptions #

Total comments: 18

Patch Set 7 : prettify samples a little #

Patch Set 8 : SamplesDataSource and fun #

Patch Set 9 : fixed zips #

Total comments: 14

Patch Set 10 : clean up and tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -11 lines) Patch
M chrome/common/extensions/docs/server2/api_data_source.py View 1 2 3 4 5 6 7 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/common/extensions/docs/server2/echo_handler.py View 1 2 3 4 5 6 7 3 chunks +13 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/server2/example_zipper.py View 1 2 3 4 5 6 7 8 9 1 chunk +41 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/fetcher_cache.py View 1 2 3 4 5 6 7 1 chunk +11 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/intro_data_source.py View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/server2/local_fetcher.py View 1 2 3 4 5 6 7 8 9 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/local_fetcher_test.py View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -8 lines 0 comments Download
A chrome/common/extensions/docs/server2/samples_data_source.py View 1 2 3 4 5 6 7 1 chunk +71 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/server_instance.py View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -4 lines 0 comments Download
M chrome/common/extensions/docs/server2/subversion_fetcher.py View 1 2 3 4 5 6 7 8 9 2 chunks +27 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/subversion_fetcher_test.py View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source.py View 1 2 3 4 5 6 7 4 chunks +4 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source_test.py View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/server2/templates/public/samples.html View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file0.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file1.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file2.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file3.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file4.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file5.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/file6.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file0.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file1.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file2.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file3.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file4.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file5.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/common/extensions/docs/server2/test_data/local_fetcher/recursive_list/list/file6.html View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/common/extensions/docs/server2/test_data/subversion_fetcher/trunk/recursive_list.html View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/server2/test_data/subversion_fetcher/trunk/recursive_list/list View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/test_urlfetch.py View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
cduvall
Here's what I have for downloading zip files. Go to samples.html for a few tests.
8 years, 5 months ago (2012-07-10 23:00:16 UTC) #1
not at google - send to devlin
Mostly high-level comments; but it will involve a bit of restructuring. http://codereview.chromium.org/10689144/diff/12001/chrome/common/extensions/docs/server2/echo_handler.py File chrome/common/extensions/docs/server2/echo_handler.py (right): ...
8 years, 5 months ago (2012-07-11 00:35:09 UTC) #2
Aaron Boodman
http://codereview.chromium.org/10689144/diff/12001/chrome/common/extensions/docs/server2/subversion_data_source.py File chrome/common/extensions/docs/server2/subversion_data_source.py (right): http://codereview.chromium.org/10689144/diff/12001/chrome/common/extensions/docs/server2/subversion_data_source.py#newcode17 chrome/common/extensions/docs/server2/subversion_data_source.py:17: page_dir = re.search('<title>.* (.*)</title>', page).group(1) On 2012/07/11 00:35:09, kalman ...
8 years, 5 months ago (2012-07-11 02:54:50 UTC) #3
not at google - send to devlin
http://codereview.chromium.org/10689144/diff/12001/chrome/common/extensions/docs/server2/subversion_data_source.py File chrome/common/extensions/docs/server2/subversion_data_source.py (right): http://codereview.chromium.org/10689144/diff/12001/chrome/common/extensions/docs/server2/subversion_data_source.py#newcode17 chrome/common/extensions/docs/server2/subversion_data_source.py:17: page_dir = re.search('<title>.* (.*)</title>', page).group(1) On 2012/07/11 02:54:51, Aaron ...
8 years, 5 months ago (2012-07-11 07:23:57 UTC) #4
Aaron Boodman
On Wed, Jul 11, 2012 at 12:23 AM, <kalman@chromium.org> wrote: > I think there's actually ...
8 years, 5 months ago (2012-07-11 07:43:59 UTC) #5
cduvall
On 2012/07/11 07:43:59, Aaron Boodman wrote: > On Wed, Jul 11, 2012 at 12:23 AM, ...
8 years, 5 months ago (2012-07-11 08:34:46 UTC) #6
cduvall
Reworked the Zipper. I also made a simple samples page (just a list of all ...
8 years, 5 months ago (2012-07-11 20:56:30 UTC) #7
not at google - send to devlin
You uploaded a new patchset half way through reviewing the older one, so the comments ...
8 years, 5 months ago (2012-07-12 00:22:48 UTC) #8
cduvall
Still needs to handle __MSG_ strings but other than that its looking good. http://codereview.chromium.org/10689144/diff/1022/chrome/common/extensions/docs/server2/example_zipper.py File ...
8 years, 5 months ago (2012-07-12 01:51:23 UTC) #9
not at google - send to devlin
I don't want to hold this up any more (time difference and all that) so ...
8 years, 5 months ago (2012-07-12 07:06:29 UTC) #10
cduvall
8 years, 5 months ago (2012-07-12 18:09:02 UTC) #11
Added some tests and cleaned things up. I'll handle the __MSG_ stuff in another
patch.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
File chrome/common/extensions/docs/server2/example_zipper.py (right):

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/example_zipper.py:41: True)
On 2012/07/12 07:06:29, kalman wrote:
> Be explicit here with recursive=True, makes this call site easier to
understand.

Done.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
File chrome/common/extensions/docs/server2/server_instance.py (right):

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/server_instance.py:39: elif
path.startswith('example'):
On 2012/07/12 07:06:29, kalman wrote:
> examples/ ?

Done.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/server_instance.py:42: elif
path.startswith('static'):
On 2012/07/12 07:06:29, kalman wrote:
> static/ ?

Done.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
File chrome/common/extensions/docs/server2/subversion_fetcher.py (right):

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/subversion_fetcher.py:25: files =
map(lambda x: x.childNodes[0].data, dom.getElementsByTagName('a'))
On 2012/07/12 07:06:29, kalman wrote:
> I think the "pythonic" way of doing map() is usually with list comprehensions

Done.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/subversion_fetcher.py:35:
all_files.extend(self.ListDirectory(dir_name).content)
On 2012/07/12 07:06:29, kalman wrote:
> need to pass recursive=True here?
> 
> Or call _RecursiveList directly?

Done.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/subversion_fetcher.py:41: result =
self._url_fetcher.fetch(self._base_path + '/' + path)
On 2012/07/12 07:06:29, kalman wrote:
> I don't see how this works, doesn't this return HTML, so if recursive is False
> then it'll return some HTML rather than the list of files?
> 
> I would have expected this to be structured like
> 
> return _RecursiveList(path) if recursive else _ListDir(path)

Done.

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
File chrome/common/extensions/docs/server2/subversion_fetcher_test.py (right):

http://codereview.chromium.org/10689144/diff/2026/chrome/common/extensions/do...
chrome/common/extensions/docs/server2/subversion_fetcher_test.py:17: 
On 2012/07/12 07:06:29, kalman wrote:
> tests for listing files?

Done.

Powered by Google App Engine
This is Rietveld 408576698