scaffoldhub 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,15 +10,22 @@ module Erb
10
10
 
11
11
  def copy_view_files
12
12
  each_template_file(:erb) do |erb_template_file|
13
- unless erb_template_file.dest == 'app/views/layouts/layout.erb'
13
+ if is_layout_erb?(erb_template_file)
14
+ copy_layout_file(erb_template_file)
15
+ else
14
16
  template erb_template_file.src, File.join("app/views", controller_file_path, erb_template_file.dest)
15
17
  end
16
18
  end
17
19
  end
18
20
 
19
- def copy_layout_file
20
- layout_template = find_template_file('erb', 'templates/layout.erb')
21
- template layout_template.src, File.join('app/views/layouts', "#{controller_file_name}.html.erb") if layout_template
21
+ private
22
+
23
+ def copy_layout_file(layout_template)
24
+ template layout_template.src, File.join('app/views/layouts', "#{controller_file_name}.html.erb")
25
+ end
26
+
27
+ def is_layout_erb?(template_file)
28
+ template_file.dest == 'app/views/layouts/layout.erb'
22
29
  end
23
30
  end
24
31
  end
@@ -5,5 +5,5 @@ require 'scaffoldhub/template_file'
5
5
  require 'scaffoldhub/helper'
6
6
 
7
7
  module Scaffoldhub
8
- VERSION = '0.0.2'
8
+ VERSION = '0.0.3'
9
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffoldhub
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Shaughnessy
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-07 00:00:00 -05:00
18
+ date: 2011-03-12 23:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency