zopim_rails 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1ba41c94e4f93d8ae2b46230f0e27ddc98c62d6
4
- data.tar.gz: c97f55c9aa5c5995f128cca93965a0dadaa923c4
3
+ metadata.gz: 6b286870e4f38070a1acaa7615b27f86b466bf1b
4
+ data.tar.gz: 34de2761c664a58dc048ab7d383c97ea30eabfbc
5
5
  SHA512:
6
- metadata.gz: b8a950d75b5692008a7d9116fc6abde935cf023ae1a30a26768696e5e82484254edb646adabd3f4519b6b423a0e48761fffd08f85ea2c81c4996689deabc54f8
7
- data.tar.gz: 2e6ffced8a7b16e46b6bc5b67b95fc14ed36a87b60f91133f9381fab18bab456ab751008f782d544a9c2be5b8ec0b5a575ad4980e8fcec2f311484adb742d02d
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
+ [![Build Status](https://travis-ci.org/wittawasw/zopim_rails.svg?branch=master)](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).
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ZopimRails
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -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
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+ require_relative '../../lib/zopim_rails/version'
3
+
4
+ describe ZopimRails do
5
+
6
+ it "should return version correctly" do
7
+ expect(ZopimRails::VERSION).to be_a_kind_of(String)
8
+ expect(ZopimRails::VERSION).to eq '0.0.7'
9
+ end
10
+ 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.6
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-05-08 00:00:00.000000000 Z
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