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.2.24 features/support/file.rb
saucy-0.2.21 features/support/file.rb
saucy-0.2.20 features/support/file.rb
saucy-0.2.18 features/support/file.rb
saucy-0.2.17 features/support/file.rb
saucy-0.2.16 features/support/file.rb
saucy-0.2.15 features/support/file.rb
saucy-0.2.14 features/support/file.rb
saucy-0.2.13 features/support/file.rb
saucy-0.2.12 features/support/file.rb
saucy-0.2.11 features/support/file.rb
saucy-0.2.10 features/support/file.rb
saucy-0.2.9 features/support/file.rb
saucy-0.2.8.1 features/support/file.rb
saucy-0.2.8 features/support/file.rb
saucy-0.2.7 features/support/file.rb
saucy-0.2.6.1 features/support/file.rb
saucy-0.2.6 features/support/file.rb
saucy-0.2.5 features/support/file.rb
saucy-0.2.4.1 features/support/file.rb