embulk-input-google_analytics 0.1.11 → 0.1.12
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d6660967199ce0831bd8d265a6a8421d68d64efb
|
|
4
|
+
data.tar.gz: fb0b657eb49c9e0b685e608d5e2edb186e154562
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b3d6cceabd655cf706ec940b90b9bf97f4a04daa25a4065d5cc06a669d9146ea581743cbe7c4fa4d762839f8e81ddfefd85fc1109b75a0ecc37d6e02a838e7b
|
|
7
|
+
data.tar.gz: 6dcfc08461ee9d880025d845605aa45411741b9a5371c16f020970ec0548fa3853ff9f37380f18651f74f31c5bd87e56dc77ac350c0b51abdd7048d41519c361
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
## 0.1.12 - 2017-01-31
|
|
2
|
+
* Support 'fooXXbar' column names [#19](https://github.com/treasure-data/embulk-input-google_analytics/pull/19)
|
|
3
|
+
|
|
1
4
|
## 0.1.11 - 2017-01-16
|
|
2
5
|
* Throw DataError if '(other)' values appear as ga:dateHour as ga:date or ga:dateHour [#18](https://github.com/treasure-data/embulk-input-google_analytics/pull/18)
|
|
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.12"
|
|
5
5
|
spec.authors = ["uu59"]
|
|
6
6
|
spec.summary = "Google Analytics input plugin for Embulk"
|
|
7
7
|
spec.description = "Loads records from Google Analytics."
|
|
@@ -142,7 +142,7 @@ module Embulk
|
|
|
142
142
|
def canonical_column_names(columns)
|
|
143
143
|
result = []
|
|
144
144
|
columns.each do |col|
|
|
145
|
-
if col[:id].match(/XX
|
|
145
|
+
if col[:id].match(/XX/)
|
|
146
146
|
# for such columns:
|
|
147
147
|
# https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=content_grouping
|
|
148
148
|
# https://developers.google.com/analytics/devguides/reporting/metadata/v3/devguide#attributes
|
|
@@ -156,7 +156,7 @@ module Embulk
|
|
|
156
156
|
].compact.max
|
|
157
157
|
|
|
158
158
|
min.upto(max) do |n|
|
|
159
|
-
actual_id = col[:id].gsub(/XX
|
|
159
|
+
actual_id = col[:id].gsub(/XX/, n.to_s)
|
|
160
160
|
result << col.merge(id: actual_id)
|
|
161
161
|
end
|
|
162
162
|
else
|
|
@@ -22,12 +22,13 @@ module Embulk
|
|
|
22
22
|
test "XX column names should be expanded" do
|
|
23
23
|
columns = @client.canonical_column_names([
|
|
24
24
|
{id: "foo"},
|
|
25
|
-
{id: "
|
|
26
|
-
{id: "bazXX", attributes: {minTemplateIndex: 1, maxTemplateIndex: 3
|
|
25
|
+
{id: "baXXr", attributes: {minTemplateIndex: 1, maxTemplateIndex: 3}},
|
|
26
|
+
{id: "bazXX", attributes: {minTemplateIndex: 1, maxTemplateIndex: 3}},
|
|
27
|
+
{id: "jarXX", attributes: {minTemplateIndex: 1, maxTemplateIndex: 3, premiumMinTemplateIndex: 1, premiumMaxTemplateIndex: 5}},
|
|
27
28
|
])
|
|
28
29
|
expected_names = %w(
|
|
29
|
-
foo
|
|
30
|
-
|
|
30
|
+
foo ba1r ba2r ba3r baz1 baz2 baz3
|
|
31
|
+
jar1 jar2 jar3 jar4 jar5
|
|
31
32
|
)
|
|
32
33
|
|
|
33
34
|
assert_equal expected_names, columns.map{|col| col[:id]}
|
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.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- uu59
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-01
|
|
11
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|