htmlbeautifier 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47d8a66494066ec486f778eb743569aa10eda648
4
- data.tar.gz: 964230bf12d44b7e71733b1d0c902864d9c879d1
3
+ metadata.gz: e1f5ee1a14739216070d654cda0baf67f47ca591
4
+ data.tar.gz: aec9ef2f98e0665639809f0ae4f9ca640925d947
5
5
  SHA512:
6
- metadata.gz: 6f3421ac4478a9e60a9ef959ce88f62b2d08a0ee246118b8913f54f5c7b4dc396b64596348b8ae5b79905a101b4dfa1a05a79ba7eb9ecb97813dba5f6832c061
7
- data.tar.gz: 93bcc5f3cb49700c15977d4609e7f3ec1d66722dec0d5c33085459a69cd23b9d41cd9b6e23d5780f31cb672aef5c4e1b26b0fdd8d843dbc5b4ad37115ab48f2b
6
+ metadata.gz: c65d727deb3738224a9974ffcfe69711f55889c19c9c424e900a68a864ee123708fb75171bc13127e896120ecc284cf8f4023603261291481d53cf585cd7a75f
7
+ data.tar.gz: 7acf594cb53911c01e0788993d88ea0e8be6f7be7e54315813dd0f61712a5e5dd2385b6f07abb914ac1c937856c6b82b75d93cbac2f5bba0cc199cf76311ce4d
@@ -9,16 +9,39 @@ rescue => e
9
9
  raise "Error parsing #{name}: #{e}"
10
10
  end
11
11
 
12
+ executable = File.basename(__FILE__)
13
+
12
14
  options = {:tab_stops => 2}
13
15
  parser = OptionParser.new do |opts|
14
- opts.banner = "Usage: #{__FILE__} [options] [file ...]"
15
- opts.on("-t", "--tab-stops NUMBER", Integer, "Set number of tab stops") do |num|
16
+ opts.banner = "Usage: #{executable} [options] [file ...]"
17
+ opts.separator <<END
18
+
19
+ #{executable} has two modes of operation:
20
+
21
+ 1. If no files are listed, it will read from standard input and write to
22
+ standard output.
23
+ 2. If files are listed, it will modify each file in place, overwriting it
24
+ with the beautified output.
25
+
26
+ The following options are available:
27
+
28
+ END
29
+ opts.on(
30
+ "-t", "--tab-stops NUMBER", Integer,
31
+ "Set number of spaces per indent (default #{options[:tab_stops]})"
32
+ ) do |num|
16
33
  options[:tab_stops] = num
17
34
  end
18
- opts.on("-e", "--stop-on-errors", "Stop with an error on problems in source") do |num|
35
+ opts.on(
36
+ "-e", "--stop-on-errors",
37
+ "Stop when invalid nesting is encountered in the input"
38
+ ) do |num|
19
39
  options[:stop_on_errors] = num
20
40
  end
21
- opts.on("-h", "--help", "Display this help message and exit") do
41
+ opts.on(
42
+ "-h", "--help",
43
+ "Display this help message and exit"
44
+ ) do
22
45
  puts opts
23
46
  exit
24
47
  end
@@ -2,7 +2,7 @@ module HtmlBeautifier #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmlbeautifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Battley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake