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
-
#v71 ⇒ 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_71? ⇒ Boolean
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.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/run_loop/xctools.rb', line 264 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?
299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/run_loop/xctools.rb', line 299 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.
110 111 112 113 |
# File 'lib/run_loop/xctools.rb', line 110 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.
100 101 102 103 |
# File 'lib/run_loop/xctools.rb', line 100 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.
90 91 92 93 |
# File 'lib/run_loop/xctools.rb', line 90 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.
80 81 82 83 |
# File 'lib/run_loop/xctools.rb', line 80 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.
70 71 72 73 |
# File 'lib/run_loop/xctools.rb', line 70 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.
60 61 62 63 |
# File 'lib/run_loop/xctools.rb', line 60 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.
50 51 52 53 |
# File 'lib/run_loop/xctools.rb', line 50 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.
40 41 42 43 |
# File 'lib/run_loop/xctools.rb', line 40 def v70 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v70 end |
#v71 ⇒ RunLoop::Version
Since 1.5.0 - replaced with RunLoop::Xcode
Returns a version instance for ‘Xcode 7.1`; 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 v71 RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.v71 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. “`
211 212 213 214 |
# File 'lib/run_loop/xctools.rb', line 211 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?
221 222 223 224 |
# File 'lib/run_loop/xctools.rb', line 221 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.
192 193 194 195 |
# File 'lib/run_loop/xctools.rb', line 192 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?
182 183 184 185 |
# File 'lib/run_loop/xctools.rb', line 182 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?
146 147 148 149 |
# File 'lib/run_loop/xctools.rb', line 146 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?
137 138 139 140 |
# File 'lib/run_loop/xctools.rb', line 137 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?
128 129 130 131 |
# File 'lib/run_loop/xctools.rb', line 128 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?
119 120 121 122 |
# File 'lib/run_loop/xctools.rb', line 119 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?
155 156 157 158 |
# File 'lib/run_loop/xctools.rb', line 155 def xcode_version_gte_6? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_6? end |
#xcode_version_gte_71? ⇒ Boolean
Since 1.5.0 - replaced with RunLoop::Xcode
Are we running Xcode 7.1 or above?
164 165 166 167 |
# File 'lib/run_loop/xctools.rb', line 164 def xcode_version_gte_71? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_71? 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?
173 174 175 176 |
# File 'lib/run_loop/xctools.rb', line 173 def xcode_version_gte_7? RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') xcode.version_gte_7? end |