gcloud 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzYyZTAzYjI3MDRlNWZmODg4OTlmMzU4MWVhOWJjNTg2NTFjZjgyMw==
4
+ ODE4NzljMmM3NWM4ZTAzNjExY2E2YWEwMWQ5MjY3YzdiZjAwOGJmOQ==
5
5
  data.tar.gz: !binary |-
6
- MTBlNzFkOGIxMTFmYzFhZWVkZmIzZGE0NzAxYjExMDM1MDU1ZjQ2ZA==
6
+ MDdlNWYxMjBiMjk1Mjc1ZTNjNjRkZmU0Y2M0NmZiMjVmOWVmODI4NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTdiZTVjZjViOTM4ZmQxZDZjMGZiMmQ1MDAzNmFmYWU1N2Q2ZTg2NTAzMjQx
10
- NTk4YTU2NmQ1ZGVjOTFjOGQ5OThhMDIxNDU0YjNmZTczMTc3ZTQ1ZDRmNTVi
11
- YzJhMWY2YTJlNTQwZDcyMmYyOWE3ZjkzY2YwYjRlZTZlYzFlYzU=
9
+ ZDRmODU3NjQ0MWIxYjU3NWVlMGU1YTZjMjQ5ZDQ1ZmVlZjQ0ZDUwODVkNjA0
10
+ NjcyNGJlMTFkOGVjNmJiZjkwZGMzMzlhNmMzYjI1ZGVlZmE5ZDhmYzU3OGVi
11
+ ODBmNDM1ZmEzYjAzNDkwZjBmMzhiYmE2MjZlMjM5MzgyM2MxMmY=
12
12
  data.tar.gz: !binary |-
13
- YTI5YjRiMWE2YTE0ZjJlYzk5OWNhNjkyNjQ4ZWM1NGQwOTRkZjllZGU0MGFk
14
- MWEyMmFkYTFiODk3NGNiZmE3ZDA5YTMxODliNjFiY2IzNDEzMjNkZGZmYzZm
15
- MGQ0MzA5ZjNhOTlhOGZkMTQ3YjMyNjM0ZTJkMDczODFhY2Q3Njc=
13
+ YWNmNzNiNzBlOTA1NjZjOGIwYzlhYzdiYTg3YTU1MWM4NTVlZjU4MjJkNDU2
14
+ YmUwNTdiZWEyMzJhYmNiZTNmNzhhZTdhY2EzMTkyOTU0Y2EyZWQyNWQ0YmUz
15
+ OTkwNGJiMGVhZjIzNDY0MmUyOWY0NzI0ZjhkZDBhOGRmZDYzNjU=
@@ -1,5 +1,12 @@
1
1
  # Release History
2
2
 
3
+ ### 0.6.1 / 2015-12-29
4
+
5
+ #### Changes
6
+
7
+ * Add delimiter parameter for listing Storage files
8
+ * Add support for Ruby 2.3
9
+
3
10
  ### 0.6.0 / 2015-12-11
4
11
 
5
12
  #### Changes
@@ -153,6 +153,24 @@ end
153
153
  projects = resource_manager.projects filter: "labels.env:production"
154
154
  ```
155
155
 
156
+ # Search
157
+
158
+ [Google Cloud Search](https://cloud.google.com/search/) ([docs](https://cloud.google.com/search/reference/rest/index)) allows an application to quickly perform full-text and geo-spatial searches without having to spin up instances and without the hassle of managing and maintaining a search service.
159
+
160
+ See the [gcloud-ruby Search API documentation](rdoc-ref:Gcloud::Search) to learn how to connect to Cloud Search using this library.
161
+
162
+ ```ruby
163
+ require "gcloud"
164
+
165
+ gcloud = Gcloud.new
166
+ search = gcloud.search
167
+ index = search.index "products"
168
+
169
+ results = index.search "cotton T-shirt",
170
+ expressions: { total_price: "(price + tax)" },
171
+ fields: ["name", "total_price", "highlight"]
172
+ ```
173
+
156
174
  # Storage
157
175
 
158
176
  [Google Cloud Storage](https://cloud.google.com/storage/) ([docs](https://cloud.google.com/storage/docs/json_api/)) allows you to store data on Google infrastructure with very high reliability, performance and availability, and can be used to distribute large data objects to users via direct download.
@@ -353,6 +353,12 @@ module Gcloud
353
353
  # +prefix+::
354
354
  # Filter results to files whose names begin with this prefix.
355
355
  # (+String+)
356
+ # +delimiter+::
357
+ # Returns results in a directory-like mode. +items+ will contain only
358
+ # objects whose names, aside from the +prefix+, do not contain
359
+ # +delimiter+. Objects whose names, aside from the +prefix+, contain
360
+ # +delimiter+ will have their name, truncated after the +delimiter+,
361
+ # returned in +prefixes+. Duplicate +prefixes+ are omitted.
356
362
  # +token+::
357
363
  # A previously-returned page token representing part of the larger set
358
364
  # of results to view. (+String+)
@@ -406,9 +412,15 @@ module Gcloud
406
412
  # tmp_files = bucket.files token: tmp_files.token
407
413
  # end
408
414
  #
409
- def files prefix: nil, token: nil, max: nil, versions: nil
415
+ def files prefix: nil, delimiter: nil, token: nil, max: nil, versions: nil
410
416
  ensure_connection!
411
- options = { prefix: prefix, token: token, max: max, versions: versions }
417
+ options = {
418
+ prefix: prefix,
419
+ delimiter: delimiter,
420
+ token: token,
421
+ max: max,
422
+ versions: versions
423
+ }
412
424
  resp = connection.list_files name, options
413
425
  if resp.success?
414
426
  File::List.from_response resp, connection
@@ -165,12 +165,14 @@ module Gcloud
165
165
  ##
166
166
  # Retrieves a list of files matching the criteria.
167
167
  def list_files bucket_name, options = {}
168
- params = { bucket: bucket_name,
169
- prefix: options[:prefix],
170
- pageToken: options[:token],
171
- maxResults: options[:max],
172
- versions: options[:versions]
173
- }.delete_if { |_, v| v.nil? }
168
+ params = {
169
+ bucket: bucket_name,
170
+ prefix: options[:prefix],
171
+ delimiter: options[:delimiter],
172
+ pageToken: options[:token],
173
+ maxResults: options[:max],
174
+ versions: options[:versions]
175
+ }.delete_if { |_, v| v.nil? }
174
176
 
175
177
  @client.execute(
176
178
  api_method: @storage.objects.list,
@@ -16,5 +16,5 @@
16
16
  #--
17
17
  # Google Cloud Version
18
18
  module Gcloud
19
- VERSION = "0.6.0"
19
+ VERSION = "0.6.1"
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Silvano Luciani
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-11 00:00:00.000000000 Z
13
+ date: 2015-12-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: beefcake