ruql 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ruql +5 -4
  3. data/lib/ruql/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 044765c22d47d756e025febb9a46d69b6adcf470ec6928fc9b6bdfd8a41e4545
4
- data.tar.gz: e21c05f59ac94b7b36e57e4b1e9abfefe1daa262ea1ab0f9f02d47d3a3f9dd7c
3
+ metadata.gz: 451199b8a4caf4d885ccbc51d35ef9ecbe0885fac1d34f216e219e4720e6852e
4
+ data.tar.gz: 0bedf1892a8d433c9fbcd8a04f30d6593e59ffe3742c1f0ddd1e00a29a94920e
5
5
  SHA512:
6
- metadata.gz: 5bb2f04a48da6b593d1698e809ceb5c7ec05aadcf6120b8c4f28a596265cff345fc89238cd5626b699ac49105a1ad7d6f90e9fad3c6497ca4eef2493eea52b5b
7
- data.tar.gz: 350b0853fb6acac7c2818539afc93ba18b3405380f9a113921f1dc36e87736148e0819edbf91db63b7e2d9ab6d001a033617fc87fc6e06c8420e89ab645267d4
6
+ metadata.gz: 474942b1d1adba971963b80898102132d0f762f2ea2bc1c490df8fb001cd1e710952749b61e6257f281d2528ce4ae10b3f28ef8e50ebbee731f5cd272ed4a05e
7
+ data.tar.gz: 6ebabeb3a80dfdf3486e6fdf71ac9fa11bdc97f8a593001785fa98b09795c1153019f0abf750516036d67c93c10241425976f5ccfbeb36e5d825db408fb8c9fa
data/bin/ruql CHANGED
@@ -45,13 +45,14 @@ module Ruql
45
45
  load_renderer
46
46
 
47
47
  options = [
48
+ ['-h', '--help', GetoptLong::NO_ARGUMENT],
48
49
  ['-S', '--solutions', GetoptLong::NO_ARGUMENT],
49
50
  ['-V', '--verbose', GetoptLong::NO_ARGUMENT]
50
51
  ]
51
52
  opts = GetoptLong.new(*(options + @additional_options))
52
53
 
53
54
  opts.each do |opt,arg|
54
- usage(help) if (opt == '--help' || opt == '-H')
55
+ usage if (opt == '--help' || opt == '-H')
55
56
  # anything else gets passed to renderer
56
57
  @options[opt] = arg
57
58
  end
@@ -65,7 +66,7 @@ module Ruql
65
66
  Quiz.quizzes.each { |quiz| puts quiz.render_with(@renderer, @options) }
66
67
  end
67
68
 
68
- def usage(help='')
69
+ def usage
69
70
  name = File.basename $0
70
71
  STDERR.puts <<eos
71
72
  Usage: #{name} <formatter> [options] filename.rb
@@ -74,14 +75,14 @@ Usage: #{name} [options] filename.rb
74
75
  named ruql-*, for example, formatter 'html' is provided by the gem ruql-html, which must
75
76
  be installed. See #{Gem.loaded_specs['ruql'].homepage} for available formatters or to add your own.
76
77
 
77
- The special renderer 'stats' will just show stats for the input file without generating output.
78
+ The special formatter 'stats' will just show stats for the input file without generating output.
78
79
  Global options:
79
80
  -S, --solutions
80
81
  Generate a version of the output with solutions included (not supported by all formatters)
81
82
  -V, --verbose
82
83
  Show verbose output for debugging
83
84
 
84
- #{help}
85
+ #{@help}
85
86
 
86
87
  eos
87
88
  exit false
@@ -1,3 +1,3 @@
1
1
  module Ruql
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Armando Fox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler