watchdoge 0.1.16 → 0.1.17

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: d4ce1d84d5abb883cb6a866f73ad1b4d8591643f86696f4f4ea4cb8db9559f19
4
- data.tar.gz: 7d0841615261cd5de53bb9c9b27c111e54d3592a0ff33460d3e6c99ca4c765d1
3
+ metadata.gz: b34a6d386b24bebe7498bcbf1280d6cf330343b62a24be2c45da592826b819be
4
+ data.tar.gz: 2f6567e8cf954d59b95b4cbfd67787ff2304bcf665e9d3d4fcb84bb2f66f961b
5
5
  SHA512:
6
- metadata.gz: 1f767f4703fee1c014752c0b94c06bc1add2192bc5fba231fe56a88522297ec0922a2b56eda68823d9c90cd4ca60ab390d64daf08681fb513a45bb1ecbc286f7
7
- data.tar.gz: 1a9993cbb8886708720d7205850b1604a8cf24812e85095f16a1b7294b6ef57bb8a6aa7db128c77816ae273c5106407feaf30967d98c421f83d03eeaea0cbb6e
6
+ metadata.gz: 9704cabe29de68b54055c44451ebe8ef84ae1aab7eb8968a4737be31176d4a53faa2b53270ae617377544db7305966212d0903a06766bd59e8d2ad2a45d98f21
7
+ data.tar.gz: ffa07abb94d4dd6692c32694f0b17b8e8e82f3db0e43550b027881a73a3a1067716912ad13acb27a85413a7bbb6ce064ec0680335dec2b8e18f97472fbf49b97
@@ -18,6 +18,10 @@ module WatchDoge
18
18
  @message_queue << message
19
19
  end
20
20
 
21
+ def msg_size
22
+ @message_queue.size
23
+ end
24
+
21
25
  def flush
22
26
  @message_queue.each do |message|
23
27
  case message
@@ -129,14 +129,18 @@ module WatchDoge
129
129
 
130
130
  # markdown_table do |context|
131
131
  def markdown_table
132
- "#### Detail: #{ENV['CI_PIPELINE_URL']}\n\n<table>
133
- <tr>
134
- <th>before</th>
135
- <th>after</th>
136
- <th>diff</th>
137
- </tr>
138
- #{yield("")}
139
- </table>"
132
+ <<~MARKDOWN
133
+ #### Detail: #{ENV['CI_PIPELINE_URL']}
134
+
135
+ <table>
136
+ <tr>
137
+ <th>before</th>
138
+ <th>after</th>
139
+ <th>diff</th>
140
+ </tr>
141
+ #{yield("")}
142
+ </table>
143
+ MARKDOWN
140
144
  end
141
145
 
142
146
  def markdown_table_row before, after, diff
@@ -34,18 +34,23 @@ module WatchDoge
34
34
  class << self
35
35
  def push message
36
36
  sources do |klass|
37
- puts "new msg push to #{klass}"
37
+ puts "[notification] new msg push to #{klass}"
38
38
  klass.push message
39
39
  end
40
40
  end
41
41
 
42
42
  def flush
43
+ raise_err = false
44
+
43
45
  sources do |klass|
44
- puts 'flush!'
46
+ puts '[notification] flush'
47
+ raise_err = true if klass.msg_size > 0
45
48
  klass.flush
46
49
  end
47
50
 
48
- raise WatchDoge::RegressionError, 'Has detected style changed. Regression failed'
51
+ if raise_err
52
+ raise WatchDoge::RegressionError, 'Has detected style changed. Regression failed'
53
+ end
49
54
  end
50
55
 
51
56
  private
@@ -1,4 +1,4 @@
1
1
  # Version of WatchDoge
2
2
  module WatchDoge
3
- VERSION = '0.1.16'
3
+ VERSION = '0.1.17'
4
4
  end
data/watchdoge.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'watchdoge'
3
- s.version = '0.1.16'
3
+ s.version = '0.1.17'
4
4
  s.date = '2019-07-22'
5
5
  s.summary = "dogi"
6
6
  s.description = "WatchDoge is Ruby on Rails friendly frontend regression test tool"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchdoge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shen Lee