Skip to content

Commit

Permalink
Prefer frozen_string_literal: true.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 3, 2020
1 parent 038ed78 commit b8e9ca5
Show file tree
Hide file tree
Showing 88 changed files with 148 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rspec/core/rake_task"

Expand Down
1 change: 1 addition & 0 deletions examples/beer/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve -c
# frozen_string_literal: true

require 'rack'
require 'cgi'
Expand Down
1 change: 1 addition & 0 deletions examples/beer/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon-host
# frozen_string_literal: true

load :rack, :self_signed_tls, :supervisor

Expand Down
1 change: 1 addition & 0 deletions examples/benchmark/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve -c
# frozen_string_literal: true

class Benchmark
def initialize(app)
Expand Down
1 change: 1 addition & 0 deletions examples/benchmark/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env -S ./bin/falcon virtual
# frozen_string_literal: true

load :rack, :self_signed_tls, :supervisor

Expand Down
1 change: 1 addition & 0 deletions examples/csv/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve -c
# frozen_string_literal: true

class MyApp
def initialize(app)
Expand Down
1 change: 1 addition & 0 deletions examples/google/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon-host
# frozen_string_literal: true

load :proxy, :self_signed_tls, :supervisor

Expand Down
1 change: 1 addition & 0 deletions examples/hello/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve -c
# frozen_string_literal: true

require 'async'

Expand Down
1 change: 1 addition & 0 deletions examples/hello/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon-host
# frozen_string_literal: true

load :rack, :self_signed_tls, :supervisor

Expand Down
1 change: 1 addition & 0 deletions examples/hello/preload.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

if GC.respond_to?(:compact)
Async.logger.warn(self, "Compacting the mainframe...")
Expand Down
1 change: 1 addition & 0 deletions examples/internet/config.ru
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

require 'async'
require 'async/http/internet'
Expand Down
1 change: 1 addition & 0 deletions examples/memory/allocations.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

class Allocations
def initialize(app)
Expand Down
1 change: 1 addition & 0 deletions examples/memory/config.ru
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

require_relative 'allocations'

Expand Down
1 change: 1 addition & 0 deletions examples/push/client.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'async'
require 'async/http/endpoint'
Expand Down
1 change: 1 addition & 0 deletions examples/push/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve --concurrency 1 --config
# frozen_string_literal: true

class EarlyHints
def initialize(app)
Expand Down
1 change: 1 addition & 0 deletions examples/redis/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

# A sample Gemfile
source "https://rubygems.org"
Expand Down
1 change: 1 addition & 0 deletions examples/redis/config.ru
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

require 'sinatra/base'
require 'async/redis'
Expand Down
2 changes: 2 additions & 0 deletions examples/sinatra/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# A sample Gemfile
source "https://rubygems.org"

Expand Down
1 change: 1 addition & 0 deletions examples/sinatra/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve -c
# frozen_string_literal: true

# Save this as `config.ru`, make it executable and then run it (or run falcon serve by hand)

Expand Down
1 change: 1 addition & 0 deletions examples/trailers/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon --verbose serve -c
# frozen_string_literal: true

require 'async'

Expand Down
1 change: 1 addition & 0 deletions examples/trailers/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env falcon-host
# frozen_string_literal: true

load :rack, :self_signed_tls, :supervisor

Expand Down
2 changes: 2 additions & 0 deletions lib/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/adapters/early_hints.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/adapters/input.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/adapters/output.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/adapters/rack.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/adapters/response.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/adapters/rewindable.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/host.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/paths.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/redirect.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/serve.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/supervisor.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/top.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/command/virtual.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/application.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/lets_encrypt_tls.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/rack.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/self_signed_tls.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/supervisor.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/configuration/tls.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/controller/host.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/controller/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/controller/redirect.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/controller/serve.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/controller/virtual.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/endpoint.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/extensions/openssl.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/middleware/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/middleware/redirect.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/proxy_endpoint.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/server.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/service/application.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/service/generic.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 201, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/service/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/service/supervisor.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/services.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/tls.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/verbose.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 2 additions & 0 deletions lib/falcon/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
1 change: 1 addition & 0 deletions lib/rack/handler/falcon.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

require 'rack/handler'

Expand Down
1 change: 1 addition & 0 deletions recipes/falcon/supervisor.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

recipe :restart, description: 'Restart the application server via the supervisor.' do
require_relative '../../lib/falcon/command/supervisor'
Expand Down
1 change: 1 addition & 0 deletions server.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env -S ./bin/falcon virtual --bind-insecure http://[::]:1080 --bind-secure https://[::]:1443
# frozen_string_literal: true

# You will want edit your `/etc/hosts`, adding the following:
# 127.0.0.1 benchmark.localhost beer.localhost hello.localhost
Expand Down
Loading

0 comments on commit b8e9ca5

Please sign in to comment.