fluent-plugin-google-cloud-storage-out 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e39b49f940220c711fbdd0be4a7844843df597c
4
- data.tar.gz: a9b4f08293b499fc8e88c9d79fda125dd1f644ed
3
+ metadata.gz: dcb50463e1971d1bc9be0e1035b0a3c5c34aedb9
4
+ data.tar.gz: 8d84ea36fe3b5c9ffee45c8d0531129619be99dc
5
5
  SHA512:
6
- metadata.gz: 84fadb0111c158904ddae9242924c113477d6efdb8dd6c9b5944c6150b66e73abfcd093d5bcb7dd9b7c2c65d3081aadffc3bb1c3e8606ea4ff3f55d45af46a98
7
- data.tar.gz: f0ec83181ad1a82c1d7275c7c0ae29172751e570778a0119bf7922dd0a6a533baa6bf1088226081be41ba58485453f55b3dc7ebfc54249b48438af1fa53bed68
6
+ metadata.gz: 43bd34d81942e6b3daceb63c5eabb896f3e21ad186f23957e071dfb75240e8d03d34f2ee0c4b8c8535938d4435c06ac26b9007e93767d9c670f68354de92e408
7
+ data.tar.gz: 847fca150a16970c0e64fb078d57889028ce06431460638f168e59e93df5c96c02af6a7a2163630831142f13d1e89a365066233a3843aa34682bab3e1bc7906d
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-google-cloud-storage-out"
7
- spec.version = "0.1.8"
7
+ spec.version = "0.1.9"
8
8
  spec.authors = ["Hideki Matsuoka"]
9
9
  spec.email = ["matsuoka.hide@gmail.com"]
10
10
 
@@ -81,17 +81,14 @@ module Fluent
81
81
  end
82
82
 
83
83
  def prepare_client
84
-
85
- storage = Storage::StorageService.new
84
+ @storage = Storage::StorageService.new
86
85
  scopes = [Storage::AUTH_CLOUD_PLATFORM, Storage::AUTH_DEVSTORAGE_FULL_CONTROL]
87
- storage.authorization = ServiceAccountCredentials.make_creds(
86
+ @storage.authorization = ServiceAccountCredentials.make_creds(
88
87
  {
89
88
  :json_key_io => File.open(@service_account_json_key_path),
90
89
  :scope => scopes
91
90
  }
92
91
  )
93
-
94
- @google_api_client = storage
95
92
  end
96
93
 
97
94
  def start
@@ -126,17 +123,12 @@ module Fluent
126
123
  io = StringIO.new(data)
127
124
  end
128
125
 
129
- media = Google::APIClient::UploadIO.new(io, mimetype.content_type, File.basename(path))
130
-
131
- @gogle_api_client.insert_object(@bucket_id, upload_source: io, name: path, content_type:mimetype_content_type)
132
-
126
+ @storage.insert_object(@bucket_id, upload_source: io, name: path, content_type:mimetype_content_type)
133
127
  end
134
128
 
135
129
  def write(chunk)
136
130
  gcs_path = path_format(chunk.key)
137
-
138
131
  send(gcs_path, chunk.read)
139
-
140
132
  gcs_path
141
133
  end
142
134
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-google-cloud-storage-out
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hideki Matsuoka