Module: Xcode
- Defined in:
- lib/xcoder.rb,
lib/xcode/group.rb,
lib/xcode/shell.rb,
lib/xcode/scheme.rb,
lib/xcode/target.rb,
lib/xcode/project.rb,
lib/xcode/version.rb,
lib/xcode/keychain.rb,
lib/xcode/registry.rb,
lib/xcode/resource.rb,
lib/xcode/buildfile.rb,
lib/xcode/workspace.rb,
lib/xcode/build_file.rb,
lib/xcode/info_plist.rb,
lib/xcode/testflight.rb,
lib/xcoder/rake_task.rb,
lib/xcode/build_phase.rb,
lib/xcode/test/report.rb,
lib/xcode/configuration.rb,
lib/xcode/shell/command.rb,
lib/xcode/variant_group.rb,
lib/xcode/file_reference.rb,
lib/xcode/project_reference.rb,
lib/xcode/target_dependency.rb,
lib/xcode/configuration_list.rb,
lib/xcode/configuration_owner.rb,
lib/xcode/builder/base_builder.rb,
lib/xcode/container_item_proxy.rb,
lib/xcode/provisioning_profile.rb,
lib/xcode/builder/scheme_builder.rb,
lib/xcode/test/report/test_result.rb,
lib/xcode/test/report/suite_result.rb,
lib/xcode/test/parsers/ocunit_parser.rb,
lib/xcode/configurations/array_property.rb,
lib/xcode/parsers/plutil_project_parser.rb,
lib/xcode/configurations/string_property.rb,
lib/xcode/configurations/boolean_property.rb,
lib/xcode/test/formatters/junit_formatter.rb,
lib/xcode/test/formatters/stdout_formatter.rb,
lib/xcode/configurations/enumeration_property.rb,
lib/xcode/builder/project_target_config_builder.rb,
lib/xcode/configurations/key_value_array_property.rb,
lib/xcode/configurations/space_delimited_string_property.rb,
lib/xcode/configurations/targeted_device_family_property.rb
Defined Under Namespace
Modules: BuildFile, BuildPhase, Builder, Configuration, ConfigurationList, ConfigurationOwner, ContainerItemProxy, FileReference, Group, Keychains, PLUTILProjectParser, ProjectReference, Registry, Shell, Target, TargetDependency, Test, VariantGroup Classes: Buildfile, EnumerationProperty, InfoPlist, Keychain, Project, ProvisioningProfile, RakeTask, Resource, Scheme, Testflight, Workspace
Constant Summary collapse
- VERSION =
"0.1.14"
- @@projects =
nil
- @@workspaces =
nil
- @@sdks =
nil
Class Method Summary collapse
-
.available_sdks ⇒ Array<String>
Available SDKs available on this particular system.
-
.find_projects(dir = '.') ⇒ Array<Project>
The projects found at the specified directory.
-
.is_sdk_available?(sdk) ⇒ TrueClass, FalseClass
True if the sdk is available; false otherwise.
-
.project(name) ⇒ Project
Find the project with the specified name within the current working directory.
-
.projects ⇒ Array<Project>
Find all the projects within the current working directory.
-
.workspace(name) ⇒ Project
Find the workspace with the specified name within the current working directory.
-
.workspaces ⇒ Array<Workspaces>
Find all the workspaces within the current working directory.
Class Method Details
.available_sdks ⇒ Array<String>
Available SDKs available on this particular system.
108 109 110 111 |
# File 'lib/xcoder.rb', line 108 def self.available_sdks parse_sdks if @@sdks.nil? @@sdks end |
.find_projects(dir = '.') ⇒ Array<Project>
Returns the projects found at the specified directory.
90 91 92 |
# File 'lib/xcoder.rb', line 90 def self.find_projects(dir='.') parse_projects(dir) end |
.is_sdk_available?(sdk) ⇒ TrueClass, FalseClass
Returns true if the sdk is available; false otherwise.
98 99 100 101 |
# File 'lib/xcoder.rb', line 98 def self.is_sdk_available?(sdk) parse_sdks if @@sdks.nil? @@sdks.values.include? sdk end |
.project(name) ⇒ Project
this method will raise an error when it is unable to find the project specified.
Find the project with the specified name within the current working directory.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/xcoder.rb', line 50 def self.project(name) name = name.to_s return Xcode::Project.new(name) if name=~/\.xcodeproj/ self.projects.each do |p| return p if p.name == name end raise "Unable to find a project named #{name}. However, I did find these projects: #{self.projects.map {|p| p.name}.join(', ') }" end |
.projects ⇒ Array<Project>
Find all the projects within the current working directory.
23 24 25 26 |
# File 'lib/xcoder.rb', line 23 def self.projects @@projects = parse_projects if @@projects.nil? @@projects end |
.workspace(name) ⇒ Project
this method will raise an error when it is unable to find the workspace specified.
Find the workspace with the specified name within the current working directory.
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/xcoder.rb', line 73 def self.workspace(name) name = name.to_s return Xcode::Workspace.new(name) if name=~/\.xcworkspace/ self.workspaces.each do |p| return p if p.name == name end raise "Unable to find a workspace named #{name}. However, I did find these workspaces: #{self.workspaces.map {|p| p.name}.join(', ') }" end |
.workspaces ⇒ Array<Workspaces>
Find all the workspaces within the current working directory.
33 34 35 36 |
# File 'lib/xcoder.rb', line 33 def self.workspaces @@workspaces = parse_workspaces if @@workspaces.nil? @@workspaces end |