mastalk 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +53 -0
- data/lib/mastalk/snippets/feedback.html.erb +13 -0
- data/lib/mastalk/snippets/fincap_primary_button.html.erb +5 -0
- data/mastalk.gemspec +1 -1
- data/spec/mastalk/document_spec.rb +27 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d20e68e5ae843fc2972a34c5fe0ce6965c777120
|
4
|
+
data.tar.gz: bfd75c9be14f4058829e3e3eaf06fa60aea1cfef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dc3cd6b41be77dab9de9b69f688f427c1b234d54ef25b0ca1c6c32b8ff159cf12723d306c43d3cf2254324ae2a38ee74f790feacefaa310115cb00c91f3fbda
|
7
|
+
data.tar.gz: 8427b13aef14554a90d6a128fbf884b23debd0e89c280e6a881c8a3d5522747c485035c6ffe3972de0140e9258596f6781070e568499026ccfbc101ba12beaa0
|
data/README.md
CHANGED
@@ -365,6 +365,46 @@ Outputs:
|
|
365
365
|
|
366
366
|
`$bl_c` `$bl_m` positioning can be swapped around to switch element positions.
|
367
367
|
|
368
|
+
### FinCap Feedback Component
|
369
|
+
|
370
|
+
```
|
371
|
+
$fincap_feedback
|
372
|
+
EMAIL@ADDRESS.com
|
373
|
+
$
|
374
|
+
```
|
375
|
+
|
376
|
+
Outputs:
|
377
|
+
|
378
|
+
```
|
379
|
+
<div class="feedback-box">
|
380
|
+
<h3 class="feedback-box__title">
|
381
|
+
Give us your feedback or ask a question
|
382
|
+
</h3>
|
383
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="feedback-box__icon svg-icon svg-icon--speech" focusable="false">
|
384
|
+
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#svg-icon--speech"></use>
|
385
|
+
</svg>
|
386
|
+
<a href="mailto:EMAIL@ADDRESS.com" class="feedback-box__text">
|
387
|
+
EMAIL@ADDRESS.com
|
388
|
+
</a>
|
389
|
+
</div>
|
390
|
+
```
|
391
|
+
|
392
|
+
### FinCap Primary Button
|
393
|
+
|
394
|
+
```
|
395
|
+
$~fincap_primary_button
|
396
|
+
[Link Text](LINK_URL)
|
397
|
+
$
|
398
|
+
```
|
399
|
+
|
400
|
+
Outputs:
|
401
|
+
|
402
|
+
```
|
403
|
+
<span class="article__primary-button">
|
404
|
+
<a href="LINK_URL">Link Text</a>
|
405
|
+
</span>
|
406
|
+
```
|
407
|
+
|
368
408
|
### Profiling Mastalk
|
369
409
|
|
370
410
|
Inside of the project you can run:
|
@@ -386,3 +426,16 @@ ruby -Ilib ./bin/mastalk-benchmarking
|
|
386
426
|
|
387
427
|
This command will print different benchmarking for Mastalk when parsing
|
388
428
|
10, 100, 200 and 500 documents.
|
429
|
+
|
430
|
+
## Release the mastalk gem
|
431
|
+
|
432
|
+
Get a login for rubygems.org and get added as a contributor to the mastalk
|
433
|
+
gem.
|
434
|
+
|
435
|
+
1) Update the version number in mastalk.gemspec
|
436
|
+
2) Run bundle
|
437
|
+
3) On the master branch, commit the changes. (e.g 'Bump version 0.0.1 ->
|
438
|
+
0.0.2')
|
439
|
+
4) Tag the git commit with the bump version: `git tag -a v<version here>`
|
440
|
+
5) Build the gem: `gem build mastalk.gemspec`
|
441
|
+
6) Publish the new gem to rubygems: `gem push mastalk-<version here>.gem
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# $fincap_feedback, $
|
2
|
+
|
3
|
+
<div class="feedback-box">
|
4
|
+
<h3 class="feedback-box__title">
|
5
|
+
Give us your feedback or ask a question
|
6
|
+
</h3>
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="feedback-box__icon svg-icon svg-icon--speech" focusable="false">
|
8
|
+
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#svg-icon--speech"></use>
|
9
|
+
</svg>
|
10
|
+
<a href="mailto:<%= Mastalk::Document.new(body.strip).to_html.gsub(/<p>|<\/p>|\n/, '') %>" class="feedback-box__text">
|
11
|
+
<%= Mastalk::Document.new(body.strip).to_html.gsub(/<p>|<\/p>|\n/, '') %>
|
12
|
+
</a>
|
13
|
+
</div>
|
data/mastalk.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'mastalk'
|
6
|
-
s.version = '0.9.
|
6
|
+
s.version = '0.9.1'
|
7
7
|
s.summary = 'mastalk'
|
8
8
|
s.description = 'Mastalk markdown extension language'
|
9
9
|
s.authors = ['Douglas Roper', 'Justin Perry']
|
@@ -283,4 +283,31 @@ describe Mastalk::Document do
|
|
283
283
|
expect(subject.to_html).to eq(expected)
|
284
284
|
end
|
285
285
|
end
|
286
|
+
|
287
|
+
context 'Fincap Feedback UI Component' do
|
288
|
+
let(:email_address) { 'test@email.com' }
|
289
|
+
let(:source) { "$fincap_feedback#{email_address}$" }
|
290
|
+
|
291
|
+
let(:expected) do
|
292
|
+
%(<a href="mailto:#{email_address}" class="feedback-box__text">)
|
293
|
+
end
|
294
|
+
|
295
|
+
it 'outputs the correct mailto link' do
|
296
|
+
expect(subject.to_html).to include(expected)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
context 'Fincap Primary Button' do
|
301
|
+
let(:link_text) { 'test text' }
|
302
|
+
let(:link_url) { 'https://www.moneyadviceservice.org.uk' }
|
303
|
+
let(:source) { "$~fincap_primary_button[#{link_text}](#{link_url})~$" }
|
304
|
+
|
305
|
+
let(:expected) do
|
306
|
+
%(<a href="#{link_url}">#{link_text}</a>)
|
307
|
+
end
|
308
|
+
|
309
|
+
it 'outputs the correct link url and text' do
|
310
|
+
expect(subject.to_html).to include(expected)
|
311
|
+
end
|
312
|
+
end
|
286
313
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mastalk
|
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
|
- Douglas Roper
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: kramdown
|
@@ -123,6 +123,8 @@ files:
|
|
123
123
|
- lib/mastalk/snippets/callout_tool.html.erb
|
124
124
|
- lib/mastalk/snippets/collabsible_section.html.erb
|
125
125
|
- lib/mastalk/snippets/collapsible_header.html.erb
|
126
|
+
- lib/mastalk/snippets/feedback.html.erb
|
127
|
+
- lib/mastalk/snippets/fincap_primary_button.html.erb
|
126
128
|
- lib/mastalk/snippets/how.html.erb
|
127
129
|
- lib/mastalk/snippets/no.html.erb
|
128
130
|
- lib/mastalk/snippets/points.html.erb
|