adtech-api-client 0.0.3 → 0.0.4
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/adtech-api-client.gemspec +1 -1
- data/lib/adtech/api/report.rb +6 -9
- data/spec/report_spec.rb +2 -9
- 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: 803699c7eb36fee26897f2e0eb0b252db5b9a26d
|
4
|
+
data.tar.gz: 47ec42cc91e6ff145aaa45fa6b0c85bb778e5a62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75ab90fad38132ad1acc574929c509a6933d708bedad890d4a0daaed8bc3440eecde4110d9ddd04571dd3523055a1a9fd669e00abcac3ee558f1d33a619f873f
|
7
|
+
data.tar.gz: 9a70715cc124cee805b42554315a0417054ec120c177264468afdef4daa37526cce9a6e4e719a4b244ff3c49bc768b57dba11f7d7e3b05c0ef64d86355e723b1
|
data/adtech-api-client.gemspec
CHANGED
@@ -2,7 +2,7 @@ $: << File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'adtech-api-client'
|
5
|
-
s.version = '0.0.
|
5
|
+
s.version = '0.0.4'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.authors = ['minsikzzang', 'ericescalante']
|
8
8
|
s.email = ['min.kim@factorymedia.com', 'eric.escalante@factorymedia.com', 'developers@factorymedia.com']
|
data/lib/adtech/api/report.rb
CHANGED
@@ -12,18 +12,15 @@ module ADTech
|
|
12
12
|
|
13
13
|
start_cal = gregorian_calendar(start_date.year,
|
14
14
|
start_date.month - 1,
|
15
|
-
start_date.day
|
16
|
-
0, 0, 0)
|
15
|
+
start_date.day)
|
17
16
|
ADTech.logger.info "Report start date set to: #{start_cal.getTime}";
|
18
17
|
|
19
18
|
end_cal = gregorian_calendar(end_date.year,
|
20
19
|
end_date.month - 1,
|
21
|
-
end_date.day
|
22
|
-
23, 59, 59)
|
20
|
+
end_date.day)
|
23
21
|
ADTech.logger.info "Report end date set to: #{end_cal.getTime}";
|
24
22
|
|
25
23
|
entities = default_entities(report.getReportCategory) if !entities || entities.empty?
|
26
|
-
|
27
24
|
if entities
|
28
25
|
report_queue_entry = report_service.requestReportByEntities(
|
29
26
|
report_type_id,
|
@@ -100,14 +97,14 @@ module ADTech
|
|
100
97
|
end
|
101
98
|
end
|
102
99
|
|
103
|
-
def gregorian_calendar(year, month, day
|
100
|
+
def gregorian_calendar(year, month, day)
|
104
101
|
cal = GregorianCalendar.getInstance()
|
105
102
|
cal.set(Calendar::DAY_OF_MONTH, day)
|
106
103
|
cal.set(Calendar::MONTH, month)
|
107
104
|
cal.set(Calendar::YEAR, year)
|
108
|
-
cal.set(Calendar::HOUR_OF_DAY,
|
109
|
-
cal.set(Calendar::MINUTE,
|
110
|
-
cal.set(Calendar::SECOND,
|
105
|
+
cal.set(Calendar::HOUR_OF_DAY, 0)
|
106
|
+
cal.set(Calendar::MINUTE, 0)
|
107
|
+
cal.set(Calendar::SECOND, 0)
|
111
108
|
cal
|
112
109
|
end
|
113
110
|
|
data/spec/report_spec.rb
CHANGED
@@ -147,16 +147,9 @@ describe ADTech::API::Report do
|
|
147
147
|
end
|
148
148
|
|
149
149
|
describe '.gregorian_calendar' do
|
150
|
-
context 'when given time is
|
150
|
+
context 'when given time is beginning of day' do
|
151
151
|
it 'should return relevant gregorian_calendar object' do
|
152
|
-
cal = @report.send(:gregorian_calendar, 2016, 5, 12
|
153
|
-
expect(cal.getTime.to_s). to eq('Sun Jun 12 23:59:59 BST 2016')
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
|
-
context 'when given time is beginnig of day' do
|
158
|
-
it 'should return relevant gregorian_calendar object' do
|
159
|
-
cal = @report.send(:gregorian_calendar, 2016, 5, 12, 0, 0, 0)
|
152
|
+
cal = @report.send(:gregorian_calendar, 2016, 5, 12)
|
160
153
|
expect(cal.getTime.to_s). to eq('Sun Jun 12 00:00:00 BST 2016')
|
161
154
|
end
|
162
155
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adtech-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- minsikzzang
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06
|
12
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ADTech Classic API ruby client
|
15
15
|
email:
|