act_as_page_extractor 0.6.2 → 0.6.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c4528cd1633b4691d46d7cef1eac6b66c986bfd3ebdebedec786b01bab0f0e6
|
4
|
+
data.tar.gz: 05b6967bb2092e17fefca9923614a3b16fae9e5dc3bfd5caf91a16f4e93b6d57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea4ba52c2cfc10c21ca3ca82791af40689140de14ce56781859e6cee6ce538d8c8ad9c9b64f2acb39f0fce4848ca548395f3442146d2e1b4e7f4711f2f0c801
|
7
|
+
data.tar.gz: 3cfbd8aef08741aceaf34103bdfbeb45ddbf9b34d863e9daf92f2d9a7c1636577cc265770cfd318287d0b77dacfb896c5c2d68923ed65393c250246f29053e3d
|
@@ -11,7 +11,7 @@ module ActAsPageExtractor
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def save_to_db
|
14
|
-
self.
|
14
|
+
self.update(page_extraction_state: EXTRACTING_STATES[:extracting])
|
15
15
|
ExtractedPage.transaction do
|
16
16
|
@pdf_pages&.times&.each do |pdf_page|
|
17
17
|
page_filename = "#{@tmp_dir}/#{@document_filename.split('.').first}_#{(pdf_page + 1).to_s}.txt"
|
@@ -32,7 +32,7 @@ module ActAsPageExtractor
|
|
32
32
|
page_extraction_doctype: @document_path&.split('.')&.last,
|
33
33
|
page_extraction_filesize: Filesize.from("#{File.size(@document_path)} B").pretty
|
34
34
|
})
|
35
|
-
self.
|
35
|
+
self.update(updated_attributes)
|
36
36
|
end
|
37
37
|
|
38
38
|
def cleanup_pages
|
data/spec/support/models.rb
CHANGED