ruby-superparser 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +173 -0
- data/lib/ruby/superparser/version.rb +1 -1
- data/lib/ruby_superparser/superparser_integration.rb +28 -0
- data/lib/ruby_superparser.rb +8 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 562838c888b03c5ee50200cfcdc414964b48357fa808987d1b621b5f414db8e0
|
4
|
+
data.tar.gz: 9174a3c5e4598135047ba2ea1e6e2f9e5054e11c2502f88eb6056db9a4565774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fba72973fc4195072b59d59e1d490a228dab41234d4e42e50f1a37d6baa2503645c65d67d944e66e9f141cb2811407ef8023880a0b0ddd24afb14983a9e23c2
|
7
|
+
data.tar.gz: 8c74c7357eec6a85672d6adfcfca0f0c611630cbe0d9246c392dcb1a87e7581323190033dc829d3e0776f904621f4407bda2f72ce92c255bd96823cf632b719a
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ruby-superparser (0.1.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
actioncable (7.0.4.3)
|
10
|
+
actionpack (= 7.0.4.3)
|
11
|
+
activesupport (= 7.0.4.3)
|
12
|
+
nio4r (~> 2.0)
|
13
|
+
websocket-driver (>= 0.6.1)
|
14
|
+
actionmailbox (7.0.4.3)
|
15
|
+
actionpack (= 7.0.4.3)
|
16
|
+
activejob (= 7.0.4.3)
|
17
|
+
activerecord (= 7.0.4.3)
|
18
|
+
activestorage (= 7.0.4.3)
|
19
|
+
activesupport (= 7.0.4.3)
|
20
|
+
mail (>= 2.7.1)
|
21
|
+
net-imap
|
22
|
+
net-pop
|
23
|
+
net-smtp
|
24
|
+
actionmailer (7.0.4.3)
|
25
|
+
actionpack (= 7.0.4.3)
|
26
|
+
actionview (= 7.0.4.3)
|
27
|
+
activejob (= 7.0.4.3)
|
28
|
+
activesupport (= 7.0.4.3)
|
29
|
+
mail (~> 2.5, >= 2.5.4)
|
30
|
+
net-imap
|
31
|
+
net-pop
|
32
|
+
net-smtp
|
33
|
+
rails-dom-testing (~> 2.0)
|
34
|
+
actionpack (7.0.4.3)
|
35
|
+
actionview (= 7.0.4.3)
|
36
|
+
activesupport (= 7.0.4.3)
|
37
|
+
rack (~> 2.0, >= 2.2.0)
|
38
|
+
rack-test (>= 0.6.3)
|
39
|
+
rails-dom-testing (~> 2.0)
|
40
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
41
|
+
actiontext (7.0.4.3)
|
42
|
+
actionpack (= 7.0.4.3)
|
43
|
+
activerecord (= 7.0.4.3)
|
44
|
+
activestorage (= 7.0.4.3)
|
45
|
+
activesupport (= 7.0.4.3)
|
46
|
+
globalid (>= 0.6.0)
|
47
|
+
nokogiri (>= 1.8.5)
|
48
|
+
actionview (7.0.4.3)
|
49
|
+
activesupport (= 7.0.4.3)
|
50
|
+
builder (~> 3.1)
|
51
|
+
erubi (~> 1.4)
|
52
|
+
rails-dom-testing (~> 2.0)
|
53
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
54
|
+
activejob (7.0.4.3)
|
55
|
+
activesupport (= 7.0.4.3)
|
56
|
+
globalid (>= 0.3.6)
|
57
|
+
activemodel (7.0.4.3)
|
58
|
+
activesupport (= 7.0.4.3)
|
59
|
+
activerecord (7.0.4.3)
|
60
|
+
activemodel (= 7.0.4.3)
|
61
|
+
activesupport (= 7.0.4.3)
|
62
|
+
activestorage (7.0.4.3)
|
63
|
+
actionpack (= 7.0.4.3)
|
64
|
+
activejob (= 7.0.4.3)
|
65
|
+
activerecord (= 7.0.4.3)
|
66
|
+
activesupport (= 7.0.4.3)
|
67
|
+
marcel (~> 1.0)
|
68
|
+
mini_mime (>= 1.1.0)
|
69
|
+
activesupport (7.0.4.3)
|
70
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
71
|
+
i18n (>= 1.6, < 2)
|
72
|
+
minitest (>= 5.1)
|
73
|
+
tzinfo (~> 2.0)
|
74
|
+
builder (3.2.4)
|
75
|
+
concurrent-ruby (1.2.2)
|
76
|
+
crass (1.0.6)
|
77
|
+
date (3.3.3)
|
78
|
+
diff-lcs (1.5.0)
|
79
|
+
erubi (1.12.0)
|
80
|
+
globalid (1.1.0)
|
81
|
+
activesupport (>= 5.0)
|
82
|
+
i18n (1.13.0)
|
83
|
+
concurrent-ruby (~> 1.0)
|
84
|
+
loofah (2.20.0)
|
85
|
+
crass (~> 1.0.2)
|
86
|
+
nokogiri (>= 1.5.9)
|
87
|
+
mail (2.8.1)
|
88
|
+
mini_mime (>= 0.1.1)
|
89
|
+
net-imap
|
90
|
+
net-pop
|
91
|
+
net-smtp
|
92
|
+
marcel (1.0.2)
|
93
|
+
method_source (1.0.0)
|
94
|
+
mini_mime (1.1.2)
|
95
|
+
mini_portile2 (2.8.1)
|
96
|
+
minitest (5.18.0)
|
97
|
+
net-imap (0.3.4)
|
98
|
+
date
|
99
|
+
net-protocol
|
100
|
+
net-pop (0.1.2)
|
101
|
+
net-protocol
|
102
|
+
net-protocol (0.2.1)
|
103
|
+
timeout
|
104
|
+
net-smtp (0.3.3)
|
105
|
+
net-protocol
|
106
|
+
nio4r (2.5.9)
|
107
|
+
nokogiri (1.14.3)
|
108
|
+
mini_portile2 (~> 2.8.0)
|
109
|
+
racc (~> 1.4)
|
110
|
+
racc (1.6.2)
|
111
|
+
rack (2.2.7)
|
112
|
+
rack-test (2.1.0)
|
113
|
+
rack (>= 1.3)
|
114
|
+
rails (7.0.4.3)
|
115
|
+
actioncable (= 7.0.4.3)
|
116
|
+
actionmailbox (= 7.0.4.3)
|
117
|
+
actionmailer (= 7.0.4.3)
|
118
|
+
actionpack (= 7.0.4.3)
|
119
|
+
actiontext (= 7.0.4.3)
|
120
|
+
actionview (= 7.0.4.3)
|
121
|
+
activejob (= 7.0.4.3)
|
122
|
+
activemodel (= 7.0.4.3)
|
123
|
+
activerecord (= 7.0.4.3)
|
124
|
+
activestorage (= 7.0.4.3)
|
125
|
+
activesupport (= 7.0.4.3)
|
126
|
+
bundler (>= 1.15.0)
|
127
|
+
railties (= 7.0.4.3)
|
128
|
+
rails-dom-testing (2.0.3)
|
129
|
+
activesupport (>= 4.2.0)
|
130
|
+
nokogiri (>= 1.6)
|
131
|
+
rails-html-sanitizer (1.5.0)
|
132
|
+
loofah (~> 2.19, >= 2.19.1)
|
133
|
+
railties (7.0.4.3)
|
134
|
+
actionpack (= 7.0.4.3)
|
135
|
+
activesupport (= 7.0.4.3)
|
136
|
+
method_source
|
137
|
+
rake (>= 12.2)
|
138
|
+
thor (~> 1.0)
|
139
|
+
zeitwerk (~> 2.5)
|
140
|
+
rake (13.0.6)
|
141
|
+
rspec (3.12.0)
|
142
|
+
rspec-core (~> 3.12.0)
|
143
|
+
rspec-expectations (~> 3.12.0)
|
144
|
+
rspec-mocks (~> 3.12.0)
|
145
|
+
rspec-core (3.12.2)
|
146
|
+
rspec-support (~> 3.12.0)
|
147
|
+
rspec-expectations (3.12.3)
|
148
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
149
|
+
rspec-support (~> 3.12.0)
|
150
|
+
rspec-mocks (3.12.5)
|
151
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
+
rspec-support (~> 3.12.0)
|
153
|
+
rspec-support (3.12.0)
|
154
|
+
thor (1.2.1)
|
155
|
+
timeout (0.3.2)
|
156
|
+
tzinfo (2.0.6)
|
157
|
+
concurrent-ruby (~> 1.0)
|
158
|
+
websocket-driver (0.7.5)
|
159
|
+
websocket-extensions (>= 0.1.0)
|
160
|
+
websocket-extensions (0.1.5)
|
161
|
+
zeitwerk (2.6.7)
|
162
|
+
|
163
|
+
PLATFORMS
|
164
|
+
ruby
|
165
|
+
|
166
|
+
DEPENDENCIES
|
167
|
+
rails (>= 6.0)
|
168
|
+
rake (~> 13.0)
|
169
|
+
rspec (~> 3.0)
|
170
|
+
ruby-superparser!
|
171
|
+
|
172
|
+
BUNDLED WITH
|
173
|
+
2.4.12
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# lib/ruby_superparser/superparser_integration.rb
|
2
|
+
|
3
|
+
module RubySuperparser
|
4
|
+
module SuperparserIntegration
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
class_methods do
|
8
|
+
def superparser_for_attached(attached_attribute, options = {})
|
9
|
+
after_save :process_document_with_superparser, if: "saved_change_to_attribute?(:#{attached_attribute})"
|
10
|
+
|
11
|
+
define_method :process_document_with_superparser do
|
12
|
+
if options[:async]
|
13
|
+
RubySuperparser::DocumentProcessorWorker.perform_async(id)
|
14
|
+
else
|
15
|
+
superparser_client.parse_resume(send(attached_attribute))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def superparser_client
|
24
|
+
api_key = ENV['SUPERPARSER_API_KEY']
|
25
|
+
@superparser_client ||= RubySuperparser::Client.new(api_key)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Silvashy
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- ".rspec"
|
36
36
|
- CHANGELOG.md
|
37
37
|
- Gemfile
|
38
|
+
- Gemfile.lock
|
38
39
|
- LICENSE.txt
|
39
40
|
- README.md
|
40
41
|
- Rakefile
|
@@ -44,6 +45,8 @@ files:
|
|
44
45
|
- lib/generators/ruby_superparser/templates/initializer.rb
|
45
46
|
- lib/ruby/superparser.rb
|
46
47
|
- lib/ruby/superparser/version.rb
|
48
|
+
- lib/ruby_superparser.rb
|
49
|
+
- lib/ruby_superparser/superparser_integration.rb
|
47
50
|
- ruby-superparser.gemspec
|
48
51
|
- sig/ruby/superparser.rbs
|
49
52
|
homepage: https://github.com/jpsilvashy/ruby-superparser
|