spec_views 3.3.0 → 3.4.0

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: eae6dff5e22673bd670708e1ff9c1855dcde1b7a669ed512edc83df789385e09
4
- data.tar.gz: a96b241b47200e29e362388dede1e402325ae220bdc903a975614dd72c1fdf15
3
+ metadata.gz: d6be6b1290f526d5601ea7896dfd29bda9913888f4620b752504d6e2931ba6fa
4
+ data.tar.gz: 9d6c11ddb9c2ff9b0898f9c887a07823555732e714341680feb8dba4ecb9e020
5
5
  SHA512:
6
- metadata.gz: 8e8990413a8eed49d4a16bf39165c8910c426e6b08bbf864c015ba4d2fc4652a0ed648bf3e1a51f1c9cfaa53e2f75ca49e6be355c49480840efc2b5baff2b77c
7
- data.tar.gz: ad2c9c6e96a4ce3170157ecd631b4825c25773fd5140b7cc5e2b6608c59e923d358bb6211732545c6a54813ab24a49d13d0e81813d088d0158f108794b256b02
6
+ metadata.gz: 3a120d0d9d5b5810dbc6978c191ca378118a8554eb9aaa0e391afc41605b7652292205545a74402a85ddecce82faf235aaa6195e5513bc24f3509710520928c9
7
+ data.tar.gz: ec0abff6c3d017ced148a464001bc58f9730314c8d4334122f22d29c42ec0fe61f09ea97fbb12f2fc38b2b9a543c4198f4f91167b9274c77da5aecafca6c690d
@@ -82,8 +82,15 @@ module SpecViews
82
82
  redirect_to action: :index
83
83
  end
84
84
 
85
+ def reject_all
86
+ directories.each do |dir|
87
+ dir.remove_challenger if dir.challenger?
88
+ end
89
+ redirect_to action: :index
90
+ end
91
+
85
92
  def reject
86
- FileUtils.remove_file(directory.challenger_path)
93
+ directory.remove_challenger
87
94
  redirect_to action: :index, challenger: :next
88
95
  end
89
96
 
@@ -27,7 +27,7 @@ module SpecViews
27
27
  end
28
28
 
29
29
  def controller_name
30
- splitted_description.first.gsub(/Controller(_.*)$/, 'Controller').gsub(/Controller$/, '').gsub('_', '::')
30
+ splitted_description.first.gsub(/Controller(_.*)$/, 'Controller').gsub(/Controller$/, '')
31
31
  end
32
32
 
33
33
  def method
@@ -23,9 +23,8 @@ module SpecViews
23
23
  private
24
24
 
25
25
  def response_status_match?(response, expected_status)
26
- # Use "#{response.message}" to ensure local encoding
27
26
  response.status == expected_status ||
28
- response.message.to_s.parameterize.underscore == expected_status.to_s
27
+ response.message.to_s.dup.force_encoding('UTF-8').parameterize.underscore == expected_status.to_s
29
28
  end
30
29
  end
31
30
  end
@@ -38,13 +38,12 @@
38
38
  <div class="footer">
39
39
  <div class="info"></div>
40
40
  <div class="actions">
41
- <% if @directories.any?(&:challenger?) %>
42
- <%= link_to 'Batch Diff', url_for(action: :batch), class: 'diff btn' %>
43
- <% end %>
44
41
  <% if @directories.any?{ |dir| dir.last_run < @latest_run } %>
45
42
  <%= button_to 'Remove Outdated', url_for(action: :destroy_outdated), method: :delete, class: 'reject' %>
46
43
  <% end %>
47
44
  <% if @directories.any?(&:challenger?) %>
45
+ <%= link_to 'Batch Diff', url_for(action: :batch), class: 'diff btn' %>
46
+ <%= button_to 'Reject All', url_for(action: :reject_all), method: :post, class: 'reject' %>
48
47
  <%= button_to 'Accept All', url_for(action: :accept_all), method: :post, class: 'accept' %>
49
48
  <% end %>
50
49
  </div>
data/config/routes.rb CHANGED
@@ -9,6 +9,7 @@ Rails.application.routes.draw do
9
9
  get :batch
10
10
  delete :destroy_outdated
11
11
  post :accept_all
12
+ post :reject_all
12
13
  post :batch_accept
13
14
  end
14
15
  member do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpecViews
4
- VERSION = '3.3.0'
4
+ VERSION = '3.4.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spec_views
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Gaul
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-31 00:00:00.000000000 Z
11
+ date: 2023-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs