analytics-rails 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +13 -7
- data/Rakefile +1 -14
- data/lib/analytics/rails.rb +2 -1
- data/lib/analytics/rails/extensions/action_view/base.rb +38 -0
- data/lib/analytics/rails/railtie.rb +4 -2
- data/lib/analytics/rails/version.rb +1 -1
- data/test/dummy/Rakefile +1 -2
- data/test/dummy/app/assets/javascripts/application.js +2 -2
- data/test/dummy/app/assets/stylesheets/application.css +6 -4
- data/test/dummy/app/views/layouts/application.html.erb +9 -12
- data/test/dummy/bin/bundle +1 -0
- data/test/dummy/bin/rails +2 -1
- data/test/dummy/bin/rake +1 -0
- data/test/dummy/bin/setup +30 -0
- data/test/dummy/config.ru +1 -1
- data/test/dummy/config/application.rb +6 -2
- data/test/dummy/config/boot.rb +1 -1
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +14 -5
- data/test/dummy/config/environments/production.rb +18 -26
- data/test/dummy/config/environments/test.rb +10 -12
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/mime_types.rb +1 -2
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/dummy/config/routes.rb +2 -2
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/log/test.log +108 -0
- data/test/dummy/public/404.html +58 -55
- data/test/dummy/public/422.html +58 -55
- data/test/dummy/public/500.html +57 -54
- data/test/tag_test.rb +47 -0
- data/test/test_helper.rb +5 -14
- metadata +21 -46
- data/lib/analytics/rails/action_view/base.rb +0 -43
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/initializers/secret_token.rb +0 -13
- data/test/dummy/db/schema.rb +0 -16
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/include_tag_test.rb +0 -28
@@ -1,13 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure your secret_key_base is kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
Dummy::Application.config.secret_token = 'cc799f48bef8d600576f83d4fbee274f1d876f156f6b3a18116abe76c81b0153e82bc9bdcf898aca59e1532e5d1a29c7bbcf592d0d9ad15ccecec650fa5ff5e7'
|
13
|
-
Dummy::Application.config.secret_key_base = 'cc799f48bef8d600576f83d4fbee274f1d876f156f6b3a18116abe76c81b0153e82bc9bdcf898aca59e1532e5d1a29c7bbcf592d0d9ad15ccecec650fa5ff5e7'
|
data/test/dummy/db/schema.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# This file is auto-generated from the current state of the database. Instead
|
3
|
-
# of editing this file, please use the migrations feature of Active Record to
|
4
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
-
#
|
6
|
-
# Note that this schema.rb definition is the authoritative source for your
|
7
|
-
# database schema. If you need to create the application database on another
|
8
|
-
# system, you should be using db:schema:load, not running all the migrations
|
9
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
-
#
|
12
|
-
# It's strongly recommended that you check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(version: 0) do
|
15
|
-
|
16
|
-
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/include_tag_test.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class IncludeTagTest < ActionView::TestCase
|
4
|
-
|
5
|
-
test 'tag id' do
|
6
|
-
with_env 'production' do
|
7
|
-
assert google_analytics_include_tag('id').include?("_gaq.push(['_setAccount', 'id']);")
|
8
|
-
|
9
|
-
assert google_analytics_include_tag(
|
10
|
-
variables: [[1, 'Member', 'Yes', 1]]
|
11
|
-
).include?("_gaq.push(['_setCustomVar', 1, 'Member', 'Yes', 1])")
|
12
|
-
|
13
|
-
assert google_analytics_include_tag(
|
14
|
-
events: [['Popup', 'Click']]
|
15
|
-
).include?("ga('send', 'event', 'Popup', 'Click');")
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def with_env(value)
|
22
|
-
old_env = Rails.env
|
23
|
-
Rails.env = value
|
24
|
-
yield
|
25
|
-
Rails.env = old_env
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|