public
Description: A Ruby web application framework
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack.git
Click here to lend your support to: mack and make a donation at www.pledgie.com !
- deprecate orm_support in app_config
- javascript support
dsutedja (author)
Mon Jul 21 10:01:37 -0700 2008
commit  eb1557981474a82bc3cd88e1640be9df480f41a4
tree    a1dd0e2ab08ce93475c57ec9c54fe9b6db2efc97
parent  f8b0b96ee82a3b3b82200faeaa4a7a0d2b6aae72
...
14
15
16
 
17
18
19
...
27
28
29
 
 
 
 
30
31
32
33
34
 
...
14
15
16
17
18
19
20
...
28
29
30
31
32
33
34
35
36
37
38
 
39
0
@@ -14,6 +14,7 @@ raise "You must specify a name for this application!" if app.nil?
0
 options = OpenStruct.new
0
 options.orm = "data_mapper"
0
 options.testing_framework = "rspec"
0
+options.js_framework = "jquery"
0
 options.version = "0.6.0.100"
0
 
0
 opts = OptionParser.new do |opts|
0
@@ -27,8 +28,12 @@ opts = OptionParser.new do |opts|
0
     options.testing_framework = v
0
   end
0
   
0
+ opts.on("-j [jquery|prototype]") do |v|
0
+ options.js_framework = v
0
+ end
0
+
0
 end
0
 
0
 opts.parse!(ARGV)
0
 
0
-MackApplicationGenerator.run({"version" => options.version, "app" => app, "orm" => options.orm, "testing_framework" => options.testing_framework})
0
+MackApplicationGenerator.run({"version" => options.version, "app" => app, "orm" => options.orm, "testing_framework" => options.testing_framework, "js_framework" => options.js_framework})
...
3
4
5
6
7
 
 
 
 
 
 
 
8
...
3
4
5
 
6
7
8
9
10
11
12
13
14
0
@@ -3,4 +3,10 @@ whiny_config_missing: false
0
 mack::session_id: _<%= @options["app"].downcase %>_session_id
0
 
0
 orm: <%= @options["orm"] %>
0
-mack::testing_framework: <%= @options["testing_framework"] %>
0
\ No newline at end of file
0
+mack::testing_framework: <%= @options["testing_framework"] %>
0
+
0
+# Mack provides RJS support through mack-javascript gem.
0
+# In order to have RJS support, you will need to perform the following steps:
0
+# 1. Uncomment the code below, and make sure that the framework is the one you want to use
0
+# 2. run: rake generate:javascript
0
+# mack::js_framework: <%= @options["js_framework"] %>
0
\ No newline at end of file
...
3
4
5
6
 
 
 
 
 
 
 
 
 
 
 
7
8
9
...
3
4
5
 
6
7
8
9
10
11
12
13
14
15
16
17
18
19
0
@@ -3,7 +3,17 @@
0
 # Note: this is initialization process only. By the default, application
0
 # generated by mack still have data_mapper as default.
0
 orm = app_config.orm
0
-unless orm.nil?
0
+unless orm.nil?
0
+ Mack.logger.warning %{
0
+ Please note that setting up orm in app_config has been deprecated, and will not be supported in future mack releases.
0
+ Here's how to update your existing application:
0
+ 1. Remove the line:
0
+ orm: data_mapper
0
+ from the app_config/default.yml file
0
+ 2. In gem.rb, add the following line in the require_gems block:
0
+ gem.add "mack-data_mapper", :version => "0.6.0", :libs => ["mack-data_mapper", "mack-data_mapper_tasks"]
0
+ ** if you use active record, then change it to mack-active_record instead of mack-data_mapper
0
+ }
0
   Mack.logger.info "Initializing #{orm} orm..."
0
   require "mack-#{orm}"
0
   require "mack-#{orm}_tasks"
...
14
15
16
 
17
18
19
...
27
28
29
 
 
 
 
30
31
32
33
34
35
 
36
...
14
15
16
17
18
19
20
...
28
29
30
31
32
33
34
35
36
37
38
 
39
40
41
0
@@ -14,6 +14,7 @@ raise "You must specify a name for this application!" if app.nil?
0
 options = OpenStruct.new
0
 options.orm = "data_mapper"
0
 options.testing_framework = "rspec"
0
+options.js_framework = "jquery"
0
 options.version = "<%= gh.version %>"
0
 
0
 opts = OptionParser.new do |opts|
0
@@ -27,8 +28,12 @@ opts = OptionParser.new do |opts|
0
     options.testing_framework = v
0
   end
0
   
0
+ opts.on("-j [jquery|prototype]") do |v|
0
+ options.js_framework = v
0
+ end
0
+
0
 end
0
 
0
 opts.parse!(ARGV)
0
 
0
-MackApplicationGenerator.run({"version" => options.version, "app" => app, "orm" => options.orm, "testing_framework" => options.testing_framework})
0
\ No newline at end of file
0
+MackApplicationGenerator.run({"version" => options.version, "app" => app, "orm" => options.orm, "testing_framework" => options.testing_framework, "js_framework" => options.js_framework})
0
\ No newline at end of file

Comments

    No one has commented yet.