msimkins-haml_scaffold 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ === 1.1.3 / 2010-06-24
2
+
3
+ * Enhancements
4
+ * Updated generator code for Rails 2.3.8
5
+ * Included LayoutHelper with title modules
6
+ * included formtastic as a dependency
1
7
  === 1.1.0 / 2009-07-30
2
8
 
3
9
  * 3 major enhancements
@@ -81,7 +81,7 @@ Also, don't forget to Hamlize your Rails app:
81
81
  {Norman Clarke}[mailto:norman@njclarke.com], modifications by {Mike Simkins}[mailto:software@g7obs.com]
82
82
 
83
83
  == Contributors
84
- {Caleb Harrelson}[mailto:atrophic@gmail.com]
84
+ {Caleb Harrelson}[atrophic@gmail.com]
85
85
  == License
86
86
 
87
87
  This work is derived from code in {Ruby on Rails}[http://rubyonrails.org/] and
@@ -54,7 +54,7 @@ class HamlScaffoldGenerator < Rails::Generator::NamedBase
54
54
  m.template("_form.html.haml.erb", File.join('app/views', controller_class_path, controller_file_name, "_form.html.haml"))
55
55
  m.template("_object.html.haml.erb", File.join('app/views', controller_class_path, controller_file_name, "_#{name}.html.haml"))
56
56
  m.template('controller.rb.erb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb"))
57
- m.template('helper.rb.erb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))
57
+ m.template('helper.rb.erb', File.join('app/helpers', controller_class_path, "layout_helper.rb"))
58
58
  m.directory('app/views/layouts')
59
59
  m.template('layout.html.haml.erb', 'app/views/layouts/application.html.haml', :collision => :skip, :assigns => {:application_name => @application_name})
60
60
  m.directory('public/stylesheets/sass')
@@ -1,2 +1,18 @@
1
- module <%= controller_class_name %>Helper
1
+ module LayoutHelper
2
+ def title(page_title = "", show_title = true)
3
+ content_for(:title) { page_title.to_s}
4
+ @show_title = show_title
5
+ end
6
+
7
+ def show_title?
8
+ @show_title
9
+ end
10
+
11
+ def stylesheet(*args)
12
+ content_for(:head) { stylesheet_link_tag(*args) }
13
+ end
14
+
15
+ def javascript(*args)
16
+ content_for(:head) { javascript_include_tag(*args) }
17
+ end
2
18
  end
@@ -2,7 +2,7 @@ module HamlScaffold
2
2
  class Version
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 3
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msimkins-haml_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 2
10
- version: 1.1.2
9
+ - 3
10
+ version: 1.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Norman Clarke
@@ -53,9 +53,25 @@ dependencies:
53
53
  type: :runtime
54
54
  version_requirements: *id002
55
55
  - !ruby/object:Gem::Dependency
56
- name: mocha
56
+ name: formtastic
57
57
  prerelease: false
58
58
  requirement: &id003 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 47
64
+ segments:
65
+ - 0
66
+ - 9
67
+ - 10
68
+ version: 0.9.10
69
+ type: :runtime
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: mocha
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
59
75
  none: false
60
76
  requirements:
61
77
  - - ">="
@@ -67,11 +83,11 @@ dependencies:
67
83
  - 0
68
84
  version: 0.9.0
69
85
  type: :runtime
70
- version_requirements: *id003
86
+ version_requirements: *id004
71
87
  - !ruby/object:Gem::Dependency
72
88
  name: newgem
73
89
  prerelease: false
74
- requirement: &id004 !ruby/object:Gem::Requirement
90
+ requirement: &id005 !ruby/object:Gem::Requirement
75
91
  none: false
76
92
  requirements:
77
93
  - - ">="
@@ -83,11 +99,11 @@ dependencies:
83
99
  - 1
84
100
  version: 1.4.1
85
101
  type: :development
86
- version_requirements: *id004
102
+ version_requirements: *id005
87
103
  - !ruby/object:Gem::Dependency
88
104
  name: hoe
89
105
  prerelease: false
90
- requirement: &id005 !ruby/object:Gem::Requirement
106
+ requirement: &id006 !ruby/object:Gem::Requirement
91
107
  none: false
92
108
  requirements:
93
109
  - - ">="
@@ -99,7 +115,7 @@ dependencies:
99
115
  - 0
100
116
  version: 1.8.0
101
117
  type: :development
102
- version_requirements: *id005
118
+ version_requirements: *id006
103
119
  description: Rails scaffolding with Haml rather than ERB, and various other improvements.
104
120
  email:
105
121
  - software@g7obs.com