exvo_helpers 0.6.2 → 0.6.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 562c5249679d032433af08916f6477c857db121f
4
- data.tar.gz: 473deaecb7237600673b919467be2d0001e8bb02
3
+ metadata.gz: abb2a6d274626611ab27e8d4cf26a56ab7ec8fbd
4
+ data.tar.gz: 8728aa4179edbf63eaae04e27cce1bc11cb79eb5
5
5
  SHA512:
6
- metadata.gz: f66a46305900a6b08da799436c4f02618f10e2f50b96a6bfa3215681aa8be18344e79e0dbfd6fff122cfebdf43c6eed31bbf0ca1f01b9c8e69e1a225c7993521
7
- data.tar.gz: 46feae963d35df3790fa67dc8758d6e68b99f403f415d15bed5293c76755bbe3fa935e29bca38263ae70b178972f2654c861b08cdde948e9b2cdddac4632e483
6
+ metadata.gz: 76b538088cfcd10b3454be410d5f503d55ac172f35a8545a22aaf3c1ed94e8bd8ecfdf6c02e0ff7a5c230ebb23c97875b3ce9b194a8c00377f88557a8c012fb2
7
+ data.tar.gz: 8bd7190ed80e18fdd84d054cfb9b608c50b4d284bcf3466267afa3f85aeddc12c9e8fe0f9579d6301565d6d563514ad2c8894129ff3b6e0a911362cd0cb9d6cd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Note, that only significant changes are listed.
4
4
 
5
+ ## 0.6.3 (2013-07-02)
6
+
7
+ * new `zendesk` view helper
8
+
9
+
5
10
  ## 0.6.2 (2013-06-24)
6
11
 
7
12
  * remove 'Blog' helpers (Blog is no more)
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
@@ -1,5 +1,5 @@
1
1
  module Exvo
2
2
  module Helpers
3
- VERSION = '0.6.2'
3
+ VERSION = '0.6.3'
4
4
  end
5
5
  end
@@ -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.2
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-06-24 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake