datahen 0.14.11 → 0.14.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datahen/cli/scraper.rb +2 -0
- data/lib/datahen/client/scraper.rb +2 -0
- data/lib/datahen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19a6cfd035a3cd5ba9bd10c1cf34e6baa0590cb2f07664e2bdd3ee2f8e032ebf
|
4
|
+
data.tar.gz: b7cd0aa204baa98013c5853df68b93eb8562c1b4c202bf65b8a3c931ca2135d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac98d022003ea6db219c1a07518f127bed088db30ebca3791569bd643acdf8ddc2ad01ddc553f42976a0a6983dfe2928fceadc2f91ed4464b4c2539939df28b
|
7
|
+
data.tar.gz: 33a65a6ffe29cb8ab0e75283436909f683354365a07e11ee672fac4311367ec55c31d2db6e8bcc02de0569768169360fb2120d4e6149aae8e0151cabea8b6752
|
data/lib/datahen/cli/scraper.rb
CHANGED
@@ -30,6 +30,7 @@ module Datahen
|
|
30
30
|
option :schedule, type: :string, desc: 'Set the schedule of the scraper to run. Must be in CRON format.'
|
31
31
|
option :timezone, type: :string, desc: "Set the scheduler's timezone. Must be in IANA Timezone format. Defaults to \"America/Toronto\""
|
32
32
|
option :profile, type: :string, desc: 'Set the profiles (comma separated) to apply to the job. Default: default'
|
33
|
+
option :multiple_jobs, type: :boolean, desc: 'Set true to enable multiple jobs. Default: false'
|
33
34
|
def create(scraper_name, git_repository)
|
34
35
|
# puts "options #{options}"
|
35
36
|
client = Client::Scraper.new(options)
|
@@ -53,6 +54,7 @@ module Datahen
|
|
53
54
|
option :schedule, type: :string, desc: 'Set the schedule of the scraper to run. Must be in CRON format.'
|
54
55
|
option :timezone, type: :string, desc: "Set the scheduler's timezone. Must be in IANA Timezone format. Defaults to \"America/Toronto\""
|
55
56
|
option :profile, type: :string, desc: 'Set the profiles (comma separated) to apply to the job. Default: default'
|
57
|
+
option :multiple_jobs, type: :boolean, desc: 'Set true to enable multiple jobs. Default: false'
|
56
58
|
def update(scraper_name)
|
57
59
|
client = Client::Scraper.new(options)
|
58
60
|
puts "#{client.update(scraper_name, options)}"
|
@@ -26,6 +26,7 @@ module Datahen
|
|
26
26
|
body[:schedule] = opts[:schedule] if opts[:schedule]
|
27
27
|
body[:timezone] = opts[:timezone] if opts[:timezone]
|
28
28
|
body[:profile] = opts[:profile] if opts[:profile]
|
29
|
+
body[:multiple_jobs] = opts[:multiple_jobs] if opts[:multiple_jobs]
|
29
30
|
params = @options.merge({body: body.to_json})
|
30
31
|
self.class.post("/scrapers", params)
|
31
32
|
end
|
@@ -45,6 +46,7 @@ module Datahen
|
|
45
46
|
body[:schedule] = opts[:schedule] if opts[:schedule]
|
46
47
|
body[:timezone] = opts[:timezone] if opts[:timezone]
|
47
48
|
body[:profile] = opts[:profile] if opts[:profile]
|
49
|
+
body[:multiple_jobs] = opts[:multiple_jobs] if opts.has_key?("multiple_jobs") || opts.has_key?(:multiple_jobs)
|
48
50
|
params = @options.merge({body: body.to_json})
|
49
51
|
|
50
52
|
self.class.put("/scrapers/#{scraper_name}", params)
|
data/lib/datahen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datahen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parama Danoesubroto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|