Skip to content

Commit

Permalink
Merge branch 'twalpole-frozen_literal'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwynne committed Jul 1, 2016
2 parents 9308e3a + 59e2388 commit 3d64273
Show file tree
Hide file tree
Showing 65 changed files with 69 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/cucumber/core.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/event_bus'
require 'cucumber/core/gherkin/parser'
require 'cucumber/core/gherkin/document'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/comment'
require 'cucumber/core/ast/tag'
require 'cucumber/core/ast/feature'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/background.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/names'
require 'cucumber/core/ast/location'
require 'cucumber/core/ast/describes_itself'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/comment.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/location'

module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/data_table.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/describes_itself'
require 'cucumber/core/ast/location'

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/describes_itself.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Ast
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/doc_string.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/describes_itself'
require 'delegate'
module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/empty_background.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Ast
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/empty_multiline_argument.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Ast
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/examples_table.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/describes_itself'
require 'cucumber/core/ast/location'
require 'cucumber/core/ast/names'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/feature.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/describes_itself'
require 'cucumber/core/ast/names'
require 'cucumber/core/ast/location'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/location.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'forwardable'
require 'cucumber/core/platform'
module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/names.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Ast
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/outline_step.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/location'
require 'cucumber/core/ast/describes_itself'
require 'cucumber/core/ast/step'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/scenario.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/describes_itself'
require 'cucumber/core/ast/names'
require 'cucumber/core/ast/empty_background'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/scenario_outline.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/names'
require 'cucumber/core/ast/location'
require 'cucumber/core/ast/describes_itself'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/step.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/describes_itself'
require 'cucumber/core/ast/location'

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/ast/tag.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Ast
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/compiler.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/case'
require 'cucumber/core/test/step'

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/filter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/gherkin/ast_builder.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast'
require 'cucumber/core/platform'

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/gherkin/document.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

module Cucumber
module Core
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/gherkin/parser.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'gherkin/parser'
require 'gherkin/token_scanner'
require 'gherkin/errors'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/gherkin/tag_expression.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Gherkin
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/gherkin/writer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/gherkin/writer/helpers'
require 'cucumber/core/gherkin/document'

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/gherkin/writer/helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Gherkin
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/platform.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Detect the platform we're running on so we can tweak behaviour
# in various places.
require 'rbconfig'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/report/summary.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Report
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/action.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/result'
require 'cucumber/core/test/timer'
require 'cucumber/core/test/result'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/around_hook.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
module Test
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/case.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/result'
require 'cucumber/core/gherkin/tag_expression'
require 'cucumber/core/ast/location'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/filters.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/filters/locations_filter'
require 'cucumber/core/test/filters/name_filter'
require 'cucumber/core/test/filters/tag_filter'
1 change: 1 addition & 0 deletions lib/cucumber/core/test/filters/locations_filter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/filter'

module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/filters/name_filter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/filter'

module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/filters/tag_filter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/filter'

module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/result.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: UTF-8
# frozen_string_literal: true

module Cucumber
module Core
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/runner.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/timer'

module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/step.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/result'
require 'cucumber/core/test/action'

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/test/timer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/result'

module Cucumber
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/core/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Cucumber
module Core
class Version
Expand Down
5 changes: 3 additions & 2 deletions spec/capture_warnings.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# With thanks to @myronmarston
# https://github.com/vcr/vcr/blob/master/spec/capture_warnings.rb

Expand All @@ -22,7 +23,7 @@ def report_warnings(&block)
end

if project_warnings.any?
puts "#{ project_warnings.count } cucumber-core warnings detected"
puts "#{ project_warnings.count } cucumber-core warnings detected"
print_warnings('cucumber-core', project_warnings)
fail "Please remove all cucumber-core warnings."
end
Expand All @@ -34,7 +35,7 @@ def capture_error(&block)
old_stderr = STDERR.clone
pipe_r, pipe_w = IO.pipe
pipe_r.sync = true
error = ""
error = String.new
reader = Thread.new do
begin
loop do
Expand Down
1 change: 1 addition & 0 deletions spec/coverage.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'simplecov'
formatters = [ SimpleCov::Formatter::HTMLFormatter ]

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/background_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/background'
module Cucumber::Core::Ast
describe Background do
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/data_table_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'cucumber/core/ast/data_table'

module Cucumber
Expand Down
3 changes: 2 additions & 1 deletion spec/cucumber/core/ast/doc_string_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/location'
require 'cucumber/core/ast/doc_string'
require 'unindent'
Expand Down Expand Up @@ -68,7 +69,7 @@ module Ast
end

context 'quacking like a String' do
let(:content) { 'content' }
let(:content) { String.new('content') }
let(:content_type) { 'text/plain' }

it 'delegates #encoding to the content string' do
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/empty_multiline_argument_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/location'
require 'cucumber/core/ast/empty_multiline_argument'

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/examples_table_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/examples_table'

module Cucumber::Core::Ast
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/location_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/location'

module Cucumber::Core::Ast
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/outline_step_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/outline_step'
require 'cucumber/core/ast/examples_table'
require 'cucumber/core/ast/data_table'
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/ast/step_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/ast/step'
require 'cucumber/core/ast/outline_step'
require 'cucumber/core/ast/empty_multiline_argument'
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/compiler_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core'
require 'cucumber/core/compiler'
require 'cucumber/core/gherkin/writer'
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/filter_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/gherkin/writer'
require 'cucumber/core'
require 'cucumber/core/filter'
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/gherkin/parser_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
require 'cucumber/core/gherkin/parser'
require 'cucumber/core/gherkin/writer'

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/gherkin/writer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/gherkin/writer'
require 'unindent'

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/action_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/action'
require 'cucumber/core/test/duration_matcher'

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/case_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# -*- coding: utf-8 -*-
require 'cucumber/core'
require 'cucumber/core/gherkin/writer'
Expand Down
3 changes: 2 additions & 1 deletion spec/cucumber/core/test/duration_matcher.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
require 'cucumber/core/test/result'
require 'rspec/expectations'

Expand All @@ -12,7 +13,7 @@ module Cucumber::Core::Test

RSpec::Matchers.define :an_unknown_duration do
match do |actual|
actual.tap { raise "#tap block was executed, not an UnknownDuration" }
actual.tap { raise "#tap block was executed, not an UnknownDuration" }
expect(actual).to respond_to(:nanoseconds)
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/filters/locations_filter_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# encoding: utf-8
# frozen_string_literal: true
require 'cucumber/core/gherkin/writer'
require 'cucumber/core'
require 'cucumber/core/test/filters/locations_filter'
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/result_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
require 'cucumber/core/test/result'
require 'cucumber/core/test/duration_matcher'

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/runner_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/runner'
require 'cucumber/core/test/case'
require 'cucumber/core/test/step'
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/step_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/step'

module Cucumber::Core::Test
Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core/test/timer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'cucumber/core/test/timer'
require 'cucumber/core/test/duration_matcher'

Expand Down
1 change: 1 addition & 0 deletions spec/cucumber/core_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'report_api_spy'
require 'cucumber/core'
require 'cucumber/core/filter'
Expand Down
1 change: 1 addition & 0 deletions spec/readme_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'stringio'
require 'kramdown'

Expand Down
1 change: 1 addition & 0 deletions spec/report_api_spy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
class ReportAPISpy
def initialize
@result = []
Expand Down

0 comments on commit 3d64273

Please sign in to comment.