datahen 1.2.3 → 1.3.1

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: 86d8da3818045a267671b3b30465157d906fab7e2b078dd0e7e5b41a2d55f379
4
- data.tar.gz: f61c35112e1678e7d09aafbe0faf1f9b8d8493ee026363a8904a6f22b4fd9f4b
3
+ metadata.gz: af6aefb0106af924ba636a91de29b27953fbf403ede51a779b9787a3f135d1b9
4
+ data.tar.gz: ce6f5dedbdff08f2034cb631e103c905ee82642b86349fdbbecc878281764c6a
5
5
  SHA512:
6
- metadata.gz: 81a8e60ad534a7ad33adb03f7519579e59ebbcc4f7230a597763225a1c0c1f54a625ee9f84b1f23b4f6d9ef5df378c36107f4d5a340ab1a24830fc1e1be1b9f9
7
- data.tar.gz: b83b9b59a403df0b6a2db1d05e7e3d7320f35945aa0bd70e88abe5d568a637865352bf8943d2873ccbc91878307b89efac8ed1c2d3f0a8be8f05370840f27c6c
6
+ metadata.gz: ccaa0107c92694865efbbf8c1b8e8d5d100d60145c3f33439abe5561ea6f220efa8f499764b152fdc90f0173433e380b697b4bd3eaee68d7b0681815c789bcc5
7
+ data.tar.gz: c4859147460d3600e76d903755eef91cb114c65b7abb17c0ab093fa9f23e7e298dd02a42fc1da8a25c6d50edee06c17b8175dca4d61b62ec012c947f1904d2f4
data/datahen.gemspec CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.require_paths = ["lib"]
36
36
  spec.required_ruby_version = '>= 2.4.4'
37
37
  spec.add_dependency "thor", "~> 0.20.3"
38
- spec.add_dependency 'httparty', '~> 0.16.2'
38
+ spec.add_dependency 'httparty', '~> 0.21'
39
39
  spec.add_dependency 'nokogiri', '~> 1.6'
40
40
  spec.add_dependency 'concurrent-ruby', '~> 1.1'
41
41
  spec.add_dependency 'parallel', '~> 1.20'
@@ -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
 
@@ -94,6 +94,12 @@ module Datahen
94
94
  self.class.delete("/jobs/#{job_id}", params)
95
95
  end
96
96
 
97
+ def sync_schema(job_id, opts={})
98
+ params = @options.merge(opts)
99
+
100
+ self.class.put("/sync/jobs/#{job_id}/schema", params)
101
+ end
102
+
97
103
  end
98
104
 
99
105
  end
@@ -72,6 +72,7 @@ module Datahen
72
72
 
73
73
  self.class.get("/scrapers/#{scraper_name}/profile", params)
74
74
  end
75
+
75
76
  end
76
77
  end
77
78
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Datahen
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.1"
3
3
  end
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.2.3
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parama Danoesubroto
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-02 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.16.2
33
+ version: '0.21'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.16.2
40
+ version: '0.21'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -278,7 +278,7 @@ metadata:
278
278
  allowed_push_host: https://rubygems.org
279
279
  homepage_uri: https://datahen.com
280
280
  source_code_uri: https://github.com/DataHenOfficial/datahen-ruby
281
- post_install_message:
281
+ post_install_message:
282
282
  rdoc_options: []
283
283
  require_paths:
284
284
  - lib
@@ -293,8 +293,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
293
  - !ruby/object:Gem::Version
294
294
  version: '0'
295
295
  requirements: []
296
- rubygems_version: 3.2.3
297
- signing_key:
296
+ rubygems_version: 3.0.3
297
+ signing_key:
298
298
  specification_version: 4
299
299
  summary: DataHen toolbelt for developers
300
300
  test_files: []