lib/xcake/xcode/project.rb in xcake-0.1.6 vs lib/xcake/xcode/project.rb in xcake-0.1.7
- old
+ new
@@ -2,10 +2,66 @@
module Xcake
module Xcode
class Project < Xcodeproj::Project
+ # @return [Hash] the attributes of
+ # the project
+ #
+ def attributes
+ root_object.attributes
+ end
+
+ # @return [String] the class name for the project
+ #
+ def class_prefix
+ attributes["CLASSPREFIX"]
+ end
+
+ # Sets the class prefix for the project
+ #
+ # @param [String] value to set
+ #
+ # @return [String] the class name for the project
+ #
+ def class_prefix=(class_prefix)
+ attributes["CLASSPREFIX"] = class_prefix
+ end
+
+ # @return [String] the organization for the project
+ #
+ def organization
+ attributes["ORGANIZATIONNAME"]
+ end
+
+ # Sets the organization for the project
+ #
+ # @param [String] value to set
+ #
+ # @return [SchemeList] the organization for the project
+ #
+ def organization=(organization)
+ attributes["ORGANIZATIONNAME"] = organization
+ end
+
+ # @return [SchemeList] the scheme list
+ #
+ def scheme_list
+ @scheme_list ||= SchemeList.new(self)
+ end
+
+ def object_version
+ Xcodeproj::Constants::DEFAULT_OBJECT_VERSION.to_s
+ end
+
+ def recreate_user_schemes(*)
+ puts "Creating Schemes..."
+
+ scheme_list.recreate_schemes
+ scheme_list.save(path)
+ end
+
# Configures the Project for use with Xcake.
# This makes sure we have sensible defaults and
# it as clean as possible.
#
def setup_for_xcake
@@ -52,27 +108,9 @@
#
def find_unit_test_target_for_target(target)
targets.find do |t|
t.name == "#{target.name}Tests"
end
- end
-
- # @return [SchemeList] the scheme list
- #
- def scheme_list
- @scheme_list ||= SchemeList.new(self)
- end
-
- def object_version
- Xcodeproj::Constants::DEFAULT_OBJECT_VERSION.to_s
- end
-
- def recreate_user_schemes(visible = true)
-
- puts "Creating Schemes..."
-
- scheme_list.recreate_schemes
- scheme_list.save(path)
end
end
end
end