2. Notes for Contributors
2.1 Invitation
Contributions are welcome and invited! Rubifying an Objective-C Cocoa application is a great way to get started with RubyCocoa. Also, by helping others use RubyCocoa, contributors strengthen interest and support for the platform.
2.2 Instructions
To avoid copyright problems, please only submit examples from the ADC Reference Library or the sample code found in /Developer/Examples on systems with Apple’s Developer Tools installed.
- Contributions must preserve the copyright declarations in the original Apple source code.
- The rubified version should match the behavior of the original example as closely as possible.
- Once you have verified the operation of your Ruby version, please delete the Objective-C files that you have replaced with Ruby code.
- It is not necessary to convert everything from Objective-C to Ruby. Partial rubifications are also of interest.
To avoid name conflicts with the original Apple examples, please add the “Ruby” prefix to the directory name. For example, OutlineView should become RubyOutlineView.
Contributed Ruby code should be released under terms that allow it to be safely reused. I prefer that contributions be copyrighted by the contributor and released under the terms of the MIT License.
Please include a file named README that includes the following information:
- the name of the original Apple example.
- the URL or path where the original source code can be found.
- your name
- any comments you have on the conversion to Ruby, especially unresolved problems or issues requiring workarounds.
- a copyright and license declaration for the Ruby sources that you authored.
To save bandwidth, the build directory should be deleted. Please also delete the user-specific files in the .xcodeproj directory. They are named user.mode1 and user.pbxuser (where user is your login id).
Create the archive using the tar command. For example:tar czf RubyRoundTransparentWindow.tgz RubyRoundTransparentWindow
Please refer to the examples for more information.
Email the completed archive to me here and I’ll add it to the collection on RubyCocoa Resources.
2.3 While you are rubifying...
Here is some advice based on discussions I’ve seen on rubycocoa-talk:
- Don’t change the rb_main.rb file. Quoting Jonathan Paisley, its purpose “is to load any other .rb files you have created. So just make yourfile.rb and it’ll get loaded. Also, standaloneify.rb depends on file being called ‘rb_main.rb’ (because it patches the file before running the application).”
- ib_outlet names must start with a lower case letter.
- Ruby class names must start with a capital letter.
- There’s a problem in RubyCocoa with object comparison. If you are comparing two things that you think should be equal and they aren’t, try this suggestion from Jonathan:
foo. __ocid__ == bar. __ocid__
Did you find an error? Is something missing? Post your comment or suggestion below!
Comments (0) post