hamls_comment 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in hamls_comment.gemspec
4
+ gemspec
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "hamls_comment/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "hamls_comment"
7
+ s.version = HamlsComment::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Andy Fleener"]
10
+ s.email = ["andy.fleener@thefutureis.mobi"]
11
+ s.homepage = ""
12
+ s.summary = %q{This gem will patch the haml gem to include comments for the start and end of every template haml renders that showes you the location of that template}
13
+ s.description = %q{This gem will put a comment into every rendered haml template that tells you the location of that template}
14
+
15
+ s.rubyforge_project = "hamls_comment"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ s.add_dependency("haml")
22
+ end
@@ -0,0 +1,14 @@
1
+ module HamlsComment
2
+ Haml::Engine.class_eval do
3
+ alias_method :initialize_without_file_comments, :initialize
4
+
5
+ def initialize(template, options ={})
6
+ template = template.dup
7
+ template.insert(0,"/ START #{options[:filename]}\n")
8
+ template.insert(-1,"\n/ END #{options[:filename]}")
9
+ template.freeze
10
+ initialize_without_file_comments(template, options)
11
+ end
12
+
13
+ end if Rails.env.development?
14
+ end
@@ -0,0 +1,3 @@
1
+ module HamlsComment
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hamls_comment
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Andy Fleener
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-07-22 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: haml
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: This gem will put a comment into every rendered haml template that tells you the location of that template
36
+ email:
37
+ - andy.fleener@thefutureis.mobi
38
+ executables: []
39
+
40
+ extensions: []
41
+
42
+ extra_rdoc_files: []
43
+
44
+ files:
45
+ - .gitignore
46
+ - Gemfile
47
+ - Rakefile
48
+ - hamls_comment.gemspec
49
+ - lib/hamls_comment.rb
50
+ - lib/hamls_comment/version.rb
51
+ has_rdoc: true
52
+ homepage: ""
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ requirements: []
79
+
80
+ rubyforge_project: hamls_comment
81
+ rubygems_version: 1.6.2
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: This gem will patch the haml gem to include comments for the start and end of every template haml renders that showes you the location of that template
85
+ test_files: []
86
+