dh_easy-qa 0.0.33 → 0.0.34

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
  SHA256:
3
- metadata.gz: 5f50c7fbde345982f84159b95991622284552a7c879cef3c41433afb40bd297b
4
- data.tar.gz: a528d2eab5ad5ab35cae524ba67a10b07c4a2f58d60bdddd2f11b11af8276bd3
3
+ metadata.gz: 8972a854f369585a4f1bc458ded75f5e4ca04d96663cd8a1b13addfbe767dbf2
4
+ data.tar.gz: 327cce5d1fed72fbb0141498b6712d165cd180ecd31c0c0ed6aa86447243c051
5
5
  SHA512:
6
- metadata.gz: 1cc9e15f9e2284744af36d311e185c8ee0df773e76e5b1d6d61a267158264efa63340c0227bdb68e2c1dac2e22a528cdc025204ccd669f140a9daad7f839cdd5
7
- data.tar.gz: 62ddd23ffdb3fe48ba7380f6ba7ff5196e80ce6c3c72d79b4c3ae4640a797c70fef2a38b10e0047758f648f53eae2fc40fb6ceeefed60250cf584920e741a493
6
+ metadata.gz: a58f091f6592d67a1390a8750be93a8a5fd06cab3235005c5ada0bddc295363afe7469106080866a55e0c15833a4fcde6c99afc89d386f780a8d90cb391adbf6
7
+ data.tar.gz: 7d70c37a9103aed8736823ffaf73facb1d493243fa80c974c0a71fb13e7596e15e937fd7d92faa2413468fbf2afea2bde07bc631992bd0f16f387dc043367fa8
@@ -68,7 +68,7 @@ module DhEasy
68
68
  end
69
69
 
70
70
  def status_ok?
71
- !collection_response.parsed_response.nil? && collection_response.code == 200
71
+ !old_collection_response.parsed_response.nil? && old_collection_response.code == 200
72
72
  end
73
73
 
74
74
  def validate_collections
@@ -83,19 +83,29 @@ module DhEasy
83
83
  end
84
84
 
85
85
  def output_response
86
- if collection_response.parsed_response.nil?
86
+ if old_collection_response.parsed_response.nil?
87
87
  puts "collection response is null"
88
88
  else
89
- puts collection_response.parsed_response['message']
89
+ puts old_collection_response.parsed_response['message']
90
90
  end
91
91
  end
92
92
 
93
93
  def collection_counts
94
- @collection_counts ||= collection_response.parsed_response
94
+ @collection_counts ||= collection_response
95
95
  end
96
96
 
97
97
  def collection_response
98
- @collection_response || Datahen::Client::ScraperJobOutput.new.collections(scraper_name)
98
+ json = JSON.parse(Datahen::Client::ScraperJobOutput.new.collections(scraper_name).body)
99
+ if json['error'] == ""
100
+ @collection_response || json["data"]
101
+ else
102
+ puts "There was an error: #{JSON.pretty_generate(json['error'])}"
103
+ @collection_response
104
+ end
105
+ end
106
+
107
+ def old_collection_response
108
+ @old_collection_response || Datahen::Client::ScraperJobOutput.new.collections(scraper_name)
99
109
  end
100
110
  end
101
111
 
@@ -148,6 +158,7 @@ module DhEasy
148
158
  data = []
149
159
  page = 1
150
160
  while data.count < total_records
161
+ # if there is an issue maybe due to this method response due to new stream data response Datahen::Client::JobOutput.new(per_page:500, page: page).all
151
162
  records = Datahen::Client::JobOutput.new(per_page:500, page: page).all(most_recent_finished_job['id'], collection_name).parsed_response
152
163
  sleep 1
153
164
  if records
@@ -1,5 +1,5 @@
1
1
  module DhEasy
2
2
  module Qa
3
- VERSION = "0.0.33"
3
+ VERSION = "0.0.34"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dh_easy-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Lynam
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-04 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dh_easy-config
@@ -120,7 +120,7 @@ licenses:
120
120
  metadata:
121
121
  homepage_uri: https://datahen.com
122
122
  source_code_uri: https://github.com/DataHenOfficial/dh_easy-qa
123
- post_install_message:
123
+ post_install_message:
124
124
  rdoc_options: []
125
125
  require_paths:
126
126
  - lib
@@ -135,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.7.6
140
- signing_key:
138
+ rubygems_version: 3.2.15
139
+ signing_key:
141
140
  specification_version: 4
142
141
  summary: DataHen Easy Quality Assurance gem
143
142
  test_files: []