ruby-superparser 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/generators/ruby_superparser/templates/initializer.rb +7 -2
- data/lib/generators/ruby_superparser/templates/superparser_job.rb +10 -0
- data/lib/ruby/superparser/version.rb +3 -5
- data/lib/ruby_superparser/configuration.rb +10 -0
- data/lib/ruby_superparser/superparser_integration.rb +4 -3
- data/lib/ruby_superparser.rb +12 -4
- data/ruby-superparser.gemspec +1 -1
- metadata +4 -2
- /data/lib/{ruby/superparser.rb → ruby_superparser/client.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27e79dbede1bacc8d5e082dd9e2eb06ce21d8f898d74e73a051e5cc507d3cfb4
|
4
|
+
data.tar.gz: 7acc5017d71d14d3112db73a19948a34e87871ccb78b2e577581b74601ebb829
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12d019e44100ef67b924fc176ca3a644b126c536e52be08ddee240b49d665f6e7591abd63ccc5e58c12290760c1051a5750310a521e20fd37881e7fc89223dcc
|
7
|
+
data.tar.gz: 10ee3ccdb9b5990fe046c854430da080bf408f0756ca424118250e6306998dd4620102b6d868799daada7a17b6b82a717d4f3f32ccfbf4b1a22d8a418475949d
|
data/Gemfile.lock
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
# lib/generators/ruby_superparser/templates/initializer.rb
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
RubySuperparser.init do |config|
|
4
|
+
config.api_key = ENV['SUPERPARSER_API_KEY']
|
5
|
+
|
6
|
+
config.async = lambda { |document_id|
|
7
|
+
SuperparserJob.perform_later(document_id)
|
8
|
+
}
|
9
|
+
end
|
@@ -10,7 +10,7 @@ module RubySuperparser
|
|
10
10
|
|
11
11
|
define_method :process_document_with_superparser do
|
12
12
|
if options[:async]
|
13
|
-
RubySuperparser
|
13
|
+
RubySuperparser.config.async.call(id)
|
14
14
|
else
|
15
15
|
superparser_client.parse_resume(send(attached_attribute))
|
16
16
|
end
|
@@ -21,8 +21,9 @@ module RubySuperparser
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def superparser_client
|
24
|
-
|
25
|
-
@superparser_client ||= RubySuperparser::Client.new(api_key)
|
24
|
+
@superparser_client ||= RubySuperparser::Client.new(RubySuperparser.config)
|
26
25
|
end
|
26
|
+
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
data/lib/ruby_superparser.rb
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
# lib/ruby_superparser.rb
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require_relative 'ruby/superparser/version'
|
4
|
+
require_relative 'ruby_superparser/client'
|
5
|
+
require_relative 'ruby_superparser/configuration'
|
6
|
+
require_relative 'ruby_superparser/superparser_integration'
|
6
7
|
|
7
8
|
module RubySuperparser
|
8
|
-
|
9
|
+
def self.config
|
10
|
+
@config ||= Configuration.new
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.init
|
14
|
+
yield config if block_given?
|
15
|
+
end
|
16
|
+
end
|
data/ruby-superparser.gemspec
CHANGED
@@ -4,7 +4,7 @@ require_relative "lib/ruby/superparser/version"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "ruby-superparser"
|
7
|
-
spec.version =
|
7
|
+
spec.version = RubySuperparser::VERSION
|
8
8
|
spec.authors = ["JP Silvashy"]
|
9
9
|
spec.email = ["jpsilvashy@gmail.com"]
|
10
10
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-superparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Silvashy
|
@@ -43,9 +43,11 @@ files:
|
|
43
43
|
- bin/setup
|
44
44
|
- lib/generators/ruby_superparser/install_generator.rb
|
45
45
|
- lib/generators/ruby_superparser/templates/initializer.rb
|
46
|
-
- lib/
|
46
|
+
- lib/generators/ruby_superparser/templates/superparser_job.rb
|
47
47
|
- lib/ruby/superparser/version.rb
|
48
48
|
- lib/ruby_superparser.rb
|
49
|
+
- lib/ruby_superparser/client.rb
|
50
|
+
- lib/ruby_superparser/configuration.rb
|
49
51
|
- lib/ruby_superparser/superparser_integration.rb
|
50
52
|
- ruby-superparser.gemspec
|
51
53
|
- sig/ruby/superparser.rbs
|
File without changes
|