Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 34 lines (27 sloc) 0.941 kb
0058c75 @ashchan created empty project
authored
1 #
7c630d2 @ashchan project structure for MacRuby version
authored
2 # rb_main.rb
3 # Gmail Notifr
0058c75 @ashchan created empty project
authored
4 #
7c630d2 @ashchan project structure for MacRuby version
authored
5 # Created by James Chen on 10/24/10.
6 # Copyright ashchan.com 2010. All rights reserved.
0058c75 @ashchan created empty project
authored
7 #
8
7c630d2 @ashchan project structure for MacRuby version
authored
9 # Loading the Cocoa framework. If you need to load more frameworks, you can
10 # do that here too.
11 framework 'Cocoa'
9e07f82 @ashchan moved framework and require call to global
authored
12 framework 'Growl'
13 require 'time'
0058c75 @ashchan created empty project
authored
14
7c630d2 @ashchan project structure for MacRuby version
authored
15 # Loading all the Ruby project files.
16 main = File.basename(__FILE__, File.extname(__FILE__))
17 dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation
687916b @ashchan use macruby-keychain-wrapper
authored
18
5f1e372 @ashchan pending v0.6.2
authored
19 # try to load Security bs file on SnowLeopard, Lion 10.7 has version number 1138
20 load_bridge_support_file "#{dir_path}/BridgeSupport/Security.bridgesupport" if NSAppKitVersionNumber < 1138
7ed0f76 @ashchan load Security.framework explicitly for 10.6
authored
21
7c630d2 @ashchan project structure for MacRuby version
authored
22 Dir.glob(File.join(dir_path, '*.{rb,rbo}')).map { |x| File.basename(x, File.extname(x)) }.uniq.each do |path|
23 if path != main
24 require(path)
0058c75 @ashchan created empty project
authored
25 end
26 end
27
d97ae42 @ashchan more migrations
authored
28 def NSLocalizedString(key)
29 NSBundle.mainBundle.localizedStringForKey(key, value:'', table:nil)
30 end
31
7c630d2 @ashchan project structure for MacRuby version
authored
32 # Starting the Cocoa main loop.
33 NSApplicationMain(0, nil)
Something went wrong with that request. Please try again.