haml_user_tags 0.9.0 → 0.9.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 +8 -8
- data/README.md +7 -10
- data/haml_user_tags.gemspec +11 -10
- data/lib/haml_user_tags/version.rb +2 -1
- data/site/download.html.haml +1 -1
- data/site/index.html.haml +1 -1
- data/site/layout.html.haml +6 -2
- data/site/tutorial.html.haml +1 -1
- metadata +38 -37
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2E5Y2EzNWVlMTQzOTE1NWMwNzkyY2QzNjQ5OGJjYTM3ZDg0NDkzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGU0ZTM2Yzc1MTY3NWFjYjkxOTRkYWJiMDQ4Yzc2NDAxNzBkMGVlZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2VhMTMwMGE2MGU3Zjc5ZTZkZWM1ZDNhZTMxODAwZDEzYmJkNmVjZDZlYTQ2
|
10
|
+
NGNjYTg5NzExNGY5MTBjZmRmYzAyZWNlOTA1OGI5MGJjYTk5YTA3MzE3YTUy
|
11
|
+
ZmMzNjRlOGE0MzY4NzY2NmYwZjgxMzYyZmYwMmI4ZmVkM2MyZmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWM1MTljNDJjN2M5YThjZGFkZTVhNTBkY2Q2YmQ0OTM2YmU3ODZkMjNiOTdk
|
14
|
+
NGY2NjE0NTU4NzVlOTg4MDUzZTE2MzRhZGUzNzNiZTI0NzJmNzk5OWM1MjY5
|
15
|
+
NDM1NThlNWZmN2M4NjI3YTYyNGJhOTYyOWQzZTgzNmRlZGQzNTE=
|
data/README.md
CHANGED
@@ -24,18 +24,15 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
27
|
-
|
27
|
+
The [Tutorial](http://cgamesplay.github.io/haml_user_tags/tutorial.html) will guide you through how to create an use user tags. Briefly:
|
28
28
|
|
29
|
-
|
29
|
+
```haml
|
30
|
+
- define_tag :MyHamlHelper do |attributes, content|
|
31
|
+
%samp MyHelper called with #{attributes.inspect} and #{content.inspect}
|
32
|
+
%br
|
30
33
|
|
31
|
-
|
32
|
-
|
33
|
-
- Explain the lazy evaluation of content
|
34
|
-
- Document how to migrate from partials
|
35
|
-
- Create a wrapper around render :partial to set it as a custom tag.
|
36
|
-
|
37
|
-
It should ensure that tags in the partial don't get included. Potentially use
|
38
|
-
Haml::to_method or whatever to do the defining.
|
34
|
+
%MyHamlHelper.cls helper defined in Haml directly
|
35
|
+
```
|
39
36
|
|
40
37
|
## Motivation
|
41
38
|
|
data/haml_user_tags.gemspec
CHANGED
@@ -8,8 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = HamlUserTags::VERSION
|
9
9
|
spec.authors = ["Ryan Patterson"]
|
10
10
|
spec.email = ["cgamesplay@cgamesplay.com"]
|
11
|
-
spec.summary =
|
12
|
-
spec.
|
11
|
+
spec.summary = "Helpers for Haml, in Haml."
|
12
|
+
spec.description = "Define reusable functions in Haml that can be called with native Haml syntax."
|
13
|
+
spec.homepage = "http://cgamesplay.github.io/haml_user_tags/"
|
13
14
|
spec.license = "MIT"
|
14
15
|
|
15
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -20,16 +21,16 @@ Gem::Specification.new do |spec|
|
|
20
21
|
spec.add_runtime_dependency "haml", "~> 4.0"
|
21
22
|
|
22
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
23
|
-
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.3"
|
24
25
|
|
25
26
|
# Site dependencies
|
26
|
-
spec.add_development_dependency "stasis"
|
27
|
-
spec.add_development_dependency "therubyracer"
|
28
|
-
spec.add_development_dependency "less"
|
29
|
-
spec.add_development_dependency "pygments.rb"
|
27
|
+
spec.add_development_dependency "stasis", "~> 0.2"
|
28
|
+
spec.add_development_dependency "therubyracer", "~> 0.12"
|
29
|
+
spec.add_development_dependency "less", "~> 2.2"
|
30
|
+
spec.add_development_dependency "pygments.rb", "~> 0.5"
|
30
31
|
|
31
32
|
# Test dependencies
|
32
|
-
spec.add_development_dependency "cucumber"
|
33
|
-
spec.add_development_dependency "rspec-expectations"
|
34
|
-
spec.add_development_dependency "fakefs"
|
33
|
+
spec.add_development_dependency "cucumber", "~> 1.3"
|
34
|
+
spec.add_development_dependency "rspec-expectations", "~> 3.0"
|
35
|
+
spec.add_development_dependency "fakefs", "~> 0.5"
|
35
36
|
end
|
data/site/download.html.haml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
- @page_title = "Download"
|
2
2
|
%h1 Download
|
3
|
-
%p The current version of Haml User Tags is #{HamlUserTags::
|
3
|
+
%p The current version of Haml User Tags is #{HamlUserTags::LATEST_STABLE_VERSION}.
|
4
4
|
%h2 Using Bundler
|
5
5
|
%p
|
6
6
|
Most people will just want to add the <code>haml_user_tags</code> gem to
|
data/site/index.html.haml
CHANGED
data/site/layout.html.haml
CHANGED
@@ -34,8 +34,12 @@
|
|
34
34
|
= yield
|
35
35
|
%footer
|
36
36
|
.container
|
37
|
-
|
38
|
-
|
37
|
+
%p
|
38
|
+
Built by <a href="http://cgamesplay.com/">Ryan Patterson</a>.
|
39
|
+
Currently at v#{HamlUserTags::LATEST_STABLE_VERSION}.
|
40
|
+
%p
|
41
|
+
%iframe{ :src => "http://ghbtns.com/github-btn.html?user=CGamesPlay&repo=haml_user_tags&type=watch&count=true", :allowtransparency => true, :frameborder => 0, :scrolling => 0, :width => 110, :height => 20 }
|
42
|
+
%iframe{ :src => "http://ghbtns.com/github-btn.html?user=CGamesPlay&repo=haml_user_tags&type=fork&count=true", :allowtransparency => true, :frameborder => 0, :scrolling => 0, :width => 95, :height => 20 }
|
39
43
|
%script{:src => "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"}
|
40
44
|
%script{:src => "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"}
|
41
45
|
:javascript
|
data/site/tutorial.html.haml
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
%MyHelper{foo: "bar"} content
|
35
35
|
%Alert.alert-warning{closable: false}
|
36
36
|
%strong Caveat:
|
37
|
-
Notice that the attribute was passed as <code>:foo</code>, but was translated to a string <code>"foo"</code> when the helper function ran. Haml User Tags will use <a href="http://api.rubyonrails.org/classes/ActiveSupport/HashWithIndifferentAccess.html">HashWithIndifferentAccess</a> when running under Rails, so this is not generally
|
37
|
+
Notice that the attribute was passed as <code>:foo</code>, but was translated to a string <code>"foo"</code> when the helper function ran. Haml User Tags will use <a href="http://api.rubyonrails.org/classes/ActiveSupport/HashWithIndifferentAccess.html">HashWithIndifferentAccess</a> when running under Rails, so this is not generally an issue.
|
38
38
|
%p In addition to specifying attributes as a hash, Haml also knows how to translate IDs and class names:
|
39
39
|
%LiveExample.haml{context: context}
|
40
40
|
:preserve
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml_user_tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Patterson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -42,115 +42,116 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: stasis
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '0.2'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '0.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: therubyracer
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '0.12'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '0.12'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: less
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.2'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pygments.rb
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
103
|
+
version: '0.5'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
110
|
+
version: '0.5'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: cucumber
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '1.3'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '1.3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec-expectations
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
131
|
+
version: '3.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
138
|
+
version: '3.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: fakefs
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
145
|
+
version: '0.5'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
description:
|
152
|
+
version: '0.5'
|
153
|
+
description: Define reusable functions in Haml that can be called with native Haml
|
154
|
+
syntax.
|
154
155
|
email:
|
155
156
|
- cgamesplay@cgamesplay.com
|
156
157
|
executables:
|
@@ -185,7 +186,7 @@ files:
|
|
185
186
|
- site/layout.html.haml
|
186
187
|
- site/style.css.less
|
187
188
|
- site/tutorial.html.haml
|
188
|
-
homepage:
|
189
|
+
homepage: http://cgamesplay.github.io/haml_user_tags/
|
189
190
|
licenses:
|
190
191
|
- MIT
|
191
192
|
metadata: {}
|
@@ -208,7 +209,7 @@ rubyforge_project:
|
|
208
209
|
rubygems_version: 2.2.1
|
209
210
|
signing_key:
|
210
211
|
specification_version: 4
|
211
|
-
summary:
|
212
|
+
summary: Helpers for Haml, in Haml.
|
212
213
|
test_files:
|
213
214
|
- features/define_tag.feature
|
214
215
|
- features/engine.feature
|