wax_tasks 1.0.0 → 1.0.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: 1f09ee093e87d8111dc4f0ee522cb33a6f3298fdd82a8f80c2c48d4f2c24baa5
4
- data.tar.gz: 12bb3dc4a77e92ebbec52f8b9900a8e6d2349592fc5fdff70a875111e11cc76e
3
+ metadata.gz: 7aaaa017dde02724ff7e1c5099365ba0711a4da6be73f3ba2a648b737c7d7cd1
4
+ data.tar.gz: 11c56f4a34b598d17912eba5c94b9f2c77a2b6ee7628dcdf591743e0213c324f
5
5
  SHA512:
6
- metadata.gz: 53bee380df63833cf919d3fa2b890617c7dea35bc350dd31fd1cbfd331032a17edf479565b841168f1db65a0ddae29fa14ab32870677ef9a1b3f33d9a0d5e27a
7
- data.tar.gz: dcd8227c7274a19473a62ea9f5507e813ca70985f1fca21cb1d9955b0e6d300225165b81028fa8aeae07c186da84f8b2c6abb21cd5273cf18a1cd1c01084185f
6
+ metadata.gz: db11be3906fb85b4d8d454818441ad29893eed2de6c27c54231dcf31013449ff4126e9aea77797ed727497463e6211f92655c3410dd192347116c3e08970e2ff
7
+ data.tar.gz: a851be1a81ecd5edaaec560d701b25975edca9943c6a9b7d7b0e2ab916cde986c2e3904594af2e77da7ffcd7973c8bac0ee415217eb73691e0466808dd247501
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'mini_magick'
4
4
  require 'progress_bar'
5
- require 'progress_bar/core_ext/enumerable_with_progress'
6
5
  require 'wax_iiif'
7
6
 
8
7
  #
@@ -54,7 +53,9 @@ module WaxTasks
54
53
  #
55
54
  def write_simple_derivatives(dir)
56
55
  puts Rainbow("Generating simple image derivatives for collection '#{@name}'\nThis might take awhile.").cyan
57
- items_from_imagedata.each_with_progress.map do |item|
56
+
57
+ bar = ProgressBar.new(items_from_imagedata.length)
58
+ items_from_imagedata.map do |item|
58
59
  item.simple_derivatives.each do |d|
59
60
  path = "#{dir}/#{d.path}"
60
61
  FileUtils.mkdir_p File.dirname(path)
@@ -63,6 +64,8 @@ module WaxTasks
63
64
  d.img.write path
64
65
  item.record.set d.label, path if item.record?
65
66
  end
67
+ bar.increment!
68
+ bar.write
66
69
  item
67
70
  end.flat_map(&:record)
68
71
  end
@@ -73,7 +76,6 @@ module WaxTasks
73
76
  build_opts = {
74
77
  base_url: "{{ '/' | absolute_url }}#{dir}",
75
78
  output_dir: dir,
76
- # variants: @image_variants,
77
79
  collection_label: @name
78
80
  }
79
81
  WaxIiif::Builder.new(build_opts)
@@ -10,11 +10,11 @@ module WaxTasks
10
10
  #
11
11
  #
12
12
  def initialize(path, variants)
13
- @path = path
14
- @variants = variants
15
- @type = type
16
- @pid = File.basename @path, '.*'
17
- @assets = assets
13
+ @path = path
14
+ @variants = variants
15
+ @type = type
16
+ @pid = File.basename @path, '.*'
17
+ @assets = assets
18
18
  end
19
19
 
20
20
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wax_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marii Nyrop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-04 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: progress_bar
@@ -72,7 +72,7 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.1
75
+ version: 0.1.2
76
76
  - - "<"
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0.2'
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: 0.1.1
85
+ version: 0.1.2
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0.2'