urchin_tracking_module 1.0.2 → 1.0.3

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: 12a4d1f01e7e6f2947a5f090f486bcd6990786a1
4
- data.tar.gz: 33f2c0689947ece4ccd411e593a2e8e227dd481d
3
+ metadata.gz: e178ebe92fe8c07ebdfc73fb9ba15afc86135918
4
+ data.tar.gz: 40b77d0dfb8b7a1884f5bf85364ba9d2a4b69c42
5
5
  SHA512:
6
- metadata.gz: 82ff80641891da60919f0d7d0d784b987a518ed42d6c036771aa7c59a8cb3bd6bff142ef7c70973f06aa1cbf06d8c97bae49a26f42737e1d05236aec98e9f752
7
- data.tar.gz: 8bda56a862b23e8a0ea0e56901ef6d49aef23f3cfbd15bcb0e9a712e790d5652b9386378881e3b67d0754c352995dd83e1098dd74b22d8be7c4959c10b2b3df3
6
+ metadata.gz: dc52e6adb9f505e45e4a8e525a88afc202c0f60372bc284f982b8b052d759846eff8fad054382c2d1fcf1a9efa77f7ebbcbf62cb6f60b11ed076415a50c4fd8d
7
+ data.tar.gz: 570a955bc823b507df562e4e871d45a0855995dda2132967a335719d2aa4987ed7782e2b35ee57cb61fe64b4cc37a4f8ac165a3846bc340345a0a17f146a191b
@@ -22,7 +22,7 @@ class UrchinTrackingModule
22
22
  end
23
23
 
24
24
  def defaults
25
- Utm::Defaults.config
25
+ Defaults.config
26
26
  end
27
27
  private :defaults
28
28
 
@@ -1,3 +1,3 @@
1
1
  class UrchinTrackingModule
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -4,10 +4,9 @@ require 'uri'
4
4
  require 'spec_helper'
5
5
 
6
6
  describe UrchinTrackingModule do
7
- Utm = UrchinTrackingModule
8
7
  let(:params) {{}}
9
8
  let(:url) { 'http://example.com?src=fba_blooming/#/shops' }
10
- subject { Utm.new(url) }
9
+ subject { UrchinTrackingModule.new(url) }
11
10
 
12
11
  context 'basic tracking' do
13
12
  let(:params) {{
@@ -17,7 +16,7 @@ describe UrchinTrackingModule do
17
16
  utm_content: 'variant_guy',
18
17
  utm_campaign: 'xmas_2013' }}
19
18
 
20
- Utm::TRACKING_PARAMETERS.each do |tracking_param|
19
+ UrchinTrackingModule::TRACKING_PARAMETERS.each do |tracking_param|
21
20
  it "tracks #{tracking_param}" do
22
21
  uri = subject.tracking(params)
23
22
  expect(uri).to match(/#{tracking_param}=#{params[tracking_param]}/)
@@ -36,14 +35,14 @@ describe UrchinTrackingModule do
36
35
 
37
36
  EXAMPLE_CONFIG.each do |(name,value)|
38
37
  it "configures #{name}" do
39
- Utm.configure { |utm| utm[name]= value }
38
+ UrchinTrackingModule.configure { |utm| utm[name]= value }
40
39
  expect(subject.tracking).to match(/#{name}=#{value}/)
41
40
  end
42
41
  end
43
42
 
44
43
  it 'configures src' do
45
44
  # checking for side effects and overrides
46
- Utm.configure { |utm| utm[:utm_source]= 'funnel_source_for_bi' }
45
+ UrchinTrackingModule.configure { |utm| utm[:utm_source]= 'funnel_source_for_bi' }
47
46
  expect(subject.tracking).to match(/src=funnel_source_for_bi/)
48
47
  expect(UTM(url, utm_source: 'pewpew')).to match(/src=pewpew/)
49
48
  expect(UTM(url, utm_source: 'pewpew')).to match(/utm_source=pewpew/)
@@ -52,21 +51,21 @@ describe UrchinTrackingModule do
52
51
  end
53
52
  end
54
53
 
55
- it 'configures Utm.source' do
56
- Utm.configure { |utm| utm[:utm_source]= EXAMPLE_CONFIG[:utm_source] }
57
- expect(Utm.source).to eq EXAMPLE_CONFIG[:utm_source]
54
+ it 'configures UrchinTrackingModule.source' do
55
+ UrchinTrackingModule.configure { |utm| utm[:utm_source]= EXAMPLE_CONFIG[:utm_source] }
56
+ expect(UrchinTrackingModule.source).to eq EXAMPLE_CONFIG[:utm_source]
58
57
  end
59
58
 
60
- it 'configures Utm.medium' do
61
- Utm.configure { |utm| utm[:utm_medium]= EXAMPLE_CONFIG[:utm_medium] }
62
- expect(Utm.medium).to eq EXAMPLE_CONFIG[:utm_medium]
59
+ it 'configures UrchinTrackingModule.medium' do
60
+ UrchinTrackingModule.configure { |utm| utm[:utm_medium]= EXAMPLE_CONFIG[:utm_medium] }
61
+ expect(UrchinTrackingModule.medium).to eq EXAMPLE_CONFIG[:utm_medium]
63
62
  end
64
63
 
65
64
  describe 'UTM helper' do
66
65
  let(:utm) { double }
67
66
 
68
- it 'invokes Utm' do
69
- Utm.should_receive(:new).with(url).and_return(utm)
67
+ it 'invokes UrchinTrackingModule' do
68
+ UrchinTrackingModule.should_receive(:new).with(url).and_return(utm)
70
69
  utm.should_receive(:tracking).with(params)
71
70
  UTM(url,params)
72
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urchin_tracking_module
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Riethmayer