summaryrefslogtreecommitdiff
path: root/spec/tiny_server.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 18:20:06 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-07-02 18:20:06 -0700
commit2da413fe65595e95b16e9e01afa240d5c668a03a (patch)
treeaaa60ecf50befabe0c6a5444c593275e411873d5 /spec/tiny_server.rb
parent5f45c98f1e2ae9ec7b95760a41d617a7a698cc19 (diff)
downloadchef-2da413fe65595e95b16e9e01afa240d5c668a03a.tar.gz
fix Style/MutableConstant
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/tiny_server.rb')
-rw-r--r--spec/tiny_server.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/tiny_server.rb b/spec/tiny_server.rb
index c3eab76d8e..4a6bdfb599 100644
--- a/spec/tiny_server.rb
+++ b/spec/tiny_server.rb
@@ -38,7 +38,7 @@ module TinyServer
# SSLEnable: options[:ssl],
# SSLCertName: [ [ 'CN', WEBrick::Utils::getservername ] ],
AccessLog: [], # Remove this option to enable the access log when debugging.
- }
+ }.freeze
def initialize(**options)
@options = DEFAULT_OPTIONS.merge(options)
@@ -101,10 +101,10 @@ module TinyServer
class API
include Singleton
- GET = "GET"
- PUT = "PUT"
- POST = "POST"
- DELETE = "DELETE"
+ GET = "GET".freeze
+ PUT = "PUT".freeze
+ POST = "POST".freeze
+ DELETE = "DELETE".freeze
attr_reader :routes
@@ -170,7 +170,7 @@ module TinyServer
end
class Response
- HEADERS = { "Content-Type" => "application/json" }
+ HEADERS = { "Content-Type" => "application/json" }.freeze
def initialize(response_code = 200, data = nil, headers = nil, &block)
@response_code, @data = response_code, data