guard-haml 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/guard/haml.rb CHANGED
@@ -32,7 +32,9 @@ module Guard
32
32
  def get_output(file)
33
33
  file_dir = File.dirname(file)
34
34
  file_name = File.basename(file).split('.')[0..-2].join('.')
35
-
35
+
36
+ file_name = "#{file_name}.html" if file_name.match("\.html?").nil?
37
+
36
38
  file_dir = file_dir.gsub(Regexp.new("#{@options[:input]}(\/){0,1}"), '') if @options[:input]
37
39
  file_dir = File.join(@options[:output], file_dir) if @options[:output]
38
40
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  class HamlVersion
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
- end
5
+ end
@@ -20,6 +20,10 @@ describe Guard::Haml do
20
20
  it 'should return test/index.htm.haml as test/index.htm' do
21
21
  subject.get_output('test/index.htm.haml').should eq('test/index.htm')
22
22
  end
23
+
24
+ it 'should return test/index.haml as test/index.html' do
25
+ subject.get_output('test/index.haml').should eq('test/index.html')
26
+ end
23
27
  end
24
28
 
25
29
  context 'when the output option is set to "demo/output"' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-22 00:00:00.000000000 Z
12
+ date: 2012-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &70114221803440 !ruby/object:Gem::Requirement
16
+ requirement: &70214545761560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70114221803440
24
+ version_requirements: *70214545761560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: haml
27
- requirement: &70114221802400 !ruby/object:Gem::Requirement
27
+ requirement: &70214545760760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70114221802400
35
+ version_requirements: *70214545760760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70114221801780 !ruby/object:Gem::Requirement
38
+ requirement: &70214545760380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70114221801780
46
+ version_requirements: *70214545760380
47
47
  description: Compiles file.html.haml into file.html
48
48
  email:
49
49
  - haeussermann@gmail.com