activerabbit-ai 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.
- checksums.yaml +4 -4
- data/activerabbit-ai-0.1.1.gem +0 -0
- data/lib/active_rabbit/client/http_client.rb +10 -0
- data/lib/active_rabbit/client/version.rb +1 -1
- data/lib/active_rabbit/client.rb +11 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed92961a01e3d76a2d8fbc3c6eabb41d0a8aa2debb164cbba024eab9039e5ed8
|
|
4
|
+
data.tar.gz: 9eddb39edb4c0cb9ef537a78aacb72a5b69b9f2960200c9275a368ae820720d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ec5ff52ecb08dac5ac42224a0d979c37e07b74c4c5fd8d157433cf0319438bd8a08955cee58b57d128edaf467fc7d44d75f743ec4b815e733e5bed130b869af
|
|
7
|
+
data.tar.gz: 0bcbcf89df1dca20667cca88ab9545a11087210e36fc832f534735ad85974eb309f101b6b2207a4154e02e8cc3a1cb29a913f1199eccbe295e4fdf4e0e513de2
|
|
Binary file
|
|
@@ -38,6 +38,16 @@ module ActiveRabbit
|
|
|
38
38
|
make_request(:post, "api/v1/events/batch", { events: batch_data })
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
def test_connection
|
|
42
|
+
response = make_request(:post, "api/v1/test/connection", {
|
|
43
|
+
gem_version: ActiveRabbit::Client::VERSION,
|
|
44
|
+
timestamp: Time.now.iso8601
|
|
45
|
+
})
|
|
46
|
+
{ success: true, data: response }
|
|
47
|
+
rescue => e
|
|
48
|
+
{ success: false, error: e.message }
|
|
49
|
+
end
|
|
50
|
+
|
|
41
51
|
def flush
|
|
42
52
|
return if @request_queue.empty?
|
|
43
53
|
|
data/lib/active_rabbit/client.rb
CHANGED
|
@@ -79,6 +79,17 @@ module ActiveRabbit
|
|
|
79
79
|
)
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
# Test connection to ActiveRabbit API
|
|
83
|
+
def test_connection
|
|
84
|
+
return { success: false, error: "ActiveRabbit not configured" } unless configured?
|
|
85
|
+
|
|
86
|
+
begin
|
|
87
|
+
http_client.test_connection
|
|
88
|
+
rescue => e
|
|
89
|
+
{ success: false, error: e.message }
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
82
93
|
# Flush any pending events
|
|
83
94
|
def flush
|
|
84
95
|
return unless configured?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerabbit-ai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Shapalov
|
|
@@ -109,6 +109,7 @@ files:
|
|
|
109
109
|
- README.md
|
|
110
110
|
- Rakefile
|
|
111
111
|
- TESTING_GUIDE.md
|
|
112
|
+
- activerabbit-ai-0.1.1.gem
|
|
112
113
|
- examples/rails_app_testing.rb
|
|
113
114
|
- examples/rails_integration.rb
|
|
114
115
|
- examples/standalone_usage.rb
|