susanoo 0.13.1 → 0.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8862acf66cd34b1e0a3bfdcea3bfa4198251536f
4
- data.tar.gz: b65c760c4afcd794d1e0106529637bc234fc098e
3
+ metadata.gz: dee89416004428ec107e848730ec9790e4316c85
4
+ data.tar.gz: 2692570284af210d56caf462255dace2e5347e97
5
5
  SHA512:
6
- metadata.gz: b983b094f9919066b77c9915ddb33484349111a835c79dd57414045d1ad647046986de0820bdf172929abfa5a77f5a679984f29d215d299e9bdf4c43e3671f85
7
- data.tar.gz: 273b1de0b37567704d0ca2ae5d969ce0537df8ba45372fb5971a4675fe21bc3a38b33c2ba7d7146291c4a43ea81620afa45c036666451a0c3f22ba47aa2905b8
6
+ metadata.gz: a6b1593da5f988f3c2178c7606042a5e4afb5e0826e0c0c192fa582797bf972be4e07b8cec8dfc9de1983049b18f7390715f4469e86ca4d302d7c5eb112ecaac
7
+ data.tar.gz: 02f356d3763c02b3a96e37899c8468d6f0b5e832b935948897aaa8b59a73bb2ccdc5f9d082201593ac4602b543336d4367482e5ce5893ff24777b486070976ff
@@ -16,7 +16,8 @@ class Susanoo::Application
16
16
  end
17
17
 
18
18
  def build(generator, options)
19
- file_pattern = File.join(project_root, 'src/views/**/*.{html,html.erb}')
19
+ extensions = ['erb', 'slim', 'haml', 'md', 'org', 'liquid', 'rdoc']
20
+ file_pattern = File.join(project_root, "src/views/**/*.{html,#{extensions.join(',')}}")
20
21
  dest_path = File.join(project_root, 'www')
21
22
  src_path = File.join(project_root, 'src')
22
23
 
@@ -29,9 +30,11 @@ class Susanoo::Application
29
30
  # Create missing directories in destination path
30
31
  FileUtils.mkpath dest_path
31
32
 
32
- # Remove erb extension name from destination path
33
- dest_file.gsub!('.erb', '') if File.extname(dest_file) == 'erb'
34
-
33
+ if extensions.include? File.extname(dest_file)[1..-1]
34
+ # Remove erb extension name from destination path
35
+ dest_file.gsub!(File.extname(dest_file), '')
36
+ dest_file = "#{dest_file}.html" if File.extname(dest_file).empty?
37
+ end
35
38
  # Create the destination file
36
39
  generator.create_file dest_file, template.render(self)
37
40
  end
@@ -1,3 +1,3 @@
1
1
  module Susanoo
2
- VERSION = '0.13.1'
2
+ VERSION = '0.13.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: susanoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sameer Rahmani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-12 00:00:00.000000000 Z
11
+ date: 2014-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler