google-cloud-firestore 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91324b3d891244579ee53512847340a286c4cf1727c9a4eb5086966355029c93
4
- data.tar.gz: ad3b9d4907e71877a82d72a3d3f7c55952c45e0ea53ecb8becd8bc7569ef4bb9
3
+ metadata.gz: 51025089f3e6c639d79f28dd536baf2d879233250fced0a8cda7a2c0fe16e9cd
4
+ data.tar.gz: e93e7a44cebf91f11c7b9c93d73d0bb63db718af6d108e3563006ee49872c8be
5
5
  SHA512:
6
- metadata.gz: b2f11c5888b49916f5383f1a7b46c190e35897e79d376e48f6ef950246fd91179b9f33a05aec1fb932ff72fe262174fca1b5ed4c8d4f8a4e1f3f69b5302bdbaf
7
- data.tar.gz: 24bd04f73584eeac0840fc0619c4003284c6193202763e751dd1bbf4c02539f4a44486587953cf90c5bd133377d02d8c871669affeaa9a22e2fa863c6f718f17
6
+ metadata.gz: 3ce514ce05e63d63ff9ffaa1a6adcb065f63315a87f3a8b6a8556761de9d962754b4b7433bcc8c543be2325b46f0401d8f858cce4ce3b100ef1d66cbbe15c342
7
+ data.tar.gz: 00017f0d65b023e17bed35a0d55b9548cc44f1f78bb87c1e5f888544675956f434de40ff5e8d7f808845b7c959ef96763e118f221cebb8facbc7c1ea52018544
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.6.2 / 2021-07-26
4
+
5
+ #### Bug Fixes
6
+
7
+ * Update FieldPath#formatted_string to correctly escape non-simple characters
8
+
3
9
  ### 2.6.1 / 2021-07-08
4
10
 
5
11
  #### Documentation
@@ -209,19 +209,15 @@ module Google
209
209
 
210
210
  protected
211
211
 
212
- START_FIELD_PATH_CHARS = /\A[a-zA-Z_]/.freeze
213
212
  INVALID_FIELD_PATH_CHARS = %r{[~*/\[\]]}.freeze
213
+ SIMPLE_FIELD_PATH_CHARS = /\A[_a-zA-Z][_a-zA-Z0-9]*\Z/.freeze
214
214
 
215
215
  def escape_field_for_path field
216
216
  field = String field
217
217
 
218
- if INVALID_FIELD_PATH_CHARS.match(field) ||
219
- field["."] || field["`"] || field["\\"]
220
- escaped_field = field.gsub(/[`\\]/, "`" => "\\\`", "\\" => "\\\\")
221
- return "`#{escaped_field}`"
222
- end
218
+ return field if SIMPLE_FIELD_PATH_CHARS.match field
223
219
 
224
- return field if START_FIELD_PATH_CHARS.match field
220
+ field = field.gsub(/[`\\]/, "`" => "\\`", "\\" => "\\\\")
225
221
 
226
222
  "`#{field}`"
227
223
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Firestore
19
- VERSION = "2.6.1".freeze
19
+ VERSION = "2.6.2".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-firestore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-08 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core