embulk-input-mixpanel 0.3.0 → 0.3.1

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: 878c5ed629d13780bfccd6b0c03e41e6c07345cf
4
- data.tar.gz: bd30844c67525e74f702b39563a56c166b48a5e9
3
+ metadata.gz: 0066d5b2178fb42e5cc52e9074340e03de5b27a0
4
+ data.tar.gz: 422ec9433897ef2fab2221a569e3663253b50f7c
5
5
  SHA512:
6
- metadata.gz: 40fe5641a663dbb10b1489e06f1dcf36ffa053bdd8495b6a0a39c1edce1e39f76264a486b3d1f8a4cc203613ed6403bae0112deb72a3c4f3d30d1ecc1d16ae92
7
- data.tar.gz: fe18510a1491d008bd58c5abd54b6cab2dd15f9d9ad4dbbb5767306134f4e3744615e0078f5abd9df4af90d69e838e6035fe5ab9060c09f60e1731687393b90c
6
+ metadata.gz: a6906d24334045312515388d9e2f05c2cb5216fac0fdf5333393efecc201c946f5e4e9cf61f72b05c4ae7a37a7eaa4932eef1dc513ea0ac67d39ec4a0ec0c440
7
+ data.tar.gz: d610d5c9aa488acc10530ca1e75740ddb1a303533f15a9d31bbcd9070996a246edc63b7f32248d24171605f1fdeb6c1ec0bac87865d1c81912e4ef5b121c28f3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.1 - 2015-09-08
2
+
3
+ * [enhancement] Show ignore dates as range [#23](https://github.com/treasure-data/embulk-input-mixpanel/pull/23) [[Reported by @muga](https://github.com/treasure-data/embulk-input-mixpanel/issues/20). Thanks!!]
4
+
1
5
  ## 0.3.0 - 2015-08-31
2
6
 
3
7
  This version breaks backword compatibility of mixpanel. `days` key in config was changed to `fetch_days`. For detail, please check README.md to modify your config.
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-input-mixpanel"
4
- spec.version = "0.3.0"
4
+ spec.version = "0.3.1"
5
5
  spec.authors = ["yoshihara", "uu59"]
6
6
  spec.summary = "Mixpanel input plugin for Embulk"
7
7
  spec.description = "Loads records from Mixpanel."
@@ -45,9 +45,11 @@ module Embulk
45
45
 
46
46
  target_dates = dates.find_all {|date| date < Date.today}
47
47
 
48
+ Embulk.logger.info "Try to fetch data from #{target_dates.first} to #{target_dates.last}"
49
+
48
50
  overtimes = dates.to_a - target_dates
49
51
  unless overtimes.empty?
50
- Embulk.logger.warn "These dates are too early access, ignored them: #{overtimes.map(&:to_s).join(', ')}"
52
+ Embulk.logger.warn "These dates are too early access, ignored them: from #{overtimes.first} to #{overtimes.last}"
51
53
  end
52
54
  end
53
55
 
@@ -193,9 +193,23 @@ module Embulk
193
193
  Mixpanel.transaction(transaction_config, &control)
194
194
  end
195
195
 
196
+ def test_info
197
+ stub(Mixpanel).resume(task.merge(dates: target_dates), columns, 1, &control)
198
+
199
+ info_message_regexp = /#{Regexp.escape(target_dates.first)}.+#{Regexp.escape(target_dates.last)}/
200
+ mock(Embulk.logger).info(info_message_regexp)
201
+ stub(Embulk.logger).warn
202
+
203
+ Mixpanel.transaction(transaction_config, &control)
204
+ end
205
+
196
206
  def test_warn
197
207
  stub(Mixpanel).resume(task.merge(dates: target_dates), columns, 1, &control)
198
- mock(Embulk.logger).warn(anything)
208
+ stub(Embulk.logger).info
209
+
210
+ ignore_dates = dates.map{|date| date.to_s}.to_a - target_dates
211
+ warn_message_regexp = /#{Regexp.escape(ignore_dates.first)}.+#{Regexp.escape(ignore_dates.last)}/
212
+ mock(Embulk.logger).warn(warn_message_regexp)
199
213
 
200
214
  Mixpanel.transaction(transaction_config, &control)
201
215
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-mixpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshihara
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-31 00:00:00.000000000 Z
12
+ date: 2015-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement