simple_segment 1.0.0.pre → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +9 -10
- data/lib/simple_segment/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1203b421981ab0a39adebe5278c6204c8041862c64ee534a5dada29d1d6831c1
|
4
|
+
data.tar.gz: 36eb6dd779a1ad9c551c7676142b50a6bf024f0b3ceae0264d94390ac21fb3d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f41ea1255f5c7ef8c0bd6a36085de15ffdeefbd3424d9882c11f402d104944b0283aac6fc67de2547e23dcc70f55c8894bfb65c644ca0c19c528aa5ba9faa6
|
7
|
+
data.tar.gz: dd31f8edc34d4b11b098222ffdb6235a2f0a0aef69dd0cc3cf5c23a02d3ca5902fcce26017acf568d2cc3032ec686b80ab01cbf125d23ff87bfaf23795a8d965
|
data/CHANGELOG.md
CHANGED
@@ -6,13 +6,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.0.0] - 2019-12-12
|
10
|
+
|
11
|
+
### Added
|
12
|
+
- Allow passing custom Net::HTTP options (e.g. timeout) https://github.com/whatthewhat/simple_segment/pull/23 by @barodeur
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
- The gem is no longer tested with Ruby versions below 2.4
|
9
16
|
|
10
17
|
## [0.3.0] - 2018-03-15
|
11
18
|
|
12
19
|
### Changed
|
13
20
|
- Date properties are now automatically converted to ISO 8601 to be consistent with the official client https://github.com/whatthewhat/simple_segment/pull/19 by @juanramoncg
|
14
21
|
|
15
|
-
[Unreleased]: https://github.com/whatthewhat/simple_segment/compare/
|
22
|
+
[Unreleased]: https://github.com/whatthewhat/simple_segment/compare/v1.0.0...HEAD
|
23
|
+
[1.0.0]: https://github.com/whatthewhat/simple_segment/compare/v0.3.0...v1.0.0
|
16
24
|
[0.3.0]: https://github.com/whatthewhat/simple_segment/compare/v0.2.1...v0.3.0
|
17
25
|
[0.2.1]: https://github.com/whatthewhat/simple_segment/compare/v0.2.0...v0.2.1
|
18
26
|
[0.2.0]: https://github.com/whatthewhat/simple_segment/compare/v0.1.1...v0.2.0
|
data/README.md
CHANGED
@@ -29,34 +29,32 @@ Add this line to your application's Gemfile:
|
|
29
29
|
gem 'simple_segment'
|
30
30
|
```
|
31
31
|
|
32
|
-
And then execute:
|
33
|
-
|
34
|
-
$ bundle
|
35
|
-
|
36
32
|
Or install it yourself as:
|
37
33
|
|
38
|
-
|
34
|
+
```sh
|
35
|
+
$ gem install simple_segment
|
36
|
+
```
|
39
37
|
|
40
38
|
## Usage
|
41
39
|
|
42
40
|
Create a client instance:
|
43
41
|
|
44
42
|
```ruby
|
45
|
-
analytics = SimpleSegment::Client.new(
|
43
|
+
analytics = SimpleSegment::Client.new(
|
46
44
|
write_key: 'YOUR_WRITE_KEY', # required
|
47
45
|
on_error: proc { |error_code, error_body, exception, response|
|
48
46
|
# defaults to an empty proc
|
49
47
|
}
|
50
|
-
|
48
|
+
)
|
51
49
|
```
|
52
50
|
|
53
51
|
Use it as you would use `analytics-ruby`:
|
54
52
|
|
55
53
|
```ruby
|
56
|
-
analytics.track(
|
54
|
+
analytics.track(
|
57
55
|
user_id: user.id,
|
58
56
|
event: 'Created Account'
|
59
|
-
|
57
|
+
)
|
60
58
|
```
|
61
59
|
|
62
60
|
### Batching
|
@@ -86,6 +84,7 @@ analytics = SimpleSegment::Client.new(
|
|
86
84
|
```
|
87
85
|
|
88
86
|
### Configurable Logger
|
87
|
+
|
89
88
|
When used in stubbed mode all calls are logged to STDOUT, this can be changed by providing a custom logger object:
|
90
89
|
|
91
90
|
```ruby
|
@@ -97,7 +96,7 @@ analytics = SimpleSegment::Client.new(
|
|
97
96
|
|
98
97
|
### Set HTTP Options
|
99
98
|
|
100
|
-
You can set options that are passed to `Net::HTTP.start`.
|
99
|
+
You can set [options](https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#method-c-start) that are passed to `Net::HTTP.start`.
|
101
100
|
|
102
101
|
```ruby
|
103
102
|
analytics = SimpleSegment::Client.new(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_segment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Topolskiy
|
@@ -159,9 +159,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- - "
|
162
|
+
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
164
|
+
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubygems_version: 3.0.3
|
167
167
|
signing_key:
|