ae_easy-qa 0.0.33 → 0.0.34

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
- SHA1:
3
- metadata.gz: e5541353f16b04175786b1ceb92a0e767032bbf7
4
- data.tar.gz: 54910859a41cbfbe7aed8c21d719b44f48bca999
2
+ SHA256:
3
+ metadata.gz: 6d82799c2aade7ae53677871d20deb99b3bb3319ba380fcc88acaa4ac18bdb81
4
+ data.tar.gz: 6fb00dca45293956ff594875df6cba899dbde0b28e0065c4e3f8debbbe659497
5
5
  SHA512:
6
- metadata.gz: 2c6b03b3151a72afd8c7e927c77e91f6ea92e1cc10944be3c5a7de93ec63cd38143d0937e83aeb93ee37e13076026b0b6dfb69f7e69ed78be360f53da9699ff6
7
- data.tar.gz: 96bbb90dd55a2ba8ccaaf44c5f68efd0770a34c51184dfff24575c840ba54d047f80990b16dbc827be7f23a788361ba5ea5ee17e4d17c6d7865688d6795c53d7
6
+ metadata.gz: d996f0fc651d37e19a9fa49ac199ac1cd37bbebf8a50b6d649bbbf167e10ab5fdbfdb6bafdda29901800367703309aec9117e373fd92b59e2690434e562aa92c
7
+ data.tar.gz: 8c44426a128b3e2c44596bf48ed6d10c2e17f701070fc2f153c1bf771b277f664416e908b465302574f572c1ddc6b2c04093238c65647c085cef5864f1200647
@@ -70,7 +70,7 @@ module AeEasy
70
70
  end
71
71
 
72
72
  def status_ok?
73
- !collection_response.parsed_response.nil? && collection_response.code == 200
73
+ !old_collection_response.parsed_response.nil? && old_collection_response.code == 200
74
74
  end
75
75
 
76
76
  def validate_collections
@@ -85,19 +85,29 @@ module AeEasy
85
85
  end
86
86
 
87
87
  def output_response
88
- if collection_response.parsed_response.nil?
88
+ if old_collection_response.parsed_response.nil?
89
89
  puts "collection response is null"
90
90
  else
91
- puts collection_response.parsed_response['message']
91
+ puts old_collection_response.parsed_response['message']
92
92
  end
93
93
  end
94
94
 
95
95
  def collection_counts
96
- @collection_counts ||= collection_response.parsed_response
96
+ @collection_counts ||= collection_response
97
97
  end
98
98
 
99
99
  def collection_response
100
- @collection_response || AnswersEngine::Client::ScraperJobOutput.new.collections(scraper_name)
100
+ json = JSON.parse(AnswersEngine::Client::ScraperJobOutput.new.collections(scraper_name).body)
101
+ if json['error'] == ""
102
+ @collection_response || json["data"]
103
+ else
104
+ puts "There was an error: #{JSON.pretty_generate(json['error'])}"
105
+ @collection_response
106
+ end
107
+ end
108
+
109
+ def old_collection_response
110
+ @old_collection_response || AnswersEngine::Client::ScraperJobOutput.new.collections(scraper_name)
101
111
  end
102
112
  end
103
113
 
@@ -151,6 +161,7 @@ module AeEasy
151
161
  data = []
152
162
  page = 1
153
163
  while data.count < total_records
164
+ # if there is an issue maybe due to this method response due to new stream data response AnswersEngine::Client::JobOutput.new(per_page:500, page: page).all
154
165
  records = AnswersEngine::Client::JobOutput.new(per_page:500, page: page).all(most_recent_finished_job['id'], collection_name).parsed_response
155
166
  sleep 1
156
167
  if records
@@ -1,5 +1,5 @@
1
1
  module AeEasy
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: ae_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: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: answersengine
@@ -92,7 +92,7 @@ licenses:
92
92
  metadata:
93
93
  homepage_uri: https://answersengine.com
94
94
  source_code_uri: https://github.com/answersengine/ae_easy-qa
95
- post_install_message:
95
+ post_install_message:
96
96
  rdoc_options: []
97
97
  require_paths:
98
98
  - lib
@@ -107,9 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubyforge_project:
111
- rubygems_version: 2.4.5
112
- signing_key:
110
+ rubygems_version: 3.2.15
111
+ signing_key:
113
112
  specification_version: 4
114
113
  summary: AnswersEngine Easy Quality Assurance gem
115
114
  test_files: []