embulk-input-zendesk 0.1.11 → 0.1.12

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
  SHA1:
3
- metadata.gz: fa6d685d804956295d745a301d32a7f4ba2643e9
4
- data.tar.gz: 6dc01ae4efdda30866ac449efcf4a4ccae90976f
3
+ metadata.gz: 54425e9279b16a3f00fffee29c05a7a393cf3d17
4
+ data.tar.gz: 2a7875870eba59a55c62c6b2c32652d3cd738b2f
5
5
  SHA512:
6
- metadata.gz: 5800e18ce5080cb92bc9535006d8d775250e75af720b843fbac68bae9752e5a05f3bbac9d09035e21b773d54e7c1c37d958d253f3700fdde8418a0806509c61d
7
- data.tar.gz: 563587b6df6ad9e96cede34cab36faa30d34992b278953dea658b6a8832513d2e5c935973b1de9376472131ce137a9261537627e4baff24767ecd748750c0816
6
+ metadata.gz: d008e9240a69d23fd6a5fb450dd3280bd07a7a1acfe7f1e7ba349f3e611ae32ca9b3f9d6806803fd8e8767772d711dc6a242034ca8c73188b616507bb7e8e862
7
+ data.tar.gz: 6eb277d8e9240d87859de789f439242dbd9097a00e09931df157dbd48d90602d374ec148279c42c9b3755f6bbc29dbab15dcb090046fc4760a16dd37feae010e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.12 - 2016-10-20
2
+ * [fixed] Fix `*_id` columns to be guessed as string. (e.g. external_id) [#17](https://github.com/treasure-data/embulk-input-zendesk/pull/17)
3
+
1
4
  ## 0.1.11 - 2016-10-20
2
5
  * [fixed] Ignore `updated_at` <= `start_time` record [#16](https://github.com/treasure-data/embulk-input-zendesk/pull/16)
3
6
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-input-zendesk"
4
- spec.version = "0.1.11"
4
+ spec.version = "0.1.12"
5
5
  spec.authors = ["uu59", "muga", "sakama"]
6
6
  spec.summary = "Zendesk input plugin for Embulk"
7
7
  spec.description = "Loads records from Zendesk."
@@ -57,8 +57,13 @@ module Embulk
57
57
  if records.any? {|r| [Array, Hash].include?(r[hash[:name]].class) }
58
58
  hash[:type] = :json
59
59
  end
60
- if hash[:name].match(/_id$/)
61
- # NOTE: sometimes *_id will be guessed as timestamp format:%d%m%Y (e.g. 21031998), all *_id columns should be type:long
60
+
61
+ case hash[:name]
62
+ when /_id$/
63
+ # NOTE: sometimes *_id will be guessed as timestamp format:%d%m%Y (e.g. 21031998), all *_id columns should be type:string
64
+ hash[:type] = :string
65
+ hash.delete(:format) # has it if type:timestamp
66
+ when "id"
62
67
  hash[:type] = :long
63
68
  hash.delete(:format) # has it if type:timestamp
64
69
  end
@@ -127,7 +127,7 @@ module Embulk
127
127
  assert actual.include?(name: "tags", type: :json)
128
128
  assert actual.include?(name: "collaborator_ids", type: :json)
129
129
  assert actual.include?(name: "custom_fields", type: :json)
130
- assert actual.include?(name: "group_id", type: :long)
130
+ assert actual.include?(name: "group_id", type: :string)
131
131
  assert actual.include?(name: "satisfaction_rating", type: :json)
132
132
  end
133
133
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-zendesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - uu59