Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress Ruby warnings #47

Merged
merged 8 commits into from
May 19, 2016
Merged

Commits on May 11, 2016

  1. Initialize uninitialized instance variable

    This change suppresses following warnings (about 45 lines or more):
    
    lib/serverengine/daemon_logger.rb:61: warning: instance variable @file_dev not initialized
    lib/serverengine/daemon_logger.rb:63: warning: instance variable @file_dev not initialized
    (snip)
    lib/serverengine/daemon_logger.rb:56: warning: instance variable @file_dev not initialized
    lib/serverengine/daemon_logger.rb:121: warning: instance variable @file_dev not initialized
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    9c3fc87 View commit details
    Browse the repository at this point in the history
  2. Initialize uninitialized instance variable

    This change can suppresses following warnings(26 lines):
    
    lib/serverengine/config_loader.rb:43: warning: instance variable @logger not initialized
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    e674aca View commit details
    Browse the repository at this point in the history
  3. Add "_" prefix to block variable

    This change suppresses following warning:
    
    lib/serverengine/daemon.rb:34: warning: shadowing outer local variable - load_config_proc
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    970c404 View commit details
    Browse the repository at this point in the history
  4. Remove unused local variable

    This change suppresses following warning:
    
    lib/serverengine/supervisor.rb:152: warning: assigned but unused variable - stat
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    c75811f View commit details
    Browse the repository at this point in the history
  5. Move TestServer and TestWorker under global namespace

    This change can suppress following warnings(84 lines):
    
    spec/server_worker_context.rb:48: warning: method redefined; discarding old initialize
    spec/server_worker_context.rb:48: warning: previous definition of initialize was here
    spec/server_worker_context.rb:52: warning: method redefined; discarding old before_run
    spec/server_worker_context.rb:52: warning: previous definition of before_run was here
    spec/server_worker_context.rb:56: warning: method redefined; discarding old after_run
    spec/server_worker_context.rb:56: warning: previous definition of after_run was here
    spec/server_worker_context.rb:60: warning: method redefined; discarding old after_start
    spec/server_worker_context.rb:60: warning: previous definition of after_start was here
    spec/server_worker_context.rb:64: warning: method redefined; discarding old stop
    spec/server_worker_context.rb:64: warning: previous definition of stop was here
    spec/server_worker_context.rb:74: warning: method redefined; discarding old restart
    spec/server_worker_context.rb:74: warning: previous definition of restart was here
    spec/server_worker_context.rb:84: warning: method redefined; discarding old reload
    spec/server_worker_context.rb:84: warning: previous definition of reload was here
    spec/server_worker_context.rb:89: warning: method redefined; discarding old detach
    spec/server_worker_context.rb:89: warning: previous definition of detach was here
    spec/server_worker_context.rb:96: warning: method redefined; discarding old initialize
    spec/server_worker_context.rb:96: warning: previous definition of initialize was here
    spec/server_worker_context.rb:101: warning: method redefined; discarding old before_fork
    spec/server_worker_context.rb:101: warning: previous definition of before_fork was here
    spec/server_worker_context.rb:105: warning: method redefined; discarding old run
    spec/server_worker_context.rb:105: warning: previous definition of run was here
    spec/server_worker_context.rb:115: warning: method redefined; discarding old stop
    spec/server_worker_context.rb:115: warning: previous definition of stop was here
    spec/server_worker_context.rb:120: warning: method redefined; discarding old reload
    spec/server_worker_context.rb:120: warning: previous definition of reload was here
    spec/server_worker_context.rb:124: warning: method redefined; discarding old after_start
    spec/server_worker_context.rb:124: warning: previous definition of after_start was here
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    a1426d7 View commit details
    Browse the repository at this point in the history
  6. Remove unused local variables

    This change suppresses following warnings:
    
    spec/signal_thread_spec.rb:42: warning: assigned but unused variable - t
    spec/signal_thread_spec.rb:58: warning: assigned but unused variable - n
    spec/signal_thread_spec.rb:83: warning: shadowing outer local variable - t
    spec/signal_thread_spec.rb:73: warning: assigned but unused variable - t
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    801de94 View commit details
    Browse the repository at this point in the history
  7. Add "_" prefix to unused local variables

    This change suppresses following warnings:
    
    spec/socket_manager_spec.rb:40: warning: assigned but unused variable - from
    spec/socket_manager_spec.rb:92: warning: assigned but unused variable - from
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    3e856e5 View commit details
    Browse the repository at this point in the history
  8. Use File.exist? instead of File.exists?

    This change suppresses following warnings:
    
    spec/socket_manager_spec.rb:10: warning: File.exists? is a deprecated name, use File.exist? instead
    spec/socket_manager_spec.rb:10: warning: File.exists? is a deprecated name, use File.exist? instead
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    17275d0 View commit details
    Browse the repository at this point in the history