baidu-tongji-turbolinks 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1d682a574a61883cc5803bfa20647e0d5283db53
4
+ data.tar.gz: 3753321d1ce27f097e5c95e12620d80a50a8f563
5
+ SHA512:
6
+ metadata.gz: 5654d164bc95cd9f17848609a2169c2ab08a4d04c63ee1b1cec9c9675a3a13d3149bd7d7865c1e9c7cc94f09cac8429f84913f257effe7b09e1f08b366df4aae
7
+ data.tar.gz: b8b98150b36c8634dbbd7eaf152687d3afc73b1661dd86b4b4eb7477005b8f90219d0205dde539e5f15790081294eceb90e0c2b9b3c74880a98bb921fde4dc59
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in baidu-tongji-turbolinks.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Shuky Dvir
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,35 @@
1
+ # Baidu::Tongji::Turbolinks
2
+
3
+ **use with Rails and Asset Pipeline**
4
+
5
+ This gem adds support for Baidu Tongji to use with Rails Turbolinks, this gem is inspired with turbolinks-analytics gem which seems to been removed from github.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'baidu-tongji-turbolinks'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install baidu-tongji-turbolinks
20
+
21
+ ## Usage
22
+
23
+ Add //= require baidu-tongji-turbolinks to your Javascript manifest file.
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create new Pull Request
32
+
33
+ ##License
34
+
35
+ Check LICENSE, MIT.
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'baidu-tongji-turbolinks/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "baidu-tongji-turbolinks"
8
+ gem.version = Baidu::Tongji::Turbolinks::VERSION
9
+ gem.authors = ["Hui"]
10
+ gem.email = ["hui@mos.cn"]
11
+ gem.description = %q{This gem adds support for Baidu Tongji to use with Rails Turbolinks, this gem is inspired with turbolinks-analytics gem which seems to been removed from github}
12
+ gem.summary = %q{This gem adds support for Baidu Tongji to use with Rails Turbolinks}
13
+ gem.homepage = "https://github.com/hui/baidu-tongji-turbolinks.git"
14
+ gem.license = 'MIT'
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_development_dependency("rake")
22
+ end
@@ -0,0 +1,6 @@
1
+ if window.history?.pushState and window.history.replaceState
2
+ document.addEventListener 'page:change', (event) =>
3
+
4
+ # Baidu Tongji
5
+ if window._hmt != undefined
6
+ _hmt.push(['_trackPageview', window.location.pathname + window.location.search])
@@ -0,0 +1,6 @@
1
+ require "baidu-tongji-turbolinks/version"
2
+
3
+ module Baidu::Tongji::Turbolinks
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ module Baidu
2
+ module Tongji
3
+ module Turbolinks
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: baidu-tongji-turbolinks
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Hui
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: This gem adds support for Baidu Tongji to use with Rails Turbolinks,
28
+ this gem is inspired with turbolinks-analytics gem which seems to been removed from
29
+ github
30
+ email:
31
+ - hui@mos.cn
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - ".gitignore"
37
+ - Gemfile
38
+ - LICENSE.txt
39
+ - README.md
40
+ - Rakefile
41
+ - baidu-tongji-turbolinks.gemspec
42
+ - lib/assets/javascripts/baidu-tongji-turbolinks.js.coffee
43
+ - lib/baidu-tongji-turbolinks.rb
44
+ - lib/baidu-tongji-turbolinks/version.rb
45
+ homepage: https://github.com/hui/baidu-tongji-turbolinks.git
46
+ licenses:
47
+ - MIT
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 2.2.2
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: This gem adds support for Baidu Tongji to use with Rails Turbolinks
69
+ test_files: []