adops_report_scrapper 0.1.14 → 0.1.15

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: a8602cb3bc3c3466d5cd6f67b9cba9ed0002f75e
4
- data.tar.gz: 8b37b2be038428dc7d31792a5e179aeb5cbb13f6
3
+ metadata.gz: 621cd534ecc5787d5bfb530df698368cd5a35192
4
+ data.tar.gz: 5829ab9f65422f983e7ae14ce2f4f69e84571bd1
5
5
  SHA512:
6
- metadata.gz: 04a02dd62bbb3261fc3ec6f8039c4ed10d9386001d48d6f3b7f640b4fd45c897b8048d64148eef1b4969f3e33c9d444eacfdebd0c6c01cac388ec4038e284379
7
- data.tar.gz: cc2bba6c3399ce0996b8014a8e4ce714df5313df839dfc4b1a9bcc910eef552685796c7de121fb0904ee183d24729898acb37709113b45921af2784910071114
6
+ metadata.gz: d4422f5abd73ee590509137a1b95d84bd3fe621f341ed80c4f7088cd9258c5c06c7ae0c1b48357b4e87c30eba770a316d96054d47b4d74d4f41179c07504bcae
7
+ data.tar.gz: 19a34c321a2b22c62d101b89abe4e92ca80ad3470a87d9c8e1a50907515d30b9c2fcbbbd0d47b1fa5522d53967bf748d38bab26a90e4d08ccb5728d4df0f0848
@@ -2,6 +2,12 @@ require 'date'
2
2
  require_relative 'base_client'
3
3
 
4
4
  class AdopsReportScrapper::AdiplyClient < AdopsReportScrapper::BaseClient
5
+ def date_supported?(date = nil)
6
+ _date = date || @date
7
+ return true if _date >= Date.today - 28
8
+ false
9
+ end
10
+
5
11
  private
6
12
 
7
13
  def login
@@ -17,7 +23,7 @@ class AdopsReportScrapper::AdiplyClient < AdopsReportScrapper::BaseClient
17
23
  end
18
24
 
19
25
  def scrap
20
- zones = @client.find_all(:css, '#AppBundle_filtersForm_zone > option')
26
+ zones = @client.find_all(:css, '#form_zoneId > option')
21
27
  zones = zones.to_a
22
28
  zones.shift
23
29
  zones = zones.map { |zone| zone.text }
@@ -1,3 +1,3 @@
1
1
  module AdopsReportScrapper
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adops_report_scrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stayman Hou
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2016-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient