Skip to content

Remove now-deprecated display manager #55

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

Merged
merged 2 commits into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added

### Changed
* Refactored documentation
- Refactored documentation

### Deprecated

### Removed
- Display Manager became no longer necessary with Arduino 1.8.X

### Fixed

Expand Down
16 changes: 2 additions & 14 deletions lib/arduino_ci/arduino_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,6 @@ def set_pref(key, value)
success
end

# run the arduino command
# @return [bool] whether the command succeeded
def _run_and_output(*args, **kwargs)
raise "Ian needs to implement this in a subclass #{args} #{kwargs}"
end

# run the arduino command
# @return [Hash] keys for :success, :out, and :err
def _run_and_capture(*args, **kwargs)
raise "Ian needs to implement this in a subclass #{args} #{kwargs}"
end

def _wrap_run(work_fn, *args, **kwargs)
# do some work to extract & merge environment variables if they exist
has_env = !args.empty? && args[0].class == Hash
Expand All @@ -140,13 +128,13 @@ def _wrap_run(work_fn, *args, **kwargs)

# build and run the arduino command
def run_and_output(*args, **kwargs)
_wrap_run((proc { |*a, **k| _run_and_output(*a, **k) }), *args, **kwargs)
_wrap_run((proc { |*a, **k| Host.run_and_output(*a, **k) }), *args, **kwargs)
end

# run a command and capture its output
# @return [Hash] {:out => String, :err => String, :success => bool}
def run_and_capture(*args, **kwargs)
ret = _wrap_run((proc { |*a, **k| _run_and_capture(*a, **k) }), *args, **kwargs)
ret = _wrap_run((proc { |*a, **k| Host.run_and_capture(*a, **k) }), *args, **kwargs)
@last_err = ret[:err]
@last_out = ret[:out]
ret
Expand Down
15 changes: 1 addition & 14 deletions lib/arduino_ci/arduino_cmd_linux.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'arduino_ci/arduino_cmd'
require 'arduino_ci/display_manager'
require 'timeout'

module ArduinoCI

Expand All @@ -19,7 +19,6 @@ class ArduinoCmdLinux < ArduinoCmd
def initialize
super
@prefs_response_time = nil
@display_mgr = DisplayManager::instance
end

# fetch preferences in their raw form
Expand All @@ -38,18 +37,6 @@ def _lib_dir
File.join(get_pref("sketchbook.path"), "libraries")
end

# run the arduino command
# @return [bool] whether the command succeeded
def _run_and_output(*args, **kwargs)
@display_mgr.run_and_output(*args, **kwargs)
end

# run the arduino command
# @return [Hash] keys for :success, :out, and :err
def _run_and_capture(*args, **kwargs)
@display_mgr.run_and_capture(*args, **kwargs)
end

def run_with_gui_guess(message, *args, **kwargs)
# On Travis CI, we get an error message in the GUI instead of on STDERR
# so, assume that if we don't get a rapid reply that things are not installed
Expand Down
12 changes: 0 additions & 12 deletions lib/arduino_ci/arduino_cmd_linux_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ def _lib_dir
File.join(get_pref("sketchbook.path"), "libraries")
end

# run the arduino command
# @return [bool] whether the command succeeded
def _run_and_output(*args, **kwargs)
Host.run_and_output(*args, **kwargs)
end

# run the arduino command
# @return [Hash] keys for :success, :out, and :err
def _run_and_capture(*args, **kwargs)
Host.run_and_capture(*args, **kwargs)
end

end

end
12 changes: 0 additions & 12 deletions lib/arduino_ci/arduino_cmd_osx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ class ArduinoCmdOSX < ArduinoCmd
flag :install_library, "--install-library"
flag :verify, "--verify"

# run the arduino command
# @return [bool] whether the command succeeded
def _run_and_output(*args, **kwargs)
Host.run_and_output(*args, **kwargs)
end

# run the arduino command
# @return [Hash] keys for :success, :out, and :err
def _run_and_capture(*args, **kwargs)
Host.run_and_capture(*args, **kwargs)
end

def _lib_dir
File.join(ENV['HOME'], "Documents", "Arduino", "libraries")
end
Expand Down
12 changes: 0 additions & 12 deletions lib/arduino_ci/arduino_cmd_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ class ArduinoCmdWindows < ArduinoCmd
flag :install_library, "--install-library"
flag :verify, "--verify"

# run the arduino command
# @return [bool] whether the command succeeded
def _run_and_output(*args, **kwargs)
Host.run_and_output(*args, **kwargs)
end

# run the arduino command
# @return [Hash] keys for :success, :out, and :err
def _run_and_capture(*args, **kwargs)
Host.run_and_capture(*args, **kwargs)
end

def _lib_dir
File.join(ENV['userprofile'], "Documents", "Arduino", "libraries")
end
Expand Down
192 changes: 0 additions & 192 deletions lib/arduino_ci/display_manager.rb

This file was deleted.

37 changes: 0 additions & 37 deletions spec/display_manager_spec.rb

This file was deleted.