analytics-rails 0.0.8 → 0.1.0

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: 563716f8414f1bce51cda967ac0d98ca294ee29a
4
- data.tar.gz: 1a9f3f6af57e7fb4e94651235047afb55e32943d
3
+ metadata.gz: 21bd456cff4450708f26b05a5b92c743de20490c
4
+ data.tar.gz: 82ac661411c106c7a7f97de6d75249a82537a520
5
5
  SHA512:
6
- metadata.gz: e85e1c31d498e2e5f982f27e2d7357deb8744852ddc6999fe5658ad870bfb64d3e6c4f47728b3eb61642cbeff78ea7384d62012c10106ae0a270d40b1e425361
7
- data.tar.gz: 123a08cf343f25661a244ad6ed7b74caf0d8927ebafec9928375ce73b1e7a5b8261749837e648eda639c5c4c47c11ce421d75462137e2b10b76775b8e52a1309
6
+ metadata.gz: 9a547715081e57a32ef4dfae69ae1bf69e614130498f64c48fa59404a09b3530ae95ad96c84c8445ec1f7ebc6056f4c8d70069c7d3a3a3b3146ff363d2ab799f
7
+ data.tar.gz: f1ff30c183fe154c4660857b8deaa1124399abe255382370224787a270e20f6ac93ebcef365a685c882e9d56139537a370b70b6b56900ede134274d3a65398d4
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2013 Museways
1
+ Copyright 2014 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,7 +1,7 @@
1
1
  module Analytics
2
2
  module Rails
3
3
 
4
- VERSION = '0.0.8'
4
+ VERSION = '0.1.0'
5
5
 
6
6
  end
7
7
  end
@@ -9,4 +9,5 @@
9
9
 
10
10
  # Make sure your secret_key_base is kept private
11
11
  # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_token = 'cc799f48bef8d600576f83d4fbee274f1d876f156f6b3a18116abe76c81b0153e82bc9bdcf898aca59e1532e5d1a29c7bbcf592d0d9ad15ccecec650fa5ff5e7'
12
13
  Dummy::Application.config.secret_key_base = 'cc799f48bef8d600576f83d4fbee274f1d876f156f6b3a18116abe76c81b0153e82bc9bdcf898aca59e1532e5d1a29c7bbcf592d0d9ad15ccecec650fa5ff5e7'
@@ -1,7 +1,4 @@
1
1
  Dummy::Application.routes.draw do
2
-
3
- root to: 'pages#index'
4
-
5
2
  # The priority is based upon order of creation: first created -> highest priority.
6
3
  # See how all your routes lay out with "rake routes".
7
4
 
@@ -76,3 +76,13 @@ Processing by PagesController#index as HTML
76
76
  Rendered pages/index.html.erb within layouts/application (0.9ms)
77
77
  Completed 200 OK in 13ms (Views: 12.5ms | ActiveRecord: 0.0ms)
78
78
   (0.1ms) rollback transaction
79
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
80
+  (0.1ms) select sqlite_version(*)
81
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
82
+  (0.0ms) SELECT version FROM "schema_migrations"
83
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
84
+  (0.1ms) begin transaction
85
+ ----------------------------------------------
86
+ IncludeTagTest: test_should_return_include_tag
87
+ ----------------------------------------------
88
+  (0.0ms) rollback transaction
@@ -1,12 +1,10 @@
1
1
  require 'test_helper'
2
2
 
3
- class IncludeTagTest < ActionDispatch::IntegrationTest
3
+ class IncludeTagTest < ActionView::TestCase
4
4
 
5
- test "should show include tag" do
5
+ test "should return include tag with id" do
6
6
  with_env 'production' do
7
- get '/'
8
- assert_response :success
9
- assert response.body.include?("<script type=\"text/javascript\">var _gaq = _gaq || [];\n_gaq.push(['_setAccount', 'your-id']);\n_gaq.push(['_trackPageview']);\n(function(){\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n})();\n</script>")
7
+ assert_equal "<script type=\"text/javascript\">var _gaq = _gaq || [];\n_gaq.push(['_setAccount', 'id']);\n_gaq.push(['_trackPageview']);\n(function(){\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n})();\n</script>", google_analytics_include_tag('id')
10
8
  end
11
9
  end
12
10
 
data/test/test_helper.rb CHANGED
@@ -19,3 +19,6 @@ config = YAML::load(File.read(File.expand_path('../dummy/config/database.yml', _
19
19
  config['test']['adapter'] = 'jdbcsqlite3' if RUBY_PLATFORM == 'java'
20
20
  ActiveRecord::Base.establish_connection(config['test'])
21
21
  load(File.expand_path('../dummy/db/schema.rb', __FILE__))
22
+
23
+ # Include helpers
24
+ ActionView::TestCase.send :include, Analytics::Rails::ActionView::Base
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Museways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-01 00:00:00.000000000 Z
11
+ date: 2014-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,28 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: 3.1.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 4.2.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 3.0.0
29
+ version: 3.1.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 4.2.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: sqlite3
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ">="
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '0'
39
+ version: '1.3'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - ">="
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '0'
46
+ version: '1.3'
41
47
  description: Adds a simple view helper to create the google analytics include tag.
42
48
  email:
43
49
  - hello@museways.com
@@ -58,7 +64,6 @@ files:
58
64
  - test/dummy/app/assets/javascripts/application.js
59
65
  - test/dummy/app/assets/stylesheets/application.css
60
66
  - test/dummy/app/controllers/application_controller.rb
61
- - test/dummy/app/controllers/pages_controller.rb
62
67
  - test/dummy/app/helpers/application_helper.rb
63
68
  - test/dummy/app/views/layouts/application.html.erb
64
69
  - test/dummy/app/views/pages/index.html.erb
@@ -110,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
115
  requirements:
111
116
  - - ">="
112
117
  - !ruby/object:Gem::Version
113
- version: '0'
118
+ version: 1.9.3
114
119
  required_rubygems_version: !ruby/object:Gem::Requirement
115
120
  requirements:
116
121
  - - ">="
@@ -126,7 +131,6 @@ test_files:
126
131
  - test/dummy/app/assets/javascripts/application.js
127
132
  - test/dummy/app/assets/stylesheets/application.css
128
133
  - test/dummy/app/controllers/application_controller.rb
129
- - test/dummy/app/controllers/pages_controller.rb
130
134
  - test/dummy/app/helpers/application_helper.rb
131
135
  - test/dummy/app/views/layouts/application.html.erb
132
136
  - test/dummy/app/views/pages/index.html.erb
@@ -1,6 +0,0 @@
1
- class PagesController < ApplicationController
2
-
3
- def index
4
- end
5
-
6
- end