Skip to content

Commit 57d1c81

Browse files
author
Mattia Roccoberton
authored
Merge pull request #17 from blocknotes/fix-some-rubocop-issues
Fix some RuboCop issues
2 parents 117226a + 07e65ff commit 57d1c81

File tree

5 files changed

+10
-24
lines changed

5 files changed

+10
-24
lines changed

.rubocop.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,6 @@ AllCops:
2020
Gemspec/RequiredRubyVersion:
2121
Enabled: false
2222

23-
Naming/FileName:
24-
Enabled: false
25-
26-
Layout/LineLength:
27-
Enabled: true
28-
Max: 120
29-
3023
RSpec/ExampleLength:
24+
# default is 5
3125
Max: 10
32-
33-
RSpec/MultipleExpectations:
34-
Max: 12
35-
36-
Style/HashEachMethods:
37-
Enabled: true
38-
39-
Style/HashTransformKeys:
40-
Enabled: true
41-
42-
Style/HashTransformValues:
43-
Enabled: true

activeadmin_dynamic_fields.gemspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Gem::Specification.new do |spec|
1414
spec.email = 'mat@blocknot.es'
1515
spec.homepage = 'https://github.com/blocknotes/activeadmin_dynamic_fields'
1616

17+
spec.metadata['homepage_uri'] = spec.homepage
18+
spec.metadata['source_code_uri'] = spec.homepage
19+
spec.metadata['rubygems_mfa_required'] = 'true'
20+
1721
spec.files = Dir['{app,lib}/**/*', 'LICENSE.txt', 'Rakefile', 'README.md']
1822
spec.require_paths = ['lib']
1923

spec/system/dialog_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
context 'with a dialog' do
1717
subject(:author_link) { '.attributes_table .row-author a[data-df-dialog]' }
1818

19-
it 'opens the dialog' do
19+
it 'opens the dialog', :aggregate_failures do
2020
visit "/admin/posts/#{post.id}"
2121

2222
expect(page).to have_css(author_link)

spec/system/dynamic_fields_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ def test_change_css(target, attrs1, attrs2, options = {})
6666
end
6767

6868
context 'with some dynamic fields' do
69-
it 'checks the conditions and actions', retry: 2 do # rubocop:disable RSpec/ExampleLength
69+
it 'checks the conditions and actions', :aggregate_failures, retry: 2 do # rubocop:disable RSpec/ExampleLength
7070
visit "/admin/posts/#{post.id}/edit"
7171

72-
expect(page).to have_css('#post_data_field_111[data-if="checked"][data-then="addClass red"][data-target="#post_data_field_111_input label"]') # rubocop:disable Layout/LineLength
72+
expect(page).to have_css('#post_data_field_111[data-if="checked"][data-then="addClass red"][data-target="#post_data_field_111_input label"]')
7373

7474
# --- if
7575
spec_message('check data-if condition')
@@ -173,7 +173,7 @@ def test_change_css(target, attrs1, attrs2, options = {})
173173
end
174174

175175
context 'with some dynamic fields on a nested resource' do
176-
it 'checks the conditions and actions' do
176+
it 'checks the conditions and actions', :aggregate_failures do
177177
visit '/admin/authors/new'
178178

179179
expect(page).not_to have_css('body.active_admin.red')

spec/system/inline_editing_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
context 'with a column set for inline editing' do
1717
let(:editing_widget) { '.index_content .status_tag[data-field="published"][data-field-type="boolean"]' }
1818

19-
it 'includes the editing widget' do
19+
it 'includes the editing widget', :aggregate_failures do
2020
visit "/admin/posts"
2121

2222
expect(post.reload.published).to be_falsey

0 commit comments

Comments
 (0)