This repository has been archived by the owner on Nov 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 282
[App/Ruby] Get information of user’s projects/targets. #161
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,31 +16,49 @@ | |
static VALUE rb_cPodInformativeError = Qnil; | ||
|
||
|
||
// Defined in RBObject+CocoaPods.rb | ||
@interface RBApp : RBObject | ||
- (id)require_gems; | ||
@end | ||
|
||
|
||
static void | ||
CPRubyInit(Class bundleClass) | ||
{ | ||
NSCAssert([NSThread currentThread] == (NSThread *)RBThreadInstance, @"Should only be called from the Ruby thread."); | ||
|
||
// setenv("RUBYCOCOA_DEBUG", "1", 1); | ||
|
||
// Initialize the Ruby runtime and load our Ruby setup file. | ||
RBBundleInit("RBObject+CocoaPods.rb", bundleClass, nil); | ||
|
||
// These are C exts that are included in libruby, but we need | ||
// to initialize them ourselves and tell the runtime that they | ||
// have been loaded (provided). | ||
#define INIT_EXT(name) void Init_##name(void); Init_##name(); | ||
#define PROVIDE_EXT(name) INIT_EXT(name); rb_provide(#name); | ||
rb_provide("thread"); | ||
|
||
#define INIT_EXT(name) void Init_##name(void); Init_##name(); | ||
|
||
// Load encoding related extensions | ||
INIT_EXT(encdb); | ||
rb_provide("enc/trans/single_byte"); | ||
INIT_EXT(transdb); | ||
|
||
// These encodings are used by Psych (YAML extension) and are normally autoloaded by load_encoding in encoding.c, | ||
// however this does not happen in static libruby or I simply have not figured out how to make it work normally. | ||
INIT_EXT(utf_16le); | ||
INIT_EXT(utf_16be); | ||
INIT_EXT(utf_32le); | ||
INIT_EXT(utf_32be); | ||
|
||
INIT_EXT(pathname); | ||
rb_provide("pathname.so"); | ||
PROVIDE_EXT(date_core); | ||
INIT_EXT(digest); | ||
rb_provide("digest.so"); | ||
INIT_EXT(fiddle); | ||
rb_provide("fiddle.so"); | ||
INIT_EXT(psych); | ||
rb_provide("psych.so"); | ||
|
||
#define PROVIDE_EXT(name) INIT_EXT(name); rb_provide(#name); | ||
PROVIDE_EXT(bigdecimal); | ||
PROVIDE_EXT(date_core); | ||
PROVIDE_EXT(stringio); | ||
PROVIDE_EXT(strscan); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yeah, def. Wow, I'd have never figure this stuff out :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one was "easy", the encoding stuff above was the real hard part, had to do some reversing of a normal |
||
|
||
// Now we can load RubyGems and the gems we need. | ||
RBApp *app = RBObjectFromString(@"Pod::App"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this all to get xcodeproj working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly yeah.