Sha256: 294400fec363719f380743f16247f8e52f8b894665a637241cac549cdd5af55a

Contents?: true

Size: 418 Bytes

Versions: 5

Compression:

Stored size: 418 Bytes

Contents

#!/usr/bin/env ruby

require 'spruz/xt/secure_write'

for filename in ARGV
  File.open(filename) do |input|
    File.secure_write(filename) do |output|
      until input.eof?
        line = input.readline
        line.sub!(/^(\s*)test "(.+)" do\s*$/) do
          "#$1def test_" << $2.downcase.gsub(/\A[^a-z]/, '').gsub(/[ -]/, '_').delete('^0-9a-z_')
        end
        output.write line
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
utils-0.0.21 bin/untest
utils-0.0.20 bin/untest
utils-0.0.19 bin/untest
utils-0.0.18 bin/untest
utils-0.0.17 bin/untest