merb-haml 0.9.8 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Generators ADDED
@@ -0,0 +1,4 @@
1
+ scope 'merb-gen' do
2
+ dir = File.join(File.dirname(__FILE__), 'lib', 'generators/')
3
+ Merb.add_generators dir + 'controller', dir + 'layout', dir + 'resource_controller'
4
+ end
data/Rakefile CHANGED
@@ -4,6 +4,8 @@ require "extlib"
4
4
  require 'merb-core/tasks/merb_rake_helper'
5
5
  require "spec/rake/spectask"
6
6
 
7
+ require File.join(File.dirname(__FILE__), "../merb-core/lib/merb-core/version.rb")
8
+
7
9
  ##############################################################################
8
10
  # Package && release
9
11
  ##############################################################################
@@ -17,7 +19,7 @@ GEM_EMAIL = "ykatz@engineyard.com"
17
19
 
18
20
  GEM_NAME = "merb-haml"
19
21
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
20
- GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.8") + PKG_BUILD
22
+ GEM_VERSION = Merb::VERSION + PKG_BUILD
21
23
 
22
24
  RELEASE_NAME = "REL #{GEM_VERSION}"
23
25
 
@@ -35,10 +37,10 @@ spec = Gem::Specification.new do |s|
35
37
  s.author = GEM_AUTHOR
36
38
  s.email = GEM_EMAIL
37
39
  s.homepage = PROJECT_URL
38
- s.add_dependency('merb-core', '>= 0.9.8')
39
- s.add_dependency('haml', '>= 1.8.2')
40
+ s.add_dependency('merb-core', "= #{Merb::VERSION}")
41
+ s.add_dependency('haml', '>= 2.0.3')
40
42
  s.require_path = 'lib'
41
- s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
43
+ s.files = %w(LICENSE README Rakefile TODO Generators) + Dir.glob("{lib}/**/*")
42
44
  end
43
45
 
44
46
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -75,4 +77,4 @@ Spec::Rake::SpecTask.new('spec') do |t|
75
77
  end
76
78
 
77
79
  desc 'Default: run spec examples'
78
- task :default => 'spec'
80
+ task :default => 'spec'
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.8
4
+ version: 0.9.9
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-10-06 00:00:00 +03:00
12
+ date: 2008-10-13 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -18,9 +18,9 @@ dependencies:
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ">="
21
+ - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.8
23
+ version: 0.9.9
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: haml
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.2
33
+ version: 2.0.3
34
34
  version:
35
35
  description: Merb plugin that provides HAML support
36
36
  email: ykatz@engineyard.com
@@ -47,6 +47,7 @@ files:
47
47
  - README
48
48
  - Rakefile
49
49
  - TODO
50
+ - Generators
50
51
  - lib/generators
51
52
  - lib/generators/controller.rb
52
53
  - lib/generators/layout.rb
@@ -99,25 +100,6 @@ files:
99
100
  - lib/merb-haml/merbtasks.rb
100
101
  - lib/merb-haml/template.rb
101
102
  - lib/merb-haml.rb
102
- - spec/controllers
103
- - spec/controllers/haml.rb
104
- - spec/controllers/views
105
- - spec/controllers/views/capture_haml
106
- - spec/controllers/views/capture_haml/index.html.haml
107
- - spec/controllers/views/concat_haml
108
- - spec/controllers/views/concat_haml/index.html.haml
109
- - spec/controllers/views/haml_config
110
- - spec/controllers/views/haml_config/index.html.haml
111
- - spec/controllers/views/haml_controller
112
- - spec/controllers/views/haml_controller/index.html.haml
113
- - spec/controllers/views/partial_haml
114
- - spec/controllers/views/partial_haml/_partial_haml.html.haml
115
- - spec/controllers/views/partial_haml/index.html.haml
116
- - spec/controllers/views/partial_ivars
117
- - spec/controllers/views/partial_ivars/_partial_haml.html.haml
118
- - spec/controllers/views/partial_ivars/index.html.haml
119
- - spec/haml_spec.rb
120
- - spec/spec_helper.rb
121
103
  has_rdoc: true
122
104
  homepage: http://merbivore.com
123
105
  post_install_message:
@@ -1,31 +0,0 @@
1
- class HamlController < Merb::Controller
2
- self._template_root = File.dirname(__FILE__) / "views"
3
- def index
4
- render
5
- end
6
- end
7
-
8
- class PartialHaml < HamlController
9
- end
10
-
11
- class HamlConfig < HamlController
12
- end
13
-
14
- class PartialIvars < HamlController
15
- def index
16
- @var1 = "Partial"
17
- render
18
- end
19
- end
20
-
21
- class CaptureHaml < HamlController
22
- end
23
-
24
- module Merb::ConcatHamlHelper
25
- def concatter(&blk)
26
- concat("<p>Concat</p>", blk.binding)
27
- end
28
- end
29
-
30
- class ConcatHaml < HamlController
31
- end
@@ -1,3 +0,0 @@
1
- - x = capture do
2
- %p Hello
3
- = x
@@ -1,2 +0,0 @@
1
- - concatter do
2
- Hello
@@ -1,2 +0,0 @@
1
- #foo
2
- %foo
@@ -1,2 +0,0 @@
1
- #foo
2
- %p Hello
@@ -1,2 +0,0 @@
1
- #foo
2
- = partial :partial_haml, :text => "Partial"
@@ -1 +0,0 @@
1
- %p== #{@var1} #{@var2}
@@ -1,3 +0,0 @@
1
- #foo
2
- - @var2 = "HAML"
3
- = partial :partial_haml
data/spec/haml_spec.rb DELETED
@@ -1,33 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- describe "HAML" do
4
- it "should be able to render HAML templates" do
5
- c = dispatch_to(HamlController, :index)
6
- c.body.should == ::Haml::Engine.new("#foo\n %p Hello").render
7
- end
8
-
9
- it "should be able to render HAML templates with locals" do
10
- c = dispatch_to(PartialHaml, :index)
11
- c.body.should == ::Haml::Engine.new("#foo\n %p Partial").render
12
- end
13
-
14
- it "should use the haml configuration in Merb::Plugins.config" do
15
- c = dispatch_to(HamlConfig, :index)
16
- c.body.should == ::Haml::Engine.new("#foo\n %foo", :autoclose => ["foo"]).render
17
- end
18
-
19
- it "should be able to have ivars defined in both the controller and the parent template" do
20
- c = dispatch_to(PartialIvars, :index)
21
- c.body.should == ::Haml::Engine.new("#foo\n %p Partial HAML").render
22
- end
23
-
24
- it "should support capture" do
25
- c = dispatch_to(CaptureHaml, :index)
26
- c.body.should == "<p>Hello</p>\n"
27
- end
28
-
29
- it "should support concat" do
30
- c = dispatch_to(ConcatHaml, :index)
31
- c.body.should == "<p>Concat</p>"
32
- end
33
- end
data/spec/spec_helper.rb DELETED
@@ -1,14 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- require "rubygems"
3
- require "merb-core"
4
- require "spec"
5
-
6
- require "merb-haml"
7
- require File.dirname(__FILE__) / "controllers" / "haml"
8
-
9
- Merb::Plugins.config[:haml] = { "autoclose" => ["foo"] }
10
- Merb.start :environment => 'test'
11
-
12
- Spec::Runner.configure do |config|
13
- config.include Merb::Test::RequestHelper
14
- end