Skip to content

Commit 22e8f89

Browse files
committed
autofix
1 parent dfcefd8 commit 22e8f89

File tree

46 files changed

+213
-227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+213
-227
lines changed

integration/apps/hanami/apps/acme/application.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'hanami/helpers'
22
require 'hanami/assets'
33
require 'datadog'
4-
require_relative './controllers/fibonacci'
4+
require_relative 'controllers/fibonacci'
55

66
module Acme
77
class Application < Hanami::Application
@@ -222,7 +222,7 @@ class Application < Hanami::Application
222222
#
223223
# * https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives
224224
#
225-
security.content_security_policy %{
225+
security.content_security_policy %(
226226
form-action 'self';
227227
frame-ancestors 'self';
228228
base-uri 'self';
@@ -237,7 +237,7 @@ class Application < Hanami::Application
237237
child-src 'self';
238238
frame-src 'self';
239239
media-src 'self'
240-
}
240+
)
241241

242242
##
243243
# FRAMEWORKS

integration/apps/hanami/apps/acme/controllers/books/show.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ class Show
55
include Acme::Action
66

77
def call(params)
8-
=begin Uncomment for testing failures
9-
# binding.pry
10-
if rand > 0.5
11-
raise "Oooops...."
12-
end
13-
=end
8+
# Uncomment for testing failures
9+
# # binding.pry
10+
# if rand > 0.5
11+
# raise "Oooops...."
12+
# end
1413
end
1514
end
1615
end

integration/apps/hanami/apps/acme/controllers/fibonacci.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def set_fibonacci
1515
end
1616

1717
def fib(n)
18-
n <= 1 ? n : fib(n-1) + fib(n-2)
18+
(n <= 1) ? n : fib(n - 1) + fib(n - 2)
1919
end
2020
end
2121
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
require_relative './environment'
1+
require_relative 'environment'
22
Hanami.boot

integration/apps/hanami/config/environment.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
require_relative '../apps/acme/application'
55

66
Hanami.configure do
7-
87
mount Acme::Application, at: '/'
98

109
model do
@@ -24,7 +23,7 @@
2423
# Migrations
2524
#
2625
migrations 'db/migrations'
27-
schema 'db/schema.sql'
26+
schema 'db/schema.sql'
2827
end
2928

3029
mailer do

integration/apps/hanami/config/puma.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require_relative './environment'
1+
require_relative 'environment'
22
require 'datadog/demo_env'
33

44
Datadog::DemoEnv.print_env('Puma master environment')

integration/apps/hanami/spec/acme/controllers/books/index_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RSpec.describe Acme::Controllers::Books::Index, type: :action do
22
let(:action) { described_class.new }
3-
let(:params) { Hash[] }
3+
let(:params) { {} }
44

55
it 'is successful' do
66
response = action.call(params)

integration/apps/hanami/spec/acme/controllers/books/show_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RSpec.describe Acme::Controllers::Books::Show, type: :action do
22
let(:action) { described_class.new }
3-
let(:params) { Hash[] }
3+
let(:params) { {} }
44

55
it 'is successful' do
66
response = action.call(params)

integration/apps/hanami/spec/acme/views/application_layout_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "spec_helper"
22

33
RSpec.describe Acme::Views::ApplicationLayout, type: :view do
4-
let(:layout) { Acme::Views::ApplicationLayout.new({ format: :html }, "contents") }
4+
let(:layout) { Acme::Views::ApplicationLayout.new({format: :html}, "contents") }
55
let(:rendered) { layout.render }
66

77
it 'contains application name' do

integration/apps/hanami/spec/acme/views/books/index_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
RSpec.describe Acme::Views::Books::Index, type: :view do
22
let(:exposures) { Hash[format: :html] }
3-
let(:template) { Hanami::View::Template.new('apps/acme/templates/books/index.html.erb') }
4-
let(:view) { described_class.new(template, exposures) }
5-
let(:rendered) { view.render }
3+
let(:template) { Hanami::View::Template.new('apps/acme/templates/books/index.html.erb') }
4+
let(:view) { described_class.new(template, exposures) }
5+
let(:rendered) { view.render }
66

77
it 'exposes #format' do
88
expect(view.format).to eq exposures.fetch(:format)

0 commit comments

Comments
 (0)