zopim_rails 0.0.6 → 0.0.7
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 +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +1 -0
- data/README.md +1 -0
- data/lib/zopim_rails/chatbox.rb +1 -1
- data/lib/zopim_rails/configuration.rb +4 -0
- data/lib/zopim_rails/version.rb +1 -1
- data/spec/zopim_rails/configuration_spec.rb +2 -0
- data/spec/zopim_rails/version_spec.rb +10 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b286870e4f38070a1acaa7615b27f86b466bf1b
|
|
4
|
+
data.tar.gz: 34de2761c664a58dc048ab7d383c97ea30eabfbc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b72a229d83cb9bc80add2b61a6e208657f3cafdaf29ef10b103b2daa9f054f4fc98135a0b3d63323a51908d1b6bf781daa84d7e5b9bc6fe1117a2e7673b45c3
|
|
7
|
+
data.tar.gz: c4cdf30fb6068b17aeba033b6cac2171ad23862e3ec3c62b9c0339433ec5fcba3cf8b54e38f537e3b61c19432ae743ca46f63f0fdb8907f56cf850400a3d3072
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.2.3
|
data/.travis.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
language: ruby
|
data/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# ZopimRails
|
|
2
|
+
[](https://travis-ci.org/wittawasw/zopim_rails)
|
|
2
3
|
|
|
3
4
|
Rails simple helper for [Zopim](https://www.zopim.com/) live chat script.
|
|
4
5
|
Now support turbolink with help from [luizpicolo](https://github.com/luizpicolo).
|
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').on('page:change.zopim', zopim_chat);zopim_chat();</script>
|
|
8
8
|
JAVASCRIPT
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require_relative 'version'
|
|
2
|
+
|
|
1
3
|
module ZopimRails
|
|
2
4
|
class << self
|
|
3
5
|
attr_accessor :configuration
|
|
@@ -10,8 +12,10 @@ module ZopimRails
|
|
|
10
12
|
|
|
11
13
|
class Configuration
|
|
12
14
|
attr_accessor :api_key
|
|
15
|
+
attr_reader :version
|
|
13
16
|
|
|
14
17
|
def initialize
|
|
18
|
+
@version = VERSION
|
|
15
19
|
@api_key = 'replace-me-with-api_key'
|
|
16
20
|
end
|
|
17
21
|
end
|
data/lib/zopim_rails/version.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
require_relative '../../lib/zopim_rails/configuration'
|
|
3
|
+
# require_relative '../../lib/zopim_rails/configuration'
|
|
3
4
|
|
|
4
5
|
describe ZopimRails::Configuration do
|
|
5
6
|
|
|
@@ -13,4 +14,5 @@ describe ZopimRails::Configuration do
|
|
|
13
14
|
expect(ZopimRails.configuration.api_key).to be_a_kind_of(String)
|
|
14
15
|
expect(ZopimRails.configuration.api_key).to eq 'replace-me-with-your-api_key'
|
|
15
16
|
end
|
|
17
|
+
|
|
16
18
|
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: 0.0.
|
|
4
|
+
version: 0.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wittawas Wisarnkanchana
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -81,6 +81,8 @@ extra_rdoc_files: []
|
|
|
81
81
|
files:
|
|
82
82
|
- ".gitignore"
|
|
83
83
|
- ".rspec"
|
|
84
|
+
- ".ruby-version"
|
|
85
|
+
- ".travis.yml"
|
|
84
86
|
- Gemfile
|
|
85
87
|
- LICENSE.txt
|
|
86
88
|
- README.md
|
|
@@ -94,6 +96,7 @@ files:
|
|
|
94
96
|
- spec/spec_helper.rb
|
|
95
97
|
- spec/zopim_rails/chatbox_spec.rb
|
|
96
98
|
- spec/zopim_rails/configuration_spec.rb
|
|
99
|
+
- spec/zopim_rails/version_spec.rb
|
|
97
100
|
- zopim_rails.gemspec
|
|
98
101
|
homepage: https://github.com/wittawasw/zopim_rails
|
|
99
102
|
licenses:
|
|
@@ -115,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
118
|
version: '0'
|
|
116
119
|
requirements: []
|
|
117
120
|
rubyforge_project:
|
|
118
|
-
rubygems_version: 2.4.5
|
|
121
|
+
rubygems_version: 2.4.5.1
|
|
119
122
|
signing_key:
|
|
120
123
|
specification_version: 4
|
|
121
124
|
summary: Rails helper for Zopim live chat script.
|
|
@@ -123,3 +126,4 @@ test_files:
|
|
|
123
126
|
- spec/spec_helper.rb
|
|
124
127
|
- spec/zopim_rails/chatbox_spec.rb
|
|
125
128
|
- spec/zopim_rails/configuration_spec.rb
|
|
129
|
+
- spec/zopim_rails/version_spec.rb
|