gabba-gmp 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a6e4086a057b28b3944d7a0a18bb92db0b58db33
4
+ data.tar.gz: dd390b94ac1ad6aa59fdf24561b8b1fefa5e978f
5
+ SHA512:
6
+ metadata.gz: f42f220ad8d2938cb6d41623877cca980ed1af8d4ed1bfc27f8335bc798a06d463f8c1a4edf25fb7140ba979711254e21063a2c08c9ee554ec2378c9aa04377d
7
+ data.tar.gz: 9a271f96641c8511bb1c9a9a6cfeccf9cfaea22ab531c10e583823962f95899b78031f311a16ce302fe71da11ebf2d3ee6abd13af198728a02a9c7373a30d6f9
@@ -2,6 +2,10 @@ module GabbaGMP
2
2
  class GabbaGMP
3
3
  class Campaign
4
4
  attr_accessor :name, :source, :medium, :keyword, :content
5
+
6
+ def present?
7
+ name.present? or source.present? or medium.present? or keyword.present? or content.present?
8
+ end
5
9
  end
6
10
  end
7
11
  end
@@ -93,18 +93,20 @@ module GabbaGMP
93
93
  def campaign=(campaign)
94
94
  campaign ||= Campaign.new
95
95
  {}.tap do |campaign_params|
96
- @sessionopts[:campaign_name] = campaign.name
97
- @sessionopts[:campaign_name] ||= "(direct)"
98
-
99
- @sessionopts[:campaign_source] = campaign.source
100
- @sessionopts[:campaign_source] ||= "(direct)"
101
-
102
- @sessionopts[:campaign_medium] = campaign.medium
103
- @sessionopts[:campaign_medium] ||= "(none)"
104
-
105
- @sessionopts[:campaign_keyword] = campaign.keyword if campaign.keyword.present?
106
-
107
- @sessionopts[:campaign_content] = campaign.content if campaign.content.present?
96
+ if campaign.present?
97
+ @sessionopts[:campaign_name] = campaign.name
98
+ @sessionopts[:campaign_name] ||= "(direct)"
99
+
100
+ @sessionopts[:campaign_source] = campaign.source
101
+ @sessionopts[:campaign_source] ||= "(direct)"
102
+
103
+ @sessionopts[:campaign_medium] = campaign.medium
104
+ @sessionopts[:campaign_medium] ||= "(none)"
105
+
106
+ @sessionopts[:campaign_keyword] = campaign.keyword if campaign.keyword.present?
107
+
108
+ @sessionopts[:campaign_content] = campaign.content if campaign.content.present?
109
+ end
108
110
  end
109
111
  end
110
112
 
@@ -1,5 +1,5 @@
1
1
  module GabbaGMP
2
2
  unless const_defined?('VERSION')
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,60 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gabba-gmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Julian West
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-09-08 00:00:00.000000000Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: net-http-persistent
16
- requirement: &26727708 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '2.9'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *26727708
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '2.9'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: rake
27
- requirement: &26727408 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ~>
31
32
  - !ruby/object:Gem::Version
32
33
  version: 10.1.0
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *26727408
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 10.1.0
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rspec
38
- requirement: &26727132 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
45
  - - ~>
42
46
  - !ruby/object:Gem::Version
43
47
  version: 2.14.1
44
48
  type: :development
45
49
  prerelease: false
46
- version_requirements: *26727132
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.14.1
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: webmock
49
- requirement: &26726856 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
54
61
  version: 1.13.0
55
62
  type: :development
56
63
  prerelease: false
57
- version_requirements: *26726856
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 1.13.0
58
69
  description: Google Measurement Protocol rewite of the Gabba library
59
70
  email:
60
71
  - julz dot west at gmail dot com
@@ -80,26 +91,25 @@ files:
80
91
  homepage: https://github.com/fuzzyjulz/gabba-gmp
81
92
  licenses:
82
93
  - MIT
94
+ metadata: {}
83
95
  post_install_message:
84
96
  rdoc_options: []
85
97
  require_paths:
86
98
  - lib
87
99
  required_ruby_version: !ruby/object:Gem::Requirement
88
- none: false
89
100
  requirements:
90
- - - ! '>='
101
+ - - '>='
91
102
  - !ruby/object:Gem::Version
92
103
  version: '0'
93
104
  required_rubygems_version: !ruby/object:Gem::Requirement
94
- none: false
95
105
  requirements:
96
- - - ! '>='
106
+ - - '>='
97
107
  - !ruby/object:Gem::Version
98
108
  version: '0'
99
109
  requirements: []
100
110
  rubyforge_project: gabba-gmp
101
- rubygems_version: 1.7.2
111
+ rubygems_version: 2.0.3
102
112
  signing_key:
103
- specification_version: 3
113
+ specification_version: 4
104
114
  summary: Google Measurement Protocol rewite of the Gabba library
105
115
  test_files: []