fog-google 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +57 -11
- data/LICENSE.md +3 -3
- data/README.md +0 -1
- data/fog-google.gemspec +1 -0
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json/models/directories.rb +9 -1
- data/lib/fog/storage/google_json/models/directory.rb +2 -3
- data/lib/fog/storage/google_json/models/files.rb +2 -2
- data/lib/fog/storage/google_json/requests/list_objects.rb +13 -2
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7499d519d94d003fb7caf199d15250717a618e
|
4
|
+
data.tar.gz: fa30717e9415e38d0ee2c14854e71e7447cc2756
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a1e5831c3181960e635ed4723c6111e90d27c38efc508d443df7d13c6431ed41f522caab1de40b3fe0ca09709877771965e56b625bc258c8c77f2614353ef11
|
7
|
+
data.tar.gz: 3cd03f1027a93777a6d3257dabadae1390485a05fbe5bb020a85945ae4c6d0e1bb2a62e61a0c570e6cbe1016e69cffbdb213a45841cb36551540e4bf3ecf9600
|
data/CONTRIBUTORS.md
CHANGED
@@ -1,11 +1,16 @@
|
|
1
|
-
|
1
|
+
With also previous help from unnamed Google employees and [Fog contributors](https://github.com/fog/fog/blob/master/CONTRIBUTORS.md)
|
2
|
+
|
3
|
+
* Akshay Moghe <amoghe@maginatics.com>
|
4
|
+
* Alex Coomans <alex@alexcoomans.com>
|
2
5
|
* Alexander Kolesen <akolesen@iron.io>
|
3
|
-
*
|
6
|
+
* Alexander Lomov <lomov.as@gmail.com>
|
4
7
|
* Andrew Leonard <andy@hurricane-ridge.com>
|
5
8
|
* Antonio <0x414f@gmail.com>
|
6
9
|
* Ariel Zavala <arielo.zavala@gmail.com>
|
7
|
-
*
|
8
|
-
*
|
10
|
+
* Artem <code@temik.me>
|
11
|
+
* Artem <temikus@google.com>
|
12
|
+
* Artem Yakimenko <code@temik.me>
|
13
|
+
* Artem Yakimenko <temikus@google.com>
|
9
14
|
* Benson Kalahar <bensonk42@gmail.com>
|
10
15
|
* Bob Lail and Luke Booth <pair=bob.lail+luke.booth@cphepdev.com>
|
11
16
|
* Brett Porter <brett@apache.org>
|
@@ -14,30 +19,71 @@
|
|
14
19
|
* Chris Gianelloni <wolf31o2@gmail.com>
|
15
20
|
* Dan Prince <dprince@redhat.com>
|
16
21
|
* Daniel Broudy <broudy@google.com>
|
22
|
+
* Daniel van Gils <daniel@cloud66.com>
|
23
|
+
* David Salgado <david@digitalronin.com>
|
24
|
+
* Dawid Janczak <dawid.janczak@gmail.com>
|
17
25
|
* Dean Putney <dean@glowforge.com>
|
26
|
+
* Dean Putney <putney.dean@gmail.com>
|
27
|
+
* Dima <dima@cloud66.com>
|
18
28
|
* Doug Henderson <dhenderson@maestrodev.com>
|
29
|
+
* Emily Ye <emilyye@google.com>
|
30
|
+
* Eric Johnson <erjohnso@google.com>
|
19
31
|
* Eric Johnson <erjohnso@google.com>
|
32
|
+
* Ervin Weber <webervin@users.noreply.github.com>
|
20
33
|
* Ferran Rodenas <frodenas@gmail.com>
|
21
34
|
* Frederick Cheung <frederick.cheung@gmail.com>
|
35
|
+
* Imri Zvik <imrizvik@gmail.com>
|
36
|
+
* Isaac Hollander McCreery <ihmccreery@google.com>
|
37
|
+
* Isaac Hollander McCreery <ihmccreery@users.noreply.github.com>
|
22
38
|
* Jacob Mattingley <jem@ubalo.com>
|
39
|
+
* Jakob Krigovsky <jakob@krigovsky.com>
|
23
40
|
* James Herdman <james.herdman@me.com>
|
24
|
-
*
|
41
|
+
* Jared <j.schaber@innovati.ws>
|
42
|
+
* Jeffrey Dang <jcdang@gmail.com>
|
43
|
+
* Joe Selman <jsselman@google.com>
|
44
|
+
* Jonathan Yankovich <jonathan.yankovich@gmail.com>
|
45
|
+
* Julian Cheal <jcheal@redhat.com>
|
25
46
|
* Juris Galang <jurisgalang@gmail.com>
|
26
|
-
*
|
47
|
+
* Kyle Boutette <Everlag@users.noreply.github.com>
|
48
|
+
* Kyle Boutette <boutette@google.com>
|
27
49
|
* Lance Ivy <lance@cainlevy.net>
|
28
|
-
*
|
50
|
+
* Leila <leyla.myosotis@gmail.com>
|
51
|
+
* Leila-Kuntar <leyla.myosotis@gmail.com>
|
52
|
+
* Marcel Hild <hild@b4mad.net>
|
29
53
|
* Marcin Owsiany <porridge@google.com>
|
54
|
+
* Martin Lazarov <martin@lazarov.bg>
|
30
55
|
* Matt Darby <matt.darby@rackspace.com>
|
31
56
|
* Michael Elfassy <michaelelfassy@napps.ca>
|
57
|
+
* Miguel Martinez <miguel@bitnami.com>
|
58
|
+
* Misha Brukman <mbrukman@google.com>
|
59
|
+
* Myosotis <leyla.myosotis@gmail.com>
|
32
60
|
* Nat Welch <nat@natwelch.com>
|
33
|
-
*
|
61
|
+
* Paul Thornthwaite <paul@brightbox.co.uk>
|
34
62
|
* Paul Thornthwaite <tokengeek@gmail.com>
|
63
|
+
* Paulo Henrique Lopes Ribeiro <plribeiro3000@gmail.com>
|
35
64
|
* Paulo Henrique Lopes Ribeiro <plribeiro@zertico.com>
|
65
|
+
* Paulo Ribeiro <paulo@majority.co>
|
66
|
+
* Pradeep G <itsprdp@gmail.com>
|
67
|
+
* Rama McIntosh <rama@contix.com>
|
68
|
+
* Riccardo Carlesso <palladiusbonton@gmail.com>
|
69
|
+
* Riccardo Carlesso <riccardo.carlesso@gmail.com>
|
70
|
+
* Richard Wallace <rwallace@gmail.com>
|
36
71
|
* Romain Haenni <admin@zlabs.ch>
|
37
72
|
* Romain Vrignaud <rvrignaud@gmail.com>
|
38
|
-
* snyquist2 <snyquist@google.com>
|
39
73
|
* Stephen von Takach <steve@advancedcontrol.com.au>
|
74
|
+
* Tim Downey <tdowney@pivotal.io>
|
40
75
|
* Timur Alperovich <timur.alperovich@gmail.com>
|
41
|
-
*
|
76
|
+
* Vadim Shaulski <sh.vadim@gmail.com>
|
42
77
|
* Wesley Beary <geemus@gmail.com>
|
43
|
-
*
|
78
|
+
* Zach Robinson <zrobinson@pivotal.io>
|
79
|
+
* althras <althras@gmail.com>
|
80
|
+
* ashmrtnz <ashmrtnz@google.com>
|
81
|
+
* canausa <tscanausa@gmail.com>
|
82
|
+
* geemus <geemus@gmail.com>
|
83
|
+
* jordangbull <jordangbull@gmail.com>
|
84
|
+
* kbockmanrs <kevin@rightscale.com>
|
85
|
+
* leonidlm <leonidlm@gmail.com>
|
86
|
+
* lkuntar <leyla.myosotis@gmail.com>
|
87
|
+
* neillturner <neillwturner@gmail.com>
|
88
|
+
* scott rushforth <scott@spotman.net>
|
89
|
+
* snyquist2 <snyquist@google.com>
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2014-
|
3
|
+
Copyright (c) 2014-2018 [CONTRIBUTORS.md](https://github.com/fog/fog-google/blob/master/CONTRIBUTORS.md)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
@@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
17
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
18
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
19
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
data/fog-google.gemspec
CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "coveralls"
|
31
31
|
spec.add_development_dependency "mime-types"
|
32
32
|
spec.add_development_dependency "minitest"
|
33
|
+
spec.add_development_dependency "osrcry"
|
33
34
|
spec.add_development_dependency "pry"
|
34
35
|
spec.add_development_dependency "rake"
|
35
36
|
spec.add_development_dependency "rubocop"
|
data/lib/fog/google/version.rb
CHANGED
@@ -21,7 +21,15 @@ module Fog
|
|
21
21
|
:projection => projection
|
22
22
|
).to_h
|
23
23
|
|
24
|
-
new(data)
|
24
|
+
directory = new(data)
|
25
|
+
# Because fog-aws accepts these arguments on files at the
|
26
|
+
# directories.get level, we need to preload the directory files
|
27
|
+
# with these attributes here.
|
28
|
+
files_attr_names = %i(delimiter page_token max_results prefix)
|
29
|
+
|
30
|
+
file_opts = options.select { |k, _| files_attr_names.include? k }
|
31
|
+
directory.files(file_opts)
|
32
|
+
directory
|
25
33
|
rescue ::Google::Apis::ClientError => e
|
26
34
|
# metageneration check failures returns HTTP 412 Precondition Failed
|
27
35
|
raise e unless e.status_code == 404 || e.status_code == 412
|
@@ -37,11 +37,10 @@ module Fog
|
|
37
37
|
false
|
38
38
|
end
|
39
39
|
|
40
|
-
def files
|
40
|
+
def files(attr = {})
|
41
41
|
@files ||= begin
|
42
42
|
Fog::Storage::GoogleJSON::Files.new(
|
43
|
-
:directory => self,
|
44
|
-
:service => service
|
43
|
+
attr.merge(:directory => self, :service => service)
|
45
44
|
)
|
46
45
|
end
|
47
46
|
end
|
@@ -16,8 +16,8 @@ module Fog
|
|
16
16
|
|
17
17
|
def all(options = {})
|
18
18
|
requires :directory
|
19
|
-
|
20
|
-
|
19
|
+
data = service.list_objects(directory.key, attributes.merge(options))
|
20
|
+
.to_h[:items] || []
|
21
21
|
load(data)
|
22
22
|
end
|
23
23
|
|
@@ -20,8 +20,19 @@ module Fog
|
|
20
20
|
# object as distinct results (defaults to False)
|
21
21
|
# @return [Google::Apis::StorageV1::Objects]
|
22
22
|
def list_objects(bucket, options = {})
|
23
|
-
|
24
|
-
|
23
|
+
allowed_opts = %i(
|
24
|
+
delimiter
|
25
|
+
max_results
|
26
|
+
page_token
|
27
|
+
prefix
|
28
|
+
projection
|
29
|
+
versions
|
30
|
+
)
|
31
|
+
|
32
|
+
@storage_json.list_objects(
|
33
|
+
bucket,
|
34
|
+
options.select { |k, _| allowed_opts.include? k }
|
35
|
+
)
|
25
36
|
end
|
26
37
|
end
|
27
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Welch
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01
|
12
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog-core
|
@@ -109,6 +109,20 @@ dependencies:
|
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: osrcry
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
112
126
|
- !ruby/object:Gem::Dependency
|
113
127
|
name: pry
|
114
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -705,7 +719,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
705
719
|
version: '0'
|
706
720
|
requirements: []
|
707
721
|
rubyforge_project:
|
708
|
-
rubygems_version: 2.6.
|
722
|
+
rubygems_version: 2.6.12
|
709
723
|
signing_key:
|
710
724
|
specification_version: 4
|
711
725
|
summary: Module for the 'fog' gem to support Google.
|