zimt 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/zimt/version.rb +1 -1
- data/lib/zimt.rb +8 -2
- metadata +2 -2
data/lib/zimt/version.rb
CHANGED
data/lib/zimt.rb
CHANGED
@@ -11,8 +11,13 @@ require "zimt/version"
|
|
11
11
|
|
12
12
|
module Zimt
|
13
13
|
def self.xcodeproj
|
14
|
-
|
15
|
-
|
14
|
+
begin
|
15
|
+
@xcodeproj ||= find_xcodeproj
|
16
|
+
raise "Could not locate .xcodeproj" unless @xcodeproj
|
17
|
+
rescue => e
|
18
|
+
puts e
|
19
|
+
exit
|
20
|
+
end
|
16
21
|
Pathname.new(@xcodeproj)
|
17
22
|
end
|
18
23
|
|
@@ -39,6 +44,7 @@ module Zimt
|
|
39
44
|
filenames = Dir.glob(File.join(current, '*.xcodeproj'))
|
40
45
|
raise "More than one .xcodeproj found: #{filenames}" if filenames.length > 1
|
41
46
|
filename = filenames.first
|
47
|
+
raise "Could not find .xcodeproj.\nYou need to execute zimt in the source directory" if filename.nil?
|
42
48
|
return filename if File.directory?(filename) and File.file?(File.join(filename, 'project.pbxproj'))
|
43
49
|
current, previous = File.expand_path("..", current), current
|
44
50
|
end
|