Sha256: 97ea746742b8bd1abef6e1d137fd5af5634d7c64eb5eb547d58f37eab92848f1

Contents?: true

Size: 247 Bytes

Versions: 142

Compression:

Stored size: 247 Bytes

Contents

module FileHelpers
  def replace_in_file(path, find, replace)
    in_current_dir do
      contents = IO.read(path)
      contents.sub!(find, replace)
      File.open(path, "w") { |file| file.write(contents) }
    end
  end
end

World(FileHelpers)

Version data entries

142 entries across 142 versions & 3 rubygems

Version Path
saucy-0.16.1 features/support/file.rb
saucy-0.16.0 features/support/file.rb
saucy-0.15.2 features/support/file.rb
saucy-0.15.1 features/support/file.rb
saucy-0.15.0 features/support/file.rb
saucy-0.14.5 features/support/file.rb
saucy-0.14.3 features/support/file.rb
saucy-0.10.10 features/support/file.rb
saucy-0.14.2 features/support/file.rb
saucy-0.14.1 features/support/file.rb
saucy-0.14.0 features/support/file.rb
saucy-0.13.3 features/support/file.rb
saucy-0.13.2 features/support/file.rb
saucy-0.10.9 features/support/file.rb
saucy-0.10.8 features/support/file.rb
saucy-0.13.1 features/support/file.rb
saucy-0.13.0 features/support/file.rb
saucy-0.12.5 features/support/file.rb
saucy-0.12.4 features/support/file.rb
saucy-0.12.3 features/support/file.rb