exvo_helpers 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +27 -0
- data/lib/exvo_helpers/version.rb +1 -1
- data/lib/exvo_helpers/view_helpers.rb +15 -0
- data/spec/exvo_helpers/view_helpers_spec.rb +8 -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: f8a3848aa8222b5da42a20bbeff76a48c83bdf94
|
4
|
+
data.tar.gz: 9761562a4472d2922f5c0aa27e05750f64f796c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4983aa1cf6582ae33a0394458333ef2dc6f79d171f909379ee9a736f0bf436ff21ae4e0641eed397c6f2b3e879951efa0d839e83b833faa193bb5f28d63d27fe
|
7
|
+
data.tar.gz: 8578869bd7d4a8b4370eb87be39b17c30978231233397bb89402a034933ce195a414bd398077ed1452d661ba0c9fb2ce6b6c19d38f6005203735967a712ecee9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -191,6 +191,33 @@ KISSmetrics javascript snippet to track users. Note, that you need to have `ENV[
|
|
191
191
|
```
|
192
192
|
|
193
193
|
|
194
|
+
### bugherd(apikey)
|
195
|
+
|
196
|
+
Asynchronous Bugherd javascript snippet.
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
= bugherd('yourapikey')
|
200
|
+
```
|
201
|
+
|
202
|
+
=>
|
203
|
+
|
204
|
+
```html
|
205
|
+
<script type="text/javascript">
|
206
|
+
(function (d, t) {
|
207
|
+
var bh = d.createElement(t), s = d.getElementsByTagName(t)[0];
|
208
|
+
...
|
209
|
+
```
|
210
|
+
|
211
|
+
If you'd like to customize the position of the 'Send Feedback' button, you can do this with this CSS snippet:
|
212
|
+
|
213
|
+
```css
|
214
|
+
#_BH_frame {
|
215
|
+
left: 10px !important;
|
216
|
+
}
|
217
|
+
```
|
218
|
+
|
219
|
+
The above code will move the button to the left side.
|
220
|
+
|
194
221
|
|
195
222
|
|
196
223
|
Copyright © 2011-2013 Exvo.com Development BV, released under the MIT license
|
data/lib/exvo_helpers/version.rb
CHANGED
@@ -100,6 +100,21 @@ END
|
|
100
100
|
|
101
101
|
out += <<END
|
102
102
|
</script>
|
103
|
+
END
|
104
|
+
|
105
|
+
out.respond_to?(:html_safe) ? out.html_safe : out
|
106
|
+
end
|
107
|
+
|
108
|
+
def bugherd(apikey)
|
109
|
+
out = <<END
|
110
|
+
<script type='text/javascript'>
|
111
|
+
(function (d, t) {
|
112
|
+
var bh = d.createElement(t), s = d.getElementsByTagName(t)[0];
|
113
|
+
bh.type = 'text/javascript';
|
114
|
+
bh.src = '//www.bugherd.com/sidebarv2.js?apikey=#{ apikey }';
|
115
|
+
s.parentNode.insertBefore(bh, s);
|
116
|
+
})(document, 'script');
|
117
|
+
</script>
|
103
118
|
END
|
104
119
|
|
105
120
|
out.respond_to?(:html_safe) ? out.html_safe : out
|
@@ -52,4 +52,12 @@ describe Exvo::ViewHelpers do
|
|
52
52
|
specify { snippet.should match(%r(identify.+#{email})) }
|
53
53
|
end
|
54
54
|
|
55
|
+
describe "#bugherd" do
|
56
|
+
let(:snippet) { view_helper.bugherd("123") }
|
57
|
+
|
58
|
+
specify { snippet.should match(/<script type='text\/javascript'>/) }
|
59
|
+
specify { snippet.should match(/www\.bugherd\.com/) }
|
60
|
+
specify { snippet.should match(/apikey=123/) }
|
61
|
+
end
|
62
|
+
|
55
63
|
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.1
|
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-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|