app/features/project/views/project_settings.erb

Summary

Maintainability
Test Coverage
<form method="POST" action="/projects_erb/<%= project.id %>/save">
  <h5>Project Name</h5>
  <div class="mdl-textfield mdl-js-textfield">
    <input class="mdl-textfield__input" type="text" name="project_name" value="<%= project.project_name %>">
    <label class="mdl-textfield__label" for="project_name">Project Name</label>
  </div>
  <br />
  <h5>Git URL</h5>
  <p><code><%= project.repo_config.git_url %></code></p>
  <h5>Lane to run</h5>
  <p><code>Fastfile</code> located at path <code><%= fastfile_path %></code></p>
  <select id="selected_lane" name="selected_lane">
    <% available_lanes.each do |lane| %>
      <option value="<%= lane[:name] %>"><%= lane[:display_name] %></option>
    <% end %>
  </select>
  <br />
  <h5>Environment Variables</h5>
  <h6>Global</h6>
  <ul>
    <% global_env_variables.each do |environment_variable| %>
      <li><%= environment_variable.key %> => <%= environment_variable.value %></li>
    <% end %>
  </ul>
  <h6>Project specific</h6>
  <ul>
    <% project_env_variables.each do |environment_variable| %>
      <li><%= environment_variable.key %> => <%= environment_variable.value %></li>
    <% end %>
  </ul>
  <br />
  <input class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" type="submit" title="Save">
</form>

<script>
    function select_lane(value) {
        document.getElementById('selected_lane').value = value
    }
</script>

<% if available_lanes %>
  <%= erb(:"../../fastfile_editor/views/fastfile", locals: { available_lanes: available_lanes, fastfile_path: fastfile_path }) %>
<% end %>