embulk-input-google_analytics 0.1.6 → 0.1.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc50f8a289839aafb14828a29eb4d89e1952f554
|
4
|
+
data.tar.gz: 74c3df3ead9e9af21aa93164dd593e1c234cb061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1714c557804ab997fa73451693ba27f87e933acfc6450e4e3d2dd5b68d7dfa28a03070384cc566c974052d5a5872dbc6cd7fa113043ac2e66a6ae2f7bb2d526c
|
7
|
+
data.tar.gz: 1d2df2f665513659eaca4ba9fab458d288d38c13473522b603487eef8d3947f384bb4700956808b1a64d31b4668392d6811e8c6ef343a12cc8aad7dd7b7d4bfb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.1.7 - 2016-10-20
|
2
|
+
* Fix to generate `end_date` on config_diff [#12](https://github.com/treasure-data/embulk-input-google_analytics/pull/12)
|
3
|
+
|
1
4
|
## 0.1.6 - 2016-08-29
|
2
5
|
* Add no-op guessing to avoid guess error [#11](https://github.com/treasure-data/embulk-input-google_analytics/pull/11)
|
3
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = "embulk-input-google_analytics"
|
4
|
-
spec.version = "0.1.
|
4
|
+
spec.version = "0.1.7"
|
5
5
|
spec.authors = ["uu59"]
|
6
6
|
spec.summary = "Google Analytics input plugin for Embulk"
|
7
7
|
spec.description = "Loads records from Google Analytics."
|
@@ -90,6 +90,10 @@ module Embulk
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def init
|
93
|
+
# PLT-6753
|
94
|
+
if task["start_date"] && !task["end_date"]
|
95
|
+
task["end_date"] = "today"
|
96
|
+
end
|
93
97
|
end
|
94
98
|
|
95
99
|
def run
|
@@ -137,6 +141,8 @@ module Embulk
|
|
137
141
|
# Modify end_date as "today" to be safe
|
138
142
|
if task["end_date"].nil? || task["end_date"].match(/[0-9]{4}-[0-9]{2}-[0-9]{2}/)
|
139
143
|
task_report[:end_date] = "today" # "today" means now. running at 03:30 AM, will got 3 o'clock data.
|
144
|
+
else
|
145
|
+
task_report[:end_date] = task["end_date"]
|
140
146
|
end
|
141
147
|
|
142
148
|
# "start_date" format is YYYY-MM-DD, but ga:dateHour will return records by hourly.
|
@@ -319,6 +319,7 @@ module Embulk
|
|
319
319
|
plugin = Plugin.new(config, nil, nil, @page_builder)
|
320
320
|
expected = {
|
321
321
|
start_date: latest_time.strftime("%Y-%m-%d"),
|
322
|
+
end_date: @config[:end_date],
|
322
323
|
last_record_time: latest_time.strftime("%Y-%m-%d %H:%M:%S %z"),
|
323
324
|
}
|
324
325
|
assert_equal expected, plugin.calculate_next_times(latest_time)
|
@@ -394,6 +395,7 @@ module Embulk
|
|
394
395
|
plugin = Plugin.new(config, nil, nil, @page_builder)
|
395
396
|
expected = {
|
396
397
|
start_date: latest_time.strftime("%Y-%m-%d"),
|
398
|
+
end_date: @config[:end_date],
|
397
399
|
last_record_time: latest_time.strftime("%Y-%m-%d %H:%M:%S %z"),
|
398
400
|
}
|
399
401
|
assert_equal expected, plugin.calculate_next_times(latest_time)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-google_analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uu59
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|