libv8 5.3.332.38.5 → 5.6.326.50.0beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +2 -0
- data/ext/libv8/builder.rb +2 -2
- data/lib/libv8/version.rb +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +4 -4
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +16 -11
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +4 -4
- data/patches/{0005-Do-not-embed-debug-symbols-in-macOS-libraries.patch → 0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch} +4 -4
- data/vendor/depot_tools/.gitignore +4 -0
- data/vendor/depot_tools/OWNERS +0 -2
- data/vendor/depot_tools/PRESUBMIT.py +20 -23
- data/vendor/depot_tools/README.gclient.md +3 -3
- data/vendor/depot_tools/README.git-cl.md +13 -12
- data/vendor/depot_tools/README.md +2 -3
- data/vendor/depot_tools/WATCHLISTS +0 -1
- data/vendor/depot_tools/appengine_mapper.py +23 -0
- data/vendor/depot_tools/apply_issue.py +2 -8
- data/vendor/depot_tools/bootstrap/win/README.md +1 -8
- data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +6 -16
- data/vendor/depot_tools/bootstrap/win/git_version.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/checkout.py +20 -433
- data/vendor/depot_tools/cipd +73 -0
- data/vendor/depot_tools/cipd.bat +12 -0
- data/vendor/depot_tools/cipd.ps1 +57 -0
- data/vendor/depot_tools/cipd_client_version +1 -0
- data/vendor/depot_tools/clang_format.py +9 -6
- data/vendor/depot_tools/clang_format_merge_driver +8 -0
- data/vendor/depot_tools/clang_format_merge_driver.bat +11 -0
- data/vendor/depot_tools/clang_format_merge_driver.py +67 -0
- data/vendor/depot_tools/codereview.settings +3 -2
- data/vendor/depot_tools/commit_queue.py +1 -1
- data/vendor/depot_tools/cpplint.py +2 -0
- data/vendor/depot_tools/fetch.py +1 -54
- data/vendor/depot_tools/fetch_configs/android.py +2 -2
- data/vendor/depot_tools/fetch_configs/breakpad.py +2 -3
- data/vendor/depot_tools/fetch_configs/chromium.py +2 -3
- data/vendor/depot_tools/fetch_configs/crashpad.py +2 -2
- data/vendor/depot_tools/fetch_configs/dart.py +2 -3
- data/vendor/depot_tools/fetch_configs/dartino.py +2 -3
- data/vendor/depot_tools/fetch_configs/dartium.py +2 -3
- data/vendor/depot_tools/fetch_configs/depot_tools.py +3 -6
- data/vendor/depot_tools/fetch_configs/gyp.py +2 -3
- data/vendor/depot_tools/fetch_configs/infra.py +2 -2
- data/vendor/depot_tools/fetch_configs/infra_internal.py +2 -2
- data/vendor/depot_tools/fetch_configs/ios.py +2 -2
- data/vendor/depot_tools/fetch_configs/ios_internal.py +2 -3
- data/vendor/depot_tools/fetch_configs/mojo.py +2 -3
- data/vendor/depot_tools/fetch_configs/nacl.py +2 -3
- data/vendor/depot_tools/fetch_configs/naclports.py +2 -3
- data/vendor/depot_tools/fetch_configs/pdfium.py +2 -2
- data/vendor/depot_tools/fetch_configs/skia.py +2 -2
- data/vendor/depot_tools/fetch_configs/skia_buildbot.py +2 -2
- data/vendor/depot_tools/fetch_configs/syzygy.py +2 -2
- data/vendor/depot_tools/fetch_configs/v8.py +2 -3
- data/vendor/depot_tools/fetch_configs/webrtc.py +5 -3
- data/vendor/depot_tools/fetch_configs/webrtc_android.py +2 -2
- data/vendor/depot_tools/fetch_configs/webrtc_ios.py +2 -2
- data/vendor/depot_tools/fix_encoding.py +6 -6
- data/vendor/depot_tools/gclient.py +136 -368
- data/vendor/depot_tools/gclient_scm.py +108 -647
- data/vendor/depot_tools/gclient_utils.py +22 -86
- data/vendor/depot_tools/gerrit_client.py +105 -0
- data/vendor/depot_tools/gerrit_util.py +174 -67
- data/vendor/depot_tools/git-crrev-parse +6 -7
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git_cache.py +68 -18
- data/vendor/depot_tools/git_cherry_pick_upload.py +4 -4
- data/vendor/depot_tools/git_cl.py +1028 -961
- data/vendor/depot_tools/git_common.py +2 -3
- data/vendor/depot_tools/git_drover.py +0 -1
- data/vendor/depot_tools/git_footers.py +3 -43
- data/vendor/depot_tools/git_rebase_update.py +9 -1
- data/vendor/depot_tools/git_squash_branch.py +1 -1
- data/vendor/depot_tools/infra/config/cq.cfg +8 -1
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/man/html/depot_tools.html +3 -11
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +9 -9
- data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +2 -2
- data/vendor/depot_tools/man/html/git-drover.html +17 -17
- data/vendor/depot_tools/man/html/git-footers.html +2 -2
- data/vendor/depot_tools/man/html/git-freeze.html +4 -4
- data/vendor/depot_tools/man/html/git-hyper-blame.html +2 -2
- data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
- data/vendor/depot_tools/man/html/git-map.html +2 -2
- data/vendor/depot_tools/man/html/git-mark-merge-base.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-downstream.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-upstream.html +2 -2
- data/vendor/depot_tools/man/html/git-new-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-rebase-update.html +2 -2
- data/vendor/depot_tools/man/html/git-rename-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-reparent-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-retry.html +3 -3
- data/vendor/depot_tools/man/html/git-squash-branch.html +3 -3
- data/vendor/depot_tools/man/html/git-thaw.html +2 -2
- data/vendor/depot_tools/man/html/git-upstream-diff.html +3 -3
- data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +4 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +19 -19
- data/vendor/depot_tools/man/man1/git-footers.1 +4 -4
- data/vendor/depot_tools/man/man1/git-freeze.1 +6 -6
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map-branches.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map.1 +4 -4
- data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-downstream.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-upstream.1 +4 -4
- data/vendor/depot_tools/man/man1/git-new-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rename-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-reparent-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-retry.1 +5 -5
- data/vendor/depot_tools/man/man1/git-squash-branch.1 +5 -5
- data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +5 -5
- data/vendor/depot_tools/man/man7/depot_tools.7 +5 -10
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +4 -4
- data/vendor/depot_tools/man/src/depot_tools.txt +1 -1
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +7 -7
- data/vendor/depot_tools/man/src/filter_demo_output.py +2 -2
- data/vendor/depot_tools/man/src/git-footers.demo.1.sh +1 -1
- data/vendor/depot_tools/man/src/git-retry.txt +1 -1
- data/vendor/depot_tools/man/src/git-squash-branch.txt +2 -2
- data/vendor/depot_tools/man/src/git-upstream-diff.txt +1 -1
- data/vendor/depot_tools/my_activity.py +6 -3
- data/vendor/depot_tools/my_reviews.py +1 -1
- data/vendor/depot_tools/ninja +2 -2
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/owners.py +14 -3
- data/vendor/depot_tools/presubmit_canned_checks.py +46 -67
- data/vendor/depot_tools/presubmit_support.py +109 -371
- data/vendor/depot_tools/pylintrc +83 -56
- data/vendor/depot_tools/recipe_modules/OWNERS +1 -0
- data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +18 -9
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +56 -55
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/buildbot.json +52 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +2 -54
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_buildbot.json +56 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/{forced.json → trychange_oauth2_json.json} +6 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_json_win.json +54 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +20 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +59 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +20 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.py +45 -63
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +210 -807
- data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +34 -45
- data/vendor/depot_tools/recipe_modules/cipd/api.py +59 -84
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/basic.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-failed.json +14 -60
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-many-instances.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/mac64.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/win64.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.py +2 -12
- data/vendor/depot_tools/recipe_modules/cipd/test_api.py +0 -9
- data/vendor/depot_tools/recipe_modules/depot_tools/api.py +6 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/basic.json +7 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/win.json +7 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.py +3 -0
- data/vendor/depot_tools/recipe_modules/gclient/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +9 -22
- data/vendor/depot_tools/recipe_modules/gclient/config.py +18 -5
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +14 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/buildbot.json +211 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +16 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +16 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.py +13 -11
- data/vendor/depot_tools/recipe_modules/gerrit/__init__.py +6 -0
- data/vendor/depot_tools/recipe_modules/gerrit/api.py +63 -0
- data/vendor/depot_tools/recipe_modules/gerrit/example.expected/basic.json +64 -0
- data/vendor/depot_tools/recipe_modules/gerrit/example.py +35 -0
- data/vendor/depot_tools/recipe_modules/gerrit/test_api.py +24 -0
- data/vendor/depot_tools/recipe_modules/git/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git/api.py +155 -142
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +13 -13
- data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +45 -19
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +45 -19
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +8 -8
- data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +44 -18
- data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +48 -22
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +42 -16
- data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.py +9 -3
- data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +8 -8
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +1 -1
- data/vendor/depot_tools/recipe_modules/gsutil/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/gsutil/api.py +196 -0
- data/vendor/depot_tools/recipe_modules/gsutil/example.expected/basic.json +186 -0
- data/vendor/depot_tools/recipe_modules/gsutil/example.py +77 -0
- data/vendor/depot_tools/recipe_modules/gsutil/resources/gsutil_smart_retry.py +69 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +3 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/api.py +20 -3
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +6 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +4 -6
- data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
- data/vendor/depot_tools/recipe_modules/rietveld/api.py +12 -9
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +2 -24
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/buildbot.json +30 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.py +12 -6
- data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +46 -70
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/set_failure_hash_with_no_steps.json +8 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/{with_svn_patch.json → with_gerrit_patch.json} +1 -31
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_gerrit_patch_deprecated.json +39 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +2 -2
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch_luci.json +8 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +3 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +3 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +1 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +1 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.py +35 -5
- data/vendor/depot_tools/recipes.py +52 -28
- data/vendor/depot_tools/repo +216 -69
- data/vendor/depot_tools/rietveld.py +20 -15
- data/vendor/depot_tools/roll_dep.py +1 -1
- data/vendor/depot_tools/scm.py +11 -826
- data/vendor/depot_tools/subprocess2.py +5 -5
- data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +2 -0
- data/vendor/depot_tools/third_party/cq_client/README.md +5 -1
- data/vendor/depot_tools/third_party/cq_client/cq.pb.go +183 -104
- data/vendor/depot_tools/third_party/cq_client/cq.proto +43 -27
- data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +95 -29
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_both.cfg +67 -0
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +1 -2
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_rietveld.cfg +0 -3
- data/vendor/depot_tools/third_party/upload.py +44 -24
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +0 -5
- metadata +38 -93
- data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +0 -25
- data/vendor/depot_tools/git-auto-svn +0 -6
- data/vendor/depot_tools/git_auto_svn.py +0 -122
- data/vendor/depot_tools/man/html/git-auto-svn.html +0 -837
- data/vendor/depot_tools/man/man1/git-auto-svn.1 +0 -113
- data/vendor/depot_tools/man/src/_git-auto-svn_desc.helper.txt +0 -1
- data/vendor/depot_tools/man/src/git-auto-svn.txt +0 -69
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +0 -43
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/install-failed.json +0 -31
- data/vendor/depot_tools/recipe_modules/cipd/resources/bootstrap.py +0 -218
- data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +0 -7
- data/vendor/depot_tools/third_party/gsutil/CHECKSUM +0 -1
- data/vendor/depot_tools/third_party/gsutil/COPYING +0 -202
- data/vendor/depot_tools/third_party/gsutil/LICENSE.third_party +0 -295
- data/vendor/depot_tools/third_party/gsutil/MANIFEST.in +0 -5
- data/vendor/depot_tools/third_party/gsutil/README +0 -38
- data/vendor/depot_tools/third_party/gsutil/README.chromium +0 -25
- data/vendor/depot_tools/third_party/gsutil/README.pkg +0 -49
- data/vendor/depot_tools/third_party/gsutil/ReleaseNotes.txt +0 -825
- data/vendor/depot_tools/third_party/gsutil/VERSION +0 -1
- data/vendor/depot_tools/third_party/gsutil/gslib/README +0 -5
- data/vendor/depot_tools/third_party/gsutil/gslib/__init__.py +0 -22
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/__init__.py +0 -15
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/acls.py +0 -234
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/anon.py +0 -57
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/command_opts.py +0 -116
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/dev.py +0 -139
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/metadata.py +0 -186
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/naming.py +0 -173
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/prod.py +0 -160
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/projects.py +0 -130
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/subdirs.py +0 -110
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/support.py +0 -86
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/versioning.py +0 -242
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/wildcards.py +0 -170
- data/vendor/depot_tools/third_party/gsutil/gslib/bucket_listing_ref.py +0 -175
- data/vendor/depot_tools/third_party/gsutil/gslib/command.py +0 -725
- data/vendor/depot_tools/third_party/gsutil/gslib/command_runner.py +0 -102
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/__init__.py +0 -15
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/cat.py +0 -131
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/chacl.py +0 -523
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/config.py +0 -662
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/cp.py +0 -1819
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/disablelogging.py +0 -101
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/enablelogging.py +0 -149
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getacl.py +0 -82
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getcors.py +0 -121
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getdefacl.py +0 -86
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getlogging.py +0 -137
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getversioning.py +0 -116
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getwebcfg.py +0 -122
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/help.py +0 -218
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/ls.py +0 -578
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/mb.py +0 -172
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/mv.py +0 -159
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/perfdiag.py +0 -903
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/rb.py +0 -113
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/rm.py +0 -237
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setacl.py +0 -138
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setcors.py +0 -145
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setdefacl.py +0 -105
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setmeta.py +0 -420
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setversioning.py +0 -114
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setwebcfg.py +0 -190
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/update.py +0 -305
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/version.py +0 -150
- data/vendor/depot_tools/third_party/gsutil/gslib/exception.py +0 -76
- data/vendor/depot_tools/third_party/gsutil/gslib/help_provider.py +0 -81
- data/vendor/depot_tools/third_party/gsutil/gslib/name_expansion.py +0 -550
- data/vendor/depot_tools/third_party/gsutil/gslib/no_op_auth_plugin.py +0 -30
- data/vendor/depot_tools/third_party/gsutil/gslib/plurality_checkable_iterator.py +0 -56
- data/vendor/depot_tools/third_party/gsutil/gslib/project_id.py +0 -67
- data/vendor/depot_tools/third_party/gsutil/gslib/storage_uri_builder.py +0 -56
- data/vendor/depot_tools/third_party/gsutil/gslib/thread_pool.py +0 -79
- data/vendor/depot_tools/third_party/gsutil/gslib/util.py +0 -167
- data/vendor/depot_tools/third_party/gsutil/gslib/wildcard_iterator.py +0 -498
- data/vendor/depot_tools/third_party/gsutil/gsutil +0 -384
- data/vendor/depot_tools/third_party/gsutil/gsutil.spec.in +0 -75
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/__init__.py +0 -22
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client.py +0 -630
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client_test.py +0 -374
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_helper.py +0 -103
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_plugin.py +0 -24
- data/vendor/depot_tools/third_party/gsutil/pkg_util.py +0 -60
- data/vendor/depot_tools/third_party/gsutil/plugins/__init__.py +0 -0
- data/vendor/depot_tools/third_party/gsutil/plugins/sso_auth.py +0 -105
@@ -1,86 +0,0 @@
|
|
1
|
-
# Copyright 2011 Google Inc. All Rights Reserved.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
from gslib.command import Command
|
16
|
-
from gslib.command import COMMAND_NAME
|
17
|
-
from gslib.command import COMMAND_NAME_ALIASES
|
18
|
-
from gslib.command import CONFIG_REQUIRED
|
19
|
-
from gslib.command import FILE_URIS_OK
|
20
|
-
from gslib.command import MAX_ARGS
|
21
|
-
from gslib.command import MIN_ARGS
|
22
|
-
from gslib.command import PROVIDER_URIS_OK
|
23
|
-
from gslib.command import SUPPORTED_SUB_ARGS
|
24
|
-
from gslib.command import URIS_START_ARG
|
25
|
-
from gslib.exception import CommandException
|
26
|
-
from gslib.help_provider import HELP_NAME
|
27
|
-
from gslib.help_provider import HELP_NAME_ALIASES
|
28
|
-
from gslib.help_provider import HELP_ONE_LINE_SUMMARY
|
29
|
-
from gslib.help_provider import HELP_TEXT
|
30
|
-
from gslib.help_provider import HelpType
|
31
|
-
from gslib.help_provider import HELP_TYPE
|
32
|
-
|
33
|
-
_detailed_help_text = ("""
|
34
|
-
<B>SYNOPSIS</B>
|
35
|
-
gsutil getdefacl uri
|
36
|
-
|
37
|
-
<B>DESCRIPTION</B>
|
38
|
-
Gets the default ACL XML for a bucket, which you can save and edit
|
39
|
-
for use with the setdefacl command.
|
40
|
-
""")
|
41
|
-
|
42
|
-
|
43
|
-
class GetDefAclCommand(Command):
|
44
|
-
"""Implementation of gsutil getdefacl command."""
|
45
|
-
|
46
|
-
# Command specification (processed by parent class).
|
47
|
-
command_spec = {
|
48
|
-
# Name of command.
|
49
|
-
COMMAND_NAME : 'getdefacl',
|
50
|
-
# List of command name aliases.
|
51
|
-
COMMAND_NAME_ALIASES : [],
|
52
|
-
# Min number of args required by this command.
|
53
|
-
MIN_ARGS : 1,
|
54
|
-
# Max number of args required by this command, or NO_MAX.
|
55
|
-
MAX_ARGS : 1,
|
56
|
-
# Getopt-style string specifying acceptable sub args.
|
57
|
-
SUPPORTED_SUB_ARGS : '',
|
58
|
-
# True if file URIs acceptable for this command.
|
59
|
-
FILE_URIS_OK : False,
|
60
|
-
# True if provider-only URIs acceptable for this command.
|
61
|
-
PROVIDER_URIS_OK : False,
|
62
|
-
# Index in args of first URI arg.
|
63
|
-
URIS_START_ARG : 0,
|
64
|
-
# True if must configure gsutil before running command.
|
65
|
-
CONFIG_REQUIRED : True,
|
66
|
-
}
|
67
|
-
help_spec = {
|
68
|
-
# Name of command or auxiliary help info for which this help applies.
|
69
|
-
HELP_NAME : 'getdefacl',
|
70
|
-
# List of help name aliases.
|
71
|
-
HELP_NAME_ALIASES : [],
|
72
|
-
# Type of help:
|
73
|
-
HELP_TYPE : HelpType.COMMAND_HELP,
|
74
|
-
# One line summary of this help.
|
75
|
-
HELP_ONE_LINE_SUMMARY : 'Get default ACL XML for a bucket',
|
76
|
-
# The full help text.
|
77
|
-
HELP_TEXT : _detailed_help_text,
|
78
|
-
}
|
79
|
-
|
80
|
-
# Command entry point.
|
81
|
-
def RunCommand(self):
|
82
|
-
if not self.suri_builder.StorageUri(self.args[-1]).names_bucket():
|
83
|
-
raise CommandException('URI must name a bucket for the %s command' %
|
84
|
-
self.command_name)
|
85
|
-
self.GetAclCommandHelper()
|
86
|
-
return 0
|
@@ -1,137 +0,0 @@
|
|
1
|
-
# Copyright 2011 Google Inc. All Rights Reserved.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
from gslib.command import Command
|
16
|
-
from gslib.command import COMMAND_NAME
|
17
|
-
from gslib.command import COMMAND_NAME_ALIASES
|
18
|
-
from gslib.command import CONFIG_REQUIRED
|
19
|
-
from gslib.command import FILE_URIS_OK
|
20
|
-
from gslib.command import MAX_ARGS
|
21
|
-
from gslib.command import MIN_ARGS
|
22
|
-
from gslib.command import PROVIDER_URIS_OK
|
23
|
-
from gslib.command import SUPPORTED_SUB_ARGS
|
24
|
-
from gslib.command import URIS_START_ARG
|
25
|
-
from gslib.help_provider import HELP_NAME
|
26
|
-
from gslib.help_provider import HELP_NAME_ALIASES
|
27
|
-
from gslib.help_provider import HELP_ONE_LINE_SUMMARY
|
28
|
-
from gslib.help_provider import HELP_TEXT
|
29
|
-
from gslib.help_provider import HelpType
|
30
|
-
from gslib.help_provider import HELP_TYPE
|
31
|
-
|
32
|
-
_detailed_help_text = ("""
|
33
|
-
<B>SYNOPSIS</B>
|
34
|
-
gsutil getlogging uri
|
35
|
-
|
36
|
-
|
37
|
-
<B>DESCRIPTION</B>
|
38
|
-
If logging is enabled for the specified bucket uri, the server responds
|
39
|
-
with a <Logging> XML element that looks something like this:
|
40
|
-
|
41
|
-
<?xml version="1.0" ?>
|
42
|
-
<Logging>
|
43
|
-
<LogBucket>
|
44
|
-
logs-bucket
|
45
|
-
</LogBucket>
|
46
|
-
<LogObjectPrefix>
|
47
|
-
my-logs-enabled-bucket
|
48
|
-
</LogObjectPrefix>
|
49
|
-
</Logging>
|
50
|
-
|
51
|
-
If logging is not enabled, an empty <Logging> element is returned.
|
52
|
-
|
53
|
-
You can download log data from your log bucket using the gsutil cp command.
|
54
|
-
|
55
|
-
|
56
|
-
<B>ACCESS LOG FIELDS</B>
|
57
|
-
Field Type Description
|
58
|
-
time_micros integer The time that the request was completed, in
|
59
|
-
microseconds since the Unix epoch.
|
60
|
-
c_ip string The IP address from which the request was made.
|
61
|
-
The "c" prefix indicates that this is information
|
62
|
-
about the client.
|
63
|
-
c_ip_type integer The type of IP in the c_ip field:
|
64
|
-
A value of 1 indicates an IPV4 address.
|
65
|
-
A value of 2 indicates an IPV6 address.
|
66
|
-
c_ip_region string Reserved for future use.
|
67
|
-
cs_method string The HTTP method of this request. The "cs" prefix
|
68
|
-
indicates that this information was sent from the
|
69
|
-
client to the server.
|
70
|
-
cs_uri string The URI of the request.
|
71
|
-
sc_status integer The HTTP status code the server sent in response.
|
72
|
-
The "sc" prefix indicates that this information
|
73
|
-
was sent from the server to the client.
|
74
|
-
cs_bytes integer The number of bytes sent in the request.
|
75
|
-
sc_bytes integer The number of bytes sent in the response.
|
76
|
-
time_taken_micros integer The time it took to serve the request in
|
77
|
-
microseconds.
|
78
|
-
cs_host string The host in the original request.
|
79
|
-
cs_referrer string The HTTP referrer for the request.
|
80
|
-
cs_user_agent string The User-Agent of the request.
|
81
|
-
s_request_id string The request identifier.
|
82
|
-
cs_operation string The Google Cloud Storage operation e.g.
|
83
|
-
GET_Object.
|
84
|
-
cs_bucket string The bucket specified in the request. If this is a
|
85
|
-
list buckets request, this can be null.
|
86
|
-
cs_object string The object specified in this request. This can be
|
87
|
-
null.
|
88
|
-
|
89
|
-
|
90
|
-
<B>STORAGE DATA FIELDS</B>
|
91
|
-
Field Type Description
|
92
|
-
bucket string The name of the bucket.
|
93
|
-
storage_byte_hours integer Average size in bytes/per hour of that bucket.
|
94
|
-
""")
|
95
|
-
|
96
|
-
|
97
|
-
class GetLoggingCommand(Command):
|
98
|
-
"""Implementation of gsutil getlogging command."""
|
99
|
-
|
100
|
-
# Command specification (processed by parent class).
|
101
|
-
command_spec = {
|
102
|
-
# Name of command.
|
103
|
-
COMMAND_NAME : 'getlogging',
|
104
|
-
# List of command name aliases.
|
105
|
-
COMMAND_NAME_ALIASES : [],
|
106
|
-
# Min number of args required by this command.
|
107
|
-
MIN_ARGS : 1,
|
108
|
-
# Max number of args required by this command, or NO_MAX.
|
109
|
-
MAX_ARGS : 1,
|
110
|
-
# Getopt-style string specifying acceptable sub args.
|
111
|
-
SUPPORTED_SUB_ARGS : '',
|
112
|
-
# True if file URIs acceptable for this command.
|
113
|
-
FILE_URIS_OK : False,
|
114
|
-
# True if provider-only URIs acceptable for this command.
|
115
|
-
PROVIDER_URIS_OK : False,
|
116
|
-
# Index in args of first URI arg.
|
117
|
-
URIS_START_ARG : 0,
|
118
|
-
# True if must configure gsutil before running command.
|
119
|
-
CONFIG_REQUIRED : True,
|
120
|
-
}
|
121
|
-
help_spec = {
|
122
|
-
# Name of command or auxiliary help info for which this help applies.
|
123
|
-
HELP_NAME : 'getlogging',
|
124
|
-
# List of help name aliases.
|
125
|
-
HELP_NAME_ALIASES : [],
|
126
|
-
# Type of help:
|
127
|
-
HELP_TYPE : HelpType.COMMAND_HELP,
|
128
|
-
# One line summary of this help.
|
129
|
-
HELP_ONE_LINE_SUMMARY : 'Get logging configuration for a bucket',
|
130
|
-
# The full help text.
|
131
|
-
HELP_TEXT : _detailed_help_text,
|
132
|
-
}
|
133
|
-
|
134
|
-
# Command entry point.
|
135
|
-
def RunCommand(self):
|
136
|
-
self.GetXmlSubresource('logging', self.args[0])
|
137
|
-
return 0
|
@@ -1,116 +0,0 @@
|
|
1
|
-
# Copyright 2012 Google Inc. All Rights Reserved.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
from gslib.command import Command
|
16
|
-
from gslib.command import COMMAND_NAME
|
17
|
-
from gslib.command import COMMAND_NAME_ALIASES
|
18
|
-
from gslib.command import CONFIG_REQUIRED
|
19
|
-
from gslib.command import FILE_URIS_OK
|
20
|
-
from gslib.command import MAX_ARGS
|
21
|
-
from gslib.command import MIN_ARGS
|
22
|
-
from gslib.command import PROVIDER_URIS_OK
|
23
|
-
from gslib.command import SUPPORTED_SUB_ARGS
|
24
|
-
from gslib.command import URIS_START_ARG
|
25
|
-
from gslib.exception import CommandException
|
26
|
-
from gslib.help_provider import HELP_NAME
|
27
|
-
from gslib.help_provider import HELP_NAME_ALIASES
|
28
|
-
from gslib.help_provider import HELP_ONE_LINE_SUMMARY
|
29
|
-
from gslib.help_provider import HELP_TEXT
|
30
|
-
from gslib.help_provider import HelpType
|
31
|
-
from gslib.help_provider import HELP_TYPE
|
32
|
-
|
33
|
-
|
34
|
-
_detailed_help_text = ("""
|
35
|
-
<B>SYNOPSIS</B>
|
36
|
-
gsutil getversioning bucket_uri
|
37
|
-
|
38
|
-
|
39
|
-
<B>DESCRIPTION</B>
|
40
|
-
The Versioning Configuration feature enables you to configure a Google Cloud
|
41
|
-
Storage bucket to keep old versions of objects.
|
42
|
-
|
43
|
-
The gsutil getversioning command gets the versioning configuration for a
|
44
|
-
bucket, and displays an XML representation of the configuration.
|
45
|
-
|
46
|
-
In Google Cloud Storage, this would look like:
|
47
|
-
|
48
|
-
<?xml version="1.0" ?>
|
49
|
-
<VersioningConfiguration>
|
50
|
-
<Status>
|
51
|
-
Enabled
|
52
|
-
</Status>
|
53
|
-
</VersioningConfiguration>
|
54
|
-
""")
|
55
|
-
|
56
|
-
class GetVersioningCommand(Command):
|
57
|
-
"""Implementation of gsutil getversioning command."""
|
58
|
-
|
59
|
-
# Command specification (processed by parent class).
|
60
|
-
command_spec = {
|
61
|
-
# Name of command.
|
62
|
-
COMMAND_NAME : 'getversioning',
|
63
|
-
# List of command name aliases.
|
64
|
-
COMMAND_NAME_ALIASES : [],
|
65
|
-
# Min number of args required by this command.
|
66
|
-
MIN_ARGS : 1,
|
67
|
-
# Max number of args required by this command, or NO_MAX.
|
68
|
-
MAX_ARGS : 1,
|
69
|
-
# Getopt-style string specifying acceptable sub args.
|
70
|
-
SUPPORTED_SUB_ARGS : '',
|
71
|
-
# True if file URIs acceptable for this command.
|
72
|
-
FILE_URIS_OK : False,
|
73
|
-
# True if provider-only URIs acceptable for this command.
|
74
|
-
PROVIDER_URIS_OK : False,
|
75
|
-
# Index in args of first URI arg.
|
76
|
-
URIS_START_ARG : 1,
|
77
|
-
# True if must configure gsutil before running command.
|
78
|
-
CONFIG_REQUIRED : True,
|
79
|
-
}
|
80
|
-
help_spec = {
|
81
|
-
# Name of command or auxiliary help info for which this help applies.
|
82
|
-
HELP_NAME : 'getversioning',
|
83
|
-
# List of help name aliases.
|
84
|
-
HELP_NAME_ALIASES : [],
|
85
|
-
# Type of help)
|
86
|
-
HELP_TYPE : HelpType.COMMAND_HELP,
|
87
|
-
# One line summary of this help.
|
88
|
-
HELP_ONE_LINE_SUMMARY : 'Get the versioning configuration '
|
89
|
-
'for one or more buckets',
|
90
|
-
# The full help text.
|
91
|
-
HELP_TEXT : _detailed_help_text,
|
92
|
-
}
|
93
|
-
|
94
|
-
# Command entry point.
|
95
|
-
def RunCommand(self):
|
96
|
-
uri_args = self.args
|
97
|
-
|
98
|
-
# Iterate over URIs, expanding wildcards, and getting the website
|
99
|
-
# configuration on each.
|
100
|
-
some_matched = False
|
101
|
-
for uri_str in uri_args:
|
102
|
-
for blr in self.WildcardIterator(uri_str):
|
103
|
-
uri = blr.GetUri()
|
104
|
-
if not uri.names_bucket():
|
105
|
-
raise CommandException('URI %s must name a bucket for the %s command'
|
106
|
-
% (str(uri), self.command_name))
|
107
|
-
some_matched = True
|
108
|
-
uri_str = '%s://%s' % (uri.scheme, uri.bucket_name)
|
109
|
-
if uri.get_versioning_config():
|
110
|
-
print '%s: Enabled' % uri_str
|
111
|
-
else:
|
112
|
-
print '%s: Suspended' % uri_str
|
113
|
-
if not some_matched:
|
114
|
-
raise CommandException('No URIs matched')
|
115
|
-
|
116
|
-
return 0
|
@@ -1,122 +0,0 @@
|
|
1
|
-
# Copyright 2012 Google Inc. All Rights Reserved.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
import sys
|
16
|
-
|
17
|
-
from gslib.command import Command
|
18
|
-
from gslib.command import COMMAND_NAME
|
19
|
-
from gslib.command import COMMAND_NAME_ALIASES
|
20
|
-
from gslib.command import CONFIG_REQUIRED
|
21
|
-
from gslib.command import FILE_URIS_OK
|
22
|
-
from gslib.command import MAX_ARGS
|
23
|
-
from gslib.command import MIN_ARGS
|
24
|
-
from gslib.command import PROVIDER_URIS_OK
|
25
|
-
from gslib.command import SUPPORTED_SUB_ARGS
|
26
|
-
from gslib.command import URIS_START_ARG
|
27
|
-
from gslib.exception import CommandException
|
28
|
-
from gslib.help_provider import HELP_NAME
|
29
|
-
from gslib.help_provider import HELP_NAME_ALIASES
|
30
|
-
from gslib.help_provider import HELP_ONE_LINE_SUMMARY
|
31
|
-
from gslib.help_provider import HELP_TEXT
|
32
|
-
from gslib.help_provider import HelpType
|
33
|
-
from gslib.help_provider import HELP_TYPE
|
34
|
-
from xml.dom.minidom import parseString as XmlParseString
|
35
|
-
|
36
|
-
|
37
|
-
_detailed_help_text = ("""
|
38
|
-
<B>SYNOPSIS</B>
|
39
|
-
gsutil getwebcfg bucket_uri
|
40
|
-
|
41
|
-
|
42
|
-
<B>DESCRIPTION</B>
|
43
|
-
The Website Configuration feature enables you to configure a Google Cloud
|
44
|
-
Storage bucket to simulate the behavior of a static website. You can define
|
45
|
-
main pages or directory indices (for example, index.html) for buckets and
|
46
|
-
"directories". Also, you can define a custom error page in case a requested
|
47
|
-
resource does not exist.
|
48
|
-
|
49
|
-
The gsutil getwebcfg command gets the web semantics configuration for a
|
50
|
-
bucket, and displays an XML representation of the configuration.
|
51
|
-
|
52
|
-
In Google Cloud Storage, this would look like:
|
53
|
-
|
54
|
-
<?xml version="1.0" ?>
|
55
|
-
<WebsiteConfiguration>
|
56
|
-
<MainPageSuffix>
|
57
|
-
index.html
|
58
|
-
</MainPageSuffix>
|
59
|
-
<NotFoundPage>
|
60
|
-
404.html
|
61
|
-
</NotFoundPage>
|
62
|
-
</WebsiteConfiguration>
|
63
|
-
""")
|
64
|
-
|
65
|
-
class GetWebcfgCommand(Command):
|
66
|
-
"""Implementation of gsutil getwebcfg command."""
|
67
|
-
|
68
|
-
# Command specification (processed by parent class).
|
69
|
-
command_spec = {
|
70
|
-
# Name of command.
|
71
|
-
COMMAND_NAME : 'getwebcfg',
|
72
|
-
# List of command name aliases.
|
73
|
-
COMMAND_NAME_ALIASES : [],
|
74
|
-
# Min number of args required by this command.
|
75
|
-
MIN_ARGS : 1,
|
76
|
-
# Max number of args required by this command, or NO_MAX.
|
77
|
-
MAX_ARGS : 1, # Getopt-style string specifying acceptable sub args.
|
78
|
-
SUPPORTED_SUB_ARGS : '',
|
79
|
-
# True if file URIs acceptable for this command.
|
80
|
-
FILE_URIS_OK : False,
|
81
|
-
# True if provider-only URIs acceptable for this command.
|
82
|
-
PROVIDER_URIS_OK : False,
|
83
|
-
# Index in args of first URI arg.
|
84
|
-
URIS_START_ARG : 1,
|
85
|
-
# True if must configure gsutil before running command.
|
86
|
-
CONFIG_REQUIRED : True,
|
87
|
-
}
|
88
|
-
help_spec = {
|
89
|
-
# Name of command or auxiliary help info for which this help applies.
|
90
|
-
HELP_NAME : 'getwebcfg',
|
91
|
-
# List of help name aliases.
|
92
|
-
HELP_NAME_ALIASES : [],
|
93
|
-
# Type of help)
|
94
|
-
HELP_TYPE : HelpType.COMMAND_HELP,
|
95
|
-
# One line summary of this help.
|
96
|
-
HELP_ONE_LINE_SUMMARY : ('Get the website configuration '
|
97
|
-
'for one or more buckets'),
|
98
|
-
# The full help text.
|
99
|
-
HELP_TEXT : _detailed_help_text,
|
100
|
-
}
|
101
|
-
|
102
|
-
# Command entry point.
|
103
|
-
def RunCommand(self):
|
104
|
-
uri_args = self.args
|
105
|
-
|
106
|
-
# Iterate over URIs, expanding wildcards, and getting the website
|
107
|
-
# configuration on each.
|
108
|
-
some_matched = False
|
109
|
-
for uri_str in uri_args:
|
110
|
-
for blr in self.WildcardIterator(uri_str):
|
111
|
-
uri = blr.GetUri()
|
112
|
-
if not uri.names_bucket():
|
113
|
-
raise CommandException('URI %s must name a bucket for the %s command'
|
114
|
-
% (str(uri), self.command_name))
|
115
|
-
some_matched = True
|
116
|
-
sys.stderr.write('Getting website config on %s...\n' % uri)
|
117
|
-
_, xml_body = uri.get_website_config()
|
118
|
-
sys.stdout.write(XmlParseString(xml_body).toprettyxml())
|
119
|
-
if not some_matched:
|
120
|
-
raise CommandException('No URIs matched')
|
121
|
-
|
122
|
-
return 0
|