analytics-ruby 2.2.6.pre → 2.2.6

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
  SHA256:
3
- metadata.gz: 16a399d60ac370a68cbb28f5887da70711403133e683d7acfe5db4b6eb8fb78d
4
- data.tar.gz: 02c96de2188fb9b79b4d567c36a61ddf2ce0b62610adb6848a777ad327e47535
3
+ metadata.gz: 472dcf42eeb6b9d83166a526ebeb81bfbbdc74a429511776fedac53ae585da27
4
+ data.tar.gz: 70d5bfbf53332c3899cb4cc0071a068c25da7fabee8e934ced0d335bbb08c45f
5
5
  SHA512:
6
- metadata.gz: 69d989c8e9483dea80c707ddd4ca456d0d7891cd8b5624056a2131bd006dca153b00e46a22c582e26b0ad94978bd6beca4036a13b9921b1511b4d3ffb76b1339
7
- data.tar.gz: 2c9a86a62efe64cbe7baea4faa9b605e32394b207eac8bd277bf1b3ca420aea6f9e34c7da4d476996f38907d1ca7a0d9e4d3abf2bd5088bd397d94a1db6641cc
6
+ metadata.gz: 112f00cdfb0e27ab41ae0c74ebe76d8fba6777acd71ec0a46fc6576948f65a096668c59354393ef600f961631f6cf1938bde3bcbb4ff09aafd4fcf1ed73a2aa9
7
+ data.tar.gz: 4af5e31b75e80dd20dacf7d3e5aeb58ce2e1280337dbe82b69b63c1588ba650d774a9625f00f930b0a25df612f8d7654ae16947cd5b3369ce6e6e3b4880e6483
@@ -53,7 +53,7 @@ module Segment
53
53
  if exception
54
54
  logger.error(exception.message)
55
55
  exception.backtrace.each { |line| logger.error(line) }
56
- Response.new(-1, "Connection error: #{exception}")
56
+ Response.new(-1, exception.to_s)
57
57
  else
58
58
  last_response
59
59
  end
@@ -1,5 +1,5 @@
1
1
  module Segment
2
2
  class Analytics
3
- VERSION = '2.2.6.pre'
3
+ VERSION = '2.2.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analytics-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6.pre
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Segment.io
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2019-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.4'
20
- type: :runtime
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
@@ -80,34 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.1.11
83
- - !ruby/object:Gem::Dependency
84
- name: faraday
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.13'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '0.13'
97
- - !ruby/object:Gem::Dependency
98
- name: pmap
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.1'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.1'
111
83
  - !ruby/object:Gem::Dependency
112
84
  name: oj
113
85
  requirement: !ruby/object:Gem::Requirement
@@ -157,15 +129,7 @@ executables:
157
129
  extensions: []
158
130
  extra_rdoc_files: []
159
131
  files:
160
- - Gemfile
161
- - History.md
162
- - Makefile
163
- - README.md
164
- - RELEASING.md
165
- - Rakefile
166
- - analytics-ruby.gemspec
167
132
  - bin/analytics
168
- - codecov.yml
169
133
  - lib/analytics-ruby.rb
170
134
  - lib/segment.rb
171
135
  - lib/segment/analytics.rb
@@ -179,20 +143,6 @@ files:
179
143
  - lib/segment/analytics/utils.rb
180
144
  - lib/segment/analytics/version.rb
181
145
  - lib/segment/analytics/worker.rb
182
- - spec/helpers/runscope_client.rb
183
- - spec/isolated/json_example.rb
184
- - spec/isolated/with_active_support.rb
185
- - spec/isolated/with_active_support_and_oj.rb
186
- - spec/isolated/with_oj.rb
187
- - spec/segment/analytics/backoff_policy_spec.rb
188
- - spec/segment/analytics/client_spec.rb
189
- - spec/segment/analytics/e2e_spec.rb
190
- - spec/segment/analytics/message_batch_spec.rb
191
- - spec/segment/analytics/request_spec.rb
192
- - spec/segment/analytics/response_spec.rb
193
- - spec/segment/analytics/worker_spec.rb
194
- - spec/segment/analytics_spec.rb
195
- - spec/spec_helper.rb
196
146
  homepage: https://github.com/segmentio/analytics-ruby
197
147
  licenses:
198
148
  - MIT
