vagrant-unbundled 2.3.2.0 → 2.3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/CHANGELOG.md +57 -0
  4. data/Gemfile.lock +40 -40
  5. data/LICENSE +1 -3
  6. data/Makefile +53 -9
  7. data/contrib/bash/completion.sh +15 -0
  8. data/go.mod +1 -1
  9. data/go.sum +2 -10
  10. data/lib/vagrant/action/builtin/box_add.rb +16 -6
  11. data/lib/vagrant/environment.rb +1 -1
  12. data/lib/vagrant/errors.rb +12 -0
  13. data/lib/vagrant/plugin/v2/config.rb +0 -5
  14. data/lib/vagrant/shared_helpers.rb +21 -0
  15. data/lib/vagrant/util/file_mutex.rb +47 -0
  16. data/lib/vagrant/util/install_cli_autocomplete.rb +3 -3
  17. data/lib/vagrant/util/platform.rb +8 -2
  18. data/lib/vagrant/util.rb +1 -0
  19. data/lib/vagrant.rb +1 -3
  20. data/pkg/vagrant-unbundled-2.3.2.0.gem +0 -0
  21. data/pkg/vagrant-unbundled-2.3.3.0.gem +0 -0
  22. data/plugins/commands/box/command/outdated.rb +1 -1
  23. data/plugins/commands/serve/command.rb +22 -24
  24. data/plugins/commands/serve/constants.rb +8 -0
  25. data/plugins/communicators/ssh/communicator.rb +11 -20
  26. data/plugins/guests/solaris/cap/remove_public_key.rb +2 -2
  27. data/plugins/hosts/arch/host.rb +1 -1
  28. data/plugins/hosts/gentoo/host.rb +1 -1
  29. data/plugins/hosts/slackware/host.rb +1 -1
  30. data/plugins/kernel_v2/config/vm.rb +0 -9
  31. data/plugins/providers/docker/action.rb +1 -2
  32. data/plugins/providers/docker/driver.rb +17 -1
  33. data/plugins/providers/hyperv/driver.rb +6 -1
  34. data/plugins/providers/hyperv/scripts/set_enhanced_session_transport_type.ps1 +11 -2
  35. data/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 +15 -0
  36. data/plugins/providers/virtualbox/action/check_virtualbox.rb +0 -6
  37. data/plugins/providers/virtualbox/action/network.rb +23 -5
  38. data/plugins/providers/virtualbox/driver/base.rb +49 -1
  39. data/plugins/providers/virtualbox/driver/version_5_0.rb +40 -36
  40. data/plugins/providers/virtualbox/driver/version_7_0.rb +241 -6
  41. data/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +5 -1
  42. data/plugins/provisioners/ansible/cap/guest/posix/ansible_installed.rb +2 -2
  43. data/plugins/provisioners/ansible/provisioner/guest.rb +1 -1
  44. data/plugins/provisioners/ansible/provisioner/host.rb +4 -3
  45. data/plugins/provisioners/chef/config/chef_zero.rb +1 -1
  46. data/plugins/synced_folders/rsync/helper.rb +4 -6
  47. data/templates/commands/init/Vagrantfile.erb +7 -0
  48. data/templates/locales/en.yml +16 -0
  49. data/thirdparty/proto/api-common-protos/.bazelrc +2 -0
  50. data/thirdparty/proto/api-common-protos/.git +1 -0
  51. data/thirdparty/proto/api-common-protos/.gitignore +11 -0
  52. data/thirdparty/proto/api-common-protos/BUILD.bazel +129 -0
  53. data/thirdparty/proto/api-common-protos/CODE_OF_CONDUCT.md +43 -0
  54. data/thirdparty/proto/api-common-protos/CONTRIBUTING.md +42 -0
  55. data/thirdparty/proto/api-common-protos/Dockerfile +18 -0
  56. data/thirdparty/proto/api-common-protos/LICENSE +201 -0
  57. data/thirdparty/proto/api-common-protos/README.md +113 -0
  58. data/thirdparty/proto/api-common-protos/SECURITY.md +7 -0
  59. data/thirdparty/proto/api-common-protos/WORKSPACE +154 -0
  60. data/thirdparty/proto/api-common-protos/google/api/BUILD.bazel +246 -0
  61. data/thirdparty/proto/api-common-protos/google/api/README.md +46 -0
  62. data/thirdparty/proto/api-common-protos/google/api/annotations.proto +31 -0
  63. data/thirdparty/proto/api-common-protos/google/api/auth.proto +181 -0
  64. data/thirdparty/proto/api-common-protos/google/api/backend.proto +51 -0
  65. data/thirdparty/proto/api-common-protos/google/api/billing.proto +67 -0
  66. data/thirdparty/proto/api-common-protos/google/api/client.proto +99 -0
  67. data/thirdparty/proto/api-common-protos/google/api/config_change.proto +85 -0
  68. data/thirdparty/proto/api-common-protos/google/api/consumer.proto +83 -0
  69. data/thirdparty/proto/api-common-protos/google/api/context.proto +63 -0
  70. data/thirdparty/proto/api-common-protos/google/api/control.proto +33 -0
  71. data/thirdparty/proto/api-common-protos/google/api/distribution.proto +213 -0
  72. data/thirdparty/proto/api-common-protos/google/api/documentation.proto +157 -0
  73. data/thirdparty/proto/api-common-protos/google/api/endpoint.proto +71 -0
  74. data/thirdparty/proto/api-common-protos/google/api/field_behavior.proto +84 -0
  75. data/thirdparty/proto/api-common-protos/google/api/http.proto +318 -0
  76. data/thirdparty/proto/api-common-protos/google/api/httpbody.proto +76 -0
  77. data/thirdparty/proto/api-common-protos/google/api/label.proto +49 -0
  78. data/thirdparty/proto/api-common-protos/google/api/launch_stage.proto +67 -0
  79. data/thirdparty/proto/api-common-protos/google/api/log.proto +55 -0
  80. data/thirdparty/proto/api-common-protos/google/api/logging.proto +83 -0
  81. data/thirdparty/proto/api-common-protos/google/api/metric.proto +192 -0
  82. data/thirdparty/proto/api-common-protos/google/api/monitored_resource.proto +116 -0
  83. data/thirdparty/proto/api-common-protos/google/api/monitoring.proto +89 -0
  84. data/thirdparty/proto/api-common-protos/google/api/quota.proto +259 -0
  85. data/thirdparty/proto/api-common-protos/google/api/resource.proto +299 -0
  86. data/thirdparty/proto/api-common-protos/google/api/routing.proto +461 -0
  87. data/thirdparty/proto/api-common-protos/google/api/service.proto +175 -0
  88. data/thirdparty/proto/api-common-protos/google/api/source_info.proto +32 -0
  89. data/thirdparty/proto/api-common-protos/google/api/system_parameter.proto +96 -0
  90. data/thirdparty/proto/api-common-protos/google/api/usage.proto +92 -0
  91. data/thirdparty/proto/api-common-protos/google/cloud/extended_operations.proto +150 -0
  92. data/thirdparty/proto/api-common-protos/google/iam/README.md +14 -0
  93. data/thirdparty/proto/api-common-protos/google/iam/admin/v1/iam.proto +1087 -0
  94. data/thirdparty/proto/api-common-protos/google/iam/v1/iam_policy.proto +145 -0
  95. data/thirdparty/proto/api-common-protos/google/iam/v1/logging/audit_data.proto +34 -0
  96. data/thirdparty/proto/api-common-protos/google/iam/v1/options.proto +41 -0
  97. data/thirdparty/proto/api-common-protos/google/iam/v1/policy.proto +240 -0
  98. data/thirdparty/proto/api-common-protos/google/logging/type/README.md +12 -0
  99. data/thirdparty/proto/api-common-protos/google/logging/type/http_request.proto +92 -0
  100. data/thirdparty/proto/api-common-protos/google/logging/type/log_severity.proto +72 -0
  101. data/thirdparty/proto/api-common-protos/google/longrunning/README.md +31 -0
  102. data/thirdparty/proto/api-common-protos/google/longrunning/operations.proto +247 -0
  103. data/thirdparty/proto/api-common-protos/google/rpc/README.md +18 -0
  104. data/thirdparty/proto/api-common-protos/google/rpc/code.proto +186 -0
  105. data/thirdparty/proto/api-common-protos/google/rpc/context/attribute_context.proto +287 -0
  106. data/thirdparty/proto/api-common-protos/google/rpc/error_details.proto +246 -0
  107. data/thirdparty/proto/api-common-protos/google/rpc/status.proto +47 -0
  108. data/thirdparty/proto/api-common-protos/google/type/README.md +7 -0
  109. data/thirdparty/proto/api-common-protos/google/type/calendar_period.proto +57 -0
  110. data/thirdparty/proto/api-common-protos/google/type/color.proto +170 -0
  111. data/thirdparty/proto/api-common-protos/google/type/date.proto +50 -0
  112. data/thirdparty/proto/api-common-protos/google/type/datetime.proto +97 -0
  113. data/thirdparty/proto/api-common-protos/google/type/dayofweek.proto +51 -0
  114. data/thirdparty/proto/api-common-protos/google/type/expr.proto +51 -0
  115. data/thirdparty/proto/api-common-protos/google/type/fraction.proto +34 -0
  116. data/thirdparty/proto/api-common-protos/google/type/latlng.proto +37 -0
  117. data/thirdparty/proto/api-common-protos/google/type/money.proto +43 -0
  118. data/thirdparty/proto/api-common-protos/google/type/month.proto +66 -0
  119. data/thirdparty/proto/api-common-protos/google/type/postal_address.proto +135 -0
  120. data/thirdparty/proto/api-common-protos/google/type/quaternion.proto +95 -0
  121. data/thirdparty/proto/api-common-protos/google/type/timeofday.proto +44 -0
  122. data/thirdparty/proto/api-common-protos/renovate.json +5 -0
  123. data/thirdparty/proto/api-common-protos/repository_rules.bzl +222 -0
  124. data/tools.go +10 -0
  125. data/vagrant.gemspec +13 -13
  126. data/version.txt +1 -1
  127. metadata +111 -38
  128. data/lib/vagrant/patches/net-ssh.rb +0 -286
