Method: Jets::Builders::ReconfigureRails#update_development_environment

Defined in:
lib/jets/builders/reconfigure_rails.rb

#update_development_environmentObject



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/jets/builders/reconfigure_rails.rb', line 57

def update_development_environment
  env_file = "#{@app_root}/config/environments/development.rb"
  lines = IO.readlines(env_file)
  new_lines = lines.map do |line|
    if line =~ /(config\.file_watcher.*)/
      "  # #{$1} # commented out by jets\n"
    else
      line
    end
  end
  write_content(env_file, new_lines)
end