8000 Autocorrect `Style/SpaceInsideParens` offenses · parse/activeadmin@fa34e8e · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit fa34e8e

Browse files
Autocorrect Style/SpaceInsideParens offenses
Using the command ``` bundle exec rubocop \ --force-default-config \ --only Style/SpaceInsideParens \ --auto-correct ```
1 parent ef6c5ab commit fa34e8e

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

lib/active_admin/batch_actions/views/selection_cells.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ResourceSelectionTogglePanel < ActiveAdmin::Component
2828
def build
2929
super(id: "collection_selection_toggle_panel")
3030
resource_selection_toggle_cell
31-
div(id: "collection_selection_toggle_explaination" ) { I18n.t('active_admin.batch_actions.selection_toggle_explanation', default: "(Toggle Selection)") }
31+
div(id: "collection_selection_toggle_explaination") { I18n.t('active_admin.batch_actions.selection_toggle_explanation', default: "(Toggle Selection)") }
3232
end
3333

3434
end

lib/active_admin/dsl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def batch_action(title, options = {}, &block)
116116

117117
# Either add/remove the batch action
118118
unless options == false
119-
config.add_batch_action( sym, title, options, &block )
119+
config.add_batch_action(sym, title, options, &block)
120120
else
121121
config.remove_batch_action sym
122122
end

spec/unit/csv_builder_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@
192192

193193
context "build csv using the supplied order" do
194194
before do
195-
@post1 = Post.create!(title: "Hello1", published_date: Date.today - 2.day )
196-
@post2 = Post.create!(title: "Hello2", published_date: Date.today - 1.day )
195+
@post1 = Post.create!(title: "Hello1", published_date: Date.today - 2.day)
196+
@post2 = Post.create!(title: "Hello2", published_date: Date.today - 1.day)
197197
end
198198
let(:dummy_controller) {
199199
class DummyController

spec/unit/dependency_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
end
2424
it '=' do
2525
expect(k.foo? '= 1.2.3').to eq true
26-
expect(k.foo? '= 1' ).to eq false
26+
expect(k.foo? '= 1').to eq false
2727
end
2828
it '>' do
2929
expect(k.foo? '> 1').to eq true
@@ -45,7 +45,7 @@
4545
end
4646
it '~>' do
4747
expect(k.foo? '~> 1.2.0').to eq true
48-
expect(k.foo? '~> 1.1' ).to eq true
48+
expect(k.foo? '~> 1.1').to eq true
4949
expect(k.foo? '~> 1.2.4').to eq false
5050
end
5151
end
@@ -81,13 +81,13 @@
8181
# Note: more extensive tests for match? and match! are above.
8282

8383
it 'match?' do
84-
expect(k['a-b'].match? ).to eq true
84+
expect(k['a-b'].match?).to eq true
8585
expect(k['a-b'].match? '1.2.3').to eq true
86-
expect(k['b-c'].match? ).to eq false
86+
expect(k['b-c'].match?).to eq false
8787
end
8888

8989
it 'match!' do
90-
expect(k['a-b'].match! ).to eq nil
90+
expect(k['a-b'].match!).to eq nil
9191
expect(k['a-b'].match! '1.2.3').to eq nil
9292

9393
expect{ k['a-b'].match! '2.5' }.to raise_error ActiveAdmin::DependencyError,
@@ -103,8 +103,8 @@
103103

104104
it '==' do
105105
expect(k['a-b'] == '1.2.3').to eq true
106-
expect(k['a-b'] == '1.2' ).to eq false
107-
expect(k['a-b'] == 1 ).to eq false
106+
expect(k['a-b'] == '1.2').to eq false
107+
expect(k['a-b'] == 1).to eq false
108108
end
109109
it '>' do
110110
expect(k['a-b'] > 1).to eq true

spec/unit/namespace/register_page_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
end
5151

5252
it "should generate the parent menu item" do
53-
expect( menu['Extra']).to_not eq nil
53+
expect(menu['Extra']).to_not eq nil
5454
end
5555

5656
it "should generate its own child item" do

spec/unit/resource/attributes_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module ActiveAdmin
1212
end
1313

1414
it 'should return attributes hash' do
15-
expect(subject).to eq( author_id: :author,
15+
expect(subject).to eq(author_id: :author,
1616
body: :body,
1717
created_at: :created_at,
1818
custom_category_id: :category,

spec/unit/resource_controller/data_access_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
end
210210

211211
before do
212-
expect(Post).to receive(:new).with(a_hash_including(:body, :taggings_attributes )).and_call_original
212+
expect(Post).to receive(:new).with(a_hash_including(:body, :taggings_attributes)).and_call_original
213213
end
214214

215215
subject do

spec/unit/resource_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def call_after_destroy(obj); end
161161
before do
162162
allow(Post).to receive(:find).and_return(post)
163163
controller.class_eval { public :resource }
164-
allow(controller).to receive(:params).and_return( ActionController::Parameters.new(http_params) )
164+
allow(controller).to receive(:params).and_return(ActionController::Parameters.new(http_params))
165165
end
166166

167167
subject { controller.resource }

0 commit comments

Comments
 (0)
0