@@ -0,0 +1,135 @@
1
+ // Copyright 2019 Google LLC.
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.type;
19
+
20
+ option cc_enable_arenas = true;
21
+ option go_package = "google.golang.org/genproto/googleapis/type/postaladdress;postaladdress";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "PostalAddressProto";
24
+ option java_package = "com.google.type";
25
+ option objc_class_prefix = "GTP";
26
+
27
+ // Represents a postal address, e.g. for postal delivery or payments addresses.
28
+ // Given a postal address, a postal service can deliver items to a premise, P.O.
29
+ // Box or similar.
30
+ // It is not intended to model geographical locations (roads, towns,
31
+ // mountains).
32
+ //
33
+ // In typical usage an address would be created via user input or from importing
34
+ // existing data, depending on the type of process.
35
+ //
36
+ // Advice on address input / editing:
37
+ // - Use an i18n-ready address widget such as
38
+ // https://github.com/google/libaddressinput)
39
+ // - Users should not be presented with UI elements for input or editing of
40
+ // fields outside countries where that field is used.
41
+ //
42
+ // For more guidance on how to use this schema, please see:
43
+ // https://support.google.com/business/answer/6397478
44
+ message PostalAddress {
45
+ // The schema revision of the `PostalAddress`. This must be set to 0, which is
46
+ // the latest revision.
47
+ //
48
+ // All new revisions **must** be backward compatible with old revisions.
49
+ int32 revision = 1;
50
+
51
+ // Required. CLDR region code of the country/region of the address. This
52
+ // is never inferred and it is up to the user to ensure the value is
53
+ // correct. See http://cldr.unicode.org/ and
54
+ // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
55
+ // for details. Example: "CH" for Switzerland.
56
+ string region_code = 2;
57
+
58
+ // Optional. BCP-47 language code of the contents of this address (if
59
+ // known). This is often the UI language of the input form or is expected
60
+ // to match one of the languages used in the address' country/region, or their
61
+ // transliterated equivalents.
62
+ // This can affect formatting in certain countries, but is not critical
63
+ // to the correctness of the data and will never affect any validation or
64
+ // other non-formatting related operations.
65
+ //
66
+ // If this value is not known, it should be omitted (rather than specifying a
67
+ // possibly incorrect default).
68
+ //
69
+ // Examples: "zh-Hant", "ja", "ja-Latn", "en".
70
+ string language_code = 3;
71
+
72
+ // Optional. Postal code of the address. Not all countries use or require
73
+ // postal codes to be present, but where they are used, they may trigger
74
+ // additional validation with other parts of the address (e.g. state/zip
75
+ // validation in the U.S.A.).
76
+ string postal_code = 4;
77
+
78
+ // Optional. Additional, country-specific, sorting code. This is not used
79
+ // in most regions. Where it is used, the value is either a string like
80
+ // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
81
+ // alone, representing the "sector code" (Jamaica), "delivery area indicator"
82
+ // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
83
+ string sorting_code = 5;
84
+
85
+ // Optional. Highest administrative subdivision which is used for postal
86
+ // addresses of a country or region.
87
+ // For example, this can be a state, a province, an oblast, or a prefecture.
88
+ // Specifically, for Spain this is the province and not the autonomous
89
+ // community (e.g. "Barcelona" and not "Catalonia").
90
+ // Many countries don't use an administrative area in postal addresses. E.g.
91
+ // in Switzerland this should be left unpopulated.
92
+ string administrative_area = 6;
93
+
94
+ // Optional. Generally refers to the city/town portion of the address.
95
+ // Examples: US city, IT comune, UK post town.
96
+ // In regions of the world where localities are not well defined or do not fit
97
+ // into this structure well, leave locality empty and use address_lines.
98
+ string locality = 7;
99
+
100
+ // Optional. Sublocality of the address.
101
+ // For example, this can be neighborhoods, boroughs, districts.
102
+ string sublocality = 8;
103
+
104
+ // Unstructured address lines describing the lower levels of an address.
105
+ //
106
+ // Because values in address_lines do not have type information and may
107
+ // sometimes contain multiple values in a single field (e.g.
108
+ // "Austin, TX"), it is important that the line order is clear. The order of
109
+ // address lines should be "envelope order" for the country/region of the
110
+ // address. In places where this can vary (e.g. Japan), address_language is
111
+ // used to make it explicit (e.g. "ja" for large-to-small ordering and
112
+ // "ja-Latn" or "en" for small-to-large). This way, the most specific line of
113
+ // an address can be selected based on the language.
114
+ //
115
+ // The minimum permitted structural representation of an address consists
116
+ // of a region_code with all remaining information placed in the
117
+ // address_lines. It would be possible to format such an address very
118
+ // approximately without geocoding, but no semantic reasoning could be
119
+ // made about any of the address components until it was at least
120
+ // partially resolved.
121
+ //
122
+ // Creating an address only containing a region_code and address_lines, and
123
+ // then geocoding is the recommended way to handle completely unstructured
124
+ // addresses (as opposed to guessing which parts of the address should be
125
+ // localities or administrative areas).
126
+ repeated string address_lines = 9;
127
+
128
+ // Optional. The recipient at the address.
129
+ // This field may, under certain circumstances, contain multiline information.
130
+ // For example, it might contain "care of" information.
131
+ repeated string recipients = 10;
132
+
133
+ // Optional. The name of the organization at the address.
134
+ string organization = 11;
135
+ }
@@ -0,0 +1,95 @@
1
+ // Copyright 2019 Google LLC.
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.type;
19
+
20
+ option cc_enable_arenas = true;
21
+ option go_package = "google.golang.org/genproto/googleapis/type/quaternion;quaternion";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "QuaternionProto";
24
+ option java_package = "com.google.type";
25
+ option objc_class_prefix = "GTP";
26
+
27
+ // A quaternion is defined as the quotient of two directed lines in a
28
+ // three-dimensional space or equivalently as the quotient of two Euclidean
29
+ // vectors (https://en.wikipedia.org/wiki/Quaternion).
30
+ //
31
+ // Quaternions are often used in calculations involving three-dimensional
32
+ // rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation),
33
+ // as they provide greater mathematical robustness by avoiding the gimbal lock
34
+ // problems that can be encountered when using Euler angles
35
+ // (https://en.wikipedia.org/wiki/Gimbal_lock).
36
+ //
37
+ // Quaternions are generally represented in this form:
38
+ //
39
+ // w + xi + yj + zk
40
+ //
41
+ // where x, y, z, and w are real numbers, and i, j, and k are three imaginary
42
+ // numbers.
43
+ //
44
+ // Our naming choice `(x, y, z, w)` comes from the desire to avoid confusion for
45
+ // those interested in the geometric properties of the quaternion in the 3D
46
+ // Cartesian space. Other texts often use alternative names or subscripts, such
47
+ // as `(a, b, c, d)`, `(1, i, j, k)`, or `(0, 1, 2, 3)`, which are perhaps
48
+ // better suited for mathematical interpretations.
49
+ //
50
+ // To avoid any confusion, as well as to maintain compatibility with a large
51
+ // number of software libraries, the quaternions represented using the protocol
52
+ // buffer below *must* follow the Hamilton convention, which defines `ij = k`
53
+ // (i.e. a right-handed algebra), and therefore:
54
+ //
55
+ // i^2 = j^2 = k^2 = ijk = −1
56
+ // ij = −ji = k
57
+ // jk = −kj = i
58
+ // ki = −ik = j
59
+ //
60
+ // Please DO NOT use this to represent quaternions that follow the JPL
61
+ // convention, or any of the other quaternion flavors out there.
62
+ //
63
+ // Definitions:
64
+ //
65
+ // - Quaternion norm (or magnitude): `sqrt(x^2 + y^2 + z^2 + w^2)`.
66
+ // - Unit (or normalized) quaternion: a quaternion whose norm is 1.
67
+ // - Pure quaternion: a quaternion whose scalar component (`w`) is 0.
68
+ // - Rotation quaternion: a unit quaternion used to represent rotation.
69
+ // - Orientation quaternion: a unit quaternion used to represent orientation.
70
+ //
71
+ // A quaternion can be normalized by dividing it by its norm. The resulting
72
+ // quaternion maintains the same direction, but has a norm of 1, i.e. it moves
73
+ // on the unit sphere. This is generally necessary for rotation and orientation
74
+ // quaternions, to avoid rounding errors:
75
+ // https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
76
+ //
77
+ // Note that `(x, y, z, w)` and `(-x, -y, -z, -w)` represent the same rotation,
78
+ // but normalization would be even more useful, e.g. for comparison purposes, if
79
+ // it would produce a unique representation. It is thus recommended that `w` be
80
+ // kept positive, which can be achieved by changing all the signs when `w` is
81
+ // negative.
82
+ //
83
+ message Quaternion {
84
+ // The x component.
85
+ double x = 1;
86
+
87
+ // The y component.
88
+ double y = 2;
89
+
90
+ // The z component.
91
+ double z = 3;
92
+
93
+ // The scalar component.
94
+ double w = 4;
95
+ }
@@ -0,0 +1,44 @@
1
+ // Copyright 2019 Google LLC.
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
+
16
+ syntax = "proto3";
17
+
18
+ package google.type;
19
+
20
+ option cc_enable_arenas = true;
21
+ option go_package = "google.golang.org/genproto/googleapis/type/timeofday;timeofday";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "TimeOfDayProto";
24
+ option java_package = "com.google.type";
25
+ option objc_class_prefix = "GTP";
26
+
27
+ // Represents a time of day. The date and time zone are either not significant
28
+ // or are specified elsewhere. An API may choose to allow leap seconds. Related
29
+ // types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`.
30
+ message TimeOfDay {
31
+ // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
32
+ // to allow the value "24:00:00" for scenarios like business closing time.
33
+ int32 hours = 1;
34
+
35
+ // Minutes of hour of day. Must be from 0 to 59.
36
+ int32 minutes = 2;
37
+
38
+ // Seconds of minutes of the time. Must normally be from 0 to 59. An API may
39
+ // allow the value 60 if it allows leap-seconds.
40
+ int32 seconds = 3;
41
+
42
+ // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
43
+ int32 nanos = 4;
44
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": [
3
+ "config:base"
4
+ ]
5
+ }
@@ -0,0 +1,222 @@
1
+ """Repository rules and macros which are expected to be called from WORKSPACE file of either
2
+ googleapis itself or any third_party repository which consumes googleapis as its dependency.
3
+ """
4
+
5
+ def _switched_rules_impl(ctx):
6
+ disabled_rule_script = """
7
+ def {rule_name}(**kwargs):
8
+ pass
9
+ """
10
+ enabled_native_rule_script = """
11
+ {rule_name} = {native_rule_name}
12
+ """
13
+ enabled_rule_script = """
14
+ load("{file_label}", _{rule_name} = "{rule_name}")
15
+ """
16
+ elabled_rule_scrip_alias = """
17
+ {rule_name} = _{rule_name}
18
+ """
19
+ load_rules = [] # load() must go before everythin else in .bzl files since Bazel 0.25.0
20
+ rules = []
21
+
22
+ for rule_name, value in ctx.attr.rules.items():
23
+ if not value:
24
+ rules.append(disabled_rule_script.format(rule_name = rule_name))
25
+ elif value.startswith("@"):
26
+ load_rules.append(enabled_rule_script.format(file_label = value, rule_name = rule_name))
27
+ rules.append(elabled_rule_scrip_alias.format(rule_name = rule_name))
28
+ elif value.startswith("native."):
29
+ rules.append(
30
+ enabled_native_rule_script.format(rule_name = rule_name, native_rule_name = value),
31
+ )
32
+ else:
33
+ rules.append(value)
34
+
35
+ ctx.file("BUILD.bazel", "")
36
+ ctx.file("imports.bzl", "".join(load_rules + rules))
37
+
38
+ switched_rules = repository_rule(
39
+ implementation = _switched_rules_impl,
40
+ attrs = {
41
+ "rules": attr.string_dict(
42
+ allow_empty = True,
43
+ mandatory = False,
44
+ default = {},
45
+ ),
46
+ },
47
+ )
48
+
49
+ def switched_rules_by_language(
50
+ name,
51
+ gapic = False,
52
+ grpc = False,
53
+ java = False,
54
+ go = False,
55
+ cc = False,
56
+ php = False,
57
+ nodejs = False,
58
+ python = False,
59
+ ruby = False,
60
+ csharp = False,
61
+ rules_override = {}):
62
+ """Switches rules in the generated imports.bzl between no-op and the actual implementation.
63
+
64
+ This defines which language-specific rules (or client type specific, like grpc or gapic) should
65
+ be enabled during the build. All non-enabled language-specific rules will default to no-op
66
+ implementations. Examples of the language-specific rules are: java_gapic_library
67
+ (Java-specific), go_proto_library (Go-specific), proto_library_with_info (gapic-specific) etc.
68
+ Note, proto_library rule is always enabled.
69
+
70
+ For example, to use this rule and enable Java and Go rules, add the following in the external
71
+ repository which imports com_google_googleapis repository and its corresponding dependencies:
72
+
73
+ load("@com_google_googleapis//:repository_rules.bzl", "enabled_rules")
74
+
75
+ enabled_rules(
76
+ name = "com_google_googleapis_imports",
77
+ grpc = True,
78
+ gapic = True,
79
+ go = True,
80
+ java = True,
81
+ )
82
+
83
+ Note, for build to work you should also import the language-specific transitive dependencies.
84
+
85
+ Args:
86
+ name (str): name of a target, is expected to be "com_google_googleapis_imports".
87
+ gapic (bool): Enable GAPIC specific rules. The GAPIC rules are also language-specific, so
88
+ the actual enabled rules will be determined by the other language-specific arguments of
89
+ this rule. False by default.
90
+ grpc (bool): Enable gRPC specific rules. The gRPC rules are also language-specific, so
91
+ the actual enabled rules will be determined by the other language-specific arguments of
92
+ this rule. False by default.
93
+ java (bool): Enable Java specific rules. False by default.
94
+ go (bool): Enable Go specific rules. False by default.
95
+ cc (bool): Enable C++ specific rules. False by default. Partially implemented.
96
+ php (bool): Enable PHP specific rules. False by default.
97
+ nodejs (bool): Enable Node.js specific rules. False by default.
98
+ ruby (bool): Enable Ruby specific rules. False by default. Not implemented yet.
99
+ python (bool): Enable Python-specific rules. False by default. Not implemented yet.
100
+ csharp (bool): Enable C# specific rules. False by default. Not implemented yet.
101
+ rules_override (dict): Custom rule overrides (for advanced usage).
102
+ """
103
+
104
+ rules = {}
105
+
106
+ #
107
+ # Common
108
+ #
109
+ rules["proto_library_with_info"] = _switch(
110
+ gapic,
111
+ "@com_google_api_codegen//rules_gapic:gapic.bzl",
112
+ )
113
+
114
+ #
115
+ # Java
116
+ #
117
+ rules["java_proto_library"] = _switch(
118
+ java,
119
+ "native.java_proto_library",
120
+ )
121
+ rules["java_grpc_library"] = _switch(
122
+ java and grpc,
123
+ "@io_grpc_grpc_java//:java_grpc_library.bzl",
124
+ )
125
+ rules["java_gapic_library"] = _switch(
126
+ java and grpc and gapic,
127
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
128
+ )
129
+ rules["java_resource_name_proto_library"] = _switch(
130
+ java and grpc and gapic,
131
+ "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl",
132
+ )
133
+ rules["java_gapic_assembly_gradle_pkg"] = _switch(
134
+ java and grpc and gapic,
135
+ "@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl",
136
+ )
137
+ rules["java_test"] = _switch(
138
+ java and grpc and gapic,
139
+ "native.java_test",
140
+ )
141
+
142
+ #
143
+ # Go
144
+ #
145
+ rules["go_proto_library"] = _switch(
146
+ go,
147
+ "@io_bazel_rules_go//proto:def.bzl",
148
+ )
149
+ rules["go_library"] = _switch(
150
+ go,
151
+ "@io_bazel_rules_go//go:def.bzl",
152
+ )
153
+ rules["go_test"] = _switch(
154
+ go and grpc and gapic,
155
+ "@io_bazel_rules_go//go:def.bzl",
156
+ )
157
+ rules["go_gapic_library"] = _switch(
158
+ go and grpc and gapic,
159
+ "@com_google_api_codegen//rules_gapic/go:go_gapic.bzl",
160
+ )
161
+ rules["go_gapic_assembly_pkg"] = _switch(
162
+ go and grpc and gapic,
163
+ "@com_google_api_codegen//rules_gapic/go:go_gapic_pkg.bzl",
164
+ )
165
+
166
+ #
167
+ # C++
168
+ #
169
+ rules["cc_proto_library"] = _switch(
170
+ cc,
171
+ "native.cc_proto_library",
172
+ )
173
+ rules["cc_grpc_library"] = _switch(
174
+ cc and grpc,
175
+ "@com_github_grpc_grpc//bazel:cc_grpc_library.bzl",
176
+ )
177
+ rules["cc_gapic_library"] = _switch(
178
+ cc and grpc and gapic,
179
+ "@com_google_gapic_generator_cpp//rules_gapic/cpp:cc_gapic.bzl",
180
+ )
181
+
182
+ #
183
+ # PHP
184
+ #
185
+ rules["php_proto_library"] = _switch(
186
+ php,
187
+ "@com_google_api_codegen//rules_gapic/php:php_gapic.bzl",
188
+ )
189
+ rules["php_grpc_library"] = _switch(
190
+ php and grpc,
191
+ "@com_google_api_codegen//rules_gapic/php:php_gapic.bzl",
192
+ )
193
+ rules["php_gapic_library"] = _switch(
194
+ php and grpc and gapic,
195
+ "@com_google_api_codegen//rules_gapic/php:php_gapic.bzl",
196
+ )
197
+ rules["php_gapic_assembly_pkg"] = _switch(
198
+ php and grpc and gapic,
199
+ "@com_google_api_codegen//rules_gapic/php:php_gapic_pkg.bzl",
200
+ )
201
+
202
+ #
203
+ # Node.js
204
+ #
205
+ rules["nodejs_gapic_library"] = _switch(
206
+ nodejs and grpc and gapic,
207
+ "@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic.bzl",
208
+ )
209
+ rules["nodejs_gapic_assembly_pkg"] = _switch(
210
+ nodejs and grpc and gapic,
211
+ "@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic_pkg.bzl",
212
+ )
213
+
214
+ rules.update(rules_override)
215
+
216
+ switched_rules(
217
+ name = name,
218
+ rules = rules,
219
+ )
220
+
221
+ def _switch(enabled, enabled_value):
222
+ return enabled_value if enabled else ""
data/tools.go ADDED
@@ -0,0 +1,10 @@
1
+ // Copyright (c) HashiCorp, Inc.
2
+ // SPDX-License-Identifier: MPL-2.0
3
+
4
+ //go:build tools
5
+
6
+ package tools
7
+
8
+ import (
9
+ _ "github.com/randall77/makefat"
10
+ )
data/vagrant.gemspec CHANGED
@@ -21,23 +21,23 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'googleapis-common-protos-types', '~> 1.3'
22
22
  s.add_dependency "grpc"
