revealing 1.0.3 → 1.0.4

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: d47824e706f740bb4bd389506532615d0f27c64d3c222ac24ba9a5edfc9b7ec2
4
- data.tar.gz: 37502d62f798b59acbd06b9e9a37bf62eb82bac0753bf1fa2e84594a29b7e40f
3
+ metadata.gz: f88e8404c6aaf20a49dbd3ee4c7a3d3d9eda17e567a4f6f6d63c51ea465256f6
4
+ data.tar.gz: fae690feb332b5a8d7d9c1840ad6a7981725f70bdc9646eabe2cbcfcd6d9fd07
5
5
  SHA512:
6
- metadata.gz: 91b2f7a00c4b60d06f0d81a59ffc43383272857cbaeb7f768091e101f17ff859c47cbcc6091843b111dff1ab899df7be1756c2a4fd49cf51f9d6d7c514dcfc1b
7
- data.tar.gz: b10369ffc6c16f1e64635ac80998358a280eab4675c6e4a1279b89c2a21d44745d780394a8e0fe237af7327659d3849b20f205929936542f2a1a7b8409c81e73
6
+ metadata.gz: b2d5cf5426276b23307d29fb11e84b25b2221e694a69ac7667cf90e4a1a5f5798492aa5309e0d837a6c0b357e2bb3d2afe3367e328c87d3d5f2989330a5039b5
7
+ data.tar.gz: e5c7a73f5b15a7da7d7553d857843d2bd5a84667d904042e84590b7abbd8bd7f8c56db65c5826e55b8a08f66362d7dfc9c6621422ff04d1ec12c0ec503be1782
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ .DS_Store
2
+ .envrc
1
3
  Gemfile.lock
2
4
  pkg
3
5
  tmp
data/README.markdown CHANGED
@@ -33,10 +33,11 @@ This gem provides a set of [`Rake`](https://github.com/ruby/rake) tasks to creat
33
33
  # TODO
34
34
 
35
35
  1. `revealing doctor` to analyze tools
36
- 1. Target folders mirror source, so that we don't risk duplicates
37
- 1. Read desired versions of dependencies from a YAML file (with sensible defaults coming from this project)
36
+ 1. Rubocop
37
+ 1. Read desired dependencies (URLs or version numbers) from ENV vars or a YAML file (with sensible defaults coming from this project)
38
38
  1. Re-add ditaa processing
39
39
  1. Add mathjax (copy to target if present, otherwise use CDN)
40
+ 1. Add guard-livereload to the generated project
40
41
  1. Expose customization of
41
42
  * highlight-style
42
43
  * slide-level
@@ -1,5 +1,24 @@
1
1
  prereq 'gm'
2
2
 
3
+ def refute_duplicate_basename(assets)
4
+ assets = assets.map{ |f| Pathname(f) }
5
+ basenames = assets.map{ |f| f.basename }
6
+
7
+ if basenames.length != basenames.uniq.length
8
+ # https://stackoverflow.com/a/8922931/3212907
9
+ duplicate_basenames = basenames.select{ |e| basenames.count(e) > 1 }.uniq
10
+ list = assets.select{ |a| duplicate_basenames.include?(a.basename) }
11
+ warn "Error: The following assets have the same base name and would override another in the output:"
12
+ warn ''
13
+ warn list.join("\n")
14
+ warn ''
15
+ warn "Consider renaming them to be unique."
16
+ fail
17
+ end
18
+ end
19
+
20
+ refute_duplicate_basename(RESIZABLE_ASSETS)
21
+
3
22
  RESIZED_ASSETS.zip(RESIZABLE_ASSETS).each do |target, source|
4
23
  desc "Resize #{source} to #{target}"
5
24
  file target => ['gm', source] do
@@ -7,9 +26,11 @@ RESIZED_ASSETS.zip(RESIZABLE_ASSETS).each do |target, source|
7
26
  end
8
27
  end
9
28
 
29
+ refute_duplicate_basename(ASSET_SOURCES)
30
+
10
31
  ASSETS.zip(ASSET_SOURCES).each do |target, source|
11
32
  desc "Copy #{source} to #{target}"
12
- file target => ['gm', source] do
33
+ file target => source do
13
34
  cp source, target
14
35
  end
15
36
  end
@@ -22,8 +22,9 @@ REVEAL_JS_TARGET_DIR = TARGET_DIR / REVEAL_JS
22
22
 
23
23
  RESIZABLE_ASSETS = (FileList[SOURCE_DIR / '**/*.png'] + FileList[SOURCE_DIR / '**/*.jpg'])
24
24
  RESIZED_ASSETS = RESIZABLE_ASSETS.pathmap("#{TARGET_DIR}/%f")
25
- ASSET_SOURCES = FileList[SOURCE_DIR / '*'] - RESIZABLE_ASSETS - SOURCE_FILES
25
+ ASSET_SOURCES = FileList[SOURCE_DIR / '**/*'].select{ |f| Pathname(f).file? } - RESIZABLE_ASSETS - SOURCE_FILES
26
26
  ASSETS = ASSET_SOURCES.pathmap("#{TARGET_DIR}/%f") - RESIZED_ASSETS
27
+
27
28
  HEADERS = FileList['headers/*'] # These are included literal; no need to copy them
28
29
 
29
30
  load "#{__dir__}/tasks/prereq.rake"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Revealing
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revealing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steffen Uhlig