exvo_helpers 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +26 -0
- data/lib/exvo_helpers/version.rb +1 -1
- data/lib/exvo_helpers/view_helpers.rb +26 -0
- data/spec/exvo_helpers/view_helpers_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abb2a6d274626611ab27e8d4cf26a56ab7ec8fbd
|
4
|
+
data.tar.gz: 8728aa4179edbf63eaae04e27cce1bc11cb79eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76b538088cfcd10b3454be410d5f503d55ac172f35a8545a22aaf3c1ed94e8bd8ecfdf6c02e0ff7a5c230ebb23c97875b3ce9b194a8c00377f88557a8c012fb2
|
7
|
+
data.tar.gz: 8bd7190ed80e18fdd84d054cfb9b608c50b4d284bcf3466267afa3f85aeddc12c9e8fe0f9579d6301565d6d563514ad2c8894129ff3b6e0a911362cd0cb9d6cd
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -205,5 +205,31 @@ Asynchronous Bugherd javascript snippet.
|
|
205
205
|
```
|
206
206
|
|
207
207
|
|
208
|
+
### zendesk
|
209
|
+
|
210
|
+
Javascript popup with Zendesk support.
|
211
|
+
|
212
|
+
```ruby
|
213
|
+
= zendesk
|
214
|
+
```
|
215
|
+
|
216
|
+
=>
|
217
|
+
|
218
|
+
```html
|
219
|
+
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.6/zenbox.js"></script>
|
220
|
+
<style type="text/css" media="screen, projection">
|
221
|
+
@import url(//assets.zendesk.com/external/zenbox/v2.6/zenbox.css);
|
222
|
+
...
|
223
|
+
```
|
224
|
+
|
225
|
+
Remember to put the above snippet just before the closing `</body>` tag, otherwise it might not work.
|
226
|
+
|
227
|
+
You must also place the link somewhere to show the actual Zendesk popup:
|
228
|
+
|
229
|
+
```html
|
230
|
+
<a href="http://exvocom.zendesk.com/account/dropboxes/20187392" onClick="script: Zenbox.show(); return false;">Open Feedback Tab</a>
|
231
|
+
```
|
232
|
+
|
233
|
+
|
208
234
|
|
209
235
|
Copyright © 2011-2013 Exvo.com Development BV, released under the MIT license
|
data/lib/exvo_helpers/version.rb
CHANGED
@@ -115,6 +115,32 @@ END
|
|
115
115
|
s.parentNode.insertBefore(bh, s);
|
116
116
|
})(document, 'script');
|
117
117
|
</script>
|
118
|
+
END
|
119
|
+
|
120
|
+
out.respond_to?(:html_safe) ? out.html_safe : out
|
121
|
+
end
|
122
|
+
|
123
|
+
def zendesk
|
124
|
+
out = <<END
|
125
|
+
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.6/zenbox.js"></script>
|
126
|
+
|
127
|
+
<style type="text/css" media="screen, projection">
|
128
|
+
@import url(//assets.zendesk.com/external/zenbox/v2.6/zenbox.css);
|
129
|
+
</style>
|
130
|
+
|
131
|
+
<script type="text/javascript">
|
132
|
+
if (typeof(Zenbox) !== "undefined") {
|
133
|
+
Zenbox.init({
|
134
|
+
dropboxID: "20187392",
|
135
|
+
url: "https://exvocom.zendesk.com",
|
136
|
+
tabTooltip: "Support",
|
137
|
+
tabImageURL: "https://assets.zendesk.com/external/zenbox/images/tab_support.png",
|
138
|
+
tabColor: "black",
|
139
|
+
tabPosition: "Right",
|
140
|
+
hide_tab: "true"
|
141
|
+
});
|
142
|
+
}
|
143
|
+
</script>
|
118
144
|
END
|
119
145
|
|
120
146
|
out.respond_to?(:html_safe) ? out.html_safe : out
|
@@ -60,4 +60,14 @@ describe Exvo::ViewHelpers do
|
|
60
60
|
specify { snippet.should match(/apikey=123/) }
|
61
61
|
end
|
62
62
|
|
63
|
+
describe '#zendesk' do
|
64
|
+
let(:snippet) { view_helper.zendesk }
|
65
|
+
|
66
|
+
specify { snippet.should match(/<script type="text\/javascript">/) }
|
67
|
+
specify { snippet.should match(/Zenbox\.init/) }
|
68
|
+
specify { snippet.should match(/exvocom\.zendesk\.com/) }
|
69
|
+
specify { snippet.should match(/dropboxID/) }
|
70
|
+
specify { snippet.should match(/hide_tab/) }
|
71
|
+
end
|
72
|
+
|
63
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exvo_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paweł Gościcki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|