23
23
  s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
24
- s.add_dependency "i18n", "~> 1.8"
25
- s.add_dependency "listen", "~> 3.6"
24
+ s.add_dependency "i18n", "~> 1.12"
25
+ s.add_dependency "listen", "~> 3.7"
26
26
  s.add_dependency "log4r", "~> 1.1.9", "< 1.1.11"
27
27
  s.add_dependency "mime-types", "~> 3.3"
28
- s.add_dependency "net-ftp", "~> 0.1"
29
- s.add_dependency "net-ssh", ">= 6.1.0", "< 6.2"
30
- s.add_dependency "net-sftp", "~> 3.0"
31
- s.add_dependency "net-scp", "~> 3.0.0"
28
+ s.add_dependency "net-ftp", "~> 0.2"
29
+ s.add_dependency "net-ssh", "~> 7.0"
30
+ s.add_dependency "net-sftp", "~> 4.0"
31
+ s.add_dependency "net-scp", "~> 4.0"
32
32
  s.add_dependency "rb-kqueue", "~> 0.2.0"
33
33
  s.add_dependency "rexml", "~> 3.2"
34
- s.add_dependency "rgl", "~> 0.5.7"
35
- s.add_dependency "rubyzip", "~> 2.0"
34
+ s.add_dependency "rgl", "~> 0.5.10"
35
+ s.add_dependency "rubyzip", "~> 2.3.2"
36
36
  s.add_dependency "vagrant_cloud", "~> 3.0.5"
