oktags 0.1.3 → 0.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ok/tags.rb +9 -1
  3. data/lib/ok/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d6afa2948322c1f6e7bb548ad2bc4934b0e7882c9efb5d3d05c4b233f4a7889
4
- data.tar.gz: 2e78e3447c5aad24b44adb7870d3f7cd21274e6a6330994b7c6e22fdc1b35f42
3
+ metadata.gz: 064d3e1decf8e198564e3ea03bfa9ffef9b6982a7aa4626984ecd7390a4ecc7f
4
+ data.tar.gz: bd34c659eb79cc5c9f27245f85390baf2cafdb6c8096d01778e83eaaaaa3a6a4
5
5
  SHA512:
6
- metadata.gz: e420a42918e5415376ca79efaca92317670d30387e0ca6573f5b11d465022e17d676b8b95751051947580d87efe395640bfe79afa76211a9389104d0f9a9ec3e
7
- data.tar.gz: e93c26b04c1d145a3db8584f63483a459a35aa2cb62f46b890901e0b1eaa887321f98ff146bb628ba68f3266982b79d85c183a129d7caddbd7e8b662941d5186
6
+ metadata.gz: 8a0305539aff833792c1d76ba98acdba725115c0dad65438476d12a6ac83ae425cc2e3c4feac123f830ddc95e4156feadbca9a3ac7fc3db72d8d0f9e0660116e
7
+ data.tar.gz: 83d1259fc52913ea08a3fbcfd9c688da832bd0f5c42be2e2b346b0955f146391211405eeb0b1bdf6d572bc5244136bc5b5be9a68c91ca5fadca026638626f54d
@@ -67,7 +67,15 @@ module OK
67
67
  end
68
68
 
69
69
  tags = find_tags_for(file)
70
- tags << new_tags.split(',')&.map(&:strip)&.map(&:downcase)
70
+ tags <<
71
+ new_tags.split(',')&.map(&:strip)&.map(&:downcase)&.map do |t|
72
+ # Replace spaces in tags with underscores, because spaces in
73
+ # filenames can cause all kinds of issues depending on what
74
+ # tools are used on the filenames. The less requirements for
75
+ # escaping filenames, the better.
76
+ t.gsub(' ', '_')
77
+ end
78
+
71
79
  tags = tags.flatten.uniq.sort
72
80
 
73
81
  new_filename = filename_with_tags(file, tags)
@@ -1,5 +1,5 @@
1
1
  module OK
2
2
  module Tags
3
- VERSION = '0.1.3'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oktags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alain M. Lafon