synful 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/synful +8 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d972681e2643dc3405332f262139f988dde9fa3f356a5fa36ceae433a816dfc3
4
- data.tar.gz: cc6ccba71159f317b99934ffeecaae0ab77fd0201120006b913b704d8e36ac46
3
+ metadata.gz: 467fed6a9cfc5aa9ceeb65e13b3c3f4b4e28d1aa1e6617a87ce53ab6fa567d30
4
+ data.tar.gz: 72b6cd675e4969849252a6526df4d5e21be767c7a5dd6e815f9925b3a1d5d45a
5
5
  SHA512:
6
- metadata.gz: '029ea3ad6aabea7d5191fcf72389dcb6b0928c354cb62416a2d0d448f9001e3be027f7cbb05af9485df3d67f9e04dd18b74eac20a9a791b26e94b27dec7bccad'
7
- data.tar.gz: 675b82e3026859e9731120b9823999d7b7d3a16cf6f50880ad7205c5ed45671c6c83fd78048fbd00967c3eeae611c2bfc834ae8f9bb22db4dc9e0a6acc5fafaa
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: Feb 22, 2023
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.2"
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.2
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: 2023-12-22 00:00:00.000000000 Z
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.1
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