@@ -208,12 +158,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
158
  version: '0'
209
159
  required_rubygems_version: !ruby/object:Gem::Requirement
210
160
  requirements:
211
- - - ">"
161
+ - - ">="
212
162
  - !ruby/object:Gem::Version
213
- version: 1.3.1
163
+ version: '0'
214
164
  requirements: []
215
- rubyforge_project:
216
- rubygems_version: 2.7.7
165
+ rubygems_version: 3.0.3
217
166
  signing_key:
218
167
  specification_version: 4
219
168
  summary: Segment.io analytics library
data/Gemfile DELETED
@@ -1,2 +0,0 @@
1
- source 'http://rubygems.org'
2
- gemspec
data/History.md DELETED
@@ -1,234 +0,0 @@
1
- 2.2.6.pre / 2018-06-27
2
- ==================
3
-
4
- * [Fix](https://github.com/segmentio/analytics-ruby/pull/168): Revert 'reuse
5
- TCP connections' to fix EMFILE errors
6
- * [Fix](https://github.com/segmentio/analytics-ruby/pull/166): Fix oj/rails
7
- conflict
8
- * [Fix](https://github.com/segmentio/analytics-ruby/pull/162): Add missing
9
- 'Forwardable' requirement
10
- * [Improvement](https://github.com/segmentio/analytics-ruby/pull/163): Better
11
- logging
12
-
13
- 2.2.5 / 2018-05-01
14
- ==================
15
-
16
- * [Fix](https://github.com/segmentio/analytics-ruby/pull/158): Require `version` module first.
17
-
18
- 2.2.4 / 2018-04-30
19
- ==================
20
-
21
- * Promote pre-release version to stable.
22
-
23
- 2.2.4.pre / 2018-02-04
24
- ======================
25
-
26
- * [Fix](https://github.com/segmentio/analytics-ruby/pull/147): Prevent 'batch
27
- size exceeded' errors by automatically batching
28
- items according to size
29
- * [Performance](https://github.com/segmentio/analytics-ruby/pull/149): Reuse
30
- TCP connections
31
- * [Improvement](https://github.com/segmentio/analytics-ruby/pull/145): Emit logs
32
- when in-memory queue is full
33
- * [Improvement](https://github.com/segmentio/analytics-ruby/pull/143): Emit logs
34
- when messages exceed maximum allowed size
35
- * [Improvement](https://github.com/segmentio/analytics-ruby/pull/134): Add
36
- exponential backoff to retries
37
- * [Improvement](https://github.com/segmentio/analytics-ruby/pull/132): Handle
38
- HTTP status code failure appropriately
39
-
40
- 2.2.3.pre / 2017-09-14
41
- ==================
42
-
43
- * [Fix](https://github.com/segmentio/analytics-ruby/pull/120): Override `respond_to_missing` instead of `respond_to?` to facilitate mock the library in tests.
44
-
45
-
46
- 2.2.2 / 2016-08-03
47
- ==================
48
-
49
- * adding commander as dep (for CLI)
50
-
51
- 2.2.1 / 2016-08-03
52
- ==================
53
-
54
- * add executables to spec
55
-
56
- 2.2.0 / 2016-08-03
57
- ==================
58
-
59
- * Adding an (experimental) CLI
60
-
61
- 2.1.0 / 2016-06-17
62
- ==================
63
-
64
- * Fix: Ensure error handler is called before Client#flush finishes.
65
- * Feature: Support setting a custom message ID.
66
-
67
- 2.0.13 / 2015-09-15
68
- ==================
69
-
70
- * readme: updated install docs
71
- * fix: page/screen to allow no name
72
- * git: ignore ruby version
73
- * travis-ci: remove old rubys
74
-
75
- 2.0.12 / 2015-01-10
76
- ==================
77
-
78
- * Fix batch being cleared and causing duplicates
79
-
80
- 2.0.11 / 2014-09-22
81
- ==================
82
-
83
- * fix: don't clear batch if request failed
84
-
85
- 2.0.10 / 2014-09-22
86
- ==================
87
-
88
- * Move timeout retry above output
89
-
90
- 2.0.9 / 2014-09-22
91
- ==================
92
-
93
- * Fix rescuing timeouts
94
-
95
- 2.0.8 / 2014-09-11
96
- ==================
97
- * fix: add 3 ms to timestamp
98
-
99
- 2.0.7 / 2014-08-27
100
- ==================
101
- * fix: include optional options hash in calls
102
-
103
- 2.0.6 / 2014-08-12
104
- ==================
105
- * fix: category param on #page and #screen
106
-
107
- 2.0.5 / 2014-05-26
108
- ==================
109
- * fix: datetime conversions
110
-
111
- 2.0.4 / 2014-06-11
112
- ==================
113
- * fix: isofying trait dates in #group
114
-
115
- 2.0.3 / 2014-06-04
116
- ==================
117
- * fix: undefined method `is_requesting?' for nil:NilClass when calling flush (#51)
118
-
119
- 2.0.2 / 2014-05-30
120
- ==================
121
- * fix: formatting ios dates
122
- * fix: respond_to? implementation
123
- * add: able to stub requests by setting STUB env var
124
-
125
- 2.0.1 / 2014-05-15
126
- ==================
127
- * add: namespace under Segment::Analytics
128
- * add: can create multiple instances with creator method (rather than
129
- having a singleton)
130
- * add: logging with Logger instance or Rails.logger if available
131
- * add: able to stub requests so they just log and don't hit the server
132
- * fix: worker continues running across forked processes
133
- * fix: removed usage of ActiveSupport methods since its not a dependency
134
- * fix: sending data that matches segment's new api spec
135
-
136
- (there is no v2.0.0)
137
-
138
- 1.1.0 / 2014-04-17
139
- ==================
140
- * adding .initialized? by [@lumberj](https://github.com/lumberj)
141
-
142
- 1.0.0 / 2014-03-12
143
- ==================
144
- * removing faraday dependency
145
-
146
- 0.6.0 / 2014-02-19
147
- ==================
148
- * adding .group(), .page(), and .screen() calls
149
- * relaxing faraday dependency, fixes #31
150
-
151
- 0.5.4 / 2013-12-31
152
- ==================
153
- * Add `requestId` fields to all requests for tracing.
154
-
155
- 0.5.3 / 2013-12-31
156
- ==================
157
- * Allow the consumer thread to shut down so it won't remain live in hot deploy scenarios. This fixes the jruby memory leak by [@nirvdrum](https://github.com/nirvdrum)
158
-
159
- 0.5.2 / 2013-12-02
160
- ==================
161
- * adding `sleep` backoff between connection retries
162
-
163
- 0.5.1 / 2013-11-22
164
- ==================
165
- * adding retries for connection hangups
166
-
167
- 0.5.0 / 2013-10-03
168
- ==================
169
- * Removing global Analytics constant in favor of adding it to our config. NOTE: If you are upgrading from a previous version and want to continue using the `Analytics` namespace, you'll have to add `Analytics = AnalyticsRuby` to your config. Otherwise you WILL NOT be sending analytics data. See the [setup docs for more info](https://segment.io/libraries/ruby)
170
-
171
- 0.4.0 / 2013-08-30
172
- ==================
173
- * Adding support and tests for 1.8.7
174
-
175
- 0.3.4 / 2013-08-26
176
- ==================
177
- * Pass `Time` values as iso8601 timestamp strings
178
-
179
- 0.3.3 / 2013-08-02
180
- ==================
181
- * Allow init/track/identify/alias to accept strings as keys. by [@shipstar](https://github.com/shipstar)
182
-
183
- 0.3.2 / 2013-05-28
184
- ==================
185
- * Adding faraday timeout by [@yanchenyun](https://github.com/yangchenyun)
186
-
187
- 0.3.1 / 2013-04-29
188
- ==================
189
- * Adding check for properties to be a Hash
190
-
191
- 0.3.0 / 2013-04-05
192
- ==================
193
- * Adding alias call
194
-
195
- 0.2.0 / 2013-03-21
196
- ==================
197
- * Adding flush method
198
-
199
- 0.1.4 / 2013-03-19
200
- ==================
201
- * Adding ClassMethods for more extensibility by [arronmabrey](https://github.com/arronmabrey)
202
-
203
- 0.1.3 / 2013-03-19
204
- ==================
205
- * Fixing user_id.to_s semantics, reported by [arronmabrey](https://github.com/arronmabrey)
206
- * Reduced faraday requirements by [arronmabrey](https://github.com/arronmabrey)
207
-
208
- 0.1.2 / 2013-03-11
209
- ==================
210
- * Fixing thrown exception on non-initialized tracks thanks to [sbellity](https://github.com/sbellity)
211
-
212
- 0.1.1 / 2013-02-11
213
- ==================
214
- * Updating dependencies
215
- * Adding actual support for MultiJson 1.0
216
-
217
- 0.1.0 / 2013-01-22
218
- ==================
219
- * Updated docs to point at segment.io
220
-
221
- 0.0.5 / 2013-01-21
222
- ==================
223
- * Renaming of all the files for proper bundling usage
224
-
225
- 0.0.4 / 2013-01-17
226
- ==================
227
- * Updated readme and install instruction courtesy of [@zeke](https://github.com/zeke)
228
- * Removed typhoeus and reverted to default adapter
229
- * Removing session_id in favor of a single user_id
230
-
231
- 0.0.3 / 2013-01-16
232
- ==================
233
- * Rakefile and renaming courtesy of [@kiennt](https://github.com/kiennt)
234
- * Updated tests with mocks
data/Makefile DELETED
@@ -1,17 +0,0 @@
1
-
2
- # Install any tools required to build this library, e.g. Ruby, Bundler etc.
3
- bootstrap:
4
- brew install ruby
5
- gem install bundler
6
-
7
- # Install any library dependencies.
8
- dependencies:
9
- bundle install --verbose
10
-
11
- # Run all tests and checks (including linters).
12
- check:
13
- bundle exec rake
14
-
15
- # Compile the code and produce any binaries where applicable.
16
- build:
17
- gem build ./analytics-ruby.gemspec
data/README.md DELETED
@@ -1,84 +0,0 @@
1
- analytics-ruby
2
- ==============
3
-
4
- [![Build Status](https://travis-ci.org/segmentio/analytics-ruby.png?branch=master)](https://travis-ci.org/segmentio/analytics-ruby)
5
-
6
- analytics-ruby is a ruby client for [Segment](https://segment.com)
7
-
8
- ## Install
9
-
10
- Into Gemfile from rubygems.org:
11
- ```ruby
12
- gem 'analytics-ruby'
13
- ```
14
-
15
- Into environment gems from rubygems.org:
16
- ```
17
- gem install 'analytics-ruby'
18
- ```
19
-
20
- ## Usage
21
-
22
- Create an instance of the Analytics object:
23
- ```ruby
24
- analytics = Segment::Analytics.new(write_key: 'YOUR_WRITE_KEY')
25
- ```
26
-
27
- Identify the user for the people section, see more [here](https://segment.com/docs/libraries/ruby/#identify).
28
- ```ruby
29
- analytics.identify(user_id: 42,
30
- traits: {
31
- email: 'name@example.com',
32
- first_name: 'Foo',
33
- last_name: 'Bar'
34
- })
35
- ```
36
-
37
- Alias an user, see more [here](https://segment.com/docs/libraries/ruby/#alias).
38
- ```ruby
39
- analytics.alias(user_id: 41)
40
- ```
41
-
42
- Track a user event, see more [here](https://segment.com/docs/libraries/ruby/#track).
43
- ```ruby
44
- analytics.track(user_id: 42, event: 'Created Account')
45
- ```
46
-
47
- There are a few calls available, please check the documentation section.
48
-
49
- ## Documentation
50
-
51
- Documentation is available at [segment.com/docs/sources/server/ruby](https://segment.com/docs/sources/server/ruby/)
52
-
53
- ## Testing
54
-
55
- You can use the `stub` option to Segment::Analytics.new to cause all requests to be stubbed, making it easier to test with this library.
56
-
57
- ## License
58
-
59
- ```
60
- WWWWWW||WWWWWW
61
- W W W||W W W
62
- ||
63
- ( OO )__________
64
- / | \
65
- /o o| MIT \
66
- \___/||_||__||_|| *
67
- || || || ||
68
- _||_|| _||_||
69
- (__|__|(__|__|
70
- ```
71
-
72
- (The MIT License)
73
-
74
- Copyright (c) 2013 Segment Inc. <friends@segment.com>
75
-
76
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
77
-
78
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
79
-
80
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
81
-
82
-
83
- [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/segmentio/analytics-ruby/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
84
-