flurry 0.3.0 → 0.4.0
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 +4 -4
- data/lib/flurry/configuration.rb +2 -1
- data/lib/flurry/request.rb +23 -2
- data/lib/flurry/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92052cc9650bc214947cd3c9add6c5924bc471669cefe385f06e1f44f89be82b
|
4
|
+
data.tar.gz: 85f6586951d9e4a83f8fbc6a14ff53b44ca24b83479826e9f7e8f15ec3759e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9dcb1f84823530e9276dff30fa2d974c4c7eefe5a4ec1bde8f948970e45be7f8b6548bab649915e534d5f2c74df06448ea475eaa86bd28b7556d1821846afc4
|
7
|
+
data.tar.gz: d6c650ee3d8dfd68004501fba113f6973b5485c4063f1dc19ea33ae67a386008373da8c7262e5661ee9a7b7be6526edfba7a414412f1cfda0bc8ea44e1cb3e9a
|
data/lib/flurry/configuration.rb
CHANGED
data/lib/flurry/request.rb
CHANGED
@@ -53,13 +53,21 @@ module Flurry
|
|
53
53
|
dup.tap { |it| it.havings = clean_havings(havings || {}) }
|
54
54
|
end
|
55
55
|
|
56
|
+
def time_zone(time_zone)
|
57
|
+
dup.tap { |it| it.time_zone = time_zone }
|
58
|
+
end
|
59
|
+
|
60
|
+
def format(format)
|
61
|
+
dup.tap { |it| it.format = format }
|
62
|
+
end
|
63
|
+
|
56
64
|
def fetch
|
57
65
|
self.class.get(full_path).response
|
58
66
|
end
|
59
67
|
|
60
68
|
protected
|
61
69
|
|
62
|
-
attr_writer :table, :grain, :dimensions, :metrics, :range, :sorts, :top, :havings
|
70
|
+
attr_writer :table, :grain, :dimensions, :metrics, :range, :sorts, :top, :havings, :time_zone, :format
|
63
71
|
|
64
72
|
private
|
65
73
|
|
@@ -133,13 +141,26 @@ module Flurry
|
|
133
141
|
end.join(',')
|
134
142
|
end
|
135
143
|
|
144
|
+
def time_zone_partial_path
|
145
|
+
time_zone = @time_zone || Flurry.configuration.time_zone
|
146
|
+
return '' if time_zone.nil? || time_zone.empty?
|
147
|
+
'&timeZone=' + time_zone.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
def format_partial_path
|
151
|
+
format = @format || Flurry.configuration.format
|
152
|
+
return '' if format.nil? || format.empty?
|
153
|
+
'&format=' + format.to_s
|
154
|
+
end
|
155
|
+
|
136
156
|
def full_path
|
137
157
|
''.tap do |path|
|
138
158
|
path << base_partial_path
|
139
159
|
path << dimensions_partial_path
|
140
160
|
path << '?'
|
141
161
|
path << 'token=' + Flurry.configuration.token
|
142
|
-
path <<
|
162
|
+
path << time_zone_partial_path
|
163
|
+
path << format_partial_path
|
143
164
|
path << metrics_partial_path
|
144
165
|
path << sort_partial_path
|
145
166
|
path << having_partial_path
|
data/lib/flurry/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flurry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Bagué
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -100,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
|
104
|
-
rubygems_version: 2.7.8
|
103
|
+
rubygems_version: 3.0.3
|
105
104
|
signing_key:
|
106
105
|
specification_version: 4
|
107
106
|
summary: A wrapper around Flurry Analytics Reporting API
|