Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make compiling the source files work, thanks @ferrous26!

  • Loading branch information...
commit 2b4c37d39bcf2d9492f700ccde3928d03faa91b8 1 parent e307819
@alloy alloy authored
View
1  .gitignore
@@ -1,5 +1,6 @@
*.swp
*.swo
+*.rbo
.DS_Store
tmp
examples/Pods
View
6 Rakefile
@@ -0,0 +1,6 @@
+desc "Compile the source files (as rbo files)"
+task :compile do
+ Dir.glob("lib/**/*.rb").each do |file|
+ sh "macrubyc #{file} -C -o #{file}o"
+ end
+end
View
1  lib/cocoa_pods.rb
@@ -27,3 +27,4 @@ def glob(pattern = '')
Dir.glob((self + pattern).to_s).map { |f| Pathname.new(f) }
end
end
+
View
2  lib/cocoa_pods/command/setup.rb
@@ -1,5 +1,3 @@
-require 'cocoa_pods/command/repo'
-
module Pod
class Command
class Setup < Command
View
4 lib/cocoa_pods/specification.rb
@@ -1,7 +1,7 @@
-require 'cocoa_pods/specification/set'
-
module Pod
class Specification
+ autoload :Set, 'cocoa_pods/specification/set'
+
def self.from_podfile(path)
if path.exist?
spec = new
View
7 lib/cocoa_pods/xcode/project.rb
@@ -3,7 +3,12 @@
module Pod
module Xcode
class Project
- TEMPLATES_DIR = Pathname.new(File.expand_path('../../../../xcode-project-templates', __FILE__))
+ # TODO this is a workaround for an issue with MacRuby with compiled files
+ # that makes the use of __FILE__ impossible.
+ #
+ #TEMPLATES_DIR = Pathname.new(File.expand_path('../../../../xcode-project-templates', __FILE__))
+ file = $LOADED_FEATURES.find { |file| file =~ %r{cocoa_pods/xcode/project\.rbo?$} }
+ TEMPLATES_DIR = Pathname.new(File.expand_path('../../../../xcode-project-templates', file))
# TODO see if we really need different templates for iOS and OS X
def self.ios_static_library
Please sign in to comment.
Something went wrong with that request. Please try again.