merb-haml 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +4 -4
- data/lib/generators/controller.rb +3 -3
- data/lib/generators/layout.rb +4 -4
- data/lib/generators/resource_controller.rb +4 -4
- data/lib/generators/templates/resource_controller/datamapper/app/views/%file_name%/edit.html.haml +2 -2
- data/lib/generators/templates/resource_controller/datamapper/app/views/%file_name%/new.html.haml +2 -2
- metadata +3 -3
data/Rakefile
CHANGED
@@ -17,7 +17,7 @@ GEM_EMAIL = "ykatz@engineyard.com"
|
|
17
17
|
|
18
18
|
GEM_NAME = "merb-haml"
|
19
19
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
20
|
-
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.
|
20
|
+
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.6") + PKG_BUILD
|
21
21
|
|
22
22
|
RELEASE_NAME = "REL #{GEM_VERSION}"
|
23
23
|
|
@@ -35,7 +35,7 @@ spec = Gem::Specification.new do |s|
|
|
35
35
|
s.author = GEM_AUTHOR
|
36
36
|
s.email = GEM_EMAIL
|
37
37
|
s.homepage = PROJECT_URL
|
38
|
-
s.add_dependency('merb-core', '>= 0.9.
|
38
|
+
s.add_dependency('merb-core', '>= 0.9.6')
|
39
39
|
s.add_dependency('haml', '>= 1.8.2')
|
40
40
|
s.require_path = 'lib'
|
41
41
|
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
|
@@ -47,14 +47,14 @@ end
|
|
47
47
|
|
48
48
|
desc "Install the gem"
|
49
49
|
task :install => [:package] do
|
50
|
-
sh
|
50
|
+
sh install_command(GEM_NAME, GEM_VERSION)
|
51
51
|
end
|
52
52
|
|
53
53
|
namespace :jruby do
|
54
54
|
|
55
55
|
desc "Run :package and install the resulting .gem with jruby"
|
56
56
|
task :install => :package do
|
57
|
-
sh
|
57
|
+
sh jinstall_command(GEM_NAME, GEM_VERSION)
|
58
58
|
end
|
59
59
|
|
60
60
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Merb::Generators::ControllerGenerator.template :index_haml, :template_engine => :haml do
|
2
|
-
source(File.dirname(__FILE__), 'templates/controller/app/views/%file_name%/index.html.haml')
|
3
|
-
destination("app/views", base_path, "#{file_name}/index.html.haml")
|
1
|
+
Merb::Generators::ControllerGenerator.template :index_haml, :template_engine => :haml do |t|
|
2
|
+
t.source = File.join(File.dirname(__FILE__), 'templates/controller/app/views/%file_name%/index.html.haml')
|
3
|
+
t.destination = File.join("app/views", base_path, "#{file_name}/index.html.haml")
|
4
4
|
end
|
data/lib/generators/layout.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Merb::Generators::LayoutGenerator.template :layout_haml, :template_engine => :haml do
|
2
|
-
source(File.dirname(__FILE__), 'templates/layout/app/views/layout/%file_name%.html.haml')
|
3
|
-
destination
|
4
|
-
end
|
1
|
+
Merb::Generators::LayoutGenerator.template :layout_haml, :template_engine => :haml do |t|
|
2
|
+
t.source = File.join(File.dirname(__FILE__), 'templates/layout/app/views/layout/%file_name%.html.haml')
|
3
|
+
t.destination = "app/views/layout/#{file_name}.html.haml"
|
4
|
+
end
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
[:show, :index, :edit, :new].each do |view|
|
4
4
|
|
5
|
-
Merb::Generators::ResourceControllerGenerator.template "view_#{view}_haml", :orm => orm, :template_engine => :haml do
|
6
|
-
source(File.dirname(__FILE__), "templates/resource_controller/#{orm}/app/views/%file_name%/#{view}.html.haml")
|
7
|
-
destination("app/views", base_path, "#{file_name}/#{view}.html.haml")
|
5
|
+
Merb::Generators::ResourceControllerGenerator.template "view_#{view}_haml", :orm => orm, :template_engine => :haml do |t|
|
6
|
+
t.source = File.join(File.dirname(__FILE__), "templates/resource_controller/#{orm}/app/views/%file_name%/#{view}.html.haml")
|
7
|
+
t.destination = File.join("app/views", base_path, "#{file_name}/#{view}.html.haml")
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
11
11
|
|
12
|
-
end
|
12
|
+
end
|
data/lib/generators/templates/resource_controller/datamapper/app/views/%file_name%/edit.html.haml
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
app/views/<%= file_name %>/edit.html.erb
|
7
7
|
= error_messages_for :<%= singular_model %>
|
8
8
|
|
9
|
-
|
9
|
+
= form_for(@<%= singular_model %>, :action => url(:<%= singular_model %>, @<%= singular_model %>)) do
|
10
10
|
<% for property in properties.select{|p| !p.key?} -%>
|
11
11
|
%p
|
12
12
|
%b
|
@@ -15,7 +15,7 @@
|
|
15
15
|
= <%= field_from_type(property.type) %> :<%= property.getter %>
|
16
16
|
<% end -%>
|
17
17
|
%p
|
18
|
-
=
|
18
|
+
= submit "Update"
|
19
19
|
|
20
20
|
= link_to 'Show', url(:<%= singular_model %>, @<%= singular_model %>)
|
21
21
|
|
|
data/lib/generators/templates/resource_controller/datamapper/app/views/%file_name%/new.html.haml
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
= error_messages_for :<%= singular_model %>
|
8
8
|
|
9
|
-
|
9
|
+
= form_for(@<%= singular_model %>, :action => url(:<%= plural_model %>) ) do |f|
|
10
10
|
<% for property in properties.select{|p| !p.key?} -%>
|
11
11
|
%p
|
12
12
|
%b
|
@@ -15,6 +15,6 @@
|
|
15
15
|
|
16
16
|
<% end -%>
|
17
17
|
%p
|
18
|
-
=
|
18
|
+
= submit "Create"
|
19
19
|
|
20
20
|
= link_to 'Back', url(:<%= plural_model %>)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-09 00:00:00 +03:00
|
13
13
|
default_executable:
|
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: 0.9.
|
23
|
+
version: 0.9.6
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: haml
|