jt-partial 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/jt-partial/js.rb +2 -2
- data/lib/jt-partial/partial.rb +8 -2
- data/lib/jt-partial/version.rb +1 -1
- metadata +3 -4
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
|
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
|
16
|
+
template += haml_render "#{template_path}/_js_script_tag.haml", {:js_file_path => "js/pages.js"}
|
17
17
|
template
|
18
18
|
end
|
data/lib/jt-partial/partial.rb
CHANGED
@@ -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("#{
|
18
|
+
html_page = File.new("#{output_path}.html", "w")
|
15
19
|
html_page.write(output)
|
16
|
-
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
data/lib/jt-partial/version.rb
CHANGED
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.
|
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:
|
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.
|
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:
|