rucola 0.0.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +468 -0
- data/History.txt +25 -0
- data/License.txt +1 -1
- data/Manifest.txt +32 -0
- data/README.txt +9 -67
- data/Rakefile +39 -31
- data/TODO +10 -18
- data/app_generators/rucola/rucola_generator.rb +15 -8
- data/app_generators/rucola/templates/Rakefile.erb +35 -7
- data/app_generators/rucola/templates/config/boot.rb +0 -1
- data/app_generators/rucola/templates/config/dependencies.rb +31 -0
- data/app_generators/rucola/templates/config/environment.rb +0 -1
- data/app_generators/rucola/templates/config/environments/debug.rb +13 -1
- data/app_generators/rucola/templates/config/environments/release.rb +15 -1
- data/app_generators/rucola/templates/config/environments/test.rb +7 -1
- data/app_generators/rucola/templates/misc/rb_main.rb.erb +12 -1
- data/app_generators/rucola/templates/project.pbxproj.erb +4 -0
- data/app_generators/rucola/templates/script/console +10 -0
- data/app_generators/rucola/templates/test/controllers/test_application_controller.rb +22 -10
- data/app_generators/rucola/templates/test/test_helper.rb +1 -0
- data/bin/rucola +4 -2
- data/lib/rucola/dependencies.rb +241 -0
- data/lib/rucola/dependencies/exclusions.rb +20 -0
- data/lib/rucola/dependencies/override_require_and_gem.rb +30 -0
- data/lib/rucola/dependencies/resolver.rb +68 -0
- data/lib/rucola/fsevents.rb +108 -0
- data/lib/rucola/initializer.rb +149 -117
- data/lib/rucola/log.rb +61 -0
- data/lib/rucola/nib.rb +3 -3
- data/lib/rucola/reloader.rb +39 -0
- data/lib/rucola/ruby_debug.rb +27 -0
- data/lib/rucola/rucola_support.rb +1 -2
- data/lib/rucola/rucola_support/core_ext.rb +4 -2
- data/lib/rucola/rucola_support/core_ext/objc.rb +9 -4
- data/lib/rucola/rucola_support/core_ext/objc/nsimage.rb +22 -0
- data/lib/rucola/rucola_support/core_ext/ruby.rb +11 -4
- data/lib/rucola/rucola_support/core_ext/ruby/file.rb +11 -0
- data/lib/rucola/rucola_support/core_ext/ruby/kernel.rb +16 -0
- data/lib/rucola/rucola_support/core_ext/ruby/object.rb +47 -0
- data/lib/rucola/rucola_support/core_ext/ruby/string.rb +8 -0
- data/lib/rucola/rucola_support/notifications/notifications.rb +26 -28
- data/lib/rucola/rucola_support/rc_app.rb +18 -0
- data/lib/rucola/tasks/dependencies.rake +49 -0
- data/lib/rucola/tasks/deploy.rake +131 -0
- data/lib/rucola/tasks/main.rake +39 -6
- data/lib/rucola/tasks/xcode.rake +54 -11
- data/lib/rucola/test_case.rb +138 -0
- data/lib/rucola/test_helper.rb +11 -5
- data/lib/rucola/version.rb +2 -2
- data/lib/rucola/xcode.rb +39 -9
- data/rucola_generators/controller/templates/test_controller_template.rb.erb +19 -7
- data/rucola_generators/simple_model/USAGE +5 -0
- data/rucola_generators/simple_model/simple_model_generator.rb +54 -0
- data/rucola_generators/simple_model/templates/simple_model.rb.erb +2 -0
- data/rucola_generators/simple_model/templates/test_simple_model.rb.erb +11 -0
- data/rucola_generators/window_controller/templates/test_window_controller_template.rb.erb +24 -13
- data/test/fixtures/dependencies/foo.rb +2 -0
- data/test/fixtures/dependencies/foo/bar.rb +0 -0
- data/test/fixtures/dependencies/foo/baz.rb +0 -0
- data/test/fixtures/dependencies/requires_fileutils.rb +1 -0
- data/test/fixtures/some_reloadable_class.rb +4 -0
- data/test/test_core_ext.rb +80 -0
- data/test/test_dependencies.rb +205 -0
- data/test/test_fsevents.rb +152 -0
- data/test/test_helper.rb +30 -1
- data/test/test_initializer.rb +56 -23
- data/test/test_log.rb +44 -0
- data/test/test_objc_core_ext.rb +23 -0
- data/test/test_rc_app.rb +5 -0
- data/test/test_reloader.rb +28 -0
- data/test/test_rucola_generator.rb +7 -0
- data/test/test_simple_model_generator.rb +48 -0
- data/test/test_xcode.rb +85 -5
- data/website/index.html +17 -91
- data/website/index.txt +14 -81
- data/website/template.rhtml +1 -1
- metadata +120 -76
data/History.txt
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
== 0.5 2008-07-10
|
2
|
+
|
3
|
+
=== Dependency resolver:
|
4
|
+
* You can now specify your dependencies in environment.rb and they will resolved and vendored in release mode.
|
5
|
+
This applies to gems and any other ruby lib. Because of this agnostic system there might still be some edge cases, for this purpose
|
6
|
+
there's the possibility to specify exceptions.
|
7
|
+
* In release mode RubyGems will NOT be loaded even if it's required at some point. This results in application startup time going from ~3 bounces in the dock to ~1.
|
8
|
+
|
9
|
+
=== Deploying:
|
10
|
+
* Added rake task for packaging a release build in a dmg
|
11
|
+
* Added rake task for uploading via scp, adding others is easy.
|
12
|
+
* Added rake task for creating a Sparkle appcast file.
|
13
|
+
* Added rake task that looks for textile files in ReleaseNotes/AppName_Version and creates HTML for Sparkle.
|
14
|
+
|
15
|
+
=== Others:
|
16
|
+
* Added Rucola::FSEvents which is a rubyesque wrapper around FSEvents.
|
17
|
+
* Added Rucola::Reloader, which uses Rucola::FSEvents to watch the app/controllers path for modifications and reloads the class.
|
18
|
+
In debug mode this will be enabled by default, you can override this setting on the `config` of Initializer.
|
19
|
+
* Added the Rucola::Log class and an extension to Kernel to access it easily. (Manfred Stienstra)
|
20
|
+
* Added Rucola::TestCase which is a test case mixin, like the one in Rails, which sets up a test case for a controller, defines helper methods and creates stubs for all ib_outlets that are defined in the controller.
|
21
|
+
* Added support for ruby-debug. If a call is made to Kernel.debugger and the RUBYCOCOA_ENV is 'debug', then the ruby-debug library will be required and ran.
|
22
|
+
* NSImage.imageNamed will also look in app/assets for a given image name.
|
23
|
+
* Added a script/console script which will run a irb console with the application loaded. (Jelle Helsen)
|
24
|
+
* Added a simple model generator, which is simply a subclass of NSObject.
|
25
|
+
|
1
26
|
== 0.0.3 2007-12-08
|
2
27
|
|
3
28
|
* Fixed some critical bugs in the xcode & nib manipulation code, which were introduced because the default is to return mutable objects in RubyCocoa again.
|
data/License.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -12,6 +12,7 @@ app_generators/rucola/templates/Rakefile.erb.old
|
|
12
12
|
app_generators/rucola/templates/app/controllers/application_controller.rb
|
13
13
|
app_generators/rucola/templates/config/Info.plist.erb
|
14
14
|
app_generators/rucola/templates/config/boot.rb
|
15
|
+
app_generators/rucola/templates/config/dependencies.rb
|
15
16
|
app_generators/rucola/templates/config/environment.rb
|
16
17
|
app_generators/rucola/templates/config/environments/debug.rb
|
17
18
|
app_generators/rucola/templates/config/environments/release.rb
|
@@ -24,6 +25,7 @@ app_generators/rucola/templates/misc/English.lproj/MainMenu.nib/keyedobjects.nib
|
|
24
25
|
app_generators/rucola/templates/misc/main.m.erb
|
25
26
|
app_generators/rucola/templates/misc/rb_main.rb.erb
|
26
27
|
app_generators/rucola/templates/project.pbxproj.erb
|
28
|
+
app_generators/rucola/templates/script/console
|
27
29
|
app_generators/rucola/templates/script/plugin
|
28
30
|
app_generators/rucola/templates/test/controllers/test_application_controller.rb
|
29
31
|
app_generators/rucola/templates/test/test_helper.rb
|
@@ -37,18 +39,30 @@ lib/autotest/pass.png
|
|
37
39
|
lib/autotest/rucola.rb
|
38
40
|
lib/autotest/sound.rb
|
39
41
|
lib/rucola.rb
|
42
|
+
lib/rucola/dependencies.rb
|
43
|
+
lib/rucola/dependencies/exclusions.rb
|
44
|
+
lib/rucola/dependencies/override_require_and_gem.rb
|
45
|
+
lib/rucola/dependencies/resolver.rb
|
46
|
+
lib/rucola/fsevents.rb
|
40
47
|
lib/rucola/info_plist.rb
|
41
48
|
lib/rucola/initializer.rb
|
49
|
+
lib/rucola/log.rb
|
42
50
|
lib/rucola/nib.rb
|
43
51
|
lib/rucola/plugin.rb
|
52
|
+
lib/rucola/reloader.rb
|
53
|
+
lib/rucola/ruby_debug.rb
|
44
54
|
lib/rucola/rucola_support.rb
|
45
55
|
lib/rucola/rucola_support/controllers.rb
|
46
56
|
lib/rucola/rucola_support/controllers/rc_controller.rb
|
47
57
|
lib/rucola/rucola_support/controllers/rc_window_controller.rb
|
48
58
|
lib/rucola/rucola_support/core_ext.rb
|
49
59
|
lib/rucola/rucola_support/core_ext/objc.rb
|
60
|
+
lib/rucola/rucola_support/core_ext/objc/nsimage.rb
|
50
61
|
lib/rucola/rucola_support/core_ext/objc/nsobject.rb
|
51
62
|
lib/rucola/rucola_support/core_ext/ruby.rb
|
63
|
+
lib/rucola/rucola_support/core_ext/ruby/file.rb
|
64
|
+
lib/rucola/rucola_support/core_ext/ruby/kernel.rb
|
65
|
+
lib/rucola/rucola_support/core_ext/ruby/object.rb
|
52
66
|
lib/rucola/rucola_support/core_ext/ruby/string.rb
|
53
67
|
lib/rucola/rucola_support/initialize_hooks.rb
|
54
68
|
lib/rucola/rucola_support/models.rb
|
@@ -56,10 +70,13 @@ lib/rucola/rucola_support/models/rc_document.rb
|
|
56
70
|
lib/rucola/rucola_support/notifications.rb
|
57
71
|
lib/rucola/rucola_support/notifications/notifications.rb
|
58
72
|
lib/rucola/rucola_support/rc_app.rb
|
73
|
+
lib/rucola/tasks/dependencies.rake
|
74
|
+
lib/rucola/tasks/deploy.rake
|
59
75
|
lib/rucola/tasks/freeze.rake
|
60
76
|
lib/rucola/tasks/interface_builder.rake
|
61
77
|
lib/rucola/tasks/main.rake
|
62
78
|
lib/rucola/tasks/xcode.rake
|
79
|
+
lib/rucola/test_case.rb
|
63
80
|
lib/rucola/test_helper.rb
|
64
81
|
lib/rucola/version.rb
|
65
82
|
lib/rucola/xcode.rb
|
@@ -75,6 +92,10 @@ rucola_generators/document_model/templates/test_document_model_template.rb.erb
|
|
75
92
|
rucola_generators/rucola_plugin/USAGE
|
76
93
|
rucola_generators/rucola_plugin/rucola_plugin_generator.rb
|
77
94
|
rucola_generators/rucola_plugin/templates/init.rb.erb
|
95
|
+
rucola_generators/simple_model/USAGE
|
96
|
+
rucola_generators/simple_model/simple_model_generator.rb
|
97
|
+
rucola_generators/simple_model/templates/simple_model.rb.erb
|
98
|
+
rucola_generators/simple_model/templates/test_simple_model.rb.erb
|
78
99
|
rucola_generators/window_controller/USAGE
|
79
100
|
rucola_generators/window_controller/templates/Window.nib/classes.nib.erb
|
80
101
|
rucola_generators/window_controller/templates/Window.nib/info.nib
|
@@ -93,12 +114,21 @@ test/fixtures/Info.plist
|
|
93
114
|
test/fixtures/MainMenu.nib/classes.nib
|
94
115
|
test/fixtures/MainMenu.nib/info.nib
|
95
116
|
test/fixtures/MainMenu.nib/keyedobjects.nib
|
117
|
+
test/fixtures/dependencies/foo.rb
|
118
|
+
test/fixtures/dependencies/foo/bar.rb
|
119
|
+
test/fixtures/dependencies/foo/baz.rb
|
120
|
+
test/fixtures/dependencies/requires_fileutils.rb
|
121
|
+
test/fixtures/some_reloadable_class.rb
|
96
122
|
test/test_controller_generator.rb
|
97
123
|
test/test_core_ext.rb
|
124
|
+
test/test_dependencies.rb
|
98
125
|
test/test_document_model_generator.rb
|
126
|
+
test/test_fsevents.rb
|
99
127
|
test/test_generator_helper.rb
|
100
128
|
test/test_helper.rb
|
101
129
|
test/test_info_plist.rb
|
130
|
+
test/test_initializer.rb
|
131
|
+
test/test_log.rb
|
102
132
|
test/test_nib.rb
|
103
133
|
test/test_notifications.rb
|
104
134
|
test/test_objc_core_ext.rb
|
@@ -106,9 +136,11 @@ test/test_plugin.rb
|
|
106
136
|
test/test_rc_app.rb
|
107
137
|
test/test_rc_document.rb
|
108
138
|
test/test_rc_window_controller.rb
|
139
|
+
test/test_reloader.rb
|
109
140
|
test/test_rucola.rb
|
110
141
|
test/test_rucola_generator.rb
|
111
142
|
test/test_rucola_plugin_generator.rb
|
143
|
+
test/test_simple_model_generator.rb
|
112
144
|
test/test_window_controller_generator.rb
|
113
145
|
test/test_xcode.rb
|
114
146
|
website/index.html
|
data/README.txt
CHANGED
@@ -1,59 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
SUPER DUPER PRE ALPHA VERSION (expect things to break kinda alpha...)
|
1
|
+
= Rucola: A Framework for rapidly building RubyCocoa applications
|
4
2
|
|
5
3
|
Rucola is a light weight framework that helps you write RubyCocoa apps.
|
6
4
|
It allows you to build, test, and deploy applications using rake commands,
|
7
|
-
eliminating the need to use XCode
|
5
|
+
eliminating the need to use XCode for the most common tasks.
|
8
6
|
|
9
7
|
Rucola provides a set of generators to help you generate controllers, window controllers,
|
10
8
|
and document-based applications. It also provides APIs for simplifying some of Objective-C's
|
11
9
|
ways of doing things.
|
12
10
|
|
13
|
-
|
11
|
+
== Generating an application skeleton
|
14
12
|
|
15
13
|
rucola MyApp -a "Your Name"
|
16
14
|
|
17
15
|
Running this command will give you a complete, working application with a single window already
|
18
16
|
bound to your application controller.
|
19
17
|
|
20
|
-
|
21
|
-
### Using Notifications
|
22
|
-
|
23
|
-
//Rucola
|
24
|
-
class Foo < Rucola::RCController
|
25
|
-
notify :some_method, :when => :something_happens
|
26
|
-
|
27
|
-
def some_method(notification)
|
28
|
-
puts "w00t!"
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
//Objective C (Excluding header file)
|
33
|
-
@implementation Foo
|
34
|
-
-(id)init {
|
35
|
-
if(self = [super init]) {
|
36
|
-
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
|
37
|
-
[center addObserver:self selector:(some_method:) name:@"SomethingHappensNotification" object:nil];
|
38
|
-
}
|
39
|
-
return self;
|
40
|
-
}
|
41
|
-
|
42
|
-
-(void)some_method:(NSNotification *) notification {
|
43
|
-
NSLog("w00t!");
|
44
|
-
}
|
45
|
-
@end
|
46
|
-
|
47
|
-
### Alternative Way Of Using Notifications
|
48
|
-
|
49
|
-
//Rucola
|
50
|
-
class Foo < Rucola::RCController
|
51
|
-
notify_on :something_happens do |notification|
|
52
|
-
puts "w0t0!"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
### Working with Interface Builder
|
18
|
+
== Working with Interface Builder
|
57
19
|
|
58
20
|
A Cocoa application contains `outlets`. Outlets allow you to bind variable names to objects.
|
59
21
|
An object can be a user interface element or an instance of a class.
|
@@ -62,22 +24,10 @@ An object can be a user interface element or an instance of a class.
|
|
62
24
|
ib_outlet :main_window
|
63
25
|
|
64
26
|
def awakeFromNib
|
65
|
-
# All the application delegate methods will be called on this object.
|
66
|
-
OSX::NSApp.delegate = self
|
67
|
-
|
68
27
|
puts "ApplicationController awoke."
|
69
28
|
puts "Edit: app/controllers/application_controller.rb"
|
70
29
|
puts "\nIt's window is: #{@main_window.inspect}"
|
71
30
|
end
|
72
|
-
|
73
|
-
# NSApplication delegate methods
|
74
|
-
def applicationDidFinishLaunching(notification)
|
75
|
-
puts "\nApplication finished launching."
|
76
|
-
end
|
77
|
-
|
78
|
-
def applicationWillTerminate(notification)
|
79
|
-
puts "\nApplication will terminate."
|
80
|
-
end
|
81
31
|
end
|
82
32
|
|
83
33
|
The `@main_window` variable now points to the user interface window. You can invoke any methods of NSWindow.
|
@@ -87,14 +37,7 @@ For example, if we wanted to add a button to the application controller above, w
|
|
87
37
|
After you've added this, you can run `rake ib:update` and your outlet will be available in interface builder that
|
88
38
|
you can now hook up to your UI button.
|
89
39
|
|
90
|
-
|
91
|
-
If you plan on using additional objective-c frameworks (WebKit, etc.) or ruby gems, you'll need to add these
|
92
|
-
in your environment.rb file.
|
93
|
-
|
94
|
-
config.objc_frameworks = %w(WebKit IOKit)
|
95
|
-
config.use_active_record = true
|
96
|
-
|
97
|
-
### Building your application
|
40
|
+
== Building your application
|
98
41
|
|
99
42
|
To build your application, Rucola provides a simple rake command. (You can also build your application in XCode)
|
100
43
|
|
@@ -104,15 +47,15 @@ To build your application, Rucola provides a simple rake command. (You can also
|
|
104
47
|
This will compile and run your application. At the moment we don't bundle Ruby or the gems that you are using
|
105
48
|
in your application, we have plans to support this in order to make it really easy to distribute your application.
|
106
49
|
|
107
|
-
|
50
|
+
== Extras
|
108
51
|
|
109
|
-
Browse the
|
52
|
+
Browse the git repo online at: http://github.com/alloy/rucola/tree/master
|
110
53
|
|
111
54
|
The latest version can be checked out with:
|
112
55
|
|
113
|
-
$
|
56
|
+
$ git clone git://github.com/alloy/rucola.git
|
114
57
|
|
115
|
-
Sample apps can be found at:
|
58
|
+
Sample apps can be found at (old svn repo):
|
116
59
|
|
117
60
|
$ svn co svn://rubyforge.org/var/svn/rucola/extras/examples/
|
118
61
|
|
@@ -122,4 +65,3 @@ There's a basic TextMate bundle which contains only 4 commands which are the equ
|
|
122
65
|
$ svn co svn://rubyforge.org/var/svn/rucola/extras/Rucola.tmbundle
|
123
66
|
|
124
67
|
There's a crash reporter plugin and a ActiveRecord plugin available, which you can install with script/plugin install. Use script/plugin list to see the ones available.
|
125
|
-
|
data/Rakefile
CHANGED
@@ -1,32 +1,40 @@
|
|
1
|
-
require 'config/requirements'
|
2
|
-
require 'config/hoe' # setup Hoe + all gem configuration
|
3
|
-
require 'rake/testtask'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
t.
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
1
|
+
require 'config/requirements'
|
2
|
+
require 'config/hoe' # setup Hoe + all gem configuration
|
3
|
+
require 'rake/testtask'
|
4
|
+
require 'rake/rdoctask'
|
5
|
+
|
6
|
+
Rake::TaskManager.class_eval do
|
7
|
+
def remove_task(task_name)
|
8
|
+
@tasks.delete(task_name.to_s)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def remove_task(task_name)
|
13
|
+
Rake.application.remove_task(task_name)
|
14
|
+
end
|
15
|
+
|
16
|
+
Dir['tasks/**/*.rake'].each { |rake| load rake }
|
17
|
+
|
18
|
+
remove_task :test
|
19
|
+
|
20
|
+
Rake::TestTask.new do |t|
|
21
|
+
t.test_files = FileList['test/test_*.rb']
|
22
|
+
t.verbose = true
|
23
|
+
#t.options = '-rr'
|
24
|
+
end
|
25
|
+
|
26
|
+
Rake::RDocTask.new do |t|
|
27
|
+
t.main = 'README.txt'
|
28
|
+
t.rdoc_files.include('README.txt', 'License.txt', 'lib/**/*.rb')
|
29
|
+
t.options << '--charset' << 'utf-8' << '--inline-source'
|
30
|
+
end
|
31
|
+
|
32
|
+
# desc 'First uninstalls the currently installed Rucola gem and then installs the new one.'
|
33
|
+
# task :install_gem_test do
|
34
|
+
# if `rake check_manifest`.split("\n").length == 1
|
35
|
+
# sh 'gem uninstall rucola'
|
36
|
+
# Rake::Task['install_gem_no_doc'].invoke
|
37
|
+
# else
|
38
|
+
# puts "You first might need to update the manifest!"
|
39
|
+
# end
|
32
40
|
# end
|
data/TODO
CHANGED
@@ -1,12 +1,16 @@
|
|
1
|
-
*
|
1
|
+
* Clean up dependencies code which is used to disable rubygems in release mode.
|
2
|
+
|
3
|
+
* From script/console the configuration isn't ran.
|
4
|
+
|
5
|
+
* Move MainMenu.nib to app/views
|
2
6
|
|
3
|
-
*
|
7
|
+
* The fsevents test "should run the user specified block when one of the paths that was specified is modified", sometimes randomly fails.
|
4
8
|
|
5
|
-
*
|
6
|
-
|
9
|
+
* Need to refactor the rc freeze tasks with the xcode:frameworks tasks.
|
10
|
+
|
11
|
+
* Choose between Notifications #notify_on and #once.
|
7
12
|
|
8
|
-
*
|
9
|
-
Should probably look if the require structure is still ok... Justin knows about this.
|
13
|
+
* Add caching to notification name lookup
|
10
14
|
|
11
15
|
* Create tests for initializer.rb.
|
12
16
|
|
@@ -14,20 +18,8 @@
|
|
14
18
|
I don't use rSpec anymore atm, so I (Eloy) will first focus on TestUnit & TestSpec.
|
15
19
|
Actually I will just move it to test/spec.
|
16
20
|
|
17
|
-
* No need to continuously rebuild your application when just changing a few lines of Ruby.
|
18
|
-
Still does xcodebuild for the build task, so add a check if the xcode project was updated,
|
19
|
-
if not then simply run the existing build.
|
20
|
-
|
21
|
-
* Allow transparent packaging. Developers need only worry about creating their application
|
22
|
-
and basic configuration not the innards of packaging and releasing.
|
23
|
-
|
24
|
-
config.objc_frameworks << ['Webkit', 'Quartz']
|
25
|
-
config.include_dirs << %w(models controllers lib)
|
26
|
-
|
27
21
|
* Create rspec testing plugin
|
28
22
|
|
29
23
|
* Create test/spec testing plugin
|
30
24
|
|
31
25
|
* Create test/unit testing plugin
|
32
|
-
|
33
|
-
* Allow plugins to be installed as gems with a config/dependencies.rb like merb
|
@@ -37,7 +37,7 @@ class RucolaGenerator < RubiGen::Base
|
|
37
37
|
m.template "Rakefile.erb", "Rakefile"
|
38
38
|
|
39
39
|
m.file "app/controllers/application_controller.rb", "app/controllers/application_controller.rb"
|
40
|
-
m.file_copy_each %w[boot.rb environment.rb ib_external_class_defs.yml], "config"
|
40
|
+
m.file_copy_each %w[boot.rb dependencies.rb environment.rb ib_external_class_defs.yml], "config"
|
41
41
|
m.template "config/Info.plist.erb", "config/Info.plist"
|
42
42
|
m.symlink "config/Info.plist", "Info.plist"
|
43
43
|
|
@@ -58,18 +58,22 @@ class RucolaGenerator < RubiGen::Base
|
|
58
58
|
# test
|
59
59
|
m.file "test/test_helper.rb", "test/test_helper.rb"
|
60
60
|
m.file "test/controllers/test_application_controller.rb", "test/controllers/test_application_controller.rb"
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
FileUtils.copy(source_path(plugin), destination_path(plugin))
|
66
|
-
File.chmod(0755, destination_path(plugin))
|
67
|
-
|
61
|
+
|
62
|
+
copy_and_make_executable('script/plugin')
|
63
|
+
copy_and_make_executable('script/console')
|
64
|
+
|
68
65
|
m.dependency "install_rubigen_scripts", [destination_root, "rucola"],
|
69
66
|
:shebang => options[:shebang], :collision => :force
|
70
67
|
end
|
71
68
|
end
|
72
69
|
|
70
|
+
def copy_and_make_executable(file)
|
71
|
+
logger.create file
|
72
|
+
FileUtils.mkdir_p File.dirname(destination_path(file))
|
73
|
+
FileUtils.copy(source_path(file), destination_path(file))
|
74
|
+
File.chmod(0755, destination_path(file))
|
75
|
+
end
|
76
|
+
|
73
77
|
protected
|
74
78
|
def banner
|
75
79
|
<<-EOS
|
@@ -103,9 +107,12 @@ EOS
|
|
103
107
|
app/controllers
|
104
108
|
app/models
|
105
109
|
app/views
|
110
|
+
app/assets
|
106
111
|
config/environments
|
112
|
+
lib
|
107
113
|
script
|
108
114
|
test/controllers
|
115
|
+
test/lib
|
109
116
|
test/models
|
110
117
|
vendor
|
111
118
|
)
|
@@ -1,12 +1,40 @@
|
|
1
|
-
# Application configuration
|
2
|
-
APPNAME = "<%= name %>"
|
3
|
-
TARGET = "#{APPNAME}.app"
|
4
|
-
#APPVERSION = "rev#{`svn info`[/Revision: (\d+)/, 1]}"
|
5
|
-
APPVERSION = Time.now.strftime("%Y-%m-%d")
|
6
|
-
PUBLISH = 'yourname@yourhost:path'
|
7
|
-
|
8
1
|
# Load Rucola tasks
|
9
2
|
SOURCE_ROOT = File.dirname(__FILE__)
|
10
3
|
require 'rubygems'
|
11
4
|
require 'rucola/rucola_support'
|
12
5
|
load 'rucola/tasks/main.rake'
|
6
|
+
|
7
|
+
# Application configuration
|
8
|
+
|
9
|
+
# You only need to specify this if for some reason the applications name
|
10
|
+
# might be different than the one specified in the Info.plist file under key: CFBundleExecutable
|
11
|
+
#
|
12
|
+
# APPNAME = "<%= name %>"
|
13
|
+
# TARGET = "#{APPNAME}.app"
|
14
|
+
|
15
|
+
# You only need to specify this if for some reason the applications version
|
16
|
+
# might be different than the one specified in the Info.plist file under key: CFBundleVersion
|
17
|
+
#
|
18
|
+
# APPVERSION = INFO_PLIST['CFBundleShortVersionString']
|
19
|
+
# APPVERSION = "rev#{`svn info`[/Revision: (\d+)/, 1]}"
|
20
|
+
# APPVERSION = Time.now.strftime("%Y-%m-%d")
|
21
|
+
|
22
|
+
# Use these constants to define the urls that should be used by the deploy:upload task.
|
23
|
+
#
|
24
|
+
# PUBLISH_URI = URI.parse('scp://yourname@yourhost:port/path')
|
25
|
+
# APPCAST_URI = PUBLISH_URI
|
26
|
+
|
27
|
+
# Tasks
|
28
|
+
|
29
|
+
desc 'Deploy a release build.'
|
30
|
+
task :deploy do
|
31
|
+
puts "\nDeploying...\n\n"
|
32
|
+
|
33
|
+
# Rake::Task['release'].invoke
|
34
|
+
# Rake::Task['deploy:package'].invoke
|
35
|
+
# Rake::Task['deploy:sparkle_appcast'].invoke
|
36
|
+
# Rake::Task['deploy:release_notes'].invoke
|
37
|
+
# Rake::Task['deploy:upload'].invoke
|
38
|
+
# Rake::Task['xcode:clean'].invoke
|
39
|
+
# Rake::Task['dependencies:clean'].invoke
|
40
|
+
end
|