segment 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6318385ab8331781baba2c981a892e715a0fee99
4
+ data.tar.gz: 5ea9f8ffacfdaea07f976c68fca244875dfda361
5
+ SHA512:
6
+ metadata.gz: 9e777912beee35939481bffe72033867dde765c32fde1dad1fd34ddd63fc1ca942ca0076f810e19c63936004d633a74915a497d798e977d945a98e6e8edfdfed
7
+ data.tar.gz: dd3342e555d94ffadba91177cfe6d719dabb8c8f24d97382f6b9e50a316edcf2d27652c4015089a33c6403b0a33fad0728d17bc0052a2dfe474ffdf2c76b2367
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'http://rubygems.org'
2
+ gemspec
@@ -0,0 +1,89 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ analytics-ruby (2.2.5)
5
+ commander (~> 4.4)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ activesupport (4.1.16)
11
+ i18n (~> 0.6, >= 0.6.9)
12
+ json (~> 1.7, >= 1.7.7)
13
+ minitest (~> 5.1)
14
+ thread_safe (~> 0.1)
15
+ tzinfo (~> 1.1)
16
+ ast (2.4.0)
17
+ codecov (0.1.10)
18
+ json
19
+ simplecov
20
+ url
21
+ commander (4.4.4)
22
+ highline (~> 1.7.2)
23
+ concurrent-ruby (1.0.5)
24
+ diff-lcs (1.3)
25
+ docile (1.1.5)
26
+ faraday (0.14.0)
27
+ multipart-post (>= 1.2, < 3)
28
+ highline (1.7.10)
29
+ i18n (0.9.5)
30
+ concurrent-ruby (~> 1.0)
31
+ json (1.8.6)
32
+ minitest (5.11.3)
33
+ multipart-post (2.0.0)
34
+ parallel (1.12.1)
35
+ parser (2.5.0.2)
36
+ ast (~> 2.4.0)
37
+ pmap (1.1.1)
38
+ powerpack (0.1.1)
39
+ rainbow (2.2.2)
40
+ rake
41
+ rake (10.5.0)
42
+ rspec (3.7.0)
43
+ rspec-core (~> 3.7.0)
44
+ rspec-expectations (~> 3.7.0)
45
+ rspec-mocks (~> 3.7.0)
46
+ rspec-core (3.7.1)
47
+ rspec-support (~> 3.7.0)
48
+ rspec-expectations (3.7.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.7.0)
51
+ rspec-mocks (3.7.0)
52
+ diff-lcs (>= 1.2.0, < 2.0)
53
+ rspec-support (~> 3.7.0)
54
+ rspec-support (3.7.1)
55
+ rubocop (0.51.0)
56
+ parallel (~> 1.10)
57
+ parser (>= 2.3.3.1, < 3.0)
58
+ powerpack (~> 0.1)
59
+ rainbow (>= 2.2.2, < 3.0)
60
+ ruby-progressbar (~> 1.7)
61
+ unicode-display_width (~> 1.0, >= 1.0.1)
62
+ ruby-progressbar (1.9.0)
63
+ simplecov (0.15.1)
64
+ docile (~> 1.1.0)
65
+ json (>= 1.8, < 3)
66
+ simplecov-html (~> 0.10.0)
67
+ simplecov-html (0.10.2)
68
+ thread_safe (0.3.6)
69
+ tzinfo (1.2.1)
70
+ thread_safe (~> 0.1)
71
+ unicode-display_width (1.3.0)
72
+ url (0.3.2)
73
+
74
+ PLATFORMS
75
+ ruby
76
+
77
+ DEPENDENCIES
78
+ activesupport (~> 4.1.11)
79
+ analytics-ruby!
80
+ codecov (~> 0.1.4)
81
+ faraday (~> 0.13)
82
+ pmap (~> 1.1)
83
+ rake (~> 10.3)
84
+ rspec (~> 3.0)
85
+ rubocop (~> 0.51.0)
86
+ tzinfo (= 1.2.1)
87
+
88
+ BUNDLED WITH
89
+ 1.16.1
@@ -0,0 +1,222 @@
1
+ 2.2.5 / 2018-05-01
2
+ ==================
3
+
4
+ * [Fix](https://github.com/segmentio/analytics-ruby/pull/158): Require `version` module first.
5
+
6
+ 2.2.4 / 2018-04-30
7
+ ==================
8
+
9
+ * Promote pre-release version to stable.
10
+
11
+ 2.2.4.pre / 2018-02-04
12
+ ======================
13
+
14
+ * [Fix](https://github.com/segmentio/analytics-ruby/pull/147): Prevent 'batch
15
+ size exceeded' errors by automatically batching
16
+ items according to size
17
+ * [Performance](https://github.com/segmentio/analytics-ruby/pull/149): Reuse
18
+ TCP connections
19
+ * [Improvement](https://github.com/segmentio/analytics-ruby/pull/145): Emit logs
20
+ when in-memory queue is full
21
+ * [Improvement](https://github.com/segmentio/analytics-ruby/pull/143): Emit logs
22
+ when messages exceed maximum allowed size
23
+ * [Improvement](https://github.com/segmentio/analytics-ruby/pull/134): Add
24
+ exponential backoff to retries
25
+ * [Improvement](https://github.com/segmentio/analytics-ruby/pull/132): Handle
26
+ HTTP status code failure appropriately
27
+
28
+ 2.2.3.pre / 2017-09-14
29
+ ==================
30
+
31
+ * [Fix](https://github.com/segmentio/analytics-ruby/pull/120): Override `respond_to_missing` instead of `respond_to?` to facilitate mock the library in tests.
32
+
33
+
34
+ 2.2.2 / 2016-08-03
35
+ ==================
36
+
37
+ * adding commander as dep (for CLI)
38
+
39
+ 2.2.1 / 2016-08-03
40
+ ==================
41
+
42
+ * add executables to spec
43
+
44
+ 2.2.0 / 2016-08-03
45
+ ==================
46
+
47
+ * Adding an (experimental) CLI
48
+
49
+ 2.1.0 / 2016-06-17
50
+ ==================
51
+
52
+ * Fix: Ensure error handler is called before Client#flush finishes.
53
+ * Feature: Support setting a custom message ID.
54
+
55
+ 2.0.13 / 2015-09-15
56
+ ==================
57
+
58
+ * readme: updated install docs
59
+ * fix: page/screen to allow no name
60
+ * git: ignore ruby version
61
+ * travis-ci: remove old rubys
62
+
63
+ 2.0.12 / 2015-01-10
64
+ ==================
65
+
66
+ * Fix batch being cleared and causing duplicates
67
+
68
+ 2.0.11 / 2014-09-22
69
+ ==================
70
+
71
+ * fix: don't clear batch if request failed
72
+
73
+ 2.0.10 / 2014-09-22
74
+ ==================
75
+
76
+ * Move timeout retry above output
77
+
78
+ 2.0.9 / 2014-09-22
79
+ ==================
80
+
81
+ * Fix rescuing timeouts
82
+
83
+ 2.0.8 / 2014-09-11
84
+ ==================
85
+ * fix: add 3 ms to timestamp
86
+
87
+ 2.0.7 / 2014-08-27
88
+ ==================
89
+ * fix: include optional options hash in calls
90
+
91
+ 2.0.6 / 2014-08-12
92
+ ==================
93
+ * fix: category param on #page and #screen
94
+
95
+ 2.0.5 / 2014-05-26
96
+ ==================
97
+ * fix: datetime conversions
98
+
99
+ 2.0.4 / 2014-06-11
100
+ ==================
101
+ * fix: isofying trait dates in #group
102
+
103
+ 2.0.3 / 2014-06-04
104
+ ==================
105
+ * fix: undefined method `is_requesting?' for nil:NilClass when calling flush (#51)
106
+
107
+ 2.0.2 / 2014-05-30
108
+ ==================
109
+ * fix: formatting ios dates
110
+ * fix: respond_to? implementation
111
+ * add: able to stub requests by setting STUB env var
112
+
113
+ 2.0.1 / 2014-05-15
114
+ ==================
115
+ * add: namespace under Segment::Analytics
116
+ * add: can create multiple instances with creator method (rather than
117
+ having a singleton)
118
+ * add: logging with Logger instance or Rails.logger if available
119
+ * add: able to stub requests so they just log and don't hit the server
120
+ * fix: worker continues running across forked processes
121
+ * fix: removed usage of ActiveSupport methods since its not a dependency
122
+ * fix: sending data that matches segment's new api spec
123
+
124
+ (there is no v2.0.0)
125
+
126
+ 1.1.0 / 2014-04-17
127
+ ==================
128
+ * adding .initialized? by [@lumberj](https://github.com/lumberj)
129
+
130
+ 1.0.0 / 2014-03-12
131
+ ==================
132
+ * removing faraday dependency
133
+
134
+ 0.6.0 / 2014-02-19
135
+ ==================
136
+ * adding .group(), .page(), and .screen() calls
137
+ * relaxing faraday dependency, fixes #31
138
+
139
+ 0.5.4 / 2013-12-31
140
+ ==================
141
+ * Add `requestId` fields to all requests for tracing.
142
+
143
+ 0.5.3 / 2013-12-31
144
+ ==================
145
+ * 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)
146
+
147
+ 0.5.2 / 2013-12-02
148
+ ==================
149
+ * adding `sleep` backoff between connection retries
150
+
151
+ 0.5.1 / 2013-11-22
152
+ ==================
153
+ * adding retries for connection hangups
154
+
155
+ 0.5.0 / 2013-10-03
156
+ ==================
157
+ * 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)
158
+
159
+ 0.4.0 / 2013-08-30
160
+ ==================
161
+ * Adding support and tests for 1.8.7
162
+
163
+ 0.3.4 / 2013-08-26
164
+ ==================
165
+ * Pass `Time` values as iso8601 timestamp strings
166
+
167
+ 0.3.3 / 2013-08-02
168
+ ==================
169
+ * Allow init/track/identify/alias to accept strings as keys. by [@shipstar](https://github.com/shipstar)
170
+
171
+ 0.3.2 / 2013-05-28
172
+ ==================
173
+ * Adding faraday timeout by [@yanchenyun](https://github.com/yangchenyun)
174
+
175
+ 0.3.1 / 2013-04-29
176
+ ==================
177
+ * Adding check for properties to be a Hash
178
+
179
+ 0.3.0 / 2013-04-05
180
+ ==================
181
+ * Adding alias call
182
+
183
+ 0.2.0 / 2013-03-21
184
+ ==================
185
+ * Adding flush method
186
+
187
+ 0.1.4 / 2013-03-19
188
+ ==================
189
+ * Adding ClassMethods for more extensibility by [arronmabrey](https://github.com/arronmabrey)
190
+
191
+ 0.1.3 / 2013-03-19
192
+ ==================
193
+ * Fixing user_id.to_s semantics, reported by [arronmabrey](https://github.com/arronmabrey)
194
+ * Reduced faraday requirements by [arronmabrey](https://github.com/arronmabrey)
195
+
196
+ 0.1.2 / 2013-03-11
197
+ ==================
198
+ * Fixing thrown exception on non-initialized tracks thanks to [sbellity](https://github.com/sbellity)
199
+
200
+ 0.1.1 / 2013-02-11
201
+ ==================
202
+ * Updating dependencies
203
+ * Adding actual support for MultiJson 1.0
204
+
205
+ 0.1.0 / 2013-01-22
206
+ ==================
207
+ * Updated docs to point at segment.io
208
+
209
+ 0.0.5 / 2013-01-21
210
+ ==================
211
+ * Renaming of all the files for proper bundling usage
212
+
213
+ 0.0.4 / 2013-01-17
214
+ ==================
215
+ * Updated readme and install instruction courtesy of [@zeke](https://github.com/zeke)
216
+ * Removed typhoeus and reverted to default adapter
217
+ * Removing session_id in favor of a single user_id
218
+
219
+ 0.0.3 / 2013-01-16
220
+ ==================
221
+ * Rakefile and renaming courtesy of [@kiennt](https://github.com/kiennt)
222
+ * Updated tests with mocks
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,84 @@
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
+
@@ -0,0 +1,9 @@
1
+ Releasing
2
+ =========
3
+
4
+ 1. Verify everything works with `make check build`.
5
+ 2. Bump version in [`version.rb`](https://github.com/segmentio/analytics-ruby/blob/master/lib/segment/analytics/version.rb).
6
+ 3. Update [`History.md`](https://github.com/segmentio/analytics-ruby/blob/master/History.md).
7
+ 4. Commit and tag `git commit -am "Release {version}" && git tag -a {version} -m "Version {version}"`.
8
+ 5. Upload to Github with `git push -u origin master && git push --tags`.
9
+ The tagged commit will be pushed to RubyGems via Travis.
@@ -0,0 +1,23 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ default_tasks = []
4
+
5
+ RSpec::Core::RakeTask.new(:spec) do |spec|
6
+ spec.pattern = 'spec/**/*_spec.rb'
7
+ spec.rspec_opts = "--tag ~e2e" if ENV["RUN_E2E_TESTS"] != "true"
8
+ end
9
+
10
+ default_tasks << :spec
11
+
12
+ # Rubocop doesn't support < 2.1
13
+ if RUBY_VERSION >= "2.1"
14
+ require 'rubocop/rake_task'
15
+
16
+ RuboCop::RakeTask.new(:rubocop) do |task|
17
+ task.patterns = ['lib/**/*.rb','spec/**/*.rb',]
18
+ end
19
+
20
+ default_tasks << :rubocop
21
+ end
22
+
23
+ task :default => default_tasks