ruby_ci 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ad35fe30f8c4e72703b0ab13fb95996d76cb291955c2401c863f159e06ebea0
4
- data.tar.gz: 06e89200e0e82e5f7c4c0dd1c2204c5fa63f13f07505f549799f6cfdbbe94326
3
+ metadata.gz: 6f75e176847fbfc33c25d935c20203bbee36634762155902cf034d76bd6590d9
4
+ data.tar.gz: dde63484782a8a755857d719fa2528b2938455d3b7c8d380f09cbfe3d366525d
5
5
  SHA512:
6
- metadata.gz: 7dc9c4580c9a8b021546ad8b638583ebb18af22ed695ff54c2f378b839257404eab73a31ce6756d6205ea2135d897abbd219cf3807424eb6458860174b4a7911
7
- data.tar.gz: 8ce9828e871bc0fc185b6a0040e336f8e520e8b813a73166e0c00d91bf70b9cb401399849d84521674e13e63a5c334b7311e2d173af8ba6fa07cc70092f3b6c5
6
+ metadata.gz: ffca3b2808479f26ee6ac439910fbffc435f805bd31905fd89f3ba516d197d988fb6f77df3139de019769fae8c96cba8e384898c4ac3de68634eff07c0e55a0e
7
+ data.tar.gz: 313c3b29073fcfa15605704c445a209aae7fe0d661c8481ec82557a0516bec08d165f7cde2398035d23509a6f1997c0aae9688a67d2d2a0a73f88689b39cab22
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCI
4
- VERSION = "0.2.11"
4
+ VERSION = "0.2.12"
5
5
  end
data/lib/ruby_ci.rb CHANGED
@@ -72,8 +72,18 @@ module RubyCI
72
72
  end
73
73
 
74
74
  def send_events(data)
75
+ reset_webmock = false
76
+ if defined?(WebMock)
77
+ reset_webmock = !WebMock.net_connect_allowed?
78
+ Webmock.allow_net_connect!
79
+ end
80
+
75
81
  uri = URI("#{RubyCI.configuration.rubyci_main_url}/api/v1/gitlab_events")
76
82
  res = Net::HTTP.post_form(uri, data)
83
+
84
+ if reset_webmock
85
+ Webmock.disable_net_connect!
86
+ end
77
87
  end
78
88
  end
79
89
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ale ∴
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-30 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: console