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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fcb912aa7ee4606234d686b8617dd57173e790b
4
- data.tar.gz: 9c1ecb037ecb94e5f5e077b474f1d9ec7b77d7a6
3
+ metadata.gz: 803699c7eb36fee26897f2e0eb0b252db5b9a26d
4
+ data.tar.gz: 47ec42cc91e6ff145aaa45fa6b0c85bb778e5a62
5
5
  SHA512:
6
- metadata.gz: e964260571d27fe60664ee5729405ebe1cb1663da6f470fcd59b31351ad074907115864a1dde0ac1a013bb666f0d886d902e2f352cb26b106e36486de96dc4b3
7
- data.tar.gz: 84067f7591418137a3e54a5b822a47726c715da39f4118468fa9e4c2c70256562b329895c49f9241dde445e3298a99e701ac831294a9b6a2a0ea4362385216fc
6
+ metadata.gz: 75ab90fad38132ad1acc574929c509a6933d708bedad890d4a0daaed8bc3440eecde4110d9ddd04571dd3523055a1a9fd669e00abcac3ee558f1d33a619f873f
7
+ data.tar.gz: 9a70715cc124cee805b42554315a0417054ec120c177264468afdef4daa37526cce9a6e4e719a4b244ff3c49bc768b57dba11f7d7e3b05c0ef64d86355e723b1
@@ -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.3'
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']
@@ -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, hour, minute, second)
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, hour)
109
- cal.set(Calendar::MINUTE, minute)
110
- cal.set(Calendar::SECOND, 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
 
@@ -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 end of day' do
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, 23, 59, 59)
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.3
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-23 00:00:00.000000000 Z
12
+ date: 2016-07-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ADTech Classic API ruby client
15
15
  email: