ruby_ci 0.2.10 → 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: aa6e2fa74cc6d0e4b24da9318e739db4491b91195a20aaab6e777470934d2819
4
- data.tar.gz: 5228af6801441a991d0f6802fb8ea28c658512f66240d1b1b2530337dcc8577d
3
+ metadata.gz: 6f75e176847fbfc33c25d935c20203bbee36634762155902cf034d76bd6590d9
4
+ data.tar.gz: dde63484782a8a755857d719fa2528b2938455d3b7c8d380f09cbfe3d366525d
5
5
  SHA512:
6
- metadata.gz: d03cdba5e3d219f235036e30ce595932eb69da946b1cb2c2639db9fd56abb8f883261515519cd4eec3559ba6964b8fb63964b270cef2a531a90bae684986fabd
7
- data.tar.gz: 639d761bf5da50ec7a35950e500682501dcca9c92017fed76631344f9436df42501ea8aecfe85814010abb24a194aa56f4a7ef4192c1c08df7771bfd3ddf616d
6
+ metadata.gz: ffca3b2808479f26ee6ac439910fbffc435f805bd31905fd89f3ba516d197d988fb6f77df3139de019769fae8c96cba8e384898c4ac3de68634eff07c0e55a0e
7
+ data.tar.gz: 313c3b29073fcfa15605704c445a209aae7fe0d661c8481ec82557a0516bec08d165f7cde2398035d23509a6f1997c0aae9688a67d2d2a0a73f88689b39cab22
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ require "stringio"
2
3
 
3
4
  module RubyCI
4
5
  class RspecRunFormatter
@@ -70,6 +71,7 @@ module RubyCI
70
71
  end
71
72
 
72
73
  def start(start_notification)
74
+ @output.print "Starting rspec run"
73
75
  # $stderr = $stdout
74
76
 
75
77
  data = {
@@ -86,6 +88,7 @@ module RubyCI
86
88
  end
87
89
 
88
90
  def close(null_notification)
91
+ @output.print "Finished rspec run"
89
92
  # check_heap_live_num
90
93
  msg(:gc_stat, GC.stat.merge(max_heap_live_num: @max_heap_live_num))
91
94
  unless running_only_failed? || ENV["EXTRA_SLOWER_RUN"] || running_gem_or_engine?
@@ -124,6 +127,7 @@ module RubyCI
124
127
  def example_passed(example_notification)
125
128
  metadata = example_notification.example.metadata
126
129
  broadcast_example_finished(serialize_example(metadata, "passed".freeze), example_notification.example)
130
+ @output.print RSpec::Core::Formatters::ConsoleCodes.wrap('.', :success)
127
131
  end
128
132
 
129
133
  def example_failed(example_notification)
@@ -135,6 +139,7 @@ module RubyCI
135
139
  serialize_example(metadata, "failed".freeze, fully_formatted),
136
140
  example_notification.example
137
141
  )
142
+ @output.print RSpec::Core::Formatters::ConsoleCodes.wrap('F', :failure)
138
143
  end
139
144
 
140
145
  def example_pending(example_notification)
@@ -143,6 +148,7 @@ module RubyCI
143
148
  serialize_example(metadata, "pending".freeze),
144
149
  example_notification.example
145
150
  )
151
+ @output.print RSpec::Core::Formatters::ConsoleCodes.wrap('*', :pending)
146
152
  end
147
153
 
148
154
  def example_group_finished(group_notification)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCI
4
- VERSION = "0.2.10"
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.10
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