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 +4 -4
- data/CHANGELOG.md +4 -0
- data/embulk-input-mixpanel.gemspec +1 -1
- data/lib/embulk/input/mixpanel.rb +3 -1
- data/test/embulk/input/test_mixpanel.rb +15 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0066d5b2178fb42e5cc52e9074340e03de5b27a0
|
4
|
+
data.tar.gz: 422ec9433897ef2fab2221a569e3663253b50f7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
@@ -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.
|
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
|
-
|
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.
|
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
|
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
|