appnexusapi 0.0.8 → 0.0.9
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: 7969421f4404cb5d0af083544387927a493d2ccb
|
4
|
+
data.tar.gz: fdf085dd9a11e7ca9877300f25d271e7e74a4a3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2f9db3645266be119063ef0bb5c3944ebab0cb036b74c78c99fc9e5abfc4ad105b7a8d0ade59c80bc95ed9c18619305f383ee9034a98ff95373d75e111f4c8e
|
7
|
+
data.tar.gz: e786a842d258682287651a46d8fcb32f00f41519d7cf53c1ab9dbf4b4f173778409c0cebc22686da3937b12808b4d3d860ef7106a9c63543017e2b2128ec2a72
|
@@ -2,19 +2,18 @@ class AppnexusApi::LogLevelDataResource < AppnexusApi::Resource
|
|
2
2
|
# Extract an array of hashes of params to pass to the LogLevelDownloadService
|
3
3
|
def download_params
|
4
4
|
fail 'Missing necessaray information!' unless name && hour && timestamp && splits
|
5
|
+
|
5
6
|
splits.map do |split_part|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}
|
17
|
-
end
|
7
|
+
# In the case of regenerated files, there should be no checksum. These replaced hourly files should not be downloaded.
|
8
|
+
next nil if split_part['checksum'].blank?
|
9
|
+
|
10
|
+
{
|
11
|
+
split_part: split_part['part'],
|
12
|
+
siphon_name: name,
|
13
|
+
timestamp: timestamp,
|
14
|
+
hour: hour,
|
15
|
+
checksum: split_part['checksum']
|
16
|
+
}
|
18
17
|
end.compact
|
19
18
|
end
|
20
19
|
end
|
@@ -11,7 +11,13 @@ class AppnexusApi::LogLevelDataService < AppnexusApi::Service
|
|
11
11
|
params[:siphon_name] = @siphon_name if @siphon_name
|
12
12
|
params[:updated_since] = time.strftime('%Y_%m_%d_%H') if time
|
13
13
|
|
14
|
-
|
14
|
+
# Anything with the same name and hour but with a newer timestamp is a republished replacement for an older file
|
15
|
+
# When this happens appnexus is supposed to set the checksum for the old file to null but they do not always
|
16
|
+
# actually do this.
|
17
|
+
siphons = get(params)
|
18
|
+
siphons.reject do |siphon|
|
19
|
+
(siphons - [siphon]).any? { |s| s.name == siphon.name && s.hour == siphon.hour && s.timestamp > siphon.timestamp }
|
20
|
+
end
|
15
21
|
end
|
16
22
|
|
17
23
|
def uri_name
|
data/lib/appnexusapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appnexusapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Aaron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06
|
11
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|