37
- s.add_dependency "wdm", "~> 0.1.0"
38
- s.add_dependency "winrm", ">= 2.3.4", "< 3.0"
39
- s.add_dependency "winrm-elevated", ">= 1.2.1", "< 2.0"
40
- s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0"
37
+ s.add_dependency "wdm", "~> 0.1.1"
38
+ s.add_dependency "winrm", ">= 2.3.6", "< 3.0"
39
+ s.add_dependency "winrm-elevated", ">= 1.2.3", "< 2.0"
40
+ s.add_dependency "winrm-fs", ">= 1.3.5", "< 2.0"
41
41
 
42
42
  # Needed for go generate to use grpc_tools_ruby_protoc
43
43
  s.add_development_dependency "grpc-tools", "~> 1.41"
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
48
48
  # Constraint rake to properly handle deprecated method usage
49
49
  # from within rspec
50
50
  s.add_development_dependency "rake", "~> 13.0"
51
- s.add_development_dependency "rspec", "~> 3.11.0"
51
+ s.add_development_dependency "rspec", "~> 3.11"
52
52
  s.add_development_dependency "rspec-its", "~> 1.3.0"
53
53
  s.add_development_dependency "fake_ftp", "~> 0.3.0"
54
54
  s.add_development_dependency "webrick", "~> 1.7.0"
data/version.txt CHANGED
@@ -1 +1 @@
1
- 2.3.2.0
1
+ 2.3.6.0