tawk_rails 0.0.1 → 0.0.2
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/README.md +3 -1
- data/lib/tawk_rails/chatbox.rb +1 -1
- data/lib/tawk_rails/version.rb +1 -1
- data/spec/tawk_rails/configuration_spec.rb +1 -1
- data/spec/tawk_rails/version_spec.rb +1 -1
- 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: 6a7d06ac416c758ec7a156a9b534b7f118571f16
|
|
4
|
+
data.tar.gz: d1d38706e19bebcc6d3f1331f0318812ee140a49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b54176a67f15ebd30de3f68f5540abcd63b064ae2ecf20fb39cf3918323ee38cb0e26cae226e57dc24f2f1c8a8f675289e3141cc0baaf13039bed230035bb809
|
|
7
|
+
data.tar.gz: e894f5f3e95aeff1d6fefe9c1c5ef0d85fda0d7378e0330bdfbec1e0228fe7a9d0cf1224f89c46b6b24a2e4b35417977be992fba58f0815de31e8dc82b1c13c4
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# TawkRails
|
|
2
2
|
|
|
3
|
+
[](http://badge.fury.io/rb/tawk_rails)
|
|
4
|
+
|
|
3
5
|
Rails simple helper for [Tawk](https://www.tawk.to/) live chat script.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -18,7 +20,7 @@ Or install it yourself as:
|
|
|
18
20
|
|
|
19
21
|
## Usage
|
|
20
22
|
|
|
21
|
-
Create file `tawk.rb` in `config/
|
|
23
|
+
Create file `tawk.rb` in `config/initializes/tawk.rb` and add
|
|
22
24
|
|
|
23
25
|
TawkRails.configure do |config|
|
|
24
26
|
config.id_site = 'replace-me-with-your-id_site'
|
data/lib/tawk_rails/chatbox.rb
CHANGED
|
@@ -4,7 +4,7 @@ module TawkRails
|
|
|
4
4
|
class Chatbox
|
|
5
5
|
def render_script
|
|
6
6
|
<<-JAVASCRIPT
|
|
7
|
-
<script type="text/javascript">var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();(function(){var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];s1.async=true;s1.src='https://embed.tawk.to/#{TawkRails.configuration.id_site}/default';s1.charset='UTF-8';s1.setAttribute('crossorigin','*');s0.parentNode.insertBefore(s1,s0);})();</script>
|
|
7
|
+
<script type="text/javascript">window.$_Tawk = undefined; var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();(function(){var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];s1.async=true;s1.src='https://embed.tawk.to/#{TawkRails.configuration.id_site}/default';s1.charset='UTF-8';s1.setAttribute('crossorigin','*');s0.parentNode.insertBefore(s1,s0);})();</script>
|
|
8
8
|
JAVASCRIPT
|
|
9
9
|
end
|
|
10
10
|
end
|
data/lib/tawk_rails/version.rb
CHANGED
|
@@ -16,7 +16,7 @@ describe TawkRails::Configuration do
|
|
|
16
16
|
|
|
17
17
|
it "should return version correctly" do
|
|
18
18
|
expect(TawkRails.configuration.version).to be_a_kind_of(String)
|
|
19
|
-
expect(TawkRails.configuration.version).to eq '0.0.
|
|
19
|
+
expect(TawkRails.configuration.version).to eq '0.0.2'
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tawk_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luiz Picolo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|