embulk-output-zendesk_users 0.0.1 → 0.0.2
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/embulk-output-zendesk_users.gemspec +1 -1
- data/lib/embulk/output/zendesk_users.rb +3 -4
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86c66c2e7272dd6c1ca06b0a1b1d13a5355948bd
|
|
4
|
+
data.tar.gz: 0235620b3af5484841dab77b69f9825ada95845c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 379a38f332ec6f714e5256d81d22d020dccb1133dfaf1548fa30e312c99f6f8ad88323c64b15ce9e5c41c5dd2f4b7043e3513bc3633ec299fdd2f0827a860a89
|
|
7
|
+
data.tar.gz: 71757b7a1b28db83d554d505d73c19d94d0f25a4da83f84666676f9926273c4c15961c24f97fb81b48d7f1954d62f5781cb68a7f1294f754a0a5d6a19239bf67
|
data/CHANGELOG.md
ADDED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Gem::Specification.new do |spec|
|
|
3
3
|
spec.name = "embulk-output-zendesk_users"
|
|
4
|
-
spec.version = "0.0.
|
|
4
|
+
spec.version = "0.0.2"
|
|
5
5
|
spec.authors = ["Toru Takahashi"]
|
|
6
6
|
spec.summary = "Zendesk Users output plugin for Embulk"
|
|
7
7
|
spec.description = "Update Zendesk User's segments"
|
|
@@ -84,8 +84,7 @@ module Embulk
|
|
|
84
84
|
|
|
85
85
|
def add(page)
|
|
86
86
|
Embulk.logger.info { "Connecting to #{@login_url}" }
|
|
87
|
-
|
|
88
|
-
if @method == "update" then
|
|
87
|
+
if @method == "update" then
|
|
89
88
|
# Batch Update updates up to 100 users.
|
|
90
89
|
page.each_slice(100).with_index do |records, index|
|
|
91
90
|
Embulk.logger.info { "Uploading #{records.size} records" }
|
|
@@ -108,7 +107,7 @@ module Embulk
|
|
|
108
107
|
end
|
|
109
108
|
|
|
110
109
|
job_status = @client.users.update_many!(requests)
|
|
111
|
-
|
|
110
|
+
|
|
112
111
|
# https://github.com/zendesk/zendesk_api_client_rb#apps-api
|
|
113
112
|
# Note: job statuses are currently not supported, so you must manually poll the job status API for app creation.
|
|
114
113
|
body = {}
|
|
@@ -117,7 +116,7 @@ module Embulk
|
|
|
117
116
|
job_status = response.body['job_status']
|
|
118
117
|
sleep(1)
|
|
119
118
|
end
|
|
120
|
-
|
|
119
|
+
|
|
121
120
|
job_status['results'].each do |result|
|
|
122
121
|
Embulk.logger.warn { "ID:#{result['id']}, Error:#{result['error']}" } unless result['success']
|
|
123
122
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: embulk-output-zendesk_users
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Toru Takahashi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-12-
|
|
11
|
+
date: 2017-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
|
75
75
|
files:
|
|
76
76
|
- ".gitignore"
|
|
77
77
|
- ".ruby-version"
|
|
78
|
+
- CHANGELOG.md
|
|
78
79
|
- Gemfile
|
|
79
80
|
- LICENSE.txt
|
|
80
81
|
- README.md
|