html-rails 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTBmMGNhOGI2YjY3MDk4MDM1MzE1YzI1MGRlZjVhYWVlNjNjNTZjYw==
5
+ data.tar.gz: !binary |-
6
+ ZDg4NTUyZjM0ZGVlYWY1NTQ4ZWFkNjkyZjE1ZDFlNTU4ZTkxNWUzYw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YTRmNDhlNWIyNmVjYTVjZDA3ZTUyMmEyMTkyMmQ0ZTljMjcxM2ZiNjU3ODNj
10
+ M2FiNTBjOWVmYWI0NDUyOTY2ZmFjZDZmYjY2NDJmNzhmMmZmNGE0Y2Q3ZmRl
11
+ MzIzMWFhOTEwNjhkMWE5OTg1NzUyNDU2OWFjYzFjMGM4ODkyMDA=
12
+ data.tar.gz: !binary |-
13
+ OTNkMzNhNTBkOWQwMTE4YWQ0M2Y4MjM4ZmEyNGRkOWVmNGE4NjFkZDVkODRh
14
+ Njc5MjE1ZjJiMTVkOTM1MzA0OTQ3M2ZhYzYxZTc1MTI2NzMxMzc2YWJiYzI0
15
+ MGQzYjU5OTE4NWYyOTA0NWE3ZDhlOTBmN2I3ODg0NzhkMmIwMWY=
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,17 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ html-rails (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (10.1.0)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ bundler (~> 1.3)
16
+ html-rails!
17
+ rake
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 mateusmaso
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ html-rails
2
+ ==========
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require 'html/rails/version'
3
+
4
+ Gem::Specification.new do |spec|
5
+ spec.name = "html-rails"
6
+ spec.version = Html::Rails::VERSION
7
+ spec.authors = ["mateusmaso"]
8
+ spec.email = ["m.maso25@gmail.com"]
9
+ spec.description = %q{HTML template adapter for the Rails asset pipeline.}
10
+ spec.summary = %q{HTML template adapter for the Rails asset pipeline.}
11
+ spec.homepage = "https://github.com/mateusmaso/html-rails"
12
+ spec.license = "MIT"
13
+
14
+ spec.files = `git ls-files`.split($/)
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.3"
20
+ spec.add_development_dependency "rake"
21
+ end
@@ -0,0 +1,9 @@
1
+ module Html
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ config.before_initialize do |app|
5
+ Sprockets.register_engine('.html', Tilt)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,25 @@
1
+ require 'tilt'
2
+
3
+ module Html
4
+ module Rails
5
+ class Tilt < Tilt::Template
6
+ include ActionView::Helpers::JavaScriptHelper
7
+
8
+ def self.default_mime_type
9
+ 'application/javascript'
10
+ end
11
+
12
+ def prepare
13
+
14
+ end
15
+
16
+ def evaluate(scope, locals, &block)
17
+ <<-TEMPLATE
18
+ this.HTMLRails || (this.HTMLRails = {});
19
+ this.HTMLRails[#{scope.logical_path}] = '#{escape_javascript data}'
20
+ TEMPLATE
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,5 @@
1
+ module Html
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
data/lib/html/rails.rb ADDED
@@ -0,0 +1,9 @@
1
+ module Html
2
+ module Rails
3
+
4
+ end
5
+ end
6
+
7
+ require "html/rails/tilt"
8
+ require "html/rails/engine"
9
+ require "html/rails/version"
data/lib/html-rails.rb ADDED
@@ -0,0 +1 @@
1
+ require 'html/rails'
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: html-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - mateusmaso
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: HTML template adapter for the Rails asset pipeline.
42
+ email:
43
+ - m.maso25@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - Gemfile
49
+ - Gemfile.lock
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - html-rails.gemspec
54
+ - lib/html-rails.rb
55
+ - lib/html/rails.rb
56
+ - lib/html/rails/engine.rb
57
+ - lib/html/rails/tilt.rb
58
+ - lib/html/rails/version.rb
59
+ homepage: https://github.com/mateusmaso/html-rails
60
+ licenses:
61
+ - MIT
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.0.5
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: HTML template adapter for the Rails asset pipeline.
83
+ test_files: []