spec_views 3.3.1 → 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: ffc864c05ff98f751abe8d28920fb4dcddcf8da527299327a42f1565bc545718
4
- data.tar.gz: dbb69ec88cdbaa8157875ff907f1d1b0a31475029454e5d0d23993b6c5a5e9d2
3
+ metadata.gz: d6be6b1290f526d5601ea7896dfd29bda9913888f4620b752504d6e2931ba6fa
4
+ data.tar.gz: 9d6c11ddb9c2ff9b0898f9c887a07823555732e714341680feb8dba4ecb9e020
5
5
  SHA512:
6
- metadata.gz: cf0d8f5c736f7736eede534183b70d52ff1782545d2086542126dfaba9c66af03bbd46e70a073bdd4b7adcb8b4012d9e2016c789c99739308a57f53872ab1ca9
7
- data.tar.gz: '0387e85f37e57af40325a7282dff27ac5687e13d2e7f156894dc77c8abc27fc91b2003e0aa21fadd6b51cbc9dc6c0e943ebae9bd127070a84bea03c54b723da1'
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
@@ -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.1'
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.1
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-11-09 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