dang 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,21 @@
1
+ require "spectory/helper"
2
+
3
+ # filters
4
+ # <:markdown
5
+ # # This is an h1 heading
6
+ # ## h2
7
+ # *bold text*
8
+ # * a
9
+ # * of
10
+ # * items
11
+ # markdown:>
12
+
13
+ # describe "filters" do
14
+ # it "farms out to raw a markdown filter" do
15
+ # Dang.it("<:markdown # an h1 markdown:>").must_equal "<h1>an h1</h1>")
16
+ # end
17
+ #
18
+ # it "farms out to 2 markdown filters with Dang in between" do
19
+ # Dang.it("<:markdown # h1 markdown:> <h2 this is<:markdown **bold text** markdown:> inside an h2>".must_equal "<h1>h1</h1> <h2>this is <b>bold text</b> inside an h2</h2>")
20
+ # end
21
+ # end
@@ -0,0 +1,20 @@
1
+ require "spectory/helper"
2
+
3
+ # TODO experimental
4
+ # for v2
5
+
6
+ # describe "hash attributes" do
7
+ # it "should have a shorthand for a hash as attributes" do
8
+ # # HAML like shorthand for a hash of attributes
9
+ # # Ideas
10
+ #
11
+ # # <body[foo=bar]{attrs, attrs}
12
+ # # <body[foo=#{bar}]{attrs, attrs}
13
+ # # <body{ hidden }
14
+ # # <body#id.class.class2{ attrs }
15
+ # # <body#id.class.class2<= attrs =>
16
+ #
17
+ # # TODO experimental
18
+ #
19
+ # end
20
+ # end
@@ -0,0 +1,11 @@
1
+ require "spectory/helper"
2
+
3
+ # TODO experimental
4
+ # for v2
5
+
6
+ # describe "interpolation" do
7
+ # it "should allow ruby interpolation in ids"
8
+ # it "should allow ruby interpolation in classes"
9
+ # it "should allow ruby interpolation in attributes"
10
+ # it "should allow ruby interpolation in values"
11
+ # end
@@ -0,0 +1,8 @@
1
+ require "spectory/helper"
2
+
3
+ # describe "script tags" do
4
+ # it "skips js that looks like a closing dang tag" do
5
+ # Dang.it("<script alert(' script>') script>").must_equal "<script>alert(' script>')</script>"
6
+ # Dang.it('<script alert(" script>") script>').must_equal '<script>alert(" script>")</script>'
7
+ # end
8
+ # end
@@ -0,0 +1,8 @@
1
+ require "spectory/helper"
2
+
3
+ # describe "style tags" do
4
+ # it "skips css that looks like a closing dang tag" do
5
+ # Dang.it("<style abbr:after { content: ' style>' } style>").must_equal "<style>abbr:after { content: ' style>' } </style>"
6
+ # Dang.it('<style abbr:after { content: " style>" } style>').must_equal '<style>abbr:after { content: " style>" } </style>'
7
+ # end
8
+ # end
@@ -0,0 +1,15 @@
1
+ require "spectory/helper"
2
+
3
+ # TODO experimental
4
+
5
+ # describe "well formedness" do
6
+ # it "should throw a warning when a closer is missing" do
7
+ # Dang.it("<div <p lorem div>").must_equal "<div><p>lorem</div>"
8
+ # Dang.it("<div <p lorem div>").errors.must_equal "Missing Closer: </p>"
9
+ # end
10
+ #
11
+ # it "should throw a warning when a closer is mismatched" do
12
+ # Dang.it("<div <p lorem a> div>").must_equal "<div><p>lorem</a></div>"
13
+ # Dang.it("<div <p lorem a> div>").errors.must_equal "Mismatched Closer: Got </a>. Expected </p>"
14
+ # end
15
+ # end
@@ -0,0 +1,16 @@
1
+ require "spectory/helper"
2
+
3
+ # something like HAML's aligator operator
4
+ # http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#whitespace_removal__and_
5
+
6
+ # TODO experimental
7
+
8
+ # describe "whitespace" do
9
+ # describe "ignoring" do
10
+ # it "should ignore whitespace"
11
+ # end
12
+ #
13
+ # describe "preservation" do
14
+ # it "should preverse whitespace"
15
+ # end
16
+ # end
metadata CHANGED
@@ -1,48 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dang
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Becker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- prerelease: false
15
14
  name: rdoc
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - ~>
17
+ - - "~>"
19
18
  - !ruby/object:Gem::Version
20
19
  version: '4.0'
20
+ type: :development
21
+ prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
- - - ~>
24
+ - - "~>"
24
25
  - !ruby/object:Gem::Version
25
26
  version: '4.0'
26
- type: :development
27
27
  - !ruby/object:Gem::Dependency
28
- prerelease: false
29
28
  name: hoe
30
29
  requirement: !ruby/object:Gem::Requirement
31
30
  requirements:
32
- - - ~>
31
+ - - "~>"
33
32
  - !ruby/object:Gem::Version
34
- version: '3.6'
33
+ version: '3.13'
34
+ type: :development
35
+ prerelease: false
35
36
  version_requirements: !ruby/object:Gem::Requirement
36
37
  requirements:
37
- - - ~>
38
+ - - "~>"
38
39
  - !ruby/object:Gem::Version
39
- version: '3.6'
40
- type: :development
41
- description: ! 'Dang is a Ruby templating language
42
-
40
+ version: '3.13'
41
+ description: |-
42
+ Dang is a Ruby templating language.
43
43
  It uses angle brackets and CSS syntax.
44
-
45
- Somewhere between ERB and Haml.'
44
+ Somewhere between ERB and Haml.
46
45
  email:
47
46
  - veganstraightedge@gmail.com
48
47
  executables:
@@ -54,10 +53,7 @@ extra_rdoc_files:
54
53
  - README.md
55
54
  - TODO.md
56
55
  files:
57
- - .autotest
58
- - .gitignore
59
- - .hoeignore
60
- - .travis.yml
56
+ - ".hoeignore"
61
57
  - Gemfile
62
58
  - Gemfile.lock
63
59
  - History.md
@@ -72,6 +68,30 @@ files:
72
68
  - lib/dang/parser.kpeg
73
69
  - lib/dang/parser.rb
74
70
  - lib/dang/rails.rb
71
+ - spectory/attribute_spec.rb
72
+ - spectory/comment_spec.rb
73
+ - spectory/conditional_comment_spec.rb
74
+ - spectory/data_attribute_spec.rb
75
+ - spectory/doctype_spec.rb
76
+ - spectory/embedded_ruby_spec.rb
77
+ - spectory/file_spec.rb
78
+ - spectory/files/iamshane-com.html
79
+ - spectory/files/iamshane-com.html.dang
80
+ - spectory/filter_spec.rb
81
+ - spectory/helper.rb
82
+ - spectory/sanity_spec.rb
83
+ - spectory/script_spec.rb
84
+ - spectory/selector_spec.rb
85
+ - spectory/style_spec.rb
86
+ - spectory/tag_spec.rb
87
+ - spectory/v2/array_classes_spec.rb
88
+ - spectory/v2/filters/markdown_spec.rb
89
+ - spectory/v2/hash_attribute_spec.rb
90
+ - spectory/v2/interpolation_spec.rb
91
+ - spectory/v2/script_exception_spec.rb
92
+ - spectory/v2/style_exception_spec.rb
93
+ - spectory/well_formedness_spec.rb
94
+ - spectory/whitespace_spec.rb
75
95
  homepage: https://github.com/veganstraightedge/dang
76
96
  licenses:
77
97
  - PUBLIC DOMAIN
@@ -79,26 +99,24 @@ licenses:
79
99
  metadata: {}
80
100
  post_install_message:
81
101
  rdoc_options:
82
- - --main
102
+ - "--main"
83
103
  - README.md
84
104
  require_paths:
85
105
  - lib
86
106
  required_ruby_version: !ruby/object:Gem::Requirement
87
107
  requirements:
88
- - - ! '>='
108
+ - - ">="
89
109
  - !ruby/object:Gem::Version
90
- version: !binary |-
91
- MA==
110
+ version: '0'
92
111
  required_rubygems_version: !ruby/object:Gem::Requirement
93
112
  requirements:
94
- - - ! '>='
113
+ - - ">="
95
114
  - !ruby/object:Gem::Version
96
- version: !binary |-
97
- MA==
115
+ version: '0'
98
116
  requirements: []
99
- rubyforge_project: dang
100
- rubygems_version: 2.0.6
117
+ rubyforge_project:
118
+ rubygems_version: 2.2.2
101
119
  signing_key:
102
120
  specification_version: 4
103
- summary: Dang is a Ruby templating language It uses angle brackets and CSS syntax
121
+ summary: Dang is a Ruby templating language
104
122
  test_files: []
data/.autotest DELETED
@@ -1,12 +0,0 @@
1
- # require 'autotest/restart'
2
- #
3
- # Autotest.add_hook :initialize do |at|
4
- # at.clear_mappings
5
- #
6
- # at.add_mapping %r%/^lib/(.*)\.rb$% do |_, m|
7
- # possible = File.basename(m[1])
8
- # files_matching %r%^test/.*test_#{possible}\.rb$%
9
- # end
10
- #
11
- # at.add_mapping(%r%^test/.*\.rb$%) {|filename, _| filename }
12
- # end
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- .bundle
2
- db/*.sqlite3
3
- log/*.log
4
- tmp/
5
- .sass-cache/
6
- .DS_Store
7
- .rvmrc
8
- *.dat
9
- pkg
@@ -1,9 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
- - rbx-18mode
7
- - rbx-19mode
8
- - jruby-18mode
9
- - jruby-19mode