utm_tracker 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 742f4df4fc29dcb39d6c6382cd86c586c87b587c57a5698e3f61a0617b8f6eff
4
- data.tar.gz: ceb12c6fbfc6d37f93aea140a49832986d412b77a8c67f7af0f266eb519db678
3
+ metadata.gz: 71738233a93adc630a83139c598b58661e06ecb04a7f7066159c6d1794745a9c
4
+ data.tar.gz: ef4e608910aec28c7b58a9e075fc929a59a251817f93fd6c0798a4801d28a7a7
5
5
  SHA512:
6
- metadata.gz: f4ce1455cee6be5f68ba4a709b50282aed02b041e9a6667b4ba2e1574fb74db07150a7d649420aa5715d2c6cc5257e7739c4764f9a6204ccd49717b3ee559f20
7
- data.tar.gz: 0e7f79e24f8c378a3f718a8b2cbc03ef339c3b927d42c979edaf4558a0352fefbd4f3d34e9ded365158fd5c182662f0db681d917a07b88afe414cf1b7615cdc5
6
+ metadata.gz: 1e3d3058b423490687e0ab8bbfa8b28db3a12ed3190b988fd6d48d296c4f19a1b01ab47bcf83d789d7bfd2f51f808b7aa7fdc41539ade8345ddc6c8cf33adc19
7
+ data.tar.gz: 4ff5efaaa4d55f019078293177d1cc88ad34482487458c6bc9ba2d451c469ba6c31fb2023dcb4ee71801537deedd4b8209568aebd3170f14bcd51455aff8128c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- utm_tracker (1.0.3)
4
+ utm_tracker (1.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -5,7 +5,7 @@ module UtmTracker
5
5
  attr_accessor :utm_data, :utm
6
6
 
7
7
  def initialize(utm_data, utm = {})
8
- @utm_data = utm_data
8
+ @utm_data = utm_data.transform_keys!(&:to_sym)
9
9
  @utm = utm
10
10
  end
11
11
 
@@ -20,23 +20,23 @@ module UtmTracker
20
20
  private
21
21
 
22
22
  def utm_source
23
- utm[:utm_source] = utm_data['source'] if utm_data['source']
23
+ utm[:utm_source] = utm_data[:source] if utm_data[:source]
24
24
  end
25
25
 
26
26
  def utm_content
27
- utm[:utm_content] = utm_data['content'] if utm_data['content']
27
+ utm[:utm_content] = utm_data[:content] if utm_data[:content]
28
28
  end
29
29
 
30
30
  def utm_medium
31
- utm[:utm_medium] = utm_data['medium'] if utm_data['medium']
31
+ utm[:utm_medium] = utm_data[:medium] if utm_data[:medium]
32
32
  end
33
33
 
34
34
  def utm_campaign
35
- utm[:utm_campaign] = utm_data['campaign'] if utm_data['campaign']
35
+ utm[:utm_campaign] = utm_data[:campaign] if utm_data[:campaign]
36
36
  end
37
37
 
38
38
  def utm_term
39
- utm[:utm_term] = utm_data['term'] if utm_data['term']
39
+ utm[:utm_term] = utm_data[:term] if utm_data[:term]
40
40
  end
41
41
  end
42
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UtmTracker
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.6"
5
5
  end
data/lib/utm_tracker.rb CHANGED
@@ -14,7 +14,7 @@ module UtmTracker
14
14
  end
15
15
 
16
16
  def call
17
- return :nok if utm_matcher.utm_data.nil?
17
+ return :nok if utm_matcher.utm_data.empty?
18
18
 
19
19
  match_utm_tags
20
20
  save_utm_tags_into_database!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utm_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Levashov