lib/gemsmith/cli_options.rb in gemsmith-5.3.0 vs lib/gemsmith/cli_options.rb in gemsmith-5.4.0
- old
+ new
@@ -1,6 +1,7 @@
module Gemsmith
+ # Provides Command Line Interface (CLI) settings initialization with safe defaults.
module CLIOptions
module_function
# Initializes template options with default and/or command line overrides.
# ==== Parameters
@@ -34,10 +35,11 @@
rails: default_boolean(:rails),
security: default_boolean(:security, true),
pry: default_boolean(:pry, true),
guard: default_boolean(:guard, true),
rspec: default_boolean(:rspec, true),
+ rubocop: default_boolean(:rubocop, true),
code_climate: default_boolean(:code_climate, true),
gemnasium: default_boolean(:gemnasium, true),
travis: default_boolean(:travis, true)
}
end
@@ -57,15 +59,15 @@
def gem_public_key
@settings.fetch :gem_public_key, "~/.ssh/gem-public.pem"
end
def author_name
- @settings[:author_name] || Gemsmith::Kit.git_config_value("user.name") || "TODO: Add full name here."
+ @settings[:author_name] || Gemsmith::Kit.git_config_value("user.name") || "TODO: Add full name."
end
def author_email
- @settings[:author_email] || Gemsmith::Kit.git_config_value("user.email") || "TODO: Add email address here."
+ @settings[:author_email] || Gemsmith::Kit.git_config_value("user.email") || "TODO: Add email address."
end
def author_url
@settings[:author_url] || "https://www.unknown.com"
end
@@ -85,17 +87,17 @@
def year
@settings[:year] || Time.now.year
end
def ruby_version
- @settings[:ruby_version] || "2.2.2"
+ @settings[:ruby_version] || "2.2.3"
end
def rails_version
@settings[:rails_version] || "4.2"
end
def default_boolean key, value = false
- @settings.has_key?(key) ? @settings[key] : value
+ @settings.key?(key) ? @settings[key] : value
end
end
end