Class: RunLoop::XCTools Deprecated
- Inherits:
-
Object
- Object
- RunLoop::XCTools
- Defined in:
- lib/run_loop/xctools.rb
Overview
Since 1.5.0
Refactor instruments related code to instruments class.
All command line tools are run in the context of xcrun.
The behaviors of this class are in the process of being refactored to other classes. Please do not implement any new behaviors in this class.
Callers should be updated ASAP.
A class for interacting with the Xcode tools.
Throughout this class’s documentation, there are references to the _current version of Xcode_. The current Xcode version is the one returned by ‘xcrun xcodebuild`. The current Xcode version can be set using xcode-select or overridden using the DEVELOPER_DIR.
Instance Method Summary collapse
-
#instruments(cmd = nil) ⇒ String, ...
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Instruments.
-
#instruments_supports_hyphen_s?(version = instruments(:version)) ⇒ Boolean
deprecated
Deprecated.
Since 1.5.0 - no replacement.
-
#v50 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v51 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v60 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v61 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v62 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v63 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v64 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#v70 ⇒ RunLoop::Version
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_developer_dir ⇒ String
(also: #developer_dir)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_is_beta? ⇒ Boolean
(also: #beta?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version ⇒ RunLoop::Version
(also: #version)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_51? ⇒ Boolean
(also: #version_gte_51?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_61? ⇒ Boolean
(also: #version_gte_61?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_62? ⇒ Boolean
(also: #version_gte_62?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_63? ⇒ Boolean
(also: #version_gte_63?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_64? ⇒ Boolean
(also: #version_gte_64?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_6? ⇒ Boolean
(also: #version_gte_6?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
-
#xcode_version_gte_7? ⇒ Boolean
(also: #version_gte_7?)
deprecated
Deprecated.
Since 1.5.0 - replaced with RunLoop::Xcode
Instance Method Details
#instruments(cmd = nil) ⇒ String, ...
Since 1.5.0 - replaced with RunLoop::Instruments.
Method for interacting with instruments.
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/run_loop/xctools.rb', line 245 def instruments(cmd=nil) RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Instruments') instruments = 'xcrun instruments' return instruments if cmd == nil case cmd when :version instruments_instance.version when :sims instruments_instance.simulators when :templates instruments_instance.templates when :devices instruments_instance.physical_devices else candidates = [:version, :sims, :devices] raise(ArgumentError, "expected '#{cmd}' to be one of '#{candidates}'") end end |
#instruments_supports_hyphen_s?(version = instruments(:version)) ⇒ Boolean
Since 1.5.0 - no replacement.
All supported Xcode versions accept -s flag.
Does the instruments version accept the -s flag?
280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/run_loop/xctools.rb', line 280 def instruments_supports_hyphen_s?(version=instruments(:version)) RunLoop.deprecated('1.5.0', 'Not replaced.') @instruments_supports_hyphen_s ||= lambda { if version.is_a? String _version = RunLoop::Version.new(version) else _version = version end _version >= RunLoop::Version.new('5.1') }.call end |
#v50 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 5.0`; used to check for the availability of features and paths to various items on the filesystem.
100 101 102 103 |
# File 'lib/run_loop/xctools.rb', line 100 def v50 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v50 end |
#v51 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 5.1`; used to check for the availability of features and paths to various items on the filesystem.
90 91 92 93 |
# File 'lib/run_loop/xctools.rb', line 90 def v51 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v51 end |
#v60 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 6.0`; used to check for the availability of features and paths to various items on the filesystem.
80 81 82 83 |
# File 'lib/run_loop/xctools.rb', line 80 def v60 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v60 end |
#v61 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 6.1`; used to check for the availability of features and paths to various items on the filesystem.
70 71 72 73 |
# File 'lib/run_loop/xctools.rb', line 70 def v61 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v61 end |
#v62 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 6.2`; used to check for the availability of features and paths to various items on the filesystem.
60 61 62 63 |
# File 'lib/run_loop/xctools.rb', line 60 def v62 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v62 end |
#v63 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 6.3`; used to check for the availability of features and paths to various items on the filesystem.
50 51 52 53 |
# File 'lib/run_loop/xctools.rb', line 50 def v63 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v63 end |
#v64 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 6.4`; used to check for the availability of features and paths to various items on the filesystem.
40 41 42 43 |
# File 'lib/run_loop/xctools.rb', line 40 def v64 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v64 end |
#v70 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 7.0`; used to check for the availability of features and paths to various items on the filesystem.
30 31 32 33 |
# File 'lib/run_loop/xctools.rb', line 30 def v70 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v70 end |
#xcode_developer_dir ⇒ String Also known as: developer_dir
Since 1.5.0 - replaced with RunLoop::Xcode
Returns the path to the current developer directory.
From the man pages:
“‘ $ man xcode-select DEVELOPER_DIR Overrides the active developer directory. When DEVELOPER_DIR is set, its value will be used instead of the system-wide active developer directory. “`
192 193 194 195 |
# File 'lib/run_loop/xctools.rb', line 192 def xcode_developer_dir RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.developer_dir end |
#xcode_is_beta? ⇒ Boolean Also known as: beta?
Since 1.5.0 - replaced with RunLoop::Xcode
Relies on Xcode beta versions having and app bundle named Xcode-Beta.app
Is this a beta version of Xcode?
202 203 204 205 |
# File 'lib/run_loop/xctools.rb', line 202 def xcode_is_beta? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.beta? end |
#xcode_version ⇒ RunLoop::Version Also known as: version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns the current version of Xcode.
173 174 175 176 |
# File 'lib/run_loop/xctools.rb', line 173 def xcode_version RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version end |
#xcode_version_gte_51? ⇒ Boolean Also known as: version_gte_51?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 5.1 or above?
163 164 165 166 |
# File 'lib/run_loop/xctools.rb', line 163 def xcode_version_gte_51? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_51? end |
#xcode_version_gte_61? ⇒ Boolean Also known as: version_gte_61?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 6.1 or above?
136 137 138 139 |
# File 'lib/run_loop/xctools.rb', line 136 def xcode_version_gte_61? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_61? end |
#xcode_version_gte_62? ⇒ Boolean Also known as: version_gte_62?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 6.2 or above?
127 128 129 130 |
# File 'lib/run_loop/xctools.rb', line 127 def xcode_version_gte_62? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_62? end |
#xcode_version_gte_63? ⇒ Boolean Also known as: version_gte_63?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 6.3 or above?
118 119 120 121 |
# File 'lib/run_loop/xctools.rb', line 118 def xcode_version_gte_63? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_63? end |
#xcode_version_gte_64? ⇒ Boolean Also known as: version_gte_64?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 6.4 or above?
109 110 111 112 |
# File 'lib/run_loop/xctools.rb', line 109 def xcode_version_gte_64? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_64? end |
#xcode_version_gte_6? ⇒ Boolean Also known as: version_gte_6?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 6 or above?
145 146 147 148 |
# File 'lib/run_loop/xctools.rb', line 145 def xcode_version_gte_6? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_6? end |
#xcode_version_gte_7? ⇒ Boolean Also known as: version_gte_7?
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 7 or above?
154 155 156 157 |
# File 'lib/run_loop/xctools.rb', line 154 def xcode_version_gte_7? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_7? end |