mbuzz 0.7.4 → 0.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31940df7a70689cccec128ba1f99498c1fda911604ca48ad9c243584c71ba228
4
- data.tar.gz: e1b98becc405f8043831645c9ce6ee3010716466e2cd5c960d1ca5ac4a3d875a
3
+ metadata.gz: 9c505c0b0158b298f75611d2a8fe9ecb2682c869da57eacc3bd1b4d74d13a7f2
4
+ data.tar.gz: 3cc79da1b2ec0afbabf7e1ab9d965688da2445f57d4d930ad9a6979649a4b667
5
5
  SHA512:
6
- metadata.gz: 80ca2e08d316b5b06526dc2375ccede006ef8e369c6a796cec73182aacca047f5874eb76e1de7e3612298379e8ebd3cb7cdc75bb45f9f3f8f43b410d5ed4f11b
7
- data.tar.gz: 0ce7d660c3b17d2fa26ab14acb79c8942cbc4caacc40690b4fe772a7b1fb92d45a4ae59a4dfee32e6836535d930b4b49d2fbb88d72c7f59884e1924347ee14c2
6
+ metadata.gz: 25d6e828fb41cd61e5a83ddd372368b31fee3629f4c1a42decf313f63ae68bf18a505101efd4e0da10dbcb2cc584e6b4591448e73853e2d6bbd42aab5478bb70
7
+ data.tar.gz: 6dd0b561d3d17ed20ad41e67993f45a24902fe1a7076da9c7077e02a88a5e45be613a898fb7e1728032e38d6e79ccd2af231bbda4c185db7789bdd832f18e7d5
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.0] - 2026-03-13
9
+
10
+ ### Changed
11
+
12
+ - **Default API URL updated to `https://api.mbuzz.co/api/v1`** — traffic now routes through the edge ingest proxy for improved reliability. The previous URL (`https://mbuzz.co/api/v1`) remains supported as a configurable fallback via `api_url`.
13
+
8
14
  ## [0.7.4] - 2026-02-17
9
15
 
10
16
  ### Fixed
data/README.md CHANGED
@@ -197,7 +197,7 @@ run MyApp
197
197
  ```ruby
198
198
  Mbuzz.init(
199
199
  api_key: "sk_live_...", # Required - from mbuzz.co dashboard
200
- api_url: "https://mbuzz.co/api/v1", # Optional - API endpoint
200
+ api_url: "https://api.mbuzz.co/api/v1", # Optional - API endpoint
201
201
  debug: false # Optional - enable debug logging
202
202
  )
203
203
  ```
@@ -12,12 +12,13 @@ module Mbuzz
12
12
  # Response values
13
13
  ACCEPTED_STATUS = "accepted"
14
14
 
15
- def initialize(visitor_id:, session_id:, url:, referrer: nil, device_fingerprint: nil, started_at: nil)
15
+ def initialize(visitor_id:, session_id:, url:, referrer: nil, device_fingerprint: nil, user_agent: nil, started_at: nil)
16
16
  @visitor_id = visitor_id
17
17
  @session_id = session_id
18
18
  @url = url
19
19
  @referrer = referrer
20
20
  @device_fingerprint = device_fingerprint
21
+ @user_agent = user_agent
21
22
  @started_at = started_at
22
23
  end
23
24
 
@@ -31,7 +32,7 @@ module Mbuzz
31
32
 
32
33
  private
33
34
 
34
- attr_reader :visitor_id, :session_id, :url, :referrer, :device_fingerprint, :started_at
35
+ attr_reader :visitor_id, :session_id, :url, :referrer, :device_fingerprint, :user_agent, :started_at
35
36
 
36
37
  def valid?
37
38
  present?(visitor_id) && present?(session_id) && present?(url)
@@ -48,6 +49,7 @@ module Mbuzz
48
49
  url: url,
49
50
  referrer: referrer,
50
51
  device_fingerprint: device_fingerprint,
52
+ user_agent: user_agent,
51
53
  started_at: started_at || Time.now.utc.iso8601
52
54
  }.compact
53
55
  end
data/lib/mbuzz/client.rb CHANGED
@@ -32,13 +32,14 @@ module Mbuzz
32
32
  ).call
33
33
  end
34
34
 
35
- def self.session(visitor_id:, session_id:, url:, referrer: nil, device_fingerprint: nil, started_at: nil)
35
+ def self.session(visitor_id:, session_id:, url:, referrer: nil, device_fingerprint: nil, user_agent: nil, started_at: nil)
36
36
  SessionRequest.new(
37
37
  visitor_id: visitor_id,
38
38
  session_id: session_id,
39
39
  url: url,
40
40
  referrer: referrer,
41
41
  device_fingerprint: device_fingerprint,
42
+ user_agent: user_agent,
42
43
  started_at: started_at
43
44
  ).call
44
45
  end
@@ -26,7 +26,7 @@ module Mbuzz
26
26
  ].freeze
27
27
 
28
28
  def initialize
29
- @api_url = "https://mbuzz.co/api/v1"
29
+ @api_url = "https://api.mbuzz.co/api/v1"
30
30
  @enabled = true
31
31
  @debug = false
32
32
  @timeout = 5
@@ -128,7 +128,8 @@ module Mbuzz
128
128
  session_id: context[:session_id],
129
129
  url: context[:url],
130
130
  referrer: context[:referrer],
131
- device_fingerprint: context[:device_fingerprint]
131
+ device_fingerprint: context[:device_fingerprint],
132
+ user_agent: context[:user_agent]
132
133
  )
133
134
  end
134
135
 
data/lib/mbuzz/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mbuzz
4
- VERSION = "0.7.4"
4
+ VERSION = "0.8.0"
5
5
  end
data/lib/mbuzz.rb CHANGED
@@ -42,7 +42,7 @@ module Mbuzz
42
42
 
43
43
  # New simplified configuration method (v0.5.0)
44
44
  # @param api_key [String] Your mbuzz API key
45
- # @param api_url [String, nil] Override API URL (defaults to https://mbuzz.co/api/v1)
45
+ # @param api_url [String, nil] Override API URL (defaults to https://api.mbuzz.co/api/v1)
46
46
  # @param session_timeout [Integer, nil] Session timeout in seconds
47
47
  # @param debug [Boolean, nil] Enable debug logging
48
48
  # @param skip_paths [Array<String>, nil] Additional paths to skip tracking (e.g., ["/admin", "/internal"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mbuzz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mbuzz team