middleman-hotjar 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/.gitignore +2 -3
- data/.rubocop.yml +8 -0
- data/.travis.yml +37 -0
- data/Gemfile +5 -1
- data/LICENSE.md +21 -0
- data/README.md +31 -0
- data/Rakefile +6 -0
- data/features/support/env.rb +5 -0
- data/fixtures/basic-app/config.rb +2 -0
- data/lib/middleman-hotjar.rb +4 -2
- data/lib/middleman-hotjar/extension.rb +7 -4
- data/middleman-hotjar.gemspec +19 -19
- metadata +12 -8
- data/tmp/aruba/basic-app/config.rb +0 -3
- data/tmp/aruba/basic-app/source/hotjar.html.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f155ade2e598abcd8a62758b2ed90e85bb3fa7f
|
4
|
+
data.tar.gz: a76959b6f4a6e08781babb6d2dd7562cb7ee1fc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fae4a8a4c1dc96594ad405b53efdf3c4eab98b4d6d825a6528577c20b4572c4b9875697452feb3f42ee2167bee07bd39aac9716a769c524658327bdb5d4f158
|
7
|
+
data.tar.gz: ab4d8502d483b8aff56d5097a849a26d22f5ed5f8d40d4de68729c330af3e6869f1277fc4d9c32eda90dfd7e5614b018de97f9a8eea924889df8c3b33dbb08fc
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
language: ruby
|
2
|
+
sudo: false
|
3
|
+
cache: bundler
|
4
|
+
|
5
|
+
before_install:
|
6
|
+
- gem install bundler
|
7
|
+
# https://github.com/travis-ci/travis-ci/issues/9333#issuecomment-373042916
|
8
|
+
|
9
|
+
before_script:
|
10
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
11
|
+
- chmod +x ./cc-test-reporter
|
12
|
+
- ./cc-test-reporter before-build
|
13
|
+
- bundle update
|
14
|
+
|
15
|
+
rvm:
|
16
|
+
- ruby-head
|
17
|
+
- 2.5
|
18
|
+
- 2.4
|
19
|
+
- 2.3
|
20
|
+
|
21
|
+
os:
|
22
|
+
- linux
|
23
|
+
|
24
|
+
matrix:
|
25
|
+
fast_finish: true
|
26
|
+
allow_failures:
|
27
|
+
- rvm: ruby-head
|
28
|
+
|
29
|
+
env:
|
30
|
+
global:
|
31
|
+
- TEST=true
|
32
|
+
|
33
|
+
script:
|
34
|
+
- bundle exec rake
|
35
|
+
|
36
|
+
after_script:
|
37
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -r 4e65a8cf75d0dd2b0cdc5b469fb54f963d270540041816f7a754af085bf9b2ae
|
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# If you do not have OpenSSL installed, update
|
2
4
|
# the following line to use "http://" instead
|
3
5
|
source 'https://rubygems.org'
|
@@ -12,8 +14,10 @@ group :development do
|
|
12
14
|
end
|
13
15
|
|
14
16
|
group :test do
|
17
|
+
gem 'aruba'
|
15
18
|
gem 'capybara'
|
16
19
|
gem 'cucumber'
|
17
|
-
gem 'aruba'
|
18
20
|
gem 'rspec'
|
21
|
+
gem 'rubocop'
|
22
|
+
gem 'simplecov'
|
19
23
|
end
|
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Kieran Hunt
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# middleman-hotjar
|
2
|
+
[](https://travis-ci.org/KieranHunt/middleman-hotjar)
|
3
|
+
[](https://codeclimate.com/github/KieranHunt/middleman-hotjar/maintainability)
|
4
|
+
[](https://codeclimate.com/github/KieranHunt/middleman-hotjar/test_coverage)
|
5
|
+
[](https://rubygems.org/gems/middleman-hotjar)
|
6
|
+
[](https://rubygems.org/gems/middleman-hotjar)
|
7
|
+
|
8
|
+
|
9
|
+
Add [Hotjar](https://hotjar.com) analytics tracking code to your [Middleman](https://middlemanapp.com/) site!
|
10
|
+
|
11
|
+
# Installation
|
12
|
+
|
13
|
+
1. Add it to your `Gemfile`:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem middleman-hotjar
|
17
|
+
```
|
18
|
+
|
19
|
+
2. Activate the extension in your `config.rb` file:
|
20
|
+
|
21
|
+
```erb
|
22
|
+
activate :hotjar do |hj|
|
23
|
+
hj.hotjar_id = '1337' # Replace with your site's ID
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
27
|
+
3. Add the helper method to your layout:
|
28
|
+
|
29
|
+
```erb
|
30
|
+
<%= hotjar_tag %>
|
31
|
+
```
|
data/Rakefile
CHANGED
@@ -1,12 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler'
|
2
4
|
Bundler::GemHelper.install_tasks
|
3
5
|
|
4
6
|
require 'cucumber/rake/task'
|
7
|
+
require 'rubocop/rake_task'
|
5
8
|
|
6
9
|
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
7
10
|
t.cucumber_opts = "--color --tags 'not @wip' --strict"
|
8
11
|
end
|
9
12
|
|
13
|
+
RuboCop::RakeTask.new
|
14
|
+
task default: :rubocop
|
15
|
+
|
10
16
|
require 'rake/clean'
|
11
17
|
|
12
18
|
task test: :cucumber
|
data/features/support/env.rb
CHANGED
data/lib/middleman-hotjar.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'middleman-core'
|
2
4
|
|
5
|
+
# Add Hotjar analytics tracking code to your Middleman site
|
3
6
|
class HotjarExtension < ::Middleman::Extension
|
4
7
|
option :hjid, nil, 'Hotjar ID'
|
5
8
|
option :hotjar_id, nil, 'Hotjar ID'
|
@@ -7,10 +10,10 @@ class HotjarExtension < ::Middleman::Extension
|
|
7
10
|
|
8
11
|
def after_configuration
|
9
12
|
options[:id] = options.id || options.hjid || options.hotjar_id
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
return unless options.id.nil?
|
14
|
+
|
15
|
+
warn 'Hotjar: please specify a Hotjar ID'
|
16
|
+
raise ArgumentError, 'No Hotjar ID given' if app.build?
|
14
17
|
end
|
15
18
|
|
16
19
|
helpers do
|
data/middleman-hotjar.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
5
|
-
s.name = "middleman-hotjar"
|
6
|
-
s.version = "0.0.1"
|
7
|
-
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = ["Kieran Hunt"]
|
9
|
-
s.email = ["kieran.hunt92@gmail.com"]
|
10
|
-
s.homepage = "http://github.com/KieranHunt/middleman-hotjar"
|
11
|
-
s.summary = %q{Add Hotjar analytics to your middleman site}
|
12
|
-
# s.description = %q{A longer description of your extension}
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
13
4
|
|
14
|
-
|
15
|
-
s.
|
16
|
-
s.
|
17
|
-
s.
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'middleman-hotjar'
|
7
|
+
s.version = '0.0.2'
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ['Kieran Hunt']
|
10
|
+
s.email = ['kieran.hunt92@gmail.com']
|
11
|
+
s.homepage = 'http://github.com/KieranHunt/middleman-hotjar'
|
12
|
+
s.summary = '📈 Add Hotjar analytics to your Middleman site'
|
13
|
+
s.description = <<~DESCRIPTION
|
14
|
+
Makes it easy to add Hotjar analytics tracking code to your Middleman site.
|
15
|
+
Keeps your configuration where it belongs, in `config.rb`.
|
16
|
+
DESCRIPTION
|
18
17
|
|
19
|
-
|
20
|
-
s.
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
21
|
+
s.require_paths = ['lib']
|
21
22
|
|
22
|
-
|
23
|
-
# s.add_runtime_dependency("gem-name", "gem-version")
|
23
|
+
s.add_runtime_dependency('middleman-core', ['>= 4.0'])
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-hotjar
|
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
|
- Kieran Hunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -16,15 +16,17 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
27
|
-
description:
|
26
|
+
version: '4.0'
|
27
|
+
description: |
|
28
|
+
Makes it easy to add Hotjar analytics tracking code to your Middleman site.
|
29
|
+
Keeps your configuration where it belongs, in `config.rb`.
|
28
30
|
email:
|
29
31
|
- kieran.hunt92@gmail.com
|
30
32
|
executables: []
|
@@ -32,7 +34,11 @@ extensions: []
|
|
32
34
|
extra_rdoc_files: []
|
33
35
|
files:
|
34
36
|
- ".gitignore"
|
37
|
+
- ".rubocop.yml"
|
38
|
+
- ".travis.yml"
|
35
39
|
- Gemfile
|
40
|
+
- LICENSE.md
|
41
|
+
- README.md
|
36
42
|
- Rakefile
|
37
43
|
- features/hotjar.feature
|
38
44
|
- features/support/env.rb
|
@@ -41,8 +47,6 @@ files:
|
|
41
47
|
- lib/middleman-hotjar.rb
|
42
48
|
- lib/middleman-hotjar/extension.rb
|
43
49
|
- middleman-hotjar.gemspec
|
44
|
-
- tmp/aruba/basic-app/config.rb
|
45
|
-
- tmp/aruba/basic-app/source/hotjar.html.erb
|
46
50
|
homepage: http://github.com/KieranHunt/middleman-hotjar
|
47
51
|
licenses: []
|
48
52
|
metadata: {}
|
@@ -65,7 +69,7 @@ rubyforge_project:
|
|
65
69
|
rubygems_version: 2.6.11
|
66
70
|
signing_key:
|
67
71
|
specification_version: 4
|
68
|
-
summary: Add Hotjar analytics to your
|
72
|
+
summary: "\U0001F4C8 Add Hotjar analytics to your Middleman site"
|
69
73
|
test_files:
|
70
74
|
- features/hotjar.feature
|
71
75
|
- features/support/env.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= hotjar_tag %>
|