Skip to content

Commit 686e38e

Browse files
author
Awesome Code
committed
Auto corrected by following Lint Ruby Layout/HeredocIndentation
1 parent 6f30aed commit 686e38e

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

lib/rails/convert_rails_logger.rb

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

33
Synvert::Rewriter.new 'rails', 'convert_rails_logger' do
44
description <<~EOS
5-
It converts RAILS_DEFAULT_LOGGER to Rails.logger.
5+
It converts RAILS_DEFAULT_LOGGER to Rails.logger.
66
7-
```ruby
8-
RAILS_DEFAULT_LOGGER
9-
```
7+
```ruby
8+
RAILS_DEFAULT_LOGGER
9+
```
1010
11-
=>
11+
=>
1212
13-
```ruby
14-
Rails.logger
15-
```
13+
```ruby
14+
Rails.logger
15+
```
1616
EOS
1717

1818
if_gem 'rails', { gte: '2.3.0' }

spec/rails/add_application_job_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
let(:fake_file_path) { 'app/jobs/application_job.rb' }
1010
let(:test_content) { nil }
1111
let(:test_rewritten_content) { <<~EOS }
12-
class ApplicationJob < ActiveJob::Base
13-
end
12+
class ApplicationJob < ActiveJob::Base
13+
end
1414
EOS
1515

1616
include_examples 'convertable'
@@ -19,12 +19,12 @@ class ApplicationJob < ActiveJob::Base
1919
context 'rename ActiveJob::Base' do
2020
let(:fake_file_path) { 'app/jobs/post_job.rb' }
2121
let(:test_content) { <<~EOS }
22-
class PostJob < ActiveJob::Base
23-
end
22+
class PostJob < ActiveJob::Base
23+
end
2424
EOS
2525
let(:test_rewritten_content) { <<~EOS }
26-
class PostJob < ApplicationJob
27-
end
26+
class PostJob < ApplicationJob
27+
end
2828
EOS
2929

3030
include_examples 'convertable'

spec/rails/add_application_record_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
let(:fake_file_path) { 'app/models/application_record.rb' }
1010
let(:test_content) { nil }
1111
let(:test_rewritten_content) { <<~EOS }
12-
class ApplicationRecord < ActiveRecord::Base
13-
self.abstract_class = true
14-
end
12+
class ApplicationRecord < ActiveRecord::Base
13+
self.abstract_class = true
14+
end
1515
EOS
1616

1717
include_examples 'convertable'
@@ -20,12 +20,12 @@ class ApplicationRecord < ActiveRecord::Base
2020
context 'rename ActiveRecord::Base' do
2121
let(:fake_file_path) { 'app/models/post.rb' }
2222
let(:test_content) { <<~EOS }
23-
class Post < ActiveRecord::Base
24-
end
23+
class Post < ActiveRecord::Base
24+
end
2525
EOS
2626
let(:test_rewritten_content) { <<~EOS }
27-
class Post < ApplicationRecord
28-
end
27+
class Post < ApplicationRecord
28+
end
2929
EOS
3030

3131
include_examples 'convertable'

spec/rails/upgrade_3_0_to_3_1_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@
6363
'
6464
}
6565
let(:wrap_parameters_rewritten_content) { <<~EOS }
66-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
67-
ActiveSupport.on_load(:action_controller) do
68-
wrap_parameters format: [:json]
69-
end
66+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
67+
ActiveSupport.on_load(:action_controller) do
68+
wrap_parameters format: [:json]
69+
end
7070
71-
# Disable root element in JSON by default.
72-
ActiveSupport.on_load(:active_record) do
73-
self.include_root_in_json = false
74-
end
71+
# Disable root element in JSON by default.
72+
ActiveSupport.on_load(:active_record) do
73+
self.include_root_in_json = false
74+
end
7575
EOS
7676
let(:session_store_content) {
7777
"

spec/ruby/new_2_2_hash_syntax_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
RSpec.describe 'Uses ruby 2.2 new hash synax' do
66
let(:rewriter_name) { 'ruby/new_2_2_hash_syntax' }
77
let(:test_content) { <<~'EOS' }
8-
{ :foo => 'bar', 'foo' => 'bar' }
9-
{ :key1 => 'value1', :key2 => 'value2' }
10-
{ foo_key: 'foo_value', bar_key: 42, "baz-key" => true }
11-
{ :"foo-#{key}" => 'foo_value', :"bar-key" => 42, :"a\tb" => false, :"c'd" => nil }
12-
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
8+
{ :foo => 'bar', 'foo' => 'bar' }
9+
{ :key1 => 'value1', :key2 => 'value2' }
10+
{ foo_key: 'foo_value', bar_key: 42, "baz-key" => true }
11+
{ :"foo-#{key}" => 'foo_value', :"bar-key" => 42, :"a\tb" => false, :"c'd" => nil }
12+
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
1313
EOS
1414
let(:test_rewritten_content) { <<~'EOS' }
15-
{ foo: 'bar', 'foo' => 'bar' }
16-
{ key1: 'value1', key2: 'value2' }
17-
{ foo_key: 'foo_value', bar_key: 42, "baz-key" => true }
18-
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
19-
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
15+
{ foo: 'bar', 'foo' => 'bar' }
16+
{ key1: 'value1', key2: 'value2' }
17+
{ foo_key: 'foo_value', bar_key: 42, "baz-key" => true }
18+
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
19+
{ "foo-#{key}": 'foo_value', 'bar-key': 42, "a\tb": false, "c'd": nil }
2020
EOS
2121

2222
before do

0 commit comments

Comments
 (0)