zimt 0.0.3 → 0.0.4
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/pbxproj.rb +8 -1
- data/lib/zimt/sprinkle.rb +1 -1
- data/lib/zimt/version.rb +1 -1
- data/lib/zimt.rb +1 -0
- metadata +2 -2
data/lib/zimt/pbxproj.rb
CHANGED
@@ -157,9 +157,16 @@ module Zimt
|
|
157
157
|
@position += 1
|
158
158
|
end
|
159
159
|
|
160
|
+
# Escape filename
|
161
|
+
if not file.match /^[A-Za-z0-9.]+$/
|
162
|
+
escaped_file = "\"#{file}\""
|
163
|
+
else
|
164
|
+
escaped_file = file
|
165
|
+
end
|
166
|
+
|
160
167
|
# Add Zimt Group
|
161
168
|
self.content.insert(@position,
|
162
|
-
"\t\t#{newgroup} /* #{file} */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = #{file_type}; path = #{
|
169
|
+
"\t\t#{newgroup} /* #{file} */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = #{file_type}; path = #{escaped_file}; sourceTree = \"<group>\"; };\n")
|
163
170
|
|
164
171
|
self.save!
|
165
172
|
self.parse
|
data/lib/zimt/sprinkle.rb
CHANGED
@@ -6,7 +6,7 @@ module Zimt
|
|
6
6
|
if name.start_with?('http://') || name.start_with?('https://')
|
7
7
|
url = name
|
8
8
|
else
|
9
|
-
url = "https://raw.github.com/zimt/sprinkles/stable/#{name.downcase}.sprinkle.yml"
|
9
|
+
url = "https://raw.github.com/zimt/sprinkles/stable/#{CGI.escape(name.downcase)}.sprinkle.yml"
|
10
10
|
end
|
11
11
|
spec = open(url) { |f| YAML::load(f) }
|
12
12
|
self.new(spec)
|
data/lib/zimt/version.rb
CHANGED
data/lib/zimt.rb
CHANGED