jt-partial 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/jt-partial/js.rb CHANGED
@@ -10,9 +10,9 @@ def include_js
10
10
  js_files = File.join("js","**", "*.js")
11
11
  Dir.glob js_files do |file|
12
12
  if ! base_js file
13
- template += haml_render "#{template_path}/_js_script_tag.haml", {js_file_path: file}
13
+ template += haml_render "#{template_path}/_js_script_tag.haml", {:js_file_path => file}
14
14
  end
15
15
  end
16
- template += haml_render "#{template_path}/_js_script_tag.haml", {js_file_path: "js/pages.js"}
16
+ template += haml_render "#{template_path}/_js_script_tag.haml", {:js_file_path => "js/pages.js"}
17
17
  template
18
18
  end
@@ -10,7 +10,13 @@ end
10
10
 
11
11
  def generate(template_name)
12
12
  template_path = "_#{template_name}.haml"
13
+ render_and_output_to_file template_path, template_name
14
+ end
15
+
16
+ def render_and_output_to_file(template_path, output_path)
13
17
  output = haml_render(template_path)
14
- html_page = File.new("#{template_name}.html", "w")
18
+ html_page = File.new("#{output_path}.html", "w")
15
19
  html_page.write(output)
16
- end
20
+ end
21
+
22
+
@@ -1,5 +1,5 @@
1
1
  module Jt
2
2
  module Partial
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt-partial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-03 00:00:00.000000000 Z
12
+ date: 2013-04-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: generate one page application html
15
15
  email:
@@ -51,9 +51,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  version: '0'
52
52
  requirements: []
53
53
  rubyforge_project:
54
- rubygems_version: 1.8.23
54
+ rubygems_version: 1.8.24
55
55
  signing_key:
56
56
  specification_version: 3
57
57
  summary: partial for haml
58
58
  test_files: []
59
- has_rdoc: