xcodeproj 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -272,16 +272,17 @@ module Xcodeproj
272
272
  #
273
273
  # @return [void]
274
274
  #
275
- def fix_encoding(file)
276
- result = ''
277
- File.read(file).unpack('U*').each do |codepoint|
278
- if codepoint > 255
279
- result << "&##{codepoint};"
275
+ def fix_encoding(filename)
276
+ output = ''
277
+ input = File.open(filename, 'rb') { |file| file.read }
278
+ input.unpack('U*').each do |codepoint|
279
+ if codepoint > 127
280
+ output << "&##{codepoint};"
280
281
  else
281
- result << codepoint.chr
282
+ output << codepoint.chr
282
283
  end
283
284
  end
284
- File.open(file, 'w') { |write_file| write_file.write(result) }
285
+ File.open(filename, 'wb') { |file| file.write(output) }
285
286
  end
286
287
 
287
288
  #-------------------------------------------------------------------------#
data/lib/xcodeproj.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
- VERSION = '0.5.3' unless defined? Xcodeproj::VERSION
2
+ VERSION = '0.5.4' unless defined? Xcodeproj::VERSION
3
3
 
4
4
  class PlainInformative < StandardError
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodeproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-03 00:00:00.000000000 Z
12
+ date: 2013-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport