universal-track-manager 0.7.1 → 0.7.2
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 +4 -4
- data/lib/generators/universal_track_manager/install_generator.rb +41 -3
- data/lib/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b14612eb9b74067e03470869a18741fde4da4cdc9568e5386959d0d70dd040fc
|
|
4
|
+
data.tar.gz: ef65a2a872240dfbd777c0b2e79d23fb5e648d464c7401507e44b5b38a3f254b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef11115f228a22643f38dcfde49c8c1d7403a062a3c3113c9217bbf9e32e29bd43f4a72e481772ca4194d86315a6ccaf6d825ca93e8b1956d947dc9ecfb7fa30
|
|
7
|
+
data.tar.gz: c0c4537dd8e38e3d827294781dc3357efe28260545130f240b3a05fb69c7817fcc56789a8b095bc22c6b215b8233a83eab12b103054cfd805f0f99910a41d2c3
|
|
@@ -12,7 +12,13 @@ module UniversalTrackManager
|
|
|
12
12
|
source_root File.expand_path('../templates', __dir__)
|
|
13
13
|
|
|
14
14
|
class_option :orm, type: 'boolean'
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
class_option :param_list, type: :string, default: nil # DEPRECATED --- DO NOT USE
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class_option :add, type: :string, default: nil
|
|
21
|
+
class_option :only, type: :string, default: nil
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
def self.next_migration_number(path)
|
|
@@ -21,14 +27,45 @@ module UniversalTrackManager
|
|
|
21
27
|
|
|
22
28
|
desc "Creates an initializer for Universal Track Manager and copy files to your application."
|
|
23
29
|
def create_universal_track_manager_migration
|
|
24
|
-
|
|
30
|
+
# guard against pre-0.7.3 sytnax
|
|
31
|
+
if options['param_list']
|
|
32
|
+
puts "Oops (FATAL): param_list is removed; use 'add' to augment the default list of fields or use 'only' to replace it"
|
|
33
|
+
exit
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# guard against using both 'add' and 'only'
|
|
37
|
+
if options['add'] && options['only']
|
|
38
|
+
puts "Oops (FATAL): You specified both 'add' and 'only'; use 'add' to augment the default list of fields OR use 'only' to replace it"
|
|
39
|
+
exit
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
@default_params = %w{utm_source utm_medium utm_campaign utm_content utm_term}
|
|
43
|
+
|
|
44
|
+
if options['add']
|
|
45
|
+
options['add'].split(",").each do |p|
|
|
46
|
+
if !@default_params.include?(p)
|
|
47
|
+
@default_params << p
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
if options['only']
|
|
54
|
+
@default_params = []
|
|
55
|
+
options['only'].split(",").each do |p|
|
|
56
|
+
@default_params << p
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
25
60
|
column_defs = ""
|
|
26
|
-
@
|
|
61
|
+
@default_params.each do |p|
|
|
27
62
|
column_defs += " t.string :#{p}, limit:256\n"
|
|
28
63
|
end
|
|
29
64
|
copy_file "create_universal_track_manager_tables.rb", "#{self.class.source_root}/create_universal_track_manager_tables.rb-staged"
|
|
30
65
|
gsub_file "#{self.class.source_root}/create_universal_track_manager_tables.rb-staged", "#GENERATOR INSERTS CAMPAIGN COLUMNS HERE", column_defs
|
|
31
66
|
migration_template "create_universal_track_manager_tables.rb-staged", "db/migrate/create_universal_track_manager_tables.rb"
|
|
67
|
+
|
|
68
|
+
remove_file "#{self.class.source_root}/create_universal_track_manager_tables.rb-staged"
|
|
32
69
|
end
|
|
33
70
|
|
|
34
71
|
def create_universal_track_manager_initializer
|
|
@@ -36,6 +73,7 @@ module UniversalTrackManager
|
|
|
36
73
|
copy_file "universal_track_manager.rb", "#{self.class.source_root}/universal_track_manager.rb-staged"
|
|
37
74
|
gsub_file "#{self.class.source_root}/universal_track_manager.rb-staged", "#GENERATOR INSERTS CAMPAIGN COLUMN CONFIG HERE", column_config
|
|
38
75
|
copy_file 'universal_track_manager.rb-staged', 'config/initializers/universal_track_manager.rb'
|
|
76
|
+
remove_file "#{self.class.source_root}/universal_track_manager.rb-staged"
|
|
39
77
|
end
|
|
40
78
|
|
|
41
79
|
def migration_version
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: universal-track-manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Fleetwood-Boldt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -68,7 +68,7 @@ dependencies:
|
|
|
68
68
|
version: '2.2'
|
|
69
69
|
description: Simple, plug & play visitor tracking by user agent (browser), IP address,
|
|
70
70
|
referrer, and UTM parameters.
|
|
71
|
-
email:
|
|
71
|
+
email: tech@datatravels.com
|
|
72
72
|
executables: []
|
|
73
73
|
extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
|
@@ -115,5 +115,5 @@ requirements: []
|
|
|
115
115
|
rubygems_version: 3.2.7
|
|
116
116
|
signing_key:
|
|
117
117
|
specification_version: 4
|
|
118
|
-
summary: A gem to track visitors to your website.
|
|
118
|
+
summary: A gem to track visitors and their UTMs to your website.
|
|
119
119
|
test_files: []
|