caterpillar 0.9.16 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +9 -1
- data/README +36 -6
- data/generators/caterpillar/USAGE +1 -1
- data/generators/caterpillar/caterpillar_generator.rb +44 -25
- data/generators/caterpillar/templates/config/portlets.rb +5 -5
- data/generators/caterpillar/templates/images/portlet_test_bench/Leafy_Sea_Dragon_1.jpg +0 -0
- data/generators/caterpillar/templates/images/portlet_test_bench/debug.jpg +0 -0
- data/generators/caterpillar/templates/images/portlet_test_bench/java.png +0 -0
- data/generators/caterpillar/templates/images/portlet_test_bench/rails.png +0 -0
- data/generators/caterpillar/templates/images/portlet_test_bench/ruby.gif +0 -0
- data/generators/caterpillar/templates/javascripts/portlet_test_bench/main.js +3 -0
- data/generators/caterpillar/templates/stylesheets/portlet_test_bench/main.css +163 -0
- data/init.rb +30 -3
- data/lib/caterpillar.rb +36 -1
- data/lib/caterpillar/config.rb +12 -2
- data/lib/caterpillar/liferay.rb +70 -14
- data/lib/caterpillar/portlet.rb +9 -0
- data/lib/caterpillar/task.rb +3 -12
- data/lib/web/portlet.rb +0 -7
- data/portlet_test_bench/controllers/caterpillar/application.rb +13 -0
- data/portlet_test_bench/controllers/caterpillar/css_controller.rb +9 -0
- data/portlet_test_bench/controllers/caterpillar/http_methods_controller.rb +35 -0
- data/portlet_test_bench/controllers/caterpillar/js_controller.rb +74 -0
- data/portlet_test_bench/controllers/caterpillar/login_controller.rb +41 -0
- data/portlet_test_bench/controllers/caterpillar/resource_controller.rb +23 -0
- data/portlet_test_bench/controllers/caterpillar/session_controller.rb +57 -0
- data/portlet_test_bench/controllers/caterpillar/user_controller.rb +6 -0
- data/portlet_test_bench/helpers/caterpillar/application_helper.rb +3 -0
- data/portlet_test_bench/routing.rb +43 -0
- data/portlet_test_bench/views/caterpillar/application/_back_to_menu.html.erb +13 -0
- data/portlet_test_bench/views/caterpillar/application/index.html.erb +70 -0
- data/portlet_test_bench/views/caterpillar/css/background.html.erb +30 -0
- data/portlet_test_bench/views/caterpillar/css/simple.html.erb +53 -0
- data/portlet_test_bench/views/caterpillar/http_methods/back.html.erb +2 -0
- data/portlet_test_bench/views/caterpillar/http_methods/parameter.html.erb +21 -0
- data/portlet_test_bench/views/caterpillar/http_methods/post.html.erb +43 -0
- data/portlet_test_bench/views/caterpillar/http_methods/post_and_redirect.html.erb +25 -0
- data/portlet_test_bench/views/caterpillar/http_methods/redirect.html.erb +4 -0
- data/portlet_test_bench/views/caterpillar/js/_scriptaculous_jquery.html.erb +19 -0
- data/portlet_test_bench/views/caterpillar/js/dragndrop.html.erb +40 -0
- data/portlet_test_bench/views/caterpillar/js/jquery.html.erb +5 -0
- data/portlet_test_bench/views/caterpillar/js/link_to_post.html.erb +5 -0
- data/portlet_test_bench/views/caterpillar/js/prototype.html.erb +5 -0
- data/portlet_test_bench/views/caterpillar/js/scriptaculous.html.erb +10 -0
- data/portlet_test_bench/views/caterpillar/js/simple.html.erb +34 -0
- data/portlet_test_bench/views/caterpillar/login/index.html.erb +52 -0
- data/portlet_test_bench/views/caterpillar/resource/exit_portlet.html.erb +3 -0
- data/portlet_test_bench/views/caterpillar/resource/images.html.erb +13 -0
- data/portlet_test_bench/views/caterpillar/user/home.html.erb +3 -0
- data/portlet_test_bench/views/layouts/basic.html.erb +20 -0
- metadata +61 -3
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en<">
|
4
|
+
<head>
|
5
|
+
<title>Simple JavaScript test</title>
|
6
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
|
7
|
+
|
8
|
+
<%= javascript_include_tag 'portlet_test_bench/main' %>
|
9
|
+
<script type="text/javascript">
|
10
|
+
//<![CDATA[
|
11
|
+
function head_alert() {
|
12
|
+
alert('Ne silazi sa čardaka Rek’o mi je pjevač Laka');
|
13
|
+
}
|
14
|
+
//]]>
|
15
|
+
</script>
|
16
|
+
</head>
|
17
|
+
<body>
|
18
|
+
<%= render :partial => 'caterpillar/application/back_to_menu' %>
|
19
|
+
|
20
|
+
<script type="text/javascript">
|
21
|
+
//<![CDATA[
|
22
|
+
function body_alert() {
|
23
|
+
alert('Ne klepeći nanulama Nemoj da se praviš dama');
|
24
|
+
}
|
25
|
+
//]]>
|
26
|
+
</script>
|
27
|
+
<div>
|
28
|
+
<%= link_to_function "simple alert from an external JS file", "simple_alert()" -%> <br />
|
29
|
+
<%= link_to_function "simple alert from a script tag in <head>", "head_alert()" -%> <br />
|
30
|
+
<%= link_to_function "simple alert from a script tag in <body>", "body_alert()" -%> <br />
|
31
|
+
</div>
|
32
|
+
</body>
|
33
|
+
</html>
|
34
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<p class="info">
|
2
|
+
This is a public page.
|
3
|
+
<% if @user -%>
|
4
|
+
You are currently logged in as <b><%= @user -%></b>.
|
5
|
+
<% else -%>
|
6
|
+
You are not logged in.
|
7
|
+
<% end -%>
|
8
|
+
</p>
|
9
|
+
|
10
|
+
<% if flash[:notice] -%>
|
11
|
+
<p class="notice">
|
12
|
+
<%= flash[:notice] %>
|
13
|
+
</p>
|
14
|
+
<% end -%>
|
15
|
+
|
16
|
+
<p>
|
17
|
+
<% unless @user -%>
|
18
|
+
<%= form_tag :action => "login" %>
|
19
|
+
<p>
|
20
|
+
<span>Username:</span>
|
21
|
+
<%= text_field_tag :username, "user1", :size => 10 %>
|
22
|
+
</p>
|
23
|
+
|
24
|
+
<p>
|
25
|
+
<span>Password:</span>
|
26
|
+
<%= password_field_tag :password, "test", :size => 10 %>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<p id="submit_tags">
|
30
|
+
<%= submit_tag "Login" %>
|
31
|
+
</p>
|
32
|
+
</form>
|
33
|
+
<% else -%>
|
34
|
+
<%= form_tag :action => "logout" %>
|
35
|
+
<p id="submit_tags">
|
36
|
+
<%= submit_tag "Logout" %>
|
37
|
+
</p>
|
38
|
+
<% end -%>
|
39
|
+
</p>
|
40
|
+
|
41
|
+
|
42
|
+
<p class="login_link">
|
43
|
+
<%= link_to 'Protected user page',
|
44
|
+
:controller => :user, :action => :home -%>
|
45
|
+
</p>
|
46
|
+
|
47
|
+
<p class="login_link">
|
48
|
+
<%= link_to 'Protected admin page',
|
49
|
+
:controller => :user, :action => :home -%>
|
50
|
+
</p>
|
51
|
+
|
52
|
+
<hr />
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<p class="info">
|
2
|
+
The following images are served under $RAILS_ROOT/public/images, and are routed (by default) to url (/images/).
|
3
|
+
</p>
|
4
|
+
<% @images.each do |img| -%>
|
5
|
+
<div class="resource_image_box">
|
6
|
+
<div class="resource_image_description">
|
7
|
+
<%= img[:description] -%>
|
8
|
+
</div>
|
9
|
+
<div class="resource_image_tag">
|
10
|
+
<%= image_tag img[:file] -%>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<% end -%>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
<%= @title || "Rails-portlet testbench" -%>
|
7
|
+
</title>
|
8
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
9
|
+
<%= stylesheet_link_tag 'portlet_test_bench/main' %>
|
10
|
+
<%= javascript_include_tag @javascripts if @javascripts -%>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<% if @test_is_selected==true -%>
|
14
|
+
<%= render :partial => 'caterpillar/application/back_to_menu' %>
|
15
|
+
<% end -%>
|
16
|
+
<%= yield %>
|
17
|
+
<br />
|
18
|
+
</body>
|
19
|
+
</html>
|
20
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caterpillar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Lammentausta
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-22 00:00:00 +03:00
|
13
13
|
default_executable: caterpillar
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.0.
|
23
|
+
version: 1.0.18
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
@@ -65,16 +65,74 @@ files:
|
|
65
65
|
- lib/web/portlet.rb
|
66
66
|
- generators/caterpillar
|
67
67
|
- generators/caterpillar/templates
|
68
|
+
- generators/caterpillar/templates/stylesheets
|
69
|
+
- generators/caterpillar/templates/stylesheets/portlet_test_bench
|
70
|
+
- generators/caterpillar/templates/stylesheets/portlet_test_bench/main.css
|
68
71
|
- generators/caterpillar/templates/config
|
69
72
|
- generators/caterpillar/templates/config/portlets.rb
|
70
73
|
- generators/caterpillar/templates/images
|
71
74
|
- generators/caterpillar/templates/images/caterpillar
|
72
75
|
- generators/caterpillar/templates/images/caterpillar/caterpillar.gif
|
76
|
+
- generators/caterpillar/templates/images/portlet_test_bench
|
77
|
+
- generators/caterpillar/templates/images/portlet_test_bench/Leafy_Sea_Dragon_1.jpg
|
78
|
+
- generators/caterpillar/templates/images/portlet_test_bench/rails.png
|
79
|
+
- generators/caterpillar/templates/images/portlet_test_bench/ruby.gif
|
80
|
+
- generators/caterpillar/templates/images/portlet_test_bench/java.png
|
81
|
+
- generators/caterpillar/templates/images/portlet_test_bench/debug.jpg
|
82
|
+
- generators/caterpillar/templates/javascripts
|
83
|
+
- generators/caterpillar/templates/javascripts/portlet_test_bench
|
84
|
+
- generators/caterpillar/templates/javascripts/portlet_test_bench/main.js
|
73
85
|
- generators/caterpillar/caterpillar_generator.rb
|
74
86
|
- generators/caterpillar/USAGE
|
75
87
|
- db/migrate
|
76
88
|
- views/caterpillar
|
77
89
|
- views/caterpillar/_navigation.html.erb
|
90
|
+
- portlet_test_bench/routing.rb
|
91
|
+
- portlet_test_bench/helpers
|
92
|
+
- portlet_test_bench/helpers/caterpillar
|
93
|
+
- portlet_test_bench/helpers/caterpillar/application_helper.rb
|
94
|
+
- portlet_test_bench/controllers
|
95
|
+
- portlet_test_bench/controllers/caterpillar
|
96
|
+
- portlet_test_bench/controllers/caterpillar/application.rb
|
97
|
+
- portlet_test_bench/controllers/caterpillar/resource_controller.rb
|
98
|
+
- portlet_test_bench/controllers/caterpillar/session_controller.rb
|
99
|
+
- portlet_test_bench/controllers/caterpillar/login_controller.rb
|
100
|
+
- portlet_test_bench/controllers/caterpillar/http_methods_controller.rb
|
101
|
+
- portlet_test_bench/controllers/caterpillar/js_controller.rb
|
102
|
+
- portlet_test_bench/controllers/caterpillar/user_controller.rb
|
103
|
+
- portlet_test_bench/controllers/caterpillar/css_controller.rb
|
104
|
+
- portlet_test_bench/views
|
105
|
+
- portlet_test_bench/views/caterpillar
|
106
|
+
- portlet_test_bench/views/caterpillar/application
|
107
|
+
- portlet_test_bench/views/caterpillar/application/_back_to_menu.html.erb
|
108
|
+
- portlet_test_bench/views/caterpillar/application/index.html.erb
|
109
|
+
- portlet_test_bench/views/caterpillar/http_methods
|
110
|
+
- portlet_test_bench/views/caterpillar/http_methods/parameter.html.erb
|
111
|
+
- portlet_test_bench/views/caterpillar/http_methods/back.html.erb
|
112
|
+
- portlet_test_bench/views/caterpillar/http_methods/post_and_redirect.html.erb
|
113
|
+
- portlet_test_bench/views/caterpillar/http_methods/post.html.erb
|
114
|
+
- portlet_test_bench/views/caterpillar/http_methods/redirect.html.erb
|
115
|
+
- portlet_test_bench/views/caterpillar/css
|
116
|
+
- portlet_test_bench/views/caterpillar/css/background.html.erb
|
117
|
+
- portlet_test_bench/views/caterpillar/css/simple.html.erb
|
118
|
+
- portlet_test_bench/views/caterpillar/user
|
119
|
+
- portlet_test_bench/views/caterpillar/user/home.html.erb
|
120
|
+
- portlet_test_bench/views/caterpillar/session
|
121
|
+
- portlet_test_bench/views/caterpillar/resource
|
122
|
+
- portlet_test_bench/views/caterpillar/resource/exit_portlet.html.erb
|
123
|
+
- portlet_test_bench/views/caterpillar/resource/images.html.erb
|
124
|
+
- portlet_test_bench/views/caterpillar/login
|
125
|
+
- portlet_test_bench/views/caterpillar/login/index.html.erb
|
126
|
+
- portlet_test_bench/views/caterpillar/js
|
127
|
+
- portlet_test_bench/views/caterpillar/js/jquery.html.erb
|
128
|
+
- portlet_test_bench/views/caterpillar/js/link_to_post.html.erb
|
129
|
+
- portlet_test_bench/views/caterpillar/js/prototype.html.erb
|
130
|
+
- portlet_test_bench/views/caterpillar/js/scriptaculous.html.erb
|
131
|
+
- portlet_test_bench/views/caterpillar/js/simple.html.erb
|
132
|
+
- portlet_test_bench/views/caterpillar/js/dragndrop.html.erb
|
133
|
+
- portlet_test_bench/views/caterpillar/js/_scriptaculous_jquery.html.erb
|
134
|
+
- portlet_test_bench/views/layouts
|
135
|
+
- portlet_test_bench/views/layouts/basic.html.erb
|
78
136
|
- README
|
79
137
|
- MIT-LICENSE
|
80
138
|
- ChangeLog
|