debride-haml 1.0.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: 8b440425be5c4e2a1c39f9b3695f1ea2b32993c4
4
+ data.tar.gz: 96c200ea521cd7b08edd8b51668d2991e5e0cfc6
5
+ SHA512:
6
+ metadata.gz: c11857629d65a1a387ab372b1cd9a13fdb585afb1548a9c9148d491faf9851ff95eb8b2a4d891968d4b0f53bc6f73f4338253506babb8fa79ea56219d0299151
7
+ data.tar.gz: 206aace5b00679f5280301884042d1538074784430bfa9a84171a79c79599688a28c488f30a21ebf774db55b58a8e57c29a442481043e7293046241774741879
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
File without changes
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2015-04-04
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
@@ -0,0 +1,7 @@
1
+ .autotest
2
+ History.rdoc
3
+ Manifest.txt
4
+ README.rdoc
5
+ Rakefile
6
+ lib/debride_haml.rb
7
+ test/test_debride_haml.rb
@@ -0,0 +1,50 @@
1
+ = debride-haml
2
+
3
+ * https://github.com/phiggins/debride-haml
4
+
5
+ == DESCRIPTION:
6
+
7
+ Plugin to allow debride to parse Haml files.
8
+
9
+ == REQUIREMENTS:
10
+
11
+ * Debride 1.1+
12
+ * Haml (tested with 4.0.6)
13
+
14
+ == INSTALL:
15
+
16
+ * Nothing special.
17
+
18
+ == DEVELOPERS:
19
+
20
+ After checking out the source, run:
21
+
22
+ $ rake newb
23
+
24
+ This task will install any missing dependencies, run the tests/specs,
25
+ and generate the RDoc.
26
+
27
+ == LICENSE:
28
+
29
+ (The MIT License)
30
+
31
+ Copyright (c) 2015 Pete Higgins
32
+
33
+ Permission is hereby granted, free of charge, to any person obtaining
34
+ a copy of this software and associated documentation files (the
35
+ 'Software'), to deal in the Software without restriction, including
36
+ without limitation the rights to use, copy, modify, merge, publish,
37
+ distribute, sublicense, and/or sell copies of the Software, and to
38
+ permit persons to whom the Software is furnished to do so, subject to
39
+ the following conditions:
40
+
41
+ The above copyright notice and this permission notice shall be
42
+ included in all copies or substantial portions of the Software.
43
+
44
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
45
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
46
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
47
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
48
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
49
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
50
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,16 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.plugin :rdoc
7
+
8
+ Hoe.spec 'debride-haml' do
9
+ developer 'Pete Higgins', 'pete@peterhiggins.org'
10
+ license 'MIT'
11
+
12
+ dependency 'debride', '~> 1.1'
13
+ dependency 'haml', '~> 4.0'
14
+ end
15
+
16
+ # vim: syntax=ruby
@@ -0,0 +1,21 @@
1
+ require 'debride'
2
+ require 'haml'
3
+
4
+ class Debride
5
+ module Haml
6
+ VERSION = '1.0.0'
7
+ end
8
+
9
+ def process_haml file
10
+ haml = File.read file
11
+
12
+ ruby = ::Haml::Engine.new(haml, ugly: true).precompiled
13
+
14
+ begin
15
+ RubyParser.new.process ruby, file
16
+ rescue => e
17
+ warn ruby if option[:verbose]
18
+ raise e
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ require "minitest/autorun"
2
+ require "debride/haml"
3
+ require "tempfile"
4
+
5
+ module TestDebride; end
6
+
7
+ class TestDebride::TestHaml < Minitest::Test
8
+ def test_process_haml
9
+ file = Tempfile.new ['debride-haml-test', '.haml']
10
+
11
+ file.write(<<-HAML.strip)
12
+ %p
13
+ = 1/0
14
+ - "foo"
15
+ HAML
16
+
17
+ file.flush
18
+
19
+ sexp = Debride.new.process_haml file.path
20
+
21
+ # Output from Haml 4.0.6
22
+ expected = s(:block, s(:call, s(:call, s(:call, nil, :_hamlout), :buffer), :<<, s(:dstr, "<p></p>\n", s(:evstr, s(:call, s(:lit, 1), :/, s(:lit, 0))), s(:str, "\n"))), s(:str, "foo"))
23
+
24
+ assert_equal expected, sexp
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: debride-haml
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Pete Higgins
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: debride
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: haml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: hoe
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.13'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.13'
69
+ description: Plugin to allow debride to parse Haml files.
70
+ email:
71
+ - pete@peterhiggins.org
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files:
75
+ - History.rdoc
76
+ - Manifest.txt
77
+ - README.rdoc
78
+ files:
79
+ - ".autotest"
80
+ - ".gemtest"
81
+ - History.rdoc
82
+ - Manifest.txt
83
+ - README.rdoc
84
+ - Rakefile
85
+ - lib/debride_haml.rb
86
+ - test/test_debride_haml.rb
87
+ homepage: https://github.com/phiggins/debride-haml
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options:
93
+ - "--main"
94
+ - README.rdoc
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubyforge_project:
109
+ rubygems_version: 2.4.6
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: Plugin to allow debride to parse Haml files.
113
+ test_files: []