zopim_rails 0.0.8 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/README.md +16 -5
- data/lib/zopim_rails/chatbox.rb +1 -1
- data/lib/zopim_rails/version.rb +1 -1
- data/spec/zopim_rails/version_spec.rb +1 -1
- data/zopim_rails.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e0f512feaca372ecb3399e1568808a572cbccca
|
4
|
+
data.tar.gz: 91823f3d242ec9e48a3dbf12b8a8fe6312e1c80c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cdeab67905aaa2f3b425b7d7d77c26012aee3285ca887e997e27542887c3c4a10be150759acb0208159e2f373f66c253d05b9b0183ce5e07ff0e82231d8ecc5
|
7
|
+
data.tar.gz: 421db7c8eca0845f17cad50f8f93a6da8a183f349ef3ab58a48a14b10448878430217fc242f948076d8e9fa3b10e4d2bda5964c1be0f6be3d93506e14042031c
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.1
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# ZopimRails
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/zopim_rails.svg)](https://badge.fury.io/rb/zopim_rails)
|
2
3
|
[![Build Status](https://travis-ci.org/wittawasw/zopim_rails.svg?branch=master)](https://travis-ci.org/wittawasw/zopim_rails)
|
3
4
|
|
4
5
|
Rails simple helper for [Zopim](https://www.zopim.com/) live chat script.
|
@@ -8,7 +9,9 @@ Now support turbolink with help from [luizpicolo](https://github.com/luizpicolo)
|
|
8
9
|
|
9
10
|
Add this line to your application's Gemfile:
|
10
11
|
|
11
|
-
|
12
|
+
```ruby
|
13
|
+
gem 'zopim_rails'
|
14
|
+
```
|
12
15
|
|
13
16
|
And then execute:
|
14
17
|
|
@@ -22,13 +25,21 @@ Or install it yourself as:
|
|
22
25
|
|
23
26
|
Create file `zopim.rb` in `config/initializers/zopim.rb` and add
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
+
```ruby
|
29
|
+
ZopimRails.configure do |config|
|
30
|
+
config.api_key = 'replace-me-with-your-api_key'
|
31
|
+
end
|
32
|
+
```
|
28
33
|
|
29
34
|
place render method where you want in view.
|
30
35
|
|
31
|
-
|
36
|
+
```ruby
|
37
|
+
<%= zopim_init %>
|
38
|
+
```
|
39
|
+
|
40
|
+
## Demostration
|
41
|
+
|
42
|
+
https://zopimrailstest.herokuapp.com/
|
32
43
|
|
33
44
|
## Contributing
|
34
45
|
|
data/lib/zopim_rails/chatbox.rb
CHANGED
@@ -4,7 +4,7 @@ module ZopimRails
|
|
4
4
|
class Chatbox
|
5
5
|
def render_script
|
6
6
|
<<-JAVASCRIPT
|
7
|
-
<script type="text/javascript">function zopim_chat(){$('[__jx__id]').remove();window.$zopim = null;(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set._.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');$.src='//v2.zopim.com/?#{ZopimRails.configuration.api_key}';z.t=+new Date;$.type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script')};$(window).off('page:change.zopim').on('page:change.zopim', zopim_chat);</script>
|
7
|
+
<script type="text/javascript">function zopim_chat(){$('[__jx__id]').remove();window.$zopim = null;(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set._.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');$.src='//v2.zopim.com/?#{ZopimRails.configuration.api_key}';z.t=+new Date;$.type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script')};$(window).off('page:change.zopim turbolinks:load.zopim').on('page:change.zopim turbolinks:load.zopim', zopim_chat);</script>
|
8
8
|
JAVASCRIPT
|
9
9
|
end
|
10
10
|
end
|
data/lib/zopim_rails/version.rb
CHANGED
data/zopim_rails.gemspec
CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.5"
|
22
22
|
spec.add_development_dependency 'rake', '~> 0'
|
23
|
-
spec.add_development_dependency 'rspec', '
|
23
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
24
24
|
spec.add_dependency 'jquery-rails', ['>= 3.0', '< 5']
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zopim_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wittawas Wisarnkanchana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.5.1
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Rails helper for Zopim live chat script.
|