erb2haml_cli 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Erb2hamlCli
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/erb2haml_cli.rb CHANGED
@@ -13,8 +13,10 @@ module Erb2hamlCli
13
13
  begin_text_style + text + END_TEXT_STYLE
14
14
  end
15
15
 
16
- def self.run(argv)
17
- return usage if argv.grep(/--help/)
16
+ def self.run(argv=[])
17
+ if !argv.grep('--help').first.nil? or !argv.grep('-h').first.nil?
18
+ return usage
19
+ end
18
20
 
19
21
  if `which html2haml`.empty?
20
22
  puts "#{color "ERROR: ", RED_FG} Could not find " +
@@ -32,7 +34,7 @@ module Erb2hamlCli
32
34
 
33
35
  Find.find(dir) do |path|
34
36
  if FileTest.file?(path) and path.downcase.match(/\.erb$/i)
35
- haml_path = path.gsub("erb", "haml")
37
+ haml_path = path.gsub(".erb", ".haml")
36
38
 
37
39
  unless FileTest.exists?(haml_path)
38
40
  print "Converting: #{path}... "
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erb2haml_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: