Skip to content

Commit fa7b976

Browse files
committed
Remove display manager completely
1 parent acd4eda commit fa7b976

8 files changed

+6
-290
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
### Added
99

1010
### Changed
11-
* Refactored documentation
11+
- Refactored documentation
12+
1213
### Deprecated
1314

1415
### Removed
16+
- Display Manager became no longer necessary with Arduino 1.8.X
1517

1618
### Fixed
1719

lib/arduino_ci/arduino_cmd.rb

+2-14
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,6 @@ def set_pref(key, value)
113113
success
114114
end
115115

116-
# run the arduino command
117-
# @return [bool] whether the command succeeded
118-
def _run_and_output(*args, **kwargs)
119-
raise "Ian needs to implement this in a subclass #{args} #{kwargs}"
120-
end
121-
122-
# run the arduino command
123-
# @return [Hash] keys for :success, :out, and :err
124-
def _run_and_capture(*args, **kwargs)
125-
raise "Ian needs to implement this in a subclass #{args} #{kwargs}"
126-
end
127-
128116
def _wrap_run(work_fn, *args, **kwargs)
129117
# do some work to extract & merge environment variables if they exist
130118
has_env = !args.empty? && args[0].class == Hash
@@ -140,13 +128,13 @@ def _wrap_run(work_fn, *args, **kwargs)
140128

141129
# build and run the arduino command
142130
def run_and_output(*args, **kwargs)
143-
_wrap_run((proc { |*a, **k| _run_and_output(*a, **k) }), *args, **kwargs)
131+
_wrap_run((proc { |*a, **k| Host.run_and_output(*a, **k) }), *args, **kwargs)
144132
end
145133

146134
# run a command and capture its output
147135
# @return [Hash] {:out => String, :err => String, :success => bool}
148136
def run_and_capture(*args, **kwargs)
149-
ret = _wrap_run((proc { |*a, **k| _run_and_capture(*a, **k) }), *args, **kwargs)
137+
ret = _wrap_run((proc { |*a, **k| Host.run_and_capture(*a, **k) }), *args, **kwargs)
150138
@last_err = ret[:err]
151139
@last_out = ret[:out]
152140
ret

lib/arduino_ci/arduino_cmd_linux.rb

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'arduino_ci/arduino_cmd'
2-
require 'arduino_ci/display_manager'
2+
require 'timeout'
33

44
module ArduinoCI
55

@@ -19,7 +19,6 @@ class ArduinoCmdLinux < ArduinoCmd
1919
def initialize
2020
super
2121
@prefs_response_time = nil
22-
@display_mgr = DisplayManager::instance
2322
end
2423

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

41-
# run the arduino command
42-
# @return [bool] whether the command succeeded
43-
def _run_and_output(*args, **kwargs)
44-
@display_mgr.run_and_output(*args, **kwargs)
45-
end
46-
47-
# run the arduino command
48-
# @return [Hash] keys for :success, :out, and :err
49-
def _run_and_capture(*args, **kwargs)
50-
@display_mgr.run_and_capture(*args, **kwargs)
51-
end
52-
5340
def run_with_gui_guess(message, *args, **kwargs)
5441
# On Travis CI, we get an error message in the GUI instead of on STDERR
5542
# so, assume that if we don't get a rapid reply that things are not installed

lib/arduino_ci/arduino_cmd_linux_builder.rb

-12
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ def _lib_dir
2020
File.join(get_pref("sketchbook.path"), "libraries")
2121
end
2222

23-
# run the arduino command
24-
# @return [bool] whether the command succeeded
25-
def _run_and_output(*args, **kwargs)
26-
Host.run_and_output(*args, **kwargs)
27-
end
28-
29-
# run the arduino command
30-
# @return [Hash] keys for :success, :out, and :err
31-
def _run_and_capture(*args, **kwargs)
32-
Host.run_and_capture(*args, **kwargs)
33-
end
34-
3523
end
3624

3725
end

lib/arduino_ci/arduino_cmd_osx.rb

-12
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ class ArduinoCmdOSX < ArduinoCmd
1313
flag :install_library, "--install-library"
1414
flag :verify, "--verify"
1515

16-
# run the arduino command
17-
# @return [bool] whether the command succeeded
18-
def _run_and_output(*args, **kwargs)
19-
Host.run_and_output(*args, **kwargs)
20-
end
21-
22-
# run the arduino command
23-
# @return [Hash] keys for :success, :out, and :err
24-
def _run_and_capture(*args, **kwargs)
25-
Host.run_and_capture(*args, **kwargs)
26-
end
27-
2816
def _lib_dir
2917
File.join(ENV['HOME'], "Documents", "Arduino", "libraries")
3018
end

lib/arduino_ci/arduino_cmd_windows.rb

-12
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ class ArduinoCmdWindows < ArduinoCmd
1313
flag :install_library, "--install-library"
1414
flag :verify, "--verify"
1515

16-
# run the arduino command
17-
# @return [bool] whether the command succeeded
18-
def _run_and_output(*args, **kwargs)
19-
Host.run_and_output(*args, **kwargs)
20-
end
21-
22-
# run the arduino command
23-
# @return [Hash] keys for :success, :out, and :err
24-
def _run_and_capture(*args, **kwargs)
25-
Host.run_and_capture(*args, **kwargs)
26-
end
27-
2816
def _lib_dir
2917
File.join(ENV['userprofile'], "Documents", "Arduino", "libraries")
3018
end

lib/arduino_ci/display_manager.rb

-188
This file was deleted.

spec/display_manager_spec.rb

-37
This file was deleted.

0 commit comments

Comments
 (0)