datahen 1.2.3 → 1.3.0
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_job.rb +15 -0
- data/lib/datahen/client/job.rb +6 -0
- data/lib/datahen/client/scraper.rb +1 -0
- data/lib/datahen/client/scraper_job.rb +5 -0
- data/lib/datahen/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8acff6d62851c24f1bd86d993255ca3c2233ec9b45f933964bf804b49e637611
|
4
|
+
data.tar.gz: 978f1ae63011cd20ad978640b5fa437416cc65930b29f143f6431c14bd059840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4531cadcddab26fd218bd1c7462114985d72460dd1d68aaca2338bea2f7d9e16278b639795d379feaab62f68924376fd17fd93df2916069cb47797210ad6b370
|
7
|
+
data.tar.gz: dcd734cb8ed3876bbf7f62ed6a66004c8d21b7f8009f7b7591144887ddf5a1d12c07b6768a54e84daeaf09d20db6ea7702adaf9c526c83043351a7cf04612388
|
@@ -133,6 +133,21 @@ module Datahen
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
+
desc "sync_schema <scraper_name>", "deploy schema config"
|
137
|
+
long_desc <<-LONGDESC
|
138
|
+
Deploy a scraper's schema config
|
139
|
+
LONGDESC
|
140
|
+
option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
|
141
|
+
def sync_schema(scraper_name)
|
142
|
+
if options[:job]
|
143
|
+
client = Client::Job.new(options)
|
144
|
+
puts "#{client.sync_schema(options[:job])}"
|
145
|
+
else
|
146
|
+
client = Client::ScraperJob.new(options)
|
147
|
+
puts "#{client.sync_schema(scraper_name)}"
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
136
151
|
desc "var SUBCOMMAND ...ARGS", "for managing scraper's job variables"
|
137
152
|
subcommand "var", ScraperJobVar
|
138
153
|
|
data/lib/datahen/client/job.rb
CHANGED
@@ -75,6 +75,11 @@ module Datahen
|
|
75
75
|
params = @options.merge(opts)
|
76
76
|
self.class.delete("/scrapers/#{scraper_name}/current_job", params)
|
77
77
|
end
|
78
|
+
|
79
|
+
def sync_schema(scraper_name, opts={})
|
80
|
+
params = @options.merge(opts)
|
81
|
+
self.class.put("/scrapers/#{scraper_name}/current_job/sync/schema", params)
|
82
|
+
end
|
78
83
|
end
|
79
84
|
end
|
80
85
|
end
|
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parama Danoesubroto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -293,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
295
|
requirements: []
|
296
|
-
rubygems_version: 3.
|
296
|
+
rubygems_version: 3.1.4
|
297
297
|
signing_key:
|
298
298
|
specification_version: 4
|
299
299
|
summary: DataHen toolbelt for developers
|