answersengine 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/answersengine/cli/scraper_page.rb +8 -6
- data/lib/answersengine/client/base.rb +1 -0
- data/lib/answersengine/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df0c5550c9fbe72ceeac38e0d921331972a476f99071e4c2427d9d1b1fe27d50
|
4
|
+
data.tar.gz: 804beea78e0069464f7761022d73d838c2ebf939c2a3e855871dc31810ea6c2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adfac18949a0d32220086b1b244f561021e6ae19bb632a803ac30a2ec2cd396b582907e2eb5080b5d9cdfc68657ac5e3d93479aa142e9b6b1bb7369332dfa510
|
7
|
+
data.tar.gz: 56ffed752b3953ba1c4b94bf99c6989e4bf72852a94736bece31f9ac0e666e42e70b16656d6f6d31e242e0792fe4934d1ede61b8fee570402e40695af20a5e84
|
@@ -98,14 +98,15 @@ module AnswersEngine
|
|
98
98
|
|
99
99
|
desc "refetch <scraper_name>", "Refetch Pages on a scraper's current job"
|
100
100
|
long_desc <<-LONGDESC
|
101
|
-
Refetch pages in a scraper's current job. You need to specify either a --gid or --fetch-fail or --parse-fail.\x5
|
101
|
+
Refetch pages in a scraper's current job. You need to specify either a --gid or --fetch-fail or --parse-fail or --status.\x5
|
102
102
|
LONGDESC
|
103
103
|
option :gid, :aliases => :g, type: :string, desc: 'Refetch a specific GID'
|
104
104
|
option :fetch_fail, type: :boolean, desc: 'Refetches only pages that fails fetching.'
|
105
105
|
option :parse_fail, type: :boolean, desc: 'Refetches only pages that fails parsing.'
|
106
|
+
option :status, type: :string, desc: 'Refetches only pages with a specific status.'
|
106
107
|
def refetch(scraper_name)
|
107
|
-
if !options.key?(:gid) && !options.key?(:fetch_fail) && !options.key?(:parse_fail)
|
108
|
-
puts "Must specify either a --gid
|
108
|
+
if !options.key?(:gid) && !options.key?(:fetch_fail) && !options.key?(:parse_fail) && !options.key?(:status)
|
109
|
+
puts "Must specify either a --gid, --fetch-fail, --parse-fail or --status"
|
109
110
|
return
|
110
111
|
end
|
111
112
|
client = Client::ScraperJobPage.new(options)
|
@@ -114,16 +115,17 @@ module AnswersEngine
|
|
114
115
|
|
115
116
|
desc "reparse <scraper_name>", "Reparse Pages on a scraper's current job"
|
116
117
|
long_desc <<-LONGDESC
|
117
|
-
Reparse pages in a scraper's current job. You need to specify either a --gid or --parse-fail.\x5
|
118
|
+
Reparse pages in a scraper's current job. You need to specify either a --gid or --parse-fail or --status.\x5
|
118
119
|
LONGDESC
|
119
120
|
option :gid, :aliases => :g, type: :string, desc: 'Reparse a specific GID'
|
120
121
|
option :parse_fail, type: :boolean, desc: 'Reparse only pages that fails parsing.'
|
122
|
+
option :status, type: :string, desc: 'Reparse only pages with a specific status.'
|
121
123
|
def reparse(scraper_name)
|
122
124
|
begin
|
123
125
|
options[:vars] = JSON.parse(options[:vars]) if options[:vars]
|
124
126
|
|
125
|
-
if !options.key?(:gid) && !options.key?(:parse_fail)
|
126
|
-
puts "Must specify either a --gid
|
127
|
+
if !options.key?(:gid) && !options.key?(:parse_fail) && !options.key?(:status)
|
128
|
+
puts "Must specify either a --gid, --parse-fail or --status"
|
127
129
|
return
|
128
130
|
end
|
129
131
|
|
@@ -34,6 +34,7 @@ module AnswersEngine
|
|
34
34
|
query[:pp] = opts[:per_page] if opts[:per_page]
|
35
35
|
query[:fetchfail] = opts[:fetch_fail] if opts[:fetch_fail]
|
36
36
|
query[:parsefail] = opts[:parse_fail] if opts[:parse_fail]
|
37
|
+
query[:status] = opts[:status] if opts[:status]
|
37
38
|
query[:page_type] = opts[:page_type] if opts[:page_type]
|
38
39
|
query[:gid] = opts[:gid] if opts[:gid]
|
39
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: answersengine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parama Danoesubroto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
263
|
version: '0'
|
264
264
|
requirements: []
|
265
265
|
rubyforge_project:
|
266
|
-
rubygems_version: 2.6
|
266
|
+
rubygems_version: 2.7.6
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: AnswersEngine toolbelt for developers
|