ga_collector_pusher 0.2.1 → 0.2.7
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/Gemfile.lock +15 -10
- data/README.rdoc +5 -1
- data/ga_collector_pusher.gemspec +1 -0
- data/lib/ga_collector_pusher/config.rb +10 -0
- data/lib/ga_collector_pusher/instance.rb +10 -3
- data/lib/ga_collector_pusher/version.rb +1 -1
- data/lib/ga_collector_pusher.rb +1 -0
- data/spec/config.rb +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04884778a7c20cea46872127570bc9e925c570c2
|
4
|
+
data.tar.gz: 6208dcf63f2cf4ac9cd1c6017bd1d3ab5410cc66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de8b04bea7570e9a0f741501c809b07a4ab1dc8cbefac4800a7741fee9ab4276196b0646c35a56c5986f050bf45dabd1091eb7fe09a4b2a67e082e886f7a6cf7
|
7
|
+
data.tar.gz: bee1e822937dcc14963bd2adedebd7e574790a9aea7d7e57327fefd1c7ed2eb2e3618712daf6b6c75a2637dac0ac0feed18db0ff1e7df174ab2c1a784e28af78
|
data/Gemfile.lock
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ga_collector_pusher (0.2)
|
4
|
+
ga_collector_pusher (0.2.5)
|
5
5
|
activesupport
|
6
6
|
rest-client
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (4.1.
|
11
|
+
activesupport (4.1.16)
|
12
12
|
i18n (~> 0.6, >= 0.6.9)
|
13
13
|
json (~> 1.7, >= 1.7.7)
|
14
14
|
minitest (~> 5.1)
|
15
15
|
thread_safe (~> 0.1)
|
16
16
|
tzinfo (~> 1.1)
|
17
17
|
diff-lcs (1.2.5)
|
18
|
-
domain_name (0.5.
|
18
|
+
domain_name (0.5.20160615)
|
19
19
|
unf (>= 0.0.5, < 1.0.0)
|
20
20
|
faker (1.4.3)
|
21
21
|
i18n (~> 0.5)
|
@@ -23,14 +23,16 @@ GEM
|
|
23
23
|
domain_name (~> 0.5)
|
24
24
|
i18n (0.6.11)
|
25
25
|
json (1.8.3)
|
26
|
-
mime-types (
|
27
|
-
|
28
|
-
|
26
|
+
mime-types (3.1)
|
27
|
+
mime-types-data (~> 3.2015)
|
28
|
+
mime-types-data (3.2016.0521)
|
29
|
+
minitest (5.9.0)
|
30
|
+
netrc (0.11.0)
|
29
31
|
rake (10.4.2)
|
30
|
-
rest-client (
|
32
|
+
rest-client (2.0.0)
|
31
33
|
http-cookie (>= 1.0.2, < 2.0)
|
32
|
-
mime-types (>= 1.16, <
|
33
|
-
netrc (~> 0.
|
34
|
+
mime-types (>= 1.16, < 4.0)
|
35
|
+
netrc (~> 0.8)
|
34
36
|
rspec (3.1.0)
|
35
37
|
rspec-core (~> 3.1.0)
|
36
38
|
rspec-expectations (~> 3.1.0)
|
@@ -48,7 +50,7 @@ GEM
|
|
48
50
|
thread_safe (~> 0.1)
|
49
51
|
unf (0.1.4)
|
50
52
|
unf_ext
|
51
|
-
unf_ext (0.0.
|
53
|
+
unf_ext (0.0.7.2)
|
52
54
|
|
53
55
|
PLATFORMS
|
54
56
|
ruby
|
@@ -58,3 +60,6 @@ DEPENDENCIES
|
|
58
60
|
ga_collector_pusher!
|
59
61
|
rake
|
60
62
|
rspec
|
63
|
+
|
64
|
+
BUNDLED WITH
|
65
|
+
1.10.6
|
data/README.rdoc
CHANGED
data/ga_collector_pusher.gemspec
CHANGED
@@ -70,7 +70,6 @@ module GACollectorPusher
|
|
70
70
|
send_to_ga
|
71
71
|
end
|
72
72
|
|
73
|
-
|
74
73
|
#convert bool to integer
|
75
74
|
def add_exception description: nil, is_fatal: false
|
76
75
|
is_fatal_int = is_fatal ? 1 : 0
|
@@ -98,9 +97,17 @@ module GACollectorPusher
|
|
98
97
|
|
99
98
|
begin
|
100
99
|
response = RestClient.post 'http://www.google-analytics.com/collect', params: @params, timeout: self.timeout, open_timeout: self.open_timeout
|
101
|
-
|
102
|
-
|
100
|
+
puts "GACollectorPusher Sent params: #{@params.inspect}. Response from GA: #{response.force_encoding('utf-8').encode.to_s} with Code: #{response.code}" if GACollectorPusher::Config.verbose
|
101
|
+
|
102
|
+
if (200..207).to_a.include? response.code
|
103
|
+
status = "sent"
|
104
|
+
else
|
105
|
+
raise "GACollectorPusher received non 20x status from GA for #{@params}" if GACollectorPusher::Config.paranoid
|
106
|
+
status = "error"
|
107
|
+
end
|
108
|
+
rescue RestClient::ExceptionWithResponse => error
|
103
109
|
response = error.inspect
|
110
|
+
puts "GACollectorPusher error: #{response}" if GACollectorPusher::Config.verbose
|
104
111
|
status = "error"
|
105
112
|
end
|
106
113
|
|
data/lib/ga_collector_pusher.rb
CHANGED
data/spec/config.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ga_collector_pusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Girts Kesteris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- Rakefile
|
98
98
|
- ga_collector_pusher.gemspec
|
99
99
|
- lib/ga_collector_pusher.rb
|
100
|
+
- lib/ga_collector_pusher/config.rb
|
100
101
|
- lib/ga_collector_pusher/instance.rb
|
101
102
|
- lib/ga_collector_pusher/version.rb
|
102
103
|
- spec/config.rb
|