analytics_goo 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -10,9 +10,9 @@ gem install eyestreet-analytics_goo
10
10
  ## Newer usage pattern
11
11
  Initially I made an adapter pattern thinking that we would support multiple analytics packages. So far I only need Google Analytics:
12
12
 
13
- tracker = AnalyticsGoo::GoogleAnalyticsAdapter.new(:analytics_id => "MO-11685745-3",
13
+ tracker = AnalyticsGoo::GoogleAnalyticsAdapter.new(:analytics_id => "MO-11685745-5",
14
14
  :domain => "shor.tswit.ch",
15
- :remote_address => "75.103.6.17",
15
+ :remote_address => "76.25.141.74",
16
16
  :user_agent => "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6",
17
17
  :http_accept_language => "en-us,en;q=0.5")
18
18
  tracker.track_page_view("/testFoo/myPage.html")
@@ -24,7 +24,7 @@ gem install eyestreet-analytics_goo
24
24
  The simple usage is the following:
25
25
 
26
26
  tracker = AnalyticsGoo.config(:google_analytics,
27
- :analytics_id => "MO-11685745-3",
27
+ :analytics_id => "MO-11685745-5",
28
28
  :domain => "demo.eyestreet.com")
29
29
 
30
30
  tracker.track_page_view("/foo")
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -143,8 +143,7 @@ module AnalyticsGoo
143
143
  return '' if self.remote_address.blank?
144
144
  # Capture the first three octects of the IP address and replace the forth
145
145
  # with 0, e.g. 124.455.3.123 becomes 124.455.3.0
146
- ip = self.remote_address.to_s.gsub!(/([^.]+\.[^.]+\.[^.]+\.)[^.]+/,"\\1") + "0"
147
- ip
146
+ self.remote_address.to_s.gsub(/([^.]+\.[^.]+\.[^.]+\.)[^.]+/,"\\1") + "0"
148
147
  end
149
148
 
150
149
 
@@ -51,6 +51,9 @@ class AnalyticsGooTest < ActiveSupport::TestCase
51
51
  should "return that IP" do
52
52
  assert_equal "127.0.0.0", @ga.utmip
53
53
  end
54
+ should "not change the analytics_config hash" do
55
+ assert_equal "127.0.0.1", @analytics_config[:remote_address]
56
+ end
54
57
  end
55
58
 
56
59
  context "that has been initialized" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics_goo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rob Christie