lib/skylight/cli.rb in skylight-4.3.2 vs lib/skylight/cli.rb in skylight-5.0.0.beta
- old
+ new
@@ -58,22 +58,23 @@
OUT
rescue Api::CreateFailed => e
say "Could not create the application. Please run `bundle exec skylight doctor` for diagnostics.", :red
say e.to_s, :yellow
- rescue Interrupt
+ rescue Interrupt # rubocop:disable Lint/SuppressedException
end
desc "disable_dev_warning", "Disables warning about running Skylight in development mode for all local apps"
def disable_dev_warning
user_config.disable_dev_warning = true
user_config.save
say "Development mode warning disabled", :green
end
- desc "disable_env_warning", "Disables warning about running Skylight in environments not defined in config.skylight.environments"
+ desc "disable_env_warning", "Disables warning about running Skylight in environments not defined in " \
+ "config.skylight.environments"
def disable_env_warning
user_config.disable_env_warning = true
user_config.save
say "Environment warning disabled", :green
@@ -91,10 +92,10 @@
# This is especially important since users may have things like WebMock that
# will prevent us from communicating with the Skylight API
begin
namefile = Tempfile.new("skylight-app-name")
# Windows appears to need double quotes for `rails runner`
- `rails runner "File.open('#{namefile.path}', 'w') {|f| f.write(Rails.application.class.name) rescue '' }"`
+ `rails runner "File.open('#{namefile.path}', 'w') {|f| f.write(Rails.application.class.name) rescue '' }"` # rubocop:disable Layout/LineLength
name = namefile.read.split("::").first.underscore.titleize
name = nil if name.empty?
rescue => e
if ENV["DEBUG"]
puts e.class.name