bin/eval in dorian-eval-1.0.0 vs bin/eval in dorian-eval-1.1.0
- old
+ new
@@ -2,18 +2,41 @@
# frozen_string_literal: true
require "dorian/arguments"
require_relative "../lib/dorian/eval"
-parsed = Dorian::Arguments.parse(
- it: { type: :string, alias: :i },
- debug: { alias: :d },
- stdout: { aliases: [:out, :o], default: true },
- stderr: { aliases: [:err, :e], default: true },
- colorize: { aliases: [:color, :c], default: true },
- version: { alias: :v }, help: { alias: :h }
-)
+parsed =
+ Dorian::Arguments.parse(
+ it: {
+ type: :string,
+ alias: :i
+ },
+ debug: {
+ alias: :d
+ },
+ stdout: {
+ aliases: %i[out o],
+ default: true
+ },
+ stderr: {
+ aliases: %i[err e],
+ default: true
+ },
+ colorize: {
+ aliases: %i[color c],
+ default: true
+ },
+ rails: {
+ alias: :r
+ },
+ version: {
+ alias: :v
+ },
+ help: {
+ alias: :h
+ }
+ )
abort parsed.help if parsed.options.help
if parsed.options.version
abort File.read(File.expand_path("../../VERSION", __FILE__))
@@ -23,7 +46,8 @@
ruby: parsed.arguments.join(" "),
it: parsed.options.it,
debug: parsed.options.debug,
stdout: parsed.options.stdout,
stderr: parsed.options.stderr,
- colorize: parsed.options.colorize
+ colorize: parsed.options.colorize,
+ rails: parsed.options.rails
)