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,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Rails.application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
@@ -12,16 +12,12 @@ Dummy::Application.configure do
|
|
12
12
|
# preloads Rails for running tests, you may have to set it to true.
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
|
-
# Configure static
|
16
|
-
|
17
|
-
|
18
|
-
else
|
19
|
-
config.serve_static_assets = false
|
20
|
-
end
|
21
|
-
config.static_cache_control = "public, max-age=3600"
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
22
18
|
|
23
19
|
# Show full error reports and disable caching.
|
24
|
-
config.consider_all_requests_local
|
20
|
+
config.consider_all_requests_local = true
|
25
21
|
config.action_controller.perform_caching = false
|
26
22
|
|
27
23
|
# Raise exceptions instead of rendering exception templates.
|
@@ -35,10 +31,12 @@ Dummy::Application.configure do
|
|
35
31
|
# ActionMailer::Base.deliveries array.
|
36
32
|
config.action_mailer.delivery_method = :test
|
37
33
|
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
38
37
|
# Print deprecation notices to the stderr.
|
39
38
|
config.active_support.deprecation = :stderr
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
end
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
44
42
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
data/test/dummy/config/routes.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Rails.application.routes.draw do
|
2
2
|
# The priority is based upon order of creation: first created -> highest priority.
|
3
3
|
# See how all your routes lay out with "rake routes".
|
4
4
|
|
@@ -39,7 +39,7 @@ Dummy::Application.routes.draw do
|
|
39
39
|
# get 'recent', on: :collection
|
40
40
|
# end
|
41
41
|
# end
|
42
|
-
|
42
|
+
|
43
43
|
# Example resource route with concerns:
|
44
44
|
# concern :toggleable do
|
45
45
|
# post 'toggle'
|
@@ -0,0 +1,22 @@
|
|
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 the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 2c1c8d4cbaa726b21aa6483b7d556125f4897508e2b94f8b3ddaec675168382c9b3b6eb5a9359d2fade03f539c16ac1ef905891c2410f2fd00b83b76c1666feb
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 9dd531171128e7c3d11dd2c5c18c84ba43d29b677043002634a6f4d58bf2687a283b7b6dc6af741d63c3824f11fa1f858010d7c2509a932023f2ece0d3bfe6cf
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV['SECRET_KEY_BASE'] %>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
-----------------------
|
2
|
+
TagTest: test_arguments
|
3
|
+
-----------------------
|
4
|
+
-----------------------
|
5
|
+
TagTest: test_arguments
|
6
|
+
-----------------------
|
7
|
+
-----------------------
|
8
|
+
TagTest: test_arguments
|
9
|
+
-----------------------
|
10
|
+
---------------------
|
11
|
+
TagTest: test_include
|
12
|
+
---------------------
|
13
|
+
-------------------
|
14
|
+
TagTest: test_event
|
15
|
+
-------------------
|
16
|
+
-----------------------
|
17
|
+
TagTest: test_arguments
|
18
|
+
-----------------------
|
19
|
+
-------------------
|
20
|
+
TagTest: test_event
|
21
|
+
-------------------
|
22
|
+
---------------------
|
23
|
+
TagTest: test_include
|
24
|
+
---------------------
|
25
|
+
-----------------------
|
26
|
+
TagTest: test_arguments
|
27
|
+
-----------------------
|
28
|
+
---------------------
|
29
|
+
TagTest: test_include
|
30
|
+
---------------------
|
31
|
+
-------------------
|
32
|
+
TagTest: test_event
|
33
|
+
-------------------
|
34
|
+
---------------------
|
35
|
+
TagTest: test_include
|
36
|
+
---------------------
|
37
|
+
-------------------
|
38
|
+
TagTest: test_event
|
39
|
+
-------------------
|
40
|
+
-----------------------
|
41
|
+
TagTest: test_arguments
|
42
|
+
-----------------------
|
43
|
+
-----------------------
|
44
|
+
TagTest: test_arguments
|
45
|
+
-----------------------
|
46
|
+
-------------------
|
47
|
+
TagTest: test_event
|
48
|
+
-------------------
|
49
|
+
---------------------
|
50
|
+
TagTest: test_include
|
51
|
+
---------------------
|
52
|
+
-----------------------
|
53
|
+
TagTest: test_arguments
|
54
|
+
-----------------------
|
55
|
+
-------------------
|
56
|
+
TagTest: test_event
|
57
|
+
-------------------
|
58
|
+
---------------------
|
59
|
+
TagTest: test_include
|
60
|
+
---------------------
|
61
|
+
-------------------
|
62
|
+
TagTest: test_event
|
63
|
+
-------------------
|
64
|
+
---------------------
|
65
|
+
TagTest: test_include
|
66
|
+
---------------------
|
67
|
+
---------------------
|
68
|
+
TagTest: test_include
|
69
|
+
---------------------
|
70
|
+
-------------------
|
71
|
+
TagTest: test_event
|
72
|
+
-------------------
|
73
|
+
-------------------
|
74
|
+
TagTest: test_event
|
75
|
+
-------------------
|
76
|
+
---------------------
|
77
|
+
TagTest: test_include
|
78
|
+
---------------------
|
79
|
+
---------------------
|
80
|
+
TagTest: test_include
|
81
|
+
---------------------
|
82
|
+
-------------------
|
83
|
+
TagTest: test_event
|
84
|
+
-------------------
|
85
|
+
-------------------
|
86
|
+
TagTest: test_event
|
87
|
+
-------------------
|
88
|
+
---------------------
|
89
|
+
TagTest: test_include
|
90
|
+
---------------------
|
91
|
+
-------------------
|
92
|
+
TagTest: test_event
|
93
|
+
-------------------
|
94
|
+
---------------------
|
95
|
+
TagTest: test_include
|
96
|
+
---------------------
|
97
|
+
-------------------
|
98
|
+
TagTest: test_event
|
99
|
+
-------------------
|
100
|
+
---------------------
|
101
|
+
TagTest: test_include
|
102
|
+
---------------------
|
103
|
+
---------------------
|
104
|
+
TagTest: test_include
|
105
|
+
---------------------
|
106
|
+
-------------------
|
107
|
+
TagTest: test_event
|
108
|
+
-------------------
|
data/test/dummy/public/404.html
CHANGED
@@ -1,58 +1,61 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
<
|
53
|
-
<
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
</
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
div.dialog {
|
15
|
+
width: 95%;
|
16
|
+
max-width: 33em;
|
17
|
+
margin: 4em auto 0;
|
18
|
+
}
|
19
|
+
div.dialog > div {
|
20
|
+
border: 1px solid #CCC;
|
21
|
+
border-right-color: #999;
|
22
|
+
border-left-color: #999;
|
23
|
+
border-bottom-color: #BBB;
|
24
|
+
border-top: #B00100 solid 4px;
|
25
|
+
border-top-left-radius: 9px;
|
26
|
+
border-top-right-radius: 9px;
|
27
|
+
background-color: white;
|
28
|
+
padding: 7px 12% 0;
|
29
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
30
|
+
}
|
31
|
+
h1 {
|
32
|
+
font-size: 100%;
|
33
|
+
color: #730E15;
|
34
|
+
line-height: 1.5em;
|
35
|
+
}
|
36
|
+
div.dialog > p {
|
37
|
+
margin: 0 0 1em;
|
38
|
+
padding: 1em;
|
39
|
+
background-color: #F7F7F7;
|
40
|
+
border: 1px solid #CCC;
|
41
|
+
border-right-color: #999;
|
42
|
+
border-left-color: #999;
|
43
|
+
border-bottom-color: #999;
|
44
|
+
border-bottom-left-radius: 4px;
|
45
|
+
border-bottom-right-radius: 4px;
|
46
|
+
border-top-color: #DADADA;
|
47
|
+
color: #666;
|
48
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
<div class="dialog">
|
54
|
+
<div>
|
55
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
56
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
57
|
+
</div>
|
58
|
+
<p>If you are the application owner check the logs for more information.</p>
|
59
|
+
</div>
|
60
|
+
</body>
|
58
61
|
</html>
|
data/test/dummy/public/422.html
CHANGED
@@ -1,58 +1,61 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
<
|
53
|
-
<
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
</
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
div.dialog {
|
15
|
+
width: 95%;
|
16
|
+
max-width: 33em;
|
17
|
+
margin: 4em auto 0;
|
18
|
+
}
|
19
|
+
div.dialog > div {
|
20
|
+
border: 1px solid #CCC;
|
21
|
+
border-right-color: #999;
|
22
|
+
border-left-color: #999;
|
23
|
+
border-bottom-color: #BBB;
|
24
|
+
border-top: #B00100 solid 4px;
|
25
|
+
border-top-left-radius: 9px;
|
26
|
+
border-top-right-radius: 9px;
|
27
|
+
background-color: white;
|
28
|
+
padding: 7px 12% 0;
|
29
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
30
|
+
}
|
31
|
+
h1 {
|
32
|
+
font-size: 100%;
|
33
|
+
color: #730E15;
|
34
|
+
line-height: 1.5em;
|
35
|
+
}
|
36
|
+
div.dialog > p {
|
37
|
+
margin: 0 0 1em;
|
38
|
+
padding: 1em;
|
39
|
+
background-color: #F7F7F7;
|
40
|
+
border: 1px solid #CCC;
|
41
|
+
border-right-color: #999;
|
42
|
+
border-left-color: #999;
|
43
|
+
border-bottom-color: #999;
|
44
|
+
border-bottom-left-radius: 4px;
|
45
|
+
border-bottom-right-radius: 4px;
|
46
|
+
border-top-color: #DADADA;
|
47
|
+
color: #666;
|
48
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
<div class="dialog">
|
54
|
+
<div>
|
55
|
+
<h1>The change you wanted was rejected.</h1>
|
56
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
57
|
+
</div>
|
58
|
+
<p>If you are the application owner check the logs for more information.</p>
|
59
|
+
</div>
|
60
|
+
</body>
|
58
61
|
</html>
|