railbars 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +166 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/railbars.rb +11 -0
- data/lib/railbars/railtie.rb +10 -0
- data/lib/railbars/version.rb +4 -0
- data/lib/railbars/view_helpers.rb +219 -0
- data/railbars.gemspec +30 -0
- metadata +115 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a030fe6ba8744260b27bf9dc3289152d92e8ab2f
|
4
|
+
data.tar.gz: 0b99415db6b4b97cd399a8dcabe70dd6dee2ca08
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e0d88ba6bb273622ce817e668d5e005d683ff2d044f18162c1aa30c93c4dcf66d72c6af9eaa4d3e7c8e79fe91caf761f8adeb8e75d167a31688dbc9346db2ab8
|
7
|
+
data.tar.gz: 3d8dc0eb14f1ac76256f6faae5e95ef89027809e70b2f7a98fa69b9ef57c3cc790c9a0bed818dae34960e4662673be502bf6bc7d1fc0ee476936f2d79ecb2798
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at mark@mrlhumphreys.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Mark Humphreys
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
# Railbars
|
2
|
+
|
3
|
+
Railbars provides a bunch of view helpers for generating handlebar templates in your rails app.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'railbars'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install railbars
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### Expressions
|
24
|
+
|
25
|
+
Expressions are simple values
|
26
|
+
|
27
|
+
```erb
|
28
|
+
<p><%= hb('hello') %></p>
|
29
|
+
```
|
30
|
+
|
31
|
+
Output:
|
32
|
+
|
33
|
+
```html
|
34
|
+
<p>{{hello}}</p>
|
35
|
+
```
|
36
|
+
|
37
|
+
### Helpers
|
38
|
+
|
39
|
+
If you have defined custom helpers and support literal params and hash params. They can be used like so:
|
40
|
+
|
41
|
+
```erb
|
42
|
+
<p><%= hb('nameOfHelper', 'firstParam', 'secondParam', {firstHash: 'a', secondHash: 1}) %></p>
|
43
|
+
```
|
44
|
+
|
45
|
+
Output:
|
46
|
+
|
47
|
+
```html
|
48
|
+
<p>{{#nameOfHelper firstParam secondParam firstHash="a" secondHash=1}}</p>
|
49
|
+
```
|
50
|
+
|
51
|
+
### Block Helpers
|
52
|
+
|
53
|
+
Like Helpers, block helpers support params, but have the added bonus of wrapping around a block:
|
54
|
+
|
55
|
+
```erb
|
56
|
+
<%= hb('nameOfHelper', 'firstParam', 'secondParam', {firstHash: 'a', secondHash: 1}) do %>
|
57
|
+
<p>Hello</p>
|
58
|
+
<% end %>
|
59
|
+
```
|
60
|
+
|
61
|
+
Output:
|
62
|
+
|
63
|
+
```html
|
64
|
+
{{#nameOfHelper firstParam secondParam firstHash="a" secondHash=1}}
|
65
|
+
<p>Hello</p>
|
66
|
+
{{/nameOfHelper}}
|
67
|
+
```
|
68
|
+
|
69
|
+
### Unescape
|
70
|
+
|
71
|
+
Handlebars Unescape are available through the `hbunescape` method:
|
72
|
+
|
73
|
+
```erb
|
74
|
+
<p><%= hbunescape('hello') %></p>
|
75
|
+
```
|
76
|
+
|
77
|
+
Output:
|
78
|
+
|
79
|
+
```html
|
80
|
+
<p>{{{hello}}}</p>
|
81
|
+
```
|
82
|
+
|
83
|
+
### Partials
|
84
|
+
|
85
|
+
Handlebars Partials are available through the `hbpartial` method:
|
86
|
+
|
87
|
+
```erb
|
88
|
+
<p><%= hbpartial('hello') %></p>
|
89
|
+
```
|
90
|
+
|
91
|
+
Output:
|
92
|
+
|
93
|
+
```html
|
94
|
+
<p>{{> hello}}}</p>
|
95
|
+
```
|
96
|
+
|
97
|
+
### Each
|
98
|
+
|
99
|
+
Built in helpers such as each are also provided:
|
100
|
+
|
101
|
+
```erb
|
102
|
+
<%= hbeach('item') do %>
|
103
|
+
<li>Element</li>
|
104
|
+
<% end %>
|
105
|
+
```
|
106
|
+
|
107
|
+
Output:
|
108
|
+
|
109
|
+
```html
|
110
|
+
{{#each item}}
|
111
|
+
<li>Element</li>
|
112
|
+
{{/each}}
|
113
|
+
```
|
114
|
+
|
115
|
+
### If
|
116
|
+
|
117
|
+
If, like else, also has a helper with similar syntax:
|
118
|
+
|
119
|
+
```erb
|
120
|
+
<%= hbif('loggedIn') do %>
|
121
|
+
<p>Logged In</p>
|
122
|
+
<% end %>
|
123
|
+
```
|
124
|
+
|
125
|
+
Output:
|
126
|
+
|
127
|
+
```html
|
128
|
+
{{#if loggedIn}}
|
129
|
+
<p>Logged In</p>
|
130
|
+
{{/each}}
|
131
|
+
```
|
132
|
+
|
133
|
+
### Else
|
134
|
+
|
135
|
+
Else is just a simple expression and can be placed within an if block:
|
136
|
+
|
137
|
+
```erb
|
138
|
+
<%= hbif('loggedIn') do %>
|
139
|
+
<p>Logged In</p>
|
140
|
+
<%= hbelse %>
|
141
|
+
<p>Logged Out</p>
|
142
|
+
<% end %>
|
143
|
+
```
|
144
|
+
|
145
|
+
Output:
|
146
|
+
|
147
|
+
```html
|
148
|
+
{{#if loggedIn}}
|
149
|
+
<p>Logged In</p>
|
150
|
+
{{#else }}
|
151
|
+
<p>Logged Out</p>
|
152
|
+
{{/each}}
|
153
|
+
```
|
154
|
+
|
155
|
+
## Development
|
156
|
+
|
157
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests.
|
158
|
+
|
159
|
+
## Contributing
|
160
|
+
|
161
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mrlhumphreys/railbars. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
162
|
+
|
163
|
+
## License
|
164
|
+
|
165
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
166
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "railbars"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/railbars.rb
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
module Railbars
|
2
|
+
|
3
|
+
# = View Helpers
|
4
|
+
#
|
5
|
+
# Handlebar Helpers for Rails Views.
|
6
|
+
module ViewHelpers
|
7
|
+
# Handlebars helper, returns an expression, helper or block handlebar string
|
8
|
+
#
|
9
|
+
# @param [String] name
|
10
|
+
# The name of the value for the expression or the name of the block.
|
11
|
+
#
|
12
|
+
# @param [Array<Object>] params
|
13
|
+
# The parameters the helper takes
|
14
|
+
#
|
15
|
+
# @return [String]
|
16
|
+
#
|
17
|
+
# ==== Example:
|
18
|
+
# irb> hb('hello')
|
19
|
+
# #=> "{{hello}}"
|
20
|
+
#
|
21
|
+
# irb> hb('myHelper', 'param1', 'param2')
|
22
|
+
# #=> "{{myHelper param1 param2}}"
|
23
|
+
#
|
24
|
+
# irb> hb('myBlockHelper', 'param') { '<p>Hello</p>' }
|
25
|
+
# #=> "{{#myBlockHelper param}}<p>Hello</p>{{/myBlockHelper}}"
|
26
|
+
def hb(name, *params, &block)
|
27
|
+
if block
|
28
|
+
hbblock(name, *params, &block)
|
29
|
+
else
|
30
|
+
if params.any?
|
31
|
+
hbhelper(name, *params)
|
32
|
+
else
|
33
|
+
hbexp(name)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Handlebars expression helper, returns the value wrapped in handlebars
|
39
|
+
#
|
40
|
+
# @param [String] exp
|
41
|
+
# The value to be wrapped
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
#
|
45
|
+
# ==== Example:
|
46
|
+
# irb> hbexp('hello')
|
47
|
+
# #=> "{{hello}}"
|
48
|
+
def hbexp(exp)
|
49
|
+
"{{#{exp}}}"
|
50
|
+
end
|
51
|
+
|
52
|
+
# Handlebars block helper, returns the contents of the block wrapped with the specified block helper
|
53
|
+
#
|
54
|
+
# @param [String] name
|
55
|
+
# The name of the block helper
|
56
|
+
#
|
57
|
+
# @param [Array<Object>] params
|
58
|
+
# The parameters the helper takes
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
#
|
62
|
+
# ==== Example:
|
63
|
+
# irb> hbblock('myBlockHelper', 'param') { '<p>Hello</p>' }
|
64
|
+
# #=> "{{#myBlockHelper param}}<p>Hello</p>{{/myBlockHelper}}"
|
65
|
+
def hbblock(name, *params, &block)
|
66
|
+
"{{##{name} #{hbparams(*params)}}}#{capture(&block)}{{/#{name}}}".html_safe
|
67
|
+
end
|
68
|
+
|
69
|
+
# Handlebars helper helper, returns the helper name with params
|
70
|
+
#
|
71
|
+
# @param [String] name
|
72
|
+
# The name of the helper
|
73
|
+
#
|
74
|
+
# @param [Array<Object>] params
|
75
|
+
# The parameters the helper takes
|
76
|
+
#
|
77
|
+
# @return [String]
|
78
|
+
#
|
79
|
+
# ==== Example:
|
80
|
+
# irb> hbhelper('myHelper', 'param1', 'param2')
|
81
|
+
# #=> "{{myHelper param1 param2}}"
|
82
|
+
def hbhelper(name, *params)
|
83
|
+
"{{#{name} #{hbparams(*params)}}}"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Handlebars escape helper, returns the value wrapped in escaped handlebars
|
87
|
+
#
|
88
|
+
# @param [String] value
|
89
|
+
# The value to be wrapped
|
90
|
+
#
|
91
|
+
# @return [String]
|
92
|
+
#
|
93
|
+
# ==== Example:
|
94
|
+
# irb> hbunescape('hello')
|
95
|
+
# #=> "{{{hello}}}"
|
96
|
+
def hbunescape(value)
|
97
|
+
"{{{#{value}}}}"
|
98
|
+
end
|
99
|
+
|
100
|
+
# Handlebars partial helper, returns the value wrapped in partial handlebars
|
101
|
+
#
|
102
|
+
# @param [String] name
|
103
|
+
# The name of the partial
|
104
|
+
#
|
105
|
+
# @param [Array<Object>] params
|
106
|
+
# The parameters the partial takes
|
107
|
+
#
|
108
|
+
# @return [String]
|
109
|
+
#
|
110
|
+
# ==== Example:
|
111
|
+
# irb> hbunescape('partialName', 'param1', 'param2')
|
112
|
+
# #=> "{{> partial param1 param2}}"
|
113
|
+
def hbpartial(name, *params)
|
114
|
+
"{{> #{name} #{hbparams(*params)} }}"
|
115
|
+
end
|
116
|
+
|
117
|
+
# Handlebars each helper, returns the contents of the block wrapped with each handlebars
|
118
|
+
#
|
119
|
+
# @param [String] item
|
120
|
+
# The name of item
|
121
|
+
#
|
122
|
+
# @return [String]
|
123
|
+
#
|
124
|
+
# ==== Example:
|
125
|
+
# irb> hbeach('point') { '<li>Hello</li>' }
|
126
|
+
# #=> "{{#each point}}<li>Hello</li>{{/each}}"
|
127
|
+
def hbeach(item, &block)
|
128
|
+
hbblock('each', item, &block)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Handlebars if helper, returns the contents of the block wrapped with if handlebars
|
132
|
+
#
|
133
|
+
# @param [String] condition
|
134
|
+
# The condition of this block
|
135
|
+
#
|
136
|
+
# @return [String]
|
137
|
+
#
|
138
|
+
# ==== Example:
|
139
|
+
# irb> hbif('present') { '<p>Hello</p>' }
|
140
|
+
# #=> "{{#if present}}<p>Hello</p>{{/if}}"
|
141
|
+
def hbif(condition, &block)
|
142
|
+
hbblock('if', condition, &block)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Handlebars else helper, returns else wrapped in handlebars
|
146
|
+
#
|
147
|
+
# @return [String]
|
148
|
+
#
|
149
|
+
# ==== Example:
|
150
|
+
# irb> hbelse
|
151
|
+
# #=> "{{hbelse}}"
|
152
|
+
def hbelse
|
153
|
+
hbexp('else')
|
154
|
+
end
|
155
|
+
|
156
|
+
# Translates params into handlebars param literals and hash literals
|
157
|
+
#
|
158
|
+
# @param [Array<Object>] params
|
159
|
+
# The values to be translated
|
160
|
+
#
|
161
|
+
# @return [String]
|
162
|
+
#
|
163
|
+
# ==== Example:
|
164
|
+
# # Translate a hash into handlebars hash literals
|
165
|
+
# irb> translate_values('cat', 'dog', food: 'lots')
|
166
|
+
# #=> "cat dog food=\"lots\""
|
167
|
+
def hbparams(*params)
|
168
|
+
if params.empty?
|
169
|
+
nil
|
170
|
+
else
|
171
|
+
values = translate_values(params.select { |p| p.is_a?(String) })
|
172
|
+
hash = translate_hash(params.last.is_a?(Hash) ? params.last : {})
|
173
|
+
|
174
|
+
[values, hash].compact.join(' ')
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Translates params into handlebars param literals
|
179
|
+
#
|
180
|
+
# @param [Array] values
|
181
|
+
# The values to be translated
|
182
|
+
#
|
183
|
+
# @return [String]
|
184
|
+
#
|
185
|
+
# ==== Example:
|
186
|
+
# # Translate a hash into handlebars hash literals
|
187
|
+
# irb> translate_values('rin', 'len')
|
188
|
+
# #=> "rin len"
|
189
|
+
def translate_values(values)
|
190
|
+
if values.empty?
|
191
|
+
nil
|
192
|
+
else
|
193
|
+
values.join(' ')
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Translates a hash into handlebars hash literals
|
198
|
+
#
|
199
|
+
# @param [Hash] hash
|
200
|
+
# The hash to be translated
|
201
|
+
#
|
202
|
+
# @return [String]
|
203
|
+
#
|
204
|
+
# ==== Example:
|
205
|
+
# # Translate a hash into handlebars hash literals
|
206
|
+
# irb> translate_hash({miku: "senbonzakura", luka: "double lariat"})
|
207
|
+
# #=> "miku=\"senbonzakura\" luka=\"double lariat\""
|
208
|
+
def translate_hash(hash)
|
209
|
+
if hash.empty?
|
210
|
+
nil
|
211
|
+
else
|
212
|
+
hash.map do |k, v|
|
213
|
+
value = v.is_a?(String) ? "\"#{v}\"" : v
|
214
|
+
"#{k}=#{value}"
|
215
|
+
end.join(' ')
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
data/railbars.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'railbars/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "railbars"
|
8
|
+
spec.version = Railbars::VERSION
|
9
|
+
spec.authors = ["Mark Humphreys"]
|
10
|
+
spec.email = ["mark@mrlhumphreys.com"]
|
11
|
+
|
12
|
+
spec.summary = "Handlebars view helpers for Rails"
|
13
|
+
spec.description = "Adds a number of helpful view helper methods for rendering Handlebars templates in the view."
|
14
|
+
spec.homepage = "https://github.com/mrlhumphreys/railbars"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.required_ruby_version = '>= 2.1'
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
29
|
+
spec.add_development_dependency "actionview", "~> 5.0.0"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: railbars
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mark Humphreys
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-03 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.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: actionview
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 5.0.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 5.0.0
|
69
|
+
description: Adds a number of helpful view helper methods for rendering Handlebars
|
70
|
+
templates in the view.
|
71
|
+
email:
|
72
|
+
- mark@mrlhumphreys.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
|
+
- CODE_OF_CONDUCT.md
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- bin/console
|
85
|
+
- bin/setup
|
86
|
+
- lib/railbars.rb
|
87
|
+
- lib/railbars/railtie.rb
|
88
|
+
- lib/railbars/version.rb
|
89
|
+
- lib/railbars/view_helpers.rb
|
90
|
+
- railbars.gemspec
|
91
|
+
homepage: https://github.com/mrlhumphreys/railbars
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
metadata: {}
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.1'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
requirements: []
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 2.5.1
|
112
|
+
signing_key:
|
113
|
+
specification_version: 4
|
114
|
+
summary: Handlebars view helpers for Rails
|
115
|
+
test_files: []
|