Skip to content

Commit

Permalink
Enable frozen_string_literal
Browse files Browse the repository at this point in the history
Closes #264
  • Loading branch information
leejarvis committed Aug 10, 2023
1 parent 7e72033 commit 13c2673
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

source "https://rubygems.org"

gemspec
gemspec
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

begin
require 'bundler/gem_tasks'
rescue LoadError
Expand Down
2 changes: 2 additions & 0 deletions lib/slop.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'slop/option'
require 'slop/options'
require 'slop/parser'
Expand Down
2 changes: 2 additions & 0 deletions lib/slop/error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

module Slop
# Base error class.
class Error < StandardError
Expand Down
2 changes: 2 additions & 0 deletions lib/slop/option.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

module Slop
class Option
DEFAULT_CONFIG = {
Expand Down
2 changes: 2 additions & 0 deletions lib/slop/options.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

module Slop
class Options
include Enumerable
Expand Down
2 changes: 2 additions & 0 deletions lib/slop/parser.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

module Slop
class Parser

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

module Slop
# This class encapsulates a Parser and Options pair. The idea is that
# the Options class shouldn't have to deal with what happens when options
Expand Down
2 changes: 2 additions & 0 deletions lib/slop/types.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

module Slop
# Cast the option argument to a String.
class StringOption < Option
Expand Down
2 changes: 2 additions & 0 deletions test/error_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'test_helper'

# All raised errors tested here
Expand Down
2 changes: 2 additions & 0 deletions test/option_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'test_helper'

describe Slop::Option do
Expand Down
2 changes: 2 additions & 0 deletions test/options_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'test_helper'

describe Slop::Options do
Expand Down
2 changes: 2 additions & 0 deletions test/parser_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'test_helper'
require 'shellwords'

Expand Down
2 changes: 2 additions & 0 deletions test/result_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'test_helper'

module Slop
Expand Down
2 changes: 2 additions & 0 deletions test/slop_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require "test_helper"

describe Slop do
Expand Down
2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

$VERBOSE = true

require 'slop'
Expand Down
2 changes: 2 additions & 0 deletions test/types_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen-string-literal: true

require 'test_helper'

describe Slop::StringOption do
Expand Down

0 comments on commit 13c2673

Please sign in to comment.