xcodeproj 0.2.0.rc1 → 0.2.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -15,7 +15,7 @@ static library from scratch, for both iOS and OSX.
15
15
  Xcodeproj itself installs through RubyGems, the Ruby package manager. Install it
16
16
  by performing the following command:
17
17
 
18
- $ sudo gem install xcodeproj
18
+ $ [sudo] gem install xcodeproj --pre
19
19
 
20
20
 
21
21
  ## Colaborate
@@ -31,13 +31,6 @@ If you're really oldschool and you want to discuss Xcodeproj development you
31
31
  can join #cocoapods on irc.freenode.net.
32
32
 
33
33
 
34
- ## Authors
35
-
36
- * [Nolan Waite](https://github.com/nolanw)
37
- * [Luke Redpath](https://github.com/lukeredpath)
38
- * [Eloy Durán](https://github.com/alloy)
39
-
40
-
41
34
  ## LICENSE
42
35
 
43
36
  These works are available under the MIT license. See the [LICENSE][license] file
@@ -17,12 +17,22 @@ VALUE Xcodeproj = Qnil;
17
17
 
18
18
  static VALUE
19
19
  cfstr_to_str(const void *cfstr) {
20
- long len = (long)CFStringGetLength(cfstr);
20
+ CFDataRef data = CFStringCreateExternalRepresentation(NULL, cfstr, kCFStringEncodingUTF8, 0);
21
+ assert(data != NULL);
22
+ long len = (long)CFDataGetLength(data);
21
23
  char *buf = (char *)malloc(len+1);
22
24
  assert(buf != NULL);
23
- CFStringGetCString(cfstr, buf, len+1, kCFStringEncodingUTF8);
25
+ CFDataGetBytes(data, CFRangeMake(0, len), buf);
26
+
24
27
  register VALUE str = rb_str_new(buf, len);
25
28
  free(buf);
29
+
30
+ // force UTF-8 encoding in Ruby 1.9+
31
+ ID forceEncodingId = rb_intern("force_encoding");
32
+ if (rb_respond_to(str, forceEncodingId)) {
33
+ rb_funcall(str, forceEncodingId, 1, rb_str_new("UTF-8", 5));
34
+ }
35
+
26
36
  return str;
27
37
  }
28
38
 
data/lib/xcodeproj.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
- VERSION = '0.2.0.rc1'
2
+ VERSION = '0.2.0.rc2'
3
3
 
4
4
  autoload :Config, 'xcodeproj/config'
5
5
  autoload :Project, 'xcodeproj/project'
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.2.0.rc1
4
+ version: 0.2.0.rc2
5
5
  prerelease: 6
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: 2012-05-31 00:00:00.000000000 Z
12
+ date: 2012-06-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
15
15
  boring management tasks or build Xcode-friendly libraries. Also includes support
@@ -36,7 +36,6 @@ files:
36
36
  - lib/xcodeproj/project.rb
37
37
  - lib/xcodeproj/workspace.rb
38
38
  - lib/xcodeproj.rb
39
- - ext/xcodeproj/extconf.h
40
39
  - ext/xcodeproj/extconf.rb
41
40
  - ext/xcodeproj/xcodeproj_ext.c
42
41
  - README.md
@@ -1,8 +0,0 @@
1
- #ifndef EXTCONF_H
2
- #define EXTCONF_H
3
- #define HAVE_FRAMEWORK_COREFOUNDATION 1
4
- #define HAVE_COREFOUNDATION_COREFOUNDATION_H 1
5
- #define HAVE_COREFOUNDATION_CFSTREAM_H 1
6
- #define HAVE_COREFOUNDATION_CFPROPERTYLIST_H 1
7
- #define HAVE_RUBY_ST_H 1
8
- #endif