volt_haml 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4a11358b24f2d7f8e2caf2abe96d754ae940735c
4
+ data.tar.gz: d5d5cc31c7d3932a1e2cc689cfebca0b1a2662cf
5
+ SHA512:
6
+ metadata.gz: 9cd8f0ec4aac63357bbc00915b2109e8e73e39171a26bf6a5804cee0195d80bb2464d04fb0f1a08880d09ea26c628e1afc06e6e1fd96943da0ac6e2d73a63f65
7
+ data.tar.gz: 460109d8f31e0b9b2ffcdfc1b7e810062f6ae26b71948009d546e7c288486701a5083489168abd8822bc789d5c28662096c1e6e39188665861c104e2a0df93cf
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in volt_haml.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 CollaboTree
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # VoltHaml
2
+
3
+ Provides **Haml Templates Rendering** for your Volt apps.
4
+
5
+
6
+ ## Installation
7
+
8
+ Add to your Gemfile:
9
+
10
+ ```ruby
11
+ gem 'volt_haml'
12
+ ```
13
+
14
+ This requires a version of volt which does not yet exist, but works with this branch:
15
+ [https://github.com/CollaboTree/volt/tree/haml](https://github.com/CollaboTree/volt/tree/haml)
16
+
17
+
18
+ ## HOW TO USE
19
+
20
+ You need to make slightly weird looking haml, like this:
21
+
22
+ ```haml
23
+ <:Title>
24
+ {{ view main_path, "title", {controller_group: 'main'} }}
25
+ <:Body>
26
+ .container
27
+ .header
28
+ %ul.nav.nav-pills.pull-right
29
+ %:nav{:href => "/"} Home
30
+ {{ if Volt.current_user? }}
31
+ %:nav{:href => "/project/new"} New Post
32
+ {{ end }}
33
+ %:nav{:href => "/about"} About
34
+ %:user_templates:menu
35
+ %h3.text-muted CollaboTree
36
+ %:volt:notices
37
+ {{ view main_path, 'body', {controller_group: 'main'} }}
38
+ .footer
39
+ <:Nav>
40
+ %li.if.end{:class => "{{ active_tab? }} active {{ }}"}
41
+ %a{:href => "{{ attrs.href }}"} {{ yield }}
42
+ ```
43
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,7 @@
1
+ require "volt_haml/version"
2
+ require "haml"
3
+
4
+ module VoltHaml
5
+ require "volt_haml/haml_handler"
6
+ end
7
+
@@ -0,0 +1,9 @@
1
+ module VoltHaml
2
+ class HAMLHandler
3
+ def call(file_contents)
4
+ Haml::Engine.new(file_contents).render
5
+ end
6
+ end
7
+ end
8
+
9
+ Volt::ComponentTemplates.register_template_handler :haml, VoltHaml::HAMLHandler.new
@@ -0,0 +1,3 @@
1
+ module VoltHaml
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'volt_haml/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "volt_haml"
8
+ spec.version = VoltHaml::VERSION
9
+ spec.authors = ["Joran Kikke"]
10
+ spec.email = ["joran.k@gmail.com"]
11
+
12
+ spec.summary = %q{HAML Templates for Volt}
13
+ spec.description = %q{This gem provides HAML templating support for the Volt Framework}
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'haml'
22
+ spec.add_dependency 'volt'
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.8"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: volt_haml
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joran Kikke
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-05-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: haml
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: volt
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.8'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.8'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ description: This gem provides HAML templating support for the Volt Framework
70
+ email:
71
+ - joran.k@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - lib/volt_haml.rb
84
+ - lib/volt_haml/haml_handler.rb
85
+ - lib/volt_haml/version.rb
86
+ - volt_haml.gemspec
87
+ homepage:
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.4.6
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: HAML Templates for Volt
111
+ test_files: []