wax_tasks 1.1.1 → 1.1.2

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: 0e51a1e7e4f2b6e4f2a47ea31dafa67a25fa72b4792357fd7e3409f7f604ea40
4
- data.tar.gz: 5f91332fb4f9ea78d922252d6d815d67a85738e37d055d8345935aadd0802f7b
3
+ metadata.gz: 0d6b199887d4f473d837b2115169191e7ba1761b6402715ef2ef5dc390f0a7e9
4
+ data.tar.gz: 3518140ad547ab96d258ce5de5ee9f8bac47dab868409318c7036a89bc85f3fa
5
5
  SHA512:
6
- metadata.gz: 2392b9846200a684cf022e48071988c41e824d074d848ba686b320f826bb499d50bf3d656d1de6a2789209ccd2ddad057d687013d9d4eff4ddf76a111bc7c593
7
- data.tar.gz: dd37457cd55d005ac5ed02a9de0b040a2d34db96e7fb28f40a218808d27e04a5d7299a223407146ae3412fd421e4df2095e976655ff72a4e27c21fd5f9849ebc
6
+ metadata.gz: ba2e755b8068a428edcb8b57ad727bef86108fa5ba6c651ff3191b521e3a71b4d5a2d9a55a8036efa3b27cbae97a03acdacff29fbfc459033af2b287fb018d52
7
+ data.tar.gz: 53fe1a0275839addf3b0d98b58ab02982c52885d3d2029a6c2424364b38f17e68ef426bd02449d9900d6dc30ce2f19b9cff577250470fa2ce3edfc9336cec15a
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+
5
+ ---
6
+
7
+ **Describe the bug**
8
+ A clear and concise description of what the bug is.
9
+
10
+ **To Reproduce**
11
+ Steps to reproduce the behavior:
12
+ 1. Go to '...'
13
+ 2. Click on '....'
14
+ 3. Scroll down to '....'
15
+ 4. See error
16
+
17
+ **Expected behavior**
18
+ A clear and concise description of what you expected to happen.
19
+
20
+ **Screenshots**
21
+ If applicable, add screenshots to help explain your problem.
22
+
23
+ **Desktop (please complete the following information):**
24
+ - OS: [e.g. iOS]
25
+ - Browser [e.g. chrome, safari]
26
+ - Version [e.g. 22]
27
+
28
+ **Smartphone (please complete the following information):**
29
+ - Device: [e.g. iPhone6]
30
+ - OS: [e.g. iOS8.1]
31
+ - Browser [e.g. stock browser, safari]
32
+ - Version [e.g. 22]
33
+
34
+ **Additional context**
35
+ Add any other context about the problem here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+
5
+ ---
6
+
7
+ **Is your feature request related to a problem? Please describe.**
8
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
+
10
+ **Describe the solution you'd like**
11
+ A clear and concise description of what you want to happen.
12
+
13
+ **Describe alternatives you've considered**
14
+ A clear and concise description of any alternative solutions or features you've considered.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,7 @@
1
+ .DS_Store
2
+ Gemfile.lock
3
+ coverage
4
+ test_build
5
+ doc
6
+ .yardoc
7
+ DIANE
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require spec_helper
3
+ --format documentation
@@ -0,0 +1,16 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.4
4
+ Exclude: ['spec/**/*', 'test_build/**/*']
5
+ Layout/LineLength:
6
+ IgnoredPatterns: ['raise', 'puts', 'set', 'warn', 'ÈÉÊË', 'EEEE', 'safe_join', 'spec']
7
+ Metrics/AbcSize:
8
+ Max: 28
9
+ Metrics/MethodLength:
10
+ Max: 15
11
+ Layout/EmptyComment:
12
+ Enabled: false
13
+ Layout/EmptyLineAfterGuardClause:
14
+ Enabled: false
15
+ Style/SingleArgumentDig:
16
+ Enabled: false
@@ -0,0 +1,27 @@
1
+ # sudo: true
2
+ language: ruby
3
+ rvm:
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
7
+ addons:
8
+ apt:
9
+ packages:
10
+ - ghostscript
11
+ - tree
12
+ env:
13
+ global:
14
+ - CC_TEST_REPORTER_ID=9ef8644063d4113becf719844a0f9c0f8a452f87d69a8315c6fb090123e52cc8
15
+ before_install:
16
+ - gem update --system
17
+ - gem install bundler
18
+ - sudo rm /etc/ImageMagick-6/policy.xml
19
+ before_script:
20
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
21
+ - chmod +x ./cc-test-reporter
22
+ - ./cc-test-reporter before-build
23
+ script:
24
+ - bundle exec bundle-audit
25
+ - bundle exec rspec
26
+ after_script:
27
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
3
+ Welcome to the Changelog! Below is the first attempt at a log for this project.
4
+
5
+ Please note that we define ___breaking changes___ as those changes which force users to change how they interact with __wax_tasks__
6
+ via their site's `_config.yml` file or how they invoke the tasks on the command line.
7
+
8
+ ## v1.0.3
9
+ #### Date: ???
10
+
11
+ #### Non-breaking Changes:
12
+ - :white_check_mark: Allows use of `wax_iiif < 0.3` (was `<0.2`)
13
+ - :white_check_mark: Fix bug where command options (e.g., `--trace`) were being parsed as task ARGV args.
14
+
15
+ ## v1.0.2
16
+ #### Date: 06/12/2019
17
+
18
+ #### Non-breaking Changes:
19
+ - :white_check_mark: Fixes [32](https://github.com/minicomp/wax_tasks/issues/32); accepts narrow images (< 1140px)
20
+ - :white_check_mark: Fixes [33](https://github.com/minicomp/wax_tasks/issues/33); better image extension handling
21
+ - :white_check_mark: Fixes [34](https://github.com/minicomp/wax_tasks/issues/34); ^
22
+ - :white_check_mark: Fixes [36](https://github.com/minicomp/wax_tasks/issues/36); fixes bug if an image item doesn't have a record
23
+
24
+ ## v1.0.1
25
+ #### Date: 06/05/2019
26
+
27
+ #### Non-breaking Changes:
28
+ - :white_check_mark: Uses `wax_iiif v0.1.2` with better progress bar handling on IIIF derivative generation
29
+ - :white_check_mark: Has better progress bar handling on simple derivative generation
30
+
31
+ ## v1.0.0
32
+ #### Date: 06/04/2019
33
+
34
+ #### Breaking Changes:
35
+ - :bangbang: __Search index generation__ is now handled under the variable `search` in `_config.yml` instead of `lunr_index` and accepts a hash instead of an array.
36
+ - :bangbang: __Search index generation__ is now run with `bundle exec rake wax:search NAME` instead of `bundle exec rake wax:lunr`
37
+ - :x: __Search UI__ is now handled dynamically by `wax_theme`; as such the `UI=true` option on the rake task has been depricated.
38
+ - :x:: The __site testing__ task `bundle exec rake wax:test` was deprecated and moved to `wax_theme`, since it deals with site presentation and not the handling of collection data.
39
+ - :x: The `wax:jspackage` task was depricated, since it was arbitrary and unused.
40
+
41
+ #### Non-breaking Changes:
42
+ - :white_check_mark: The __page generation__ task `bundle exec rake wax:pagemaster NAME` has become `bundle exec rake wax:pages NAME`. However, this is currently aliased for backwards compatibility.
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 marii nyrop
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,171 @@
1
+ # wax_tasks 🐝
2
+ [![Build Status](https://travis-ci.com/minicomp/wax_tasks.svg?branch=main)](https://travis-ci.com/minicomp/wax_tasks) [![Depfu](https://badges.depfu.com/badges/6105c55b9634e74b1c27055b19bad8f0/overview.svg)](https://depfu.com/github/minicomp/wax_tasks?project_id=10548)
3
+ [![Gem Version](https://badge.fury.io/rb/wax_tasks.svg)](https://badge.fury.io/rb/wax_tasks)
4
+ [![Gem Downloads](https://img.shields.io/gem/dt/wax_tasks.svg?color=046d0b)](https://badge.fury.io/rb/wax_tasks)
5
+ [![docs](http://img.shields.io/badge/docs-rdoc.info-blue.svg?style=flat)](https://www.rubydoc.info/github/minicomp/wax_tasks/)
6
+
7
+ [![Maintainability](https://api.codeclimate.com/v1/badges/14408e7e962b9b84ec65/maintainability)](https://codeclimate.com/github/minicomp/wax_tasks/maintainability)
8
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/14408e7e962b9b84ec65/test_coverage)](https://codeclimate.com/github/minicomp/wax_tasks/test_coverage)
9
+ ![License](https://img.shields.io/github/license/minicomp/wax_tasks.svg?color=c6a1e0)
10
+
11
+ __wax_tasks__ is gem-packaged set of [Rake](https://ruby.github.io/rake/) tasks for creating minimal exhibition sites with [Wax](https://github.com/minicomp/wax/).
12
+
13
+ It can be used to:
14
+ - generate collection markdown pages from a metadata file ([wax:pages](#waxpages))
15
+ - generate a client-side search index ([wax:search](#waxsearch))
16
+ - generate either IIIF-compliant derivatives ([wax:derivatives:iiif](#waxderivativesiiif)) or simple image derivatives ([wax:derivatives:simple](#waxderivativessimple)) from local image and pdf files
17
+
18
+ <br>
19
+ <img src="https://github.com/minicomp/wiki/blob/main/assets/wax_screen.gif?raw=true"/>
20
+
21
+
22
+ # Getting Started
23
+
24
+ ## Prerequisites
25
+
26
+ You'll need `Ruby >= 2.4` with `bundler` installed. Check your versions with:
27
+ ```bash
28
+ $ ruby -v
29
+ ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
30
+
31
+ $ bundler -v
32
+ Bundler version 1.16.1
33
+ ```
34
+
35
+ To use the image derivative tasks, you will also need to have ImageMagick and Ghostscript installed and functional. You can check to see if you have ImageMagick by running:
36
+ ```bash
37
+ $ convert -version
38
+ Version: ImageMagick 6.9.9-20 Q16 x86_64 2017-10-15 http://www.imagemagick.org
39
+ Copyright: (c) 1999-2017 ImageMagick Studio LLC
40
+ License: http://www.imagemagick.org/script/license.php
41
+ Features: Cipher DPC Modules
42
+ Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
43
+ ```
44
+
45
+ ... and check Ghostscript with:
46
+ ```bash
47
+ $ gs -version
48
+ GPL Ghostscript 9.21 (2017-03-16)
49
+ Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
50
+ ```
51
+
52
+ Next, you'll need a Jekyll site. You can clone the [minicomp/wax demo site](https://github.com/minicomp/wax/) or start a site from scratch with:
53
+
54
+ ```sh
55
+ $ gem install jekyll
56
+ $ jekyll new wax && cd wax
57
+ ```
58
+
59
+ ## Installation
60
+
61
+ Add `wax_tasks` to your Jekyll site's `Gemfile`:
62
+
63
+ ```ruby
64
+ gem 'wax_tasks'
65
+ ```
66
+
67
+ ... and install with bundler:
68
+
69
+ ```bash
70
+ $ bundle install
71
+ ```
72
+
73
+ Create a `Rakefile` with the following:
74
+ ```ruby
75
+ spec = Gem::Specification.find_by_name 'wax_tasks'
76
+ Dir.glob("#{spec.gem_dir}/lib/tasks/*.rake").each { |r| load r }
77
+ ```
78
+
79
+ # Usage
80
+
81
+ After following the installation instructions above, you will have access to the Rake tasks in your shell by running `$ bundle exec rake wax:taskname` in the root directory of your Jekyll site.
82
+ To see the available tasks, run
83
+
84
+ ```ruby
85
+ $ bundle exec rake --tasks
86
+ ```
87
+
88
+ ## Sample site `_config.yml` file:
89
+
90
+ ```yaml
91
+ # basic settings
92
+ title: Wax.
93
+ description: a jekyll theme for minimal exhibitions
94
+ url: 'https://minicomp.github.io'
95
+ baseurl: '/wax'
96
+
97
+ # build settings
98
+ permalink: pretty # optional, creates `/page/` link instead of `page.html` links
99
+
100
+ # wax collection settings
101
+ collections:
102
+ objects: # the collection name
103
+ layout: 'iiif-image-page'
104
+ output: true # this must be true for your .md pages to be built to html!
105
+ metadata:
106
+ source: 'objects.csv' # path to the metadata file, must be within '_data'
107
+ images:
108
+ source 'source_images/objects' # path to the directory of source images, must be within '_data'
109
+
110
+ # wax search index settings
111
+ lunr_index:
112
+ main:
113
+ index: 'js/lunr-index.json' # where the index will be generated
114
+ collections: # the collections to index
115
+ objects:
116
+ content: false # whether or not to index the markdown page content (below the YAML)
117
+ fields: # the metadata fields to index
118
+ - 'label'
119
+ - 'artist'
120
+ - 'location'
121
+ - 'object_type'
122
+ ```
123
+
124
+ The above example includes a single collection `objects` that comprises:
125
+ 1. a CSV `metadata:source` file (`objects.csv`), and
126
+ 2. a `images:source` directory of image and pdf files.
127
+
128
+ For more information on configuring Jekyll collections for __wax_tasks__, check out the [minicomp/wax wiki](https://minicomp.github.io/wiki/#/wax/) and <https://jekyllrb.com/docs/collections/>.
129
+
130
+ ## Running the tasks
131
+
132
+ ### wax:pages
133
+
134
+ Takes a CSV, JSON, or YAML file of collection metadata and generates a [markdown](https://daringfireball.net/projects/markdown/syntax) page for each record to a directory using a specified layout. [Read More](#TODO).
135
+
136
+ `$ bundle exec rake wax:pages collection-name`
137
+
138
+ ### wax:search
139
+
140
+ Generates a client-side JSON search index of your site for use with [ElasticLunr.js](http://elasticlunr.com/). [Read More](#TODO).
141
+
142
+ `$ bundle exec rake wax:search search-name`
143
+
144
+
145
+ ### wax:derivatives:simple
146
+
147
+ Takes a local directory of images and pdf files and generates a few image derivatives (i.e., 'thumbnail' 250w and 'full' 1140w) for Jekyll layouts and includes to use. [Read More](#TODO).
148
+
149
+ `$ bundle exec rake wax:derivatives:iiif collection-name`
150
+
151
+ ### wax:derivatives:iiif
152
+
153
+ Takes a local directory of images and pdf files and generates tiles and data that work with a IIIF compliant image viewer like [OpenSeaDragon](https://openseadragon.github.io/), [Mirador](http://projectmirador.org/), or [Leaflet IIIF](https://github.com/mejackreed/Leaflet-IIIF). [Read More](#TODO).
154
+
155
+ `$ bundle exec rake wax:derivatives:iiif collection-name`
156
+
157
+ ### wax:clobber
158
+
159
+ Destroys (or "clobbers") wax-generated files, i.e., pages generated from `wax:pagemaster`, derivatives generated from `wax:derivatives`, and search indexes generated with `wax:search` so you can start from scratch.
160
+
161
+ This task does *not* touch your source metadata or source image files! Instead, it simply clears a path for you to regenerate your collection materials in case you add/edit source materials.
162
+
163
+ `$ bundle exec rake wax:clobber collection-name`
164
+
165
+ # Contributing
166
+
167
+ Fork/clone the repository. After making code changes, run the tests (`$ bundle exec rubocop` and `$ bundle exec rspec`) before submitting a pull request. You can enable verbose tests with `$ DEBUG=true bundle exec rspec`.
168
+
169
+ # License
170
+
171
+ The gem is available as open source under the terms of the [MIT License](LICENSE).
@@ -22,6 +22,7 @@ require_relative 'wax_tasks/item'
22
22
  require_relative 'wax_tasks/record'
23
23
  require_relative 'wax_tasks/site'
24
24
  require_relative 'wax_tasks/utils'
25
+ require_relative 'wax_tasks/version'
25
26
 
26
27
  #
27
28
  module WaxTasks
@@ -8,8 +8,6 @@ module WaxTasks
8
8
  class Asset
9
9
  attr_reader :id, :path
10
10
 
11
-
12
-
13
11
  def initialize(path, pid, variants)
14
12
  @path = path
15
13
  @pid = pid
@@ -19,14 +19,13 @@ module WaxTasks
19
19
  records = records_from_metadata
20
20
  Dir.glob(Utils.safe_join(@imagedata_source, '*')).map do |path|
21
21
  item = WaxTasks::Item.new(path, @image_variants)
22
- if item.valid?
23
- item.record = records.find { |r| r.pid == item.pid }
24
- item.iiif_config = @config.dig 'images', 'iiif'
25
- warn Rainbow("\nCould not find record in #{@metadata_source} for image item #{path}.\n").orange if item.record.nil?
26
- item
27
- else
28
- puts Rainbow("Skipping #{path} because type #{item.type} is not an accepted format").yellow unless item.type == '.pdf'
29
- end
22
+ next if item.type == '.pdf'
23
+ next puts Rainbow("Skipping #{path} because type #{item.type} is not an accepted format").yellow unless item.valid?
24
+
25
+ item.record = records.find { |r| r.pid == item.pid }
26
+ item.iiif_config = @config.dig 'images', 'iiif'
27
+ warn Rainbow("\nCould not find record in #{@metadata_source} for image item #{path}.\n").orange if item.record.nil?
28
+ item
30
29
  end.compact
31
30
  end
32
31
 
@@ -97,8 +96,8 @@ module WaxTasks
97
96
 
98
97
  json = JSON.parse manifest.to_json
99
98
  @image_variants.each do |k, _v|
100
- value = json.dig k
101
- record.set k, "/#{Utils.content_clean(value)}" unless value.nil?
99
+ value = json.fetch k, ''
100
+ record.set k, "/#{Utils.content_clean(value)}" unless value.empty?
102
101
  end
103
102
 
104
103
  record.set 'manifest', "/#{Utils.content_clean(manifest.id)}"
@@ -68,7 +68,7 @@ module WaxTasks
68
68
  lost_record_pids.each do |pid|
69
69
  new << original.find { |r| r.pid == pid }
70
70
  end
71
- new
71
+ new.sort_by(&:order)
72
72
  end
73
73
 
74
74
  #
@@ -32,7 +32,7 @@ module WaxTasks
32
32
  #
33
33
  #
34
34
  def valid?
35
- accepted_image_formats.include?(@type) || @type == 'dir'
35
+ accepted_image_formats.include? @type or @type == 'dir'
36
36
  end
37
37
 
38
38
  #
@@ -90,7 +90,7 @@ module WaxTasks
90
90
  str.gsub!(/\A---(.|\n)*?---/, '') # remove yaml front matter
91
91
  str.gsub!(/{%(.*)%}/, '') # remove functional liquid
92
92
  str.gsub!(/{{.*}}/, '') # remove referential liquid
93
- str.gsub!(%r{<\/?[^>]*>}, '') # remove html
93
+ str.gsub!(%r{</?[^>]*>}, '') # remove html
94
94
  str.gsub!('\\n', '') # remove newlines
95
95
  str.gsub!(/\s+/, ' ') # remove extra space
96
96
  str.tr!('"', "'") # replace double quotes with single
@@ -114,7 +114,7 @@ module WaxTasks
114
114
  #
115
115
  #
116
116
  def self.safe_join(*args)
117
- File.join(args.compact).sub %r{^\/}, ''
117
+ File.join(args.compact).sub %r{^/}, ''
118
118
  end
119
119
 
120
120
  # Constructs the order variable for each page (if the collection
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WaxTasks
4
+ VERSION = '1.1.2'
5
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/wax_tasks/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'wax_tasks'
7
+ spec.version = WaxTasks::VERSION
8
+ spec.authors = ['Marii Nyrop']
9
+ spec.email = ['marii@nyu.edu']
10
+ spec.license = 'MIT'
11
+ spec.homepage = 'https://github.com/minicomp/wax_tasks'
12
+ spec.summary = 'Rake tasks for minimal exhibition sites with Minicomp/Wax.'
13
+ spec.description = 'Rake tasks for minimal exhibition sites with Minicomp/Wax.'
14
+
15
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
16
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ end
18
+
19
+ spec.test_files = Dir['spec/*']
20
+ spec.required_ruby_version = '>= 2.4'
21
+ spec.metadata['yard.run'] = 'yri'
22
+
23
+ spec.requirements << 'imagemagick'
24
+ spec.requirements << 'ghostscript'
25
+
26
+ spec.add_runtime_dependency 'progress_bar', '~> 1.3'
27
+ spec.add_runtime_dependency 'rainbow', '~> 3.0'
28
+ spec.add_runtime_dependency 'rake', '~> 13.0'
29
+ spec.add_runtime_dependency 'safe_yaml', '~> 1.0'
30
+ spec.add_runtime_dependency 'wax_iiif', '~> 0.2'
31
+
32
+ spec.add_development_dependency 'rspec', '~> 3'
33
+ end
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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marii Nyrop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-10 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: progress_bar
@@ -101,7 +101,17 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
105
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
106
+ - ".gitignore"
107
+ - ".rspec"
108
+ - ".rubocop.yml"
109
+ - ".travis.yml"
110
+ - CHANGELOG.md
111
+ - CODE_OF_CONDUCT.md
104
112
  - Gemfile
113
+ - LICENSE
114
+ - README.md
105
115
  - lib/tasks/clobber.rake
106
116
  - lib/tasks/derivatives_iiif.rake
107
117
  - lib/tasks/derivatives_simple.rake
@@ -119,8 +129,10 @@ files:
119
129
  - lib/wax_tasks/record.rb
120
130
  - lib/wax_tasks/site.rb
121
131
  - lib/wax_tasks/utils.rb
132
+ - lib/wax_tasks/version.rb
122
133
  - spec/setup.rb
123
134
  - spec/spec_helper.rb
135
+ - wax_tasks.gemspec
124
136
  homepage: https://github.com/minicomp/wax_tasks
125
137
  licenses:
126
138
  - MIT
@@ -143,8 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
155
  requirements:
144
156
  - imagemagick
145
157
  - ghostscript
146
- rubyforge_project:
147
- rubygems_version: 2.7.6.2
158
+ rubygems_version: 3.1.4
148
159
  signing_key:
149
160
  specification_version: 4
150
161
  summary: Rake tasks for minimal exhibition sites with Minicomp/Wax.