pug-sh 0.1.1 → 0.1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -5
  3. data/lib/pug/version.rb +1 -1
  4. metadata +11 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 133575bdbf871efe89edf1d344fb0affedb6f8327617a539416673ace6e1a4e3
4
- data.tar.gz: f828411944e0db6f36fefbd946e097fc4a79a28d57a7eff6f42adfea553094f4
3
+ metadata.gz: c05cdb265ce5fafef76b2f0b5a909dc4dd6b4a79fb5f3e54d48c50d629761296
4
+ data.tar.gz: d9e12e51a62436e58152bf66a32200c123d3bbe5ade28a4d09cf896ea6322301
5
5
  SHA512:
6
- metadata.gz: 01a8a2fe9e371c0c3aa2e9497d4b2088dffc01efcd6f13e143c56cbad068479af2d13ee440e81c6922695ca56bd10695f6b166e74394f7e688cbf9328f23f680
7
- data.tar.gz: 4fb5b2e454c0a432f2d280285ed781f755a1bed55603e9afab0529a874bc900d43a31d4e73c45918a9009005a31138e469f45fe9ba4d75247fead4ec2262a515
6
+ metadata.gz: 03a4f89b7f1b0fb3d16e178563bd24b7524bf49f1e26f6c1b88cf24557fc73f28c4b8bcb1e27ee693f9ee1422f5c34ebbff0581ee8835eb8ad7cbd103d83ebf9
7
+ data.tar.gz: 599699acaf2579b65590f7ccd131a6a0c4a9b5c8e059e5050e741a5e0ac533c0578338e2f78edaf381e07899abaa292fd9f5e05882e0301a5e1c586bca57ab72
data/README.md CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  # pug-sh
6
6
 
7
- Pug server-side SDK for Ruby: event tracking, profile identify, and analytics reads.
7
+ Open-source product analytics SDK for Ruby and Rails, from [Pug](https://pug.sh): server-side event
8
+ tracking, profile identify, and reads of profiles, activity, and insights.
8
9
 
9
10
  It is instance-based and authenticates with a **private** project API key (`prv_…`). Ingestion
10
11
  never raises, so a tracking call can't take down your request path.
@@ -31,7 +32,7 @@ pug.track("user_42", "order.completed", amount: 49.0, currency: "USD")
31
32
  # Well-known events get their properties type-checked and validated against the event's schema.
32
33
  pug.track("user_42", "feature_used", feature_id: "export")
33
34
 
34
- # Identify a profile. Like track, it returns at once: identifies are queued and sent in batches.
35
+ # Identify a profile. Like track, it never waits on the network: identifies are batched too.
35
36
  pug.identify("user_42", email: "ada@example.com", plan: "pro")
36
37
 
37
38
  # Reads raise Pug::Error.
@@ -50,7 +51,7 @@ pug.close
50
51
  ## Behaviour
51
52
 
52
53
  - **Ingestion never raises.** `track` and `identify` validate input client-side and log and drop
53
- anything invalid. Both are non-blocking: background threads, one for events and one for
54
+ anything invalid. Neither waits on the network: background threads, one for events and one for
54
55
  identifies, send them in batches, by size (`max_size`) or interval (`max_wait`). Identifies go
55
56
  out with `BatchIdentify`; a server that predates it gets one `Identify` call each.
56
57
  - **Delivery is best-effort with retry.** A transient send failure keeps events and identifies
@@ -107,9 +108,10 @@ blocking the thread that called `track` or `identify`.
107
108
 
108
109
  ### Ingestion (never raises)
109
110
 
110
- - `pug.track(distinct_id, kind, properties = nil, options = nil)`: enqueue an event. Non-blocking.
111
+ - `pug.track(distinct_id, kind, properties = nil, options = nil)`: enqueue an event. Never waits
112
+ on the network.
111
113
  - `pug.identify(external_id, traits = nil, options = nil)`: enqueue a create-or-update of a
112
- profile; its traits are shallow-merged into the stored ones. Non-blocking.
114
+ profile; its traits are shallow-merged into the stored ones. Never waits on the network.
113
115
  - `pug.flush(timeout: nil)`: send the queued events and identifies now and wait for that attempt.
114
116
  Returns `false` if `timeout` (seconds) passed first. `true` means the attempt finished, not that
115
117
  everything was delivered: a transient failure keeps it queued for a retry.
data/lib/pug/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pug
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pug-sh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pug.sh
@@ -43,6 +43,10 @@ dependencies:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: '1.6'
46
+ description: 'Tracks events and identifies profiles from Rails or plain Ruby without
47
+ raising: background threads send them in batches, and one client is thread- and
48
+ fork-safe under Puma, Unicorn and Sidekiq. It also reads profiles, activity and
49
+ insights.'
46
50
  executables: []
47
51
  extensions: []
48
52
  extra_rdoc_files: []
@@ -94,11 +98,13 @@ files:
94
98
  - lib/pug/validator.rb
95
99
  - lib/pug/version.rb
96
100
  - lib/pug/well_known.rb
97
- homepage: https://pug.sh
101
+ homepage: https://pug.sh/integrations/rails
98
102
  licenses:
99
103
  - MIT
100
104
  metadata:
101
- homepage_uri: https://pug.sh
105
+ homepage_uri: https://pug.sh/integrations/rails
106
+ documentation_uri: https://docs.pug.sh/sdks/ruby/
107
+ changelog_uri: https://github.com/pug-sh/sdk-ruby/releases
102
108
  source_code_uri: https://github.com/pug-sh/sdk-ruby
103
109
  bug_tracker_uri: https://github.com/pug-sh/sdk-ruby/issues
104
110
  rdoc_options: []
@@ -117,6 +123,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
123
  requirements: []
118
124
  rubygems_version: 3.6.9
119
125
  specification_version: 4
120
- summary: 'Pug server-side SDK for Ruby: event tracking, profile identify, and analytics
121
- reads.'
126
+ summary: 'Open-source product analytics SDK for Ruby and Rails: server-side event
127
+ tracking, profile identify, and analytics reads.'
122
128
  test_files: []