arduino_ci 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/cpp/arduino/Arduino.h +0 -77
- data/cpp/arduino/ArduinoDefines.h +2 -0
- data/cpp/arduino/PinHistory.h +1 -1
- data/cpp/arduino/Print.h +23 -22
- data/cpp/arduino/SoftwareSerial.h +5 -2
- data/cpp/arduino/WString.h +117 -121
- data/cpp/arduino/WString.h.orig +172 -0
- data/cpp/arduino/avr/pgmspace.h +45 -45
- data/cpp/arduino/avr/pgmspace.h.orig +95 -0
- data/cpp/arduino/ci/Queue.h +2 -2
- data/cpp/unittest/ArduinoUnitTests.h +2 -2
- data/cpp/unittest/Compare.h +557 -78
- data/exe/arduino_ci_remote.rb +27 -7
- data/lib/arduino_ci/arduino_cmd.rb +19 -18
- data/lib/arduino_ci/arduino_cmd_linux.rb +9 -2
- data/lib/arduino_ci/arduino_cmd_linux_builder.rb +9 -4
- data/lib/arduino_ci/arduino_cmd_osx.rb +9 -2
- data/lib/arduino_ci/ci_config.rb +2 -0
- data/lib/arduino_ci/cpp_library.rb +12 -15
- data/lib/arduino_ci/cpp_library.rb.orig +215 -0
- data/lib/arduino_ci/display_manager.rb +12 -8
- data/lib/arduino_ci/host.rb +7 -2
- data/lib/arduino_ci/version.rb +1 -1
- metadata +5 -2
@@ -150,10 +150,8 @@ module ArduinoCI
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
-
|
154
|
-
|
155
|
-
def run(*args, **kwargs)
|
156
|
-
ret = false
|
153
|
+
def wrap_run(work_fn, *args, **kwargs)
|
154
|
+
ret = nil
|
157
155
|
# do some work to extract & merge environment variables if they exist
|
158
156
|
has_env = !args.empty? && args[0].class == Hash
|
159
157
|
with_display do |env_vars|
|
@@ -161,15 +159,21 @@ module ArduinoCI
|
|
161
159
|
env_vars.merge!(args[0]) if has_env
|
162
160
|
actual_args = has_env ? args[1..-1] : args # need to shift over if we extracted args
|
163
161
|
full_cmd = env_vars.empty? ? actual_args : [env_vars] + actual_args
|
164
|
-
ret =
|
162
|
+
ret = work_fn.call(*full_cmd, **kwargs)
|
165
163
|
end
|
166
164
|
ret
|
167
165
|
end
|
168
166
|
|
169
|
-
# run a command in a display
|
167
|
+
# run a command in a display, outputting to stdout
|
168
|
+
# @return [bool]
|
169
|
+
def run_and_output(*args, **kwargs)
|
170
|
+
wrap_run((proc { |*a, **k| Host.run_and_output(*a, **k) }), *args, **kwargs)
|
171
|
+
end
|
172
|
+
|
173
|
+
# run a command in a display, capturing output
|
170
174
|
# @return [bool]
|
171
|
-
def
|
172
|
-
|
175
|
+
def run_and_capture(*args, **kwargs)
|
176
|
+
wrap_run((proc { |*a, **k| Host.run_and_capture(*a, **k) }), *args, **kwargs)
|
173
177
|
end
|
174
178
|
|
175
179
|
# @return [Hash] the environment variables for the display
|
data/lib/arduino_ci/host.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'os'
|
2
|
+
require 'open3'
|
2
3
|
|
3
4
|
module ArduinoCI
|
4
5
|
|
@@ -20,8 +21,12 @@ module ArduinoCI
|
|
20
21
|
nil
|
21
22
|
end
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
def self.run_and_capture(*args, **kwargs)
|
25
|
+
stdout, stderr, status = Open3.capture3(*args, **kwargs)
|
26
|
+
{ out: stdout, err: stderr, success: status.exitstatus.zero? }
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.run_and_output(*args, **kwargs)
|
25
30
|
system(*args, **kwargs)
|
26
31
|
end
|
27
32
|
|
data/lib/arduino_ci/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arduino_ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Katz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: os
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- cpp/arduino/Stream.h
|
104
104
|
- cpp/arduino/WCharacter.h
|
105
105
|
- cpp/arduino/WString.h
|
106
|
+
- cpp/arduino/WString.h.orig
|
106
107
|
- cpp/arduino/avr/README.md
|
107
108
|
- cpp/arduino/avr/common.h
|
108
109
|
- cpp/arduino/avr/fuse.h
|
@@ -375,6 +376,7 @@ files:
|
|
375
376
|
- cpp/arduino/avr/iox8e5.h
|
376
377
|
- cpp/arduino/avr/lock.h
|
377
378
|
- cpp/arduino/avr/pgmspace.h
|
379
|
+
- cpp/arduino/avr/pgmspace.h.orig
|
378
380
|
- cpp/arduino/avr/portpins.h
|
379
381
|
- cpp/arduino/avr/version.h
|
380
382
|
- cpp/arduino/avr/xmega.h
|
@@ -397,6 +399,7 @@ files:
|
|
397
399
|
- lib/arduino_ci/arduino_installation.rb
|
398
400
|
- lib/arduino_ci/ci_config.rb
|
399
401
|
- lib/arduino_ci/cpp_library.rb
|
402
|
+
- lib/arduino_ci/cpp_library.rb.orig
|
400
403
|
- lib/arduino_ci/display_manager.rb
|
401
404
|
- lib/arduino_ci/host.rb
|
402
405
|
- lib/arduino_ci/version.rb
|