kithe 2.17.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 675e05528a33eb6b29c34c8a3c55f19ba82b937d0eb41b61fcc632af0383dee1
|
|
4
|
+
data.tar.gz: 43fd9b34e684e369e910e295d1bca21a00c53c10b0fa2cec0a74323351b09382
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e575adc1d2ae9ab6b7f78d2938468c696a1a5fd37a2d964b1a09ab0b3ef0b85ed15ad25bb4946e6069a79d043efb08449e72203281978617eca3ec5e5eb1343e
|
|
7
|
+
data.tar.gz: 0a645f019d8ff8246d07cc29be08d937e9a2af40974746c557973a907aa36ba0be53cf0b75983a044b30899099fda6ebbfd637c25c48a15d2db2d3c19c969ec4
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Kithe
|
|
2
|
+
# Can be included in a controller, or usually in ApplicationController for your
|
|
3
|
+
# whole app, to batch solr indexing that takes place in a controller action, into
|
|
4
|
+
# a single or fewer solr index commands.
|
|
5
|
+
#
|
|
6
|
+
# We used to just have implementers write this simple code in thier local app, which
|
|
7
|
+
# works fine, but you wind up with the around filter in all your stack traces, since
|
|
8
|
+
# it's around every action.
|
|
9
|
+
#
|
|
10
|
+
# So instead, just
|
|
11
|
+
#
|
|
12
|
+
# include Kithe::BatchIndexableAroundAction
|
|
13
|
+
#
|
|
14
|
+
# in eg ApplicationController
|
|
15
|
+
#
|
|
16
|
+
module BatchIndexableAroundAction
|
|
17
|
+
extend ActiveSupport::Concern
|
|
18
|
+
|
|
19
|
+
included do
|
|
20
|
+
around_action :_kithe_batch_indexable_around_action
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Used as a Rails controller around_action to batch any kithe indexing directives
|
|
24
|
+
# in a controller action.
|
|
25
|
+
#
|
|
26
|
+
# As `index_with(batching: true)` only creates a Traject::Writer lazily on demand,
|
|
27
|
+
# this should not add appreciable overhead to actions that don't end up triggering any Solr updates.
|
|
28
|
+
def _kithe_batch_indexable_around_action
|
|
29
|
+
Kithe::Indexable.index_with(batching: true) do
|
|
30
|
+
yield
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/kithe/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kithe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Rochkind
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -19,7 +18,7 @@ dependencies:
|
|
|
19
18
|
version: '6.0'
|
|
20
19
|
- - "<"
|
|
21
20
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '8.
|
|
21
|
+
version: '8.2'
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,7 +28,7 @@ dependencies:
|
|
|
29
28
|
version: '6.0'
|
|
30
29
|
- - "<"
|
|
31
30
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '8.
|
|
31
|
+
version: '8.2'
|
|
33
32
|
- !ruby/object:Gem::Dependency
|
|
34
33
|
name: attr_json
|
|
35
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -348,7 +347,6 @@ dependencies:
|
|
|
348
347
|
- - ">="
|
|
349
348
|
- !ruby/object:Gem::Version
|
|
350
349
|
version: '0'
|
|
351
|
-
description:
|
|
352
350
|
email:
|
|
353
351
|
- jrochkind@sciencehistory.org
|
|
354
352
|
executables: []
|
|
@@ -362,6 +360,7 @@ files:
|
|
|
362
360
|
- app/characterization/kithe/exiftool_characterization.rb
|
|
363
361
|
- app/characterization/kithe/exiftool_characterization/result.rb
|
|
364
362
|
- app/characterization/kithe/ffprobe_characterization.rb
|
|
363
|
+
- app/controllers/concerns/kithe/batch_indexable_around_action.rb
|
|
365
364
|
- app/derivative_transformers/kithe/ffmpeg_extract_jpg.rb
|
|
366
365
|
- app/derivative_transformers/kithe/ffmpeg_transformer.rb
|
|
367
366
|
- app/derivative_transformers/kithe/vips_cli_image_to_jpeg.rb
|
|
@@ -427,7 +426,6 @@ homepage: https://github.com/sciencehistory/kithe
|
|
|
427
426
|
licenses:
|
|
428
427
|
- MIT
|
|
429
428
|
metadata: {}
|
|
430
|
-
post_install_message:
|
|
431
429
|
rdoc_options: []
|
|
432
430
|
require_paths:
|
|
433
431
|
- lib
|
|
@@ -442,8 +440,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
442
440
|
- !ruby/object:Gem::Version
|
|
443
441
|
version: '0'
|
|
444
442
|
requirements: []
|
|
445
|
-
rubygems_version: 3.
|
|
446
|
-
signing_key:
|
|
443
|
+
rubygems_version: 3.7.1
|
|
447
444
|
specification_version: 4
|
|
448
445
|
summary: Shareable tools/components for building a digital collections app in Rails.
|
|
449
446
|
test_files: []
|