Commit 252e6104 authored by Eloy Duran's avatar Eloy Duran

Make a MacRuby sample app build.

parent 8b9ab121
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
5165756D144AFA12002A4EFA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5165756C144AFA12002A4EFA /* Cocoa.framework */; };
5165756F144AFA12002A4EFA /* MacRuby.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5165756E144AFA12002A4EFA /* MacRuby.framework */; };
51657578144AFA12002A4EFA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 51657576144AFA12002A4EFA /* InfoPlist.strings */; };
5165757A144AFA12002A4EFA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 51657579144AFA12002A4EFA /* main.m */; };
5165757F144AFA12002A4EFA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5165757D144AFA12002A4EFA /* MainMenu.xib */; };
51657582144AFA12002A4EFA /* rb_main.rb in Resources */ = {isa = PBXBuildFile; fileRef = 51657581144AFA12002A4EFA /* rb_main.rb */; };
51657584144AFA12002A4EFA /* AppDelegate.rb in Resources */ = {isa = PBXBuildFile; fileRef = 51657583144AFA12002A4EFA /* AppDelegate.rb */; };
51657598144B2608002A4EFA /* Pods.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 51657597144B2608002A4EFA /* Pods.xcconfig */; };
5165759B144B265B002A4EFA /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5165759A144B265B002A4EFA /* libPods.a */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
51657568144AFA12002A4EFA /* MacRubySample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MacRubySample.app; sourceTree = BUILT_PRODUCTS_DIR; };
5165756C144AFA12002A4EFA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
5165756E144AFA12002A4EFA /* MacRuby.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MacRuby.framework; path = Library/Frameworks/MacRuby.framework; sourceTree = DEVELOPER_DIR; };
51657575144AFA12002A4EFA /* MacRubySample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MacRubySample-Info.plist"; sourceTree = "<group>"; };
51657577144AFA12002A4EFA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
51657579144AFA12002A4EFA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5165757B144AFA12002A4EFA /* MacRubySample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MacRubySample-Prefix.pch"; sourceTree = "<group>"; };
5165757E144AFA12002A4EFA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
51657581144AFA12002A4EFA /* rb_main.rb */ = {isa = PBXFileReference; lastKnownFileType = text.script.ruby; path = rb_main.rb; sourceTree = "<group>"; };
51657583144AFA12002A4EFA /* AppDelegate.rb */ = {isa = PBXFileReference; lastKnownFileType = text.script.ruby; path = AppDelegate.rb; sourceTree = "<group>"; };
51657597144B2608002A4EFA /* Pods.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = "<group>"; };
5165759A144B265B002A4EFA /* libPods.a */ = {isa = PBXFileReference; lastKnownFileType = file; name = libPods.a; path = Pods/build/Release/libPods.a; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
51657565144AFA12002A4EFA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5165759B144B265B002A4EFA /* libPods.a in Frameworks */,
5165756D144AFA12002A4EFA /* Cocoa.framework in Frameworks */,
5165756F144AFA12002A4EFA /* MacRuby.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5165755D144AFA11002A4EFA = {
isa = PBXGroup;
children = (
5165759A144B265B002A4EFA /* libPods.a */,
51657597144B2608002A4EFA /* Pods.xcconfig */,
51657573144AFA12002A4EFA /* MacRubySample */,
5165756B144AFA12002A4EFA /* Frameworks */,
51657569144AFA12002A4EFA /* Products */,
);
sourceTree = "<group>";
};
51657569144AFA12002A4EFA /* Products */ = {
isa = PBXGroup;
children = (
51657568144AFA12002A4EFA /* MacRubySample.app */,
);
name = Products;
sourceTree = "<group>";
};
5165756B144AFA12002A4EFA /* Frameworks */ = {
isa = PBXGroup;
children = (
5165756C144AFA12002A4EFA /* Cocoa.framework */,
5165756E144AFA12002A4EFA /* MacRuby.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
51657573144AFA12002A4EFA /* MacRubySample */ = {
isa = PBXGroup;
children = (
51657583144AFA12002A4EFA /* AppDelegate.rb */,
5165757C144AFA12002A4EFA /* Resources */,
51657580144AFA12002A4EFA /* Other Sources */,
51657574144AFA12002A4EFA /* Supporting Files */,
);
path = MacRubySample;
sourceTree = "<group>";
};
51657574144AFA12002A4EFA /* Supporting Files */ = {
isa = PBXGroup;
children = (
51657575144AFA12002A4EFA /* MacRubySample-Info.plist */,
51657576144AFA12002A4EFA /* InfoPlist.strings */,
51657579144AFA12002A4EFA /* main.m */,
5165757B144AFA12002A4EFA /* MacRubySample-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
5165757C144AFA12002A4EFA /* Resources */ = {
isa = PBXGroup;
children = (
5165757D144AFA12002A4EFA /* MainMenu.xib */,
);
name = Resources;
sourceTree = "<group>";
};
51657580144AFA12002A4EFA /* Other Sources */ = {
isa = PBXGroup;
children = (
51657581144AFA12002A4EFA /* rb_main.rb */,
);
name = "Other Sources";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
51657567144AFA12002A4EFA /* MacRubySample */ = {
isa = PBXNativeTarget;
buildConfigurationList = 51657587144AFA12002A4EFA /* Build configuration list for PBXNativeTarget "MacRubySample" */;
buildPhases = (
51657564144AFA12002A4EFA /* Sources */,
51657565144AFA12002A4EFA /* Frameworks */,
51657566144AFA12002A4EFA /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = MacRubySample;
productName = MacRubySample;
productReference = 51657568144AFA12002A4EFA /* MacRubySample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5165755F144AFA11002A4EFA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
};
buildConfigurationList = 51657562144AFA11002A4EFA /* Build configuration list for PBXProject "MacRubySample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 5165755D144AFA11002A4EFA;
productRefGroup = 51657569144AFA12002A4EFA /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
51657567144AFA12002A4EFA /* MacRubySample */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
51657566144AFA12002A4EFA /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
51657578144AFA12002A4EFA /* InfoPlist.strings in Resources */,
5165757F144AFA12002A4EFA /* MainMenu.xib in Resources */,
51657582144AFA12002A4EFA /* rb_main.rb in Resources */,
51657584144AFA12002A4EFA /* AppDelegate.rb in Resources */,
51657598144B2608002A4EFA /* Pods.xcconfig in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
51657564144AFA12002A4EFA /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5165757A144AFA12002A4EFA /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
51657576144AFA12002A4EFA /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
51657577144AFA12002A4EFA /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
5165757D144AFA12002A4EFA /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
5165757E144AFA12002A4EFA /* en */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
51657585144AFA12002A4EFA /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
51657586144AFA12002A4EFA /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
51657588144AFA12002A4EFA /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 51657597144B2608002A4EFA /* Pods.xcconfig */;
buildSettings = {
ARCHS = x86_64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(DEVELOPER_FRAMEWORKS_DIR)\"",
);
GCC_ENABLE_OBJC_GC = required;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MacRubySample/MacRubySample-Prefix.pch";
INFOPLIST_FILE = "MacRubySample/MacRubySample-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
51657589144AFA12002A4EFA /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 51657597144B2608002A4EFA /* Pods.xcconfig */;
buildSettings = {
ARCHS = x86_64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(DEVELOPER_FRAMEWORKS_DIR)\"",
);
GCC_ENABLE_OBJC_GC = required;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MacRubySample/MacRubySample-Prefix.pch";
INFOPLIST_FILE = "MacRubySample/MacRubySample-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
51657562144AFA11002A4EFA /* Build configuration list for PBXProject "MacRubySample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
51657585144AFA12002A4EFA /* Debug */,
51657586144AFA12002A4EFA /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
51657587144AFA12002A4EFA /* Build configuration list for PBXNativeTarget "MacRubySample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
51657588144AFA12002A4EFA /* Debug */,
51657589144AFA12002A4EFA /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5165755F144AFA11002A4EFA /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
<FileRef
location = "group:MacRubySample.xcodeproj">
</FileRef>
</Workspace>
# Load the BridgeSupport metadata generated by CocoaPods from all dependencies.
p NSBundle.mainBundle.pathForResource("Pods", ofType:"bridgesupport")
load_bridge_support_file NSBundle.mainBundle.pathForResource("Pods", ofType:"bridgesupport")
class AppDelegate
attr_accessor :window
def applicationDidFinishLaunching(notification)
@queue = NSOperationQueue.new
end
#NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://gowalla.com/users/mattt.json"]];
#AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
#NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]);
#} failure:nil];
#NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
#[queue addOperation:operation];
def refreshData(sender)
url = NSURL.URLWithString("http://api.twitter.com/1/statuses/user_timeline.json?screen_name=alloy")
request = NSURLRequest.requestWithURL(url)
operation = AFJSONRequestOperation.JSONRequestOperationWithRequest(request, success:lambda { |request, response, json|
p json
}, failure:nil)
@queue.addOperation(operation)
p @queue
end
end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
//
// Prefix header for all source files of the 'MacRubySample' target in the 'MacRubySample' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
//
// main.m
// MacRubySample
//
// Created by Eloy Duran on 16-10-11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <MacRuby/MacRuby.h>
int main(int argc, char *argv[])
{
return macruby_main("rb_main.rb", argc, argv);
}
#
# rb_main.rb
# MacRubySample
#
# Created by Eloy Duran on 16-10-11.
# Copyright (c) 2011 __MyCompanyName__. All rights reserved.
#
# Loading the Cocoa framework. If you need to load more frameworks, you can
# do that here too.
framework 'Cocoa'
# Loading all the Ruby project files.
main = File.basename(__FILE__, File.extname(__FILE__))
dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation
Dir.glob(File.join(dir_path, '*.{rb,rbo}')).map { |x| File.basename(x, File.extname(x)) }.uniq.each do |path|
if path != main
require(path)
end
end
# Starting the Cocoa main loop.
NSApplicationMain(0, nil)
Pod::File.new do |f|
f.platform = :osx
f.dependency 'ASIHTTPRequest'
end
...@@ -35,9 +35,7 @@ module Pod ...@@ -35,9 +35,7 @@ module Pod
raise Informative, "The specified podspec `#{@podspec}' doesn't exist." raise Informative, "The specified podspec `#{@podspec}' doesn't exist."
end end
else else
if config.project_podfile unless spec = config.rootspec
spec = Specification.from_file(config.project_podfile)
else
raise Informative, "No `Podfile' or `.podspec' file found in the current working directory." raise Informative, "No `Podfile' or `.podspec' file found in the current working directory."
end end
end end
......
...@@ -10,7 +10,7 @@ module Pod ...@@ -10,7 +10,7 @@ module Pod
@instance = instance @instance = instance
end end
attr_accessor :repos_dir, :project_pods_root, :clean, :verbose, :silent attr_accessor :repos_dir, :project_pods_root, :rootspec, :clean, :verbose, :silent
alias_method :clean?, :clean alias_method :clean?, :clean
alias_method :verbose?, :verbose alias_method :verbose?, :verbose
alias_method :silent?, :silent alias_method :silent?, :silent
...@@ -40,6 +40,22 @@ module Pod ...@@ -40,6 +40,22 @@ module Pod
@project_podfile @project_podfile
end end
# Returns the spec at the pat returned from `project_podfile`.
def rootspec
unless @rootspec
@rootspec = Specification.from_file(project_podfile) if project_podfile
end
@rootspec
end
def ios?
rootspec.platform == :ios
end
def osx?
rootspec.platform == :osx
end
module Mixin module Mixin
def config def config
Config.instance Config.instance
......
...@@ -16,22 +16,6 @@ module Pod ...@@ -16,22 +16,6 @@ module Pod
dependent_specification_sets.reject(&:only_part_of_other_pod?) dependent_specification_sets.reject(&:only_part_of_other_pod?)
end end
def source_files
source_files = {}
build_specification_sets.each do |set|
spec = set.specification
source_files[spec.name] = []
spec.source_files.each do |pattern|
pattern = spec.pod_destroot + pattern
pattern = pattern + '*.{h,m,mm,c,cpp}' if pattern.directory?
pattern.glob.each do |file|
source_files[spec.name] << file.relative_path_from(config.project_pods_root)
end
end
end
source_files
end
def xcconfig def xcconfig
@xcconfig ||= Xcode::Config.new({ @xcconfig ||= Xcode::Config.new({
# In a workspace this is where the static library headers should be found # In a workspace this is where the static library headers should be found
......
module Pod module Pod
extend Config::Mixin
def self._eval_podspec(path) def self._eval_podspec(path)
eval(path.read, nil, path.to_s) eval(path.read, nil, path.to_s)
end end
...@@ -62,7 +64,7 @@ module Pod ...@@ -62,7 +64,7 @@ module Pod
end end
def source_files=(*patterns) def source_files=(*patterns)
@source_files = patterns.flatten.map { |p| Pathname.new(p) } @source_files = patterns.flatten
end end
attr_reader :source_files attr_reader :source_files
...@@ -92,7 +94,7 @@ module Pod ...@@ -92,7 +94,7 @@ module Pod
def libraries=(*libraries) def libraries=(*libraries)
libraries.unshift('') libraries.unshift('')
self.xcconfig = { 'OTHER_LDFLAGS' => libraries.join(' -l ').strip } self.xcconfig = { 'OTHER_LDFLAGS' => libraries.join(' -l').strip }
end end
alias_method :library=, :libraries= alias_method :library=, :libraries=
...@@ -120,8 +122,8 @@ module Pod ...@@ -120,8 +122,8 @@ module Pod
def ==(other) def ==(other)
self.class === other && self.class === other &&
@name && @name == other.name && name && name == other.name &&
@version && @version == other.version version && version == other.version
end end
def dependency_by_name(name) def dependency_by_name(name)
...@@ -129,8 +131,8 @@ module Pod ...@@ -129,8 +131,8 @@ module Pod
end end
def part_of_specification_set def part_of_specification_set
if @part_of if part_of
Set.by_specification_name(@part_of.name) Set.by_specification_name(part_of.name)
end end
end end
...@@ -154,7 +156,7 @@ module Pod ...@@ -154,7 +156,7 @@ module Pod
end end
def part_of_other_pod? def part_of_other_pod?
!@part_of.nil? !part_of.nil?
end end
def podfile? def podfile?
...@@ -162,13 +164,13 @@ module Pod ...@@ -162,13 +164,13 @@ module Pod
end end
def any_platform? def any_platform?
@platform.nil? platform.nil?
end end
# Returns all source files of this pod including header files. # Returns all source files of this pod including header files.
def expanded_source_files def expanded_source_files
files = [] files = []
source_files.each do |pattern| [*source_files].each do |pattern|
pattern = pod_destroot + pattern pattern = pod_destroot + pattern
pattern = pattern + '*.{h,m,mm,c,cpp}' if pattern.directory? pattern = pattern + '*.{h,m,mm,c,cpp}' if pattern.directory?
pattern.glob.each do |file| pattern.glob.each do |file|
...@@ -217,7 +219,7 @@ module Pod ...@@ -217,7 +219,7 @@ module Pod
end end
def to_s def to_s
"`#{@name}' version `#{@version}'" "`#{name}' version `#{version}'"
end end
def inspect def inspect
...@@ -226,17 +228,17 @@ module Pod ...@@ -226,17 +228,17 @@ module Pod
def validate! def validate!
missing = [] missing = []
missing << "`name'" unless @name missing << "`name'" unless name
missing << "`version'" unless @version missing << "`version'" unless version
missing << "`summary'" unless @summary missing << "`summary'" unless summary
missing << "`homepage'" unless @homepage missing << "`homepage'" unless homepage
missing << "`author(s)'" unless @authors missing << "`author(s)'" unless authors
missing << "either `source' or `part_of'" unless @source || @part_of missing << "either `source' or `part_of'" unless source || part_of
missing << "`source_files'" unless @source_files missing << "`source_files'" unless source_files
incorrect = [] incorrect = []
allowed = [nil, :ios, :osx] allowed = [nil, :ios, :osx]
incorrect << ["`platform'", allowed] unless allowed.include?(@platform) incorrect << ["`platform'", allowed] unless allowed.include?(platform)
unless missing.empty? && incorrect.empty? unless missing.empty? && incorrect.empty?
message = "The following #{(missing + incorrect).size == 1 ? 'attribute is' : 'attributes are'}:\n" message = "The following #{(missing + incorrect).size == 1 ? 'attribute is' : 'attributes are'}:\n"
...@@ -264,7 +266,7 @@ module Pod ...@@ -264,7 +266,7 @@ module Pod
puts "==> Installing: #{self}" unless config.silent? puts "==> Installing: #{self}" unless config.silent?
config.project_pods_root.mkpath config.project_pods_root.mkpath
require 'fileutils' require 'fileutils'
FileUtils.cp(@defined_in_file, config.project_pods_root) FileUtils.cp(defined_in_file, config.project_pods_root)
# In case this spec is part of another pod's source, we need to dowload # In case this spec is part of another pod's source, we need to dowload
# the other pod's source. # the other pod's source.
...@@ -294,7 +296,7 @@ module Pod ...@@ -294,7 +296,7 @@ module Pod
# end # end
# end # end
def download! def download!
downloader = Downloader.for_source(pod_destroot, @source) downloader = Downloader.for_source(pod_destroot, source)
downloader.download downloader.download
downloader.clean(clean_paths) if config.clean downloader.clean(clean_paths) if config.clean
end end
...@@ -309,7 +311,7 @@ module Pod ...@@ -309,7 +311,7 @@ module Pod
end end
def to_s def to_s
"podfile at `#{@defined_in_file}'" "podfile at `#{defined_in_file}'"
end end
def pod_destroot def pod_destroot
......
...@@ -190,7 +190,9 @@ ...@@ -190,7 +190,9 @@
baseConfigurationReference = 518ACD53144605B400F6BE80 /* Pods.xcconfig */; baseConfigurationReference = 518ACD53144605B400F6BE80 /* Pods.xcconfig */;
buildSettings = { buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Pods/Pods-Prefix.pch"; GCC_PREFIX_HEADER = "Pods-Prefix.pch";
OTHER_LDFLAGS = (
);
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
}; };
name = Debug; name = Debug;
...@@ -200,7 +202,9 @@ ...@@ -200,7 +202,9 @@
baseConfigurationReference = 518ACD53144605B400F6BE80 /* Pods.xcconfig */; baseConfigurationReference = 518ACD53144605B400F6BE80 /* Pods.xcconfig */;
buildSettings = { buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Pods/Pods-Prefix.pch"; GCC_PREFIX_HEADER = "Pods-Prefix.pch";
OTHER_LDFLAGS = (
);
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
}; };
name = Release; name = Release;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment