synful 1.1.2 → 1.1.3
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 +4 -4
- data/bin/synful +8 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 467fed6a9cfc5aa9ceeb65e13b3c3f4b4e28d1aa1e6617a87ce53ab6fa567d30
|
4
|
+
data.tar.gz: 72b6cd675e4969849252a6526df4d5e21be767c7a5dd6e815f9925b3a1d5d45a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28706d53b96b4828e7f86a6e0efd2d23e4245d657571f74e947bf79175f3f138ef3db8f7ae4a35135231b91358cfc12f33714dc5f5be679fe23a00b7291d39c4
|
7
|
+
data.tar.gz: a2315811a7bcb19602d85255fbc71fa384741589bc0fb3dd254e89503628d3b56b9328b6f243531bbac07f5fd050c5c233af708b2f9dfef065e36492bb1e24c9
|
data/bin/synful
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# synful - Ruby utility that shows syntax highlighted code in your browser
|
5
5
|
#
|
6
6
|
# Author: Steve Shreeve (steve.shreeve@gmail.com)
|
7
|
-
# Date:
|
7
|
+
# Date: Sep 5, 2024
|
8
8
|
#
|
9
9
|
# Thanks to Julie Evans for creating the amazing rouge library!
|
10
10
|
# ============================================================================
|
@@ -19,7 +19,7 @@
|
|
19
19
|
require "optparse"
|
20
20
|
|
21
21
|
OptionParser.new.instance_eval do
|
22
|
-
@version = "1.1.
|
22
|
+
@version = "1.1.3"
|
23
23
|
@banner = "usage: #{program_name} [options] <paths ...> [--] <-paths_to_skip ...>"
|
24
24
|
|
25
25
|
on '-b' , '--bypass' , 'Bypass (skip over) top comments (begin with "#") in files'
|
@@ -27,6 +27,7 @@ OptionParser.new.instance_eval do
|
|
27
27
|
on '-h' , '--help' , 'Show help and command usage' do Kernel.abort to_s; end
|
28
28
|
on '-i <exts>' , '--include' , 'Comma list of extensions to include (incompatible with -x)', Array
|
29
29
|
on '-x <exts>' , '--exclude' , 'Comma list of extensions to exclude (incompatible with -i)', Array
|
30
|
+
on '-w' , '--windows' , 'Re-encode files from Windows-1252 to UTF-8'
|
30
31
|
|
31
32
|
self
|
32
33
|
end.parse!(into: opts={}) rescue abort($!.message)
|
@@ -40,6 +41,11 @@ fore = opts[:foreground]
|
|
40
41
|
keep = opts[:include ] # will become a Set or nil
|
41
42
|
deny = opts[:exclude ] # will become a Set or nil
|
42
43
|
|
44
|
+
if opts[:windows]
|
45
|
+
Encoding.default_external = "Windows-1252"
|
46
|
+
Encoding.default_internal = "UTF-8"
|
47
|
+
end
|
48
|
+
|
43
49
|
if keep && deny
|
44
50
|
abort "#{File.basename $0}: include and exclude cannot be used together"
|
45
51
|
elsif keep
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rouge
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
|
-
rubygems_version: 3.5.
|
86
|
+
rubygems_version: 3.5.17
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: A Ruby utility that shows syntax highlighted code in your browser
|