<%= description %>

Deploy Plan
-----------
Does Infrastructure need to know anything special about this deploy? If so, keep this section and fill it in. **Otherwise, delete it.**

Rollback Plan
-------------
**If this pull request requires anything more complex (e.g., rolling back a migration), you MUST update this section. Otherwise, delete this note.**

To roll back this change, revert the merge with `git revert -m 1 MERGE_SHA` and perform another deploy.

URLs
----
<% pivotal_ids.each do |pivotal_id| -%>
* [pivotal tracker story <%= pivotal_id %>](https://www.pivotaltracker.com/story/show/<%= pivotal_id %>)
<% end -%>
<% jira_ids.each do |jira_id| -%>
* [Jira issue <%= jira_id %>](https://<%= jira_url %>/browse/<%= jira_id %>)
<% end -%>

QA Plan
-------
Provide a detailed QA plan, or other developers will retain the right to mock you mercilessly.

<%= description %>

Deploy Plan
-----------
Does Infrastructure need to know anything special about this deploy? If so, keep this section and fill it in. **Otherwise, delete it.**

Rollback Plan
-------------
**If this pull request requires anything more complex (e.g., rolling back a migration), you MUST update this section. Otherwise, delete this note.**

To roll back this change, revert the merge with `git revert -m 1 MERGE_SHA` and perform another deploy.

URLs
----
<% pivotal_ids.each do |pivotal_id| -%>
* [pivotal tracker story <%= pivotal_id %>](https://www.pivotaltracker.com/story/show/<%= pivotal_id %>)
<% end -%>
<% jira_ids.each do |jira_id| -%>
* [Jira issue <%= jira_id %>](<%= jira_url %>/browse/<%= jira_id %>)
<% end -%>

QA Plan
-------
Provide a detailed QA plan, or other developers will retain the right to mock you mercilessly.

Fix template to just use the jira url as a base url, the user can decide the protocol


        <img src="/asktheeu-theme/images/logo.png" width="180" height="82" alt="<%= site_name %>">

        <%=link_to _("Download original attachment"), @attachment_url %>

(<%=h @attachment.name_of_content_type %>)

    <%= _('This is an HTML version of an attachment to the Freedom of Information request')%>
    '<%=link_to h(@info_request.title), incoming_message_path(@incoming_message)%>'.

        <img src="/asktheeu-theme/images/logo.png" width="109" height="50" alt="<%= site_name %>">

        <%=link_to _("Download original attachment"), @attachment_url %>

(<%=h @attachment.name_of_content_type %>)

    <%= _('This is an HTML version of an attachment to the Freedom of Information request')%>
    '<%=link_to h(@info_request.title), incoming_message_path(@incoming_message)%>'.

Tweak logo size in HTML view page

Tweak logo size in HTML view page


---
- job:
    name: Trade_Tariff_Reindex_ElsaticSearch
    display-name: Trade_Tariff_Reindex_ElsaticSearch
    project-type: freestyle
    description: '
Drops and rebuilds the search index
'
    builders:
        - shell: |
           "ssh deploy@backend-1.backend 'cd /var/apps/tariff-api && govuk_setenv tariff-api bundle exec rake tariff:reindex'"
    publishers:
        - trigger:
            project: Smokey_Production
    wrappers:
        - ansicolor:
            colormap: xterm
    triggers:
        - timed: '5 6 * * *'
    logrotate:
      artifactNumToKeep: 3

---
- job:
    name: Trade_Tariff_Reindex_ElasticSearch
    display-name: Trade_Tariff_Reindex_ElasticSearch
    project-type: freestyle
    description: '
Drops and rebuilds the search index
'
    builders:
        - shell: |
           ssh deploy@backend-1.backend 'cd /var/apps/tariff-api && govuk_setenv tariff-api bundle exec rake tariff:reindex'
    publishers:
        - trigger:
            project: Smokey_Production
    wrappers:
        - ansicolor:
            colormap: xterm
    triggers:
        - timed: '5 6 * * *'
    logrotate:
      artifactNumToKeep: 3

Fix JJB template for trade_tariff shell command.

This does not need double quotes.


<%= link_to pr[:html_url], class: "list-group-item"  do %>

      <%= "##{pr[:number]} - #{pr[:title]}" %>

      <%= image_tag pr[:user][:avatar_url], class: "pr-avatar pull-right" %>

<% end %>

<%= link_to pr[:html_url], class: "list-group-item", target: '_blank'  do %>

      <%= "##{pr[:number]} - #{pr[:title]}" %>

      <%= image_tag pr[:user][:avatar_url], class: "pr-avatar pull-right" %>

<% end %>

Add target blank to PR links

Add target blank to PR links


<%= javascript_include_tag "rickshaw" %>
<%= javascript_include_tag "underscore.min" %>
<%= stylesheet_link_tag    "graphs_stacked" %>

		<% (1..@metrics.length-1).each do |n| %>
			<div class="axis1" id="axis<%=n%>" style="left: <%= 700 + 40 * n %>px" >
				<div class="stub stub_right" id="axis<%=n%>_stub">

		<% end %>

Add waiting spinner for stacked graphs

Add waiting spinner for stacked graphs


<script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?v=3.4&appid=<%= Setting.get(:services, :yahoo) %>"></script>
<script type="text/javascript">
  var address = <%= @group.location.inspect %>;
  map_loaded = false;
  function load_map() {
    if(map_loaded) return;
    map_loaded = true;
    var map = new YMap($('map'));
    map.drawZoomAndCenter(address, 6);
    map.addZoomLong();
    map.setMapType(YAHOO_MAP_REG);
    var img = new YImage();
    img.src = '/images/map_marker.gif';
    img.size = new YSize(16, 28);
    var marker = new YMarker(address, img);
    map.addOverlay(marker);
    map.addTypeControl();
    map.disableKeyControls();
  }
  if(typeof(hide_map) == 'undefined' || !hide_map) {
    Element.show('map-container')
    onload = load_map;
  }
</script>

<script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?v=3.4&appid=<%= Setting.get(:services, :yahoo) %>"></script>
<script type="text/javascript">
  var address = <%= @group.location.inspect %>;
  map_loaded = false;
  function load_map() {
    if(map_loaded) return;
    map_loaded = true;
    var map = new YMap($('map'));
    map.drawZoomAndCenter(address, 6);
    map.addZoomLong();
    map.setMapType(YAHOO_MAP_REG);
    var img = new YImage();
    img.src = '/images/map_marker.gif';
    img.size = new YSize(16, 28);
    var marker = new YMarker(address, img);
    map.addOverlay(marker);
    map.addTypeControl();
    map.disableKeyControls();
  }
  if(typeof(hide_map) == 'undefined' || !hide_map) {
    $('#map-container').show();
    onload = load_map;
  }
</script>

Use jQuery to show map on group page.

Use jQuery to show map on group page.


#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX)

# use the same as for the users-agreed template
export PGPASSFILE=/etc/replication/users-agreed.conf

echo "# user IDs of deleted users. " > $T/users_deleted
psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted

if cmp -s "${T}/users_deleted" "/store/planet/users_deleted.txt"; then
  : # do nothing
else
  cp $T/users_deleted /store/planet/users_deleted.txt
fi

rm -rf $T

#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX)

# use the same as for the users-agreed template
export PGPASSFILE=/etc/replication/users-agreed.conf

echo "# user IDs of deleted users. " > $T/users_deleted
psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted

if cmp -s "${T}/users_deleted" "/store/planet/users_deleted/users_deleted.txt"; then
  : # do nothing
else
  cp $T/users_deleted /store/planet/users_deleted/users_deleted.txt
fi

rm -rf $T

Move output down a level

Move output down a level


---
- scm:
    name: smokey_Smokey_Deploy
    scm:
        - git:
            url: git@github.com:alphagov/smokey.git
            branches:
              - main

- job:
    name: Smokey_Deploy
    display-name: Smokey_Deploy
    project-type: freestyle
    properties:
        - build-discarder:
            days-to-keep: 30
            artifact-num-to-keep: 5
        - github:
            url: https://github.com/alphagov/smokey/
    scm:
      - smokey_Smokey_Deploy
    builders:
        - shell: |
            export DEPLOY_TO=$(govuk_node_list -c monitoring)
            sh -x deploy.sh
    triggers:
        - timed: |
            TZ=Europe/London
            H 9 * * *

---
- scm:
    name: smokey_Smokey_Deploy
    scm:
        - git:
            url: git@github.com:alphagov/smokey.git
            branches:
              - main

- job:
    name: Smokey_Deploy
    display-name: Smokey_Deploy
    project-type: freestyle
    properties:
        - build-discarder:
            days-to-keep: 30
            artifact-num-to-keep: 5
        - github:
            url: https://github.com/alphagov/smokey/
    scm:
      - smokey_Smokey_Deploy
    builders:
        - shell: |
            export DEPLOY_TO=$(govuk_node_list -c monitoring)
            sh -x deploy.sh
            # Deploy to downstream environment using same credentials as Deploy_App_Downstream job
            CRUMB=$(curl https://<%= @jenkins_downstream_api_user %>:<%= @jenkins_downstream_api_password %>@<%= @deploy_url %>/crumbIssuer/api/json | jq --raw-output '. | .crumb')
            curl -f -H "Jenkins-Crumb:$CRUMB" -XPOST https://<%= @jenkins_downstream_api_user %>:<%= @jenkins_downstream_api_password %>@<%= @deploy_url %>/job/Smokey_Deploy/build"
    triggers:
        - timed: |
            TZ=Europe/London
            H 9 * * *

Add downstream deploy steps to Smokey_Deploy job

This is inspired by the Deploy_App_Downstream job and uses the same
credentials when deploying smokey downstream.


127.0.0.1 localhost <%= node['hosts']['localhost_aliases'].join(" ") unless node['hosts']['localhost_aliases'].empty? %>
<%= node['ipaddress'] %> <%= node['fqdn'] %> <%= node['hostname'] %>

<% node['hosts']['entries'].each do |ip, name| -%>
<%= ip %> <%= name %>
<% end -%>

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.0.1 localhost
<%= node['ipaddress'] %> <%= node['fqdn'] %> <%= node['hostname'] %> <%= node['hosts']['localhost_aliases'].join(' ') unless node['hosts']['localhost_aliases'].empty? %>

<% node['hosts']['entries'].each do |ip, name| -%>
<%= ip %> <%= name %>
<% end -%>

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Make the aliases use the external ip address


<%= @udl_module.title %>

      <%= render 'edit_module_form' %>

      <%= link_to 'Show', @udl_module %> |
      <%= link_to 'Back', udl_modules_path %>

<%= @udl_module.title %>

      <%= render 'edit_module_form' %>

      <%= link_to(
            fa_icon( 'arrow-left', text: 'Back to module' ),
            @udl_module
          ) %>

Add navigation button to module edit view.

Adds a "back to module" navigation button to the
app/views/udl_modules/edit.html.erb file.


#!/bin/bash

#Create a colourful prompt
color_prompt=yes

#Put the path in the title, put the bash history number in yellow and the current path in green
PS1='\[\033]0;\w\a\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[0m\]\$ '

#Make directories pink so they are easier to see
LS_COLORS='di=0;35';
export LS_COLORS

#Add colour output to some useful commands
alias ls="ls --color"
alias grep="grep --color"

#Cache the output of the compiler to save time when compiling a file which has not been changed since the last compile
export USE_CCACHE=1

#!/bin/bash

#Create a colourful prompt
color_prompt=yes

#Put the path in the title, put the bash history number in yellow and the current path in green
PS1='\[\033]0;\w\a\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[0m\]\$ '

#Make directories pink so they are easier to see
LS_COLORS='di=0;35';
export LS_COLORS

#Add colour output to some useful commands
alias ls="ls --color"
alias grep="grep --color"
alias repo="repo --time"

#Cache the output of the compiler to save time when compiling a file which has not been changed since the last compile
export USE_CCACHE=1

Add the --time option to all repo commands via an alias


<?php

$config = array(
    'site_dir' => 'default',
    'base_url' => "http://<%= @site_name %>/",
    'mysql' => array(
        'username' => "<%= scope['::crm::db_user'] %>",
        'password' => "<%= scope['::crm::db_pass'] %>",
        'server' => '127.0.0.1',
        'database' => "<%= scope['::crm::civicrm_db'] %>",
    ),
    'drupal' => array(
        'username' => "<%= scope['::crm::db_user'] %>",
        'password' => "<%= scope['::crm::db_pass'] %>",
        'server' => '127.0.0.1',
        'database' => "<%= scope['::crm::drupal_db'] %>",
    ),
);

global $cmsPath, $crmPath, $installType;
$cmsPath = '<%= @dir %>/drupal';
$crmPath = '<%= @dir %>/civicrm';
$installType = 'drupal';

define( 'VERSION', '7.0' );
define( 'DB_USER', $config['drupal']['username'] );
define( 'DB_PASSWORD', $config['drupal']['password'] );
define( 'DB_HOST', $config['drupal']['server'] );
define( 'DB_NAME', $config['drupal']['database'] );

require_once '<%= @dir %>/civicrm/install/civicrm.php';

civicrm_main( $config );

<?php

$config = array(
    'site_dir' => 'default',
    'base_url' => "http://<%= @site_name %><%= scope['::port_fragment'] %>/",
    'mysql' => array(
        'username' => "<%= scope['::crm::db_user'] %>",
        'password' => "<%= scope['::crm::db_pass'] %>",
        'server' => '127.0.0.1',
        'database' => "<%= scope['::crm::civicrm_db'] %>",
    ),
    'drupal' => array(
        'username' => "<%= scope['::crm::db_user'] %>",
        'password' => "<%= scope['::crm::db_pass'] %>",
        'server' => '127.0.0.1',
        'database' => "<%= scope['::crm::drupal_db'] %>",
    ),
);

global $cmsPath, $crmPath, $installType;
$cmsPath = '<%= @dir %>/drupal';
$crmPath = '<%= @dir %>/civicrm';
$installType = 'drupal';

define( 'VERSION', '7.0' );
define( 'DB_USER', $config['drupal']['username'] );
define( 'DB_PASSWORD', $config['drupal']['password'] );
define( 'DB_HOST', $config['drupal']['server'] );
define( 'DB_NAME', $config['drupal']['database'] );

require_once '<%= @dir %>/civicrm/install/civicrm.php';

civicrm_main( $config );

Include port in CiviCRM base URL

Fundraising: Include port in CiviCRM base URL

Change-Id: I0453102e0e7c232fcffac093edf57ef8e0edba55


<!DOCTYPE html>
<html>
<head>
  <title>Dummy</title>
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>

<!DOCTYPE html>

<title>Dummy</title>
<%= javascript_include_tag "/angular.min.js" %>
<%= javascript_include_tag "application" %>

Angular

  {{version}}

Template Cache

  {{info}}

Add AngularJS 1.2.16 and a trivial app to the Dummy App

- angular is not in the manifest, but in dummy/public
- trivial angular app shows how many templates are in the cache, angular version number
- `rackup` in test/dummy to see the demo app


<% text_for :title do %>
  Are you State Pension age or over?
<% end %>

<% text_for :hint do %>
  You can check your state pension age if you're not sure (opens in a new tab).
<% end %>

<% options(
    "yes": "Yes",
    "no": "No",
  )
%>

<% text_for :title do %>
  Are you State Pension age or over?
<% end %>

<% text_for :hint do %>
  You can check your state pension age (opens in new tab) if you're not sure.
<% end %>

<% options(
    "yes": "Yes",
    "no": "No",
  )
%>

Move (opens in new tab) to be part of the link

Better for accessibility and inkeeping with design system recommendations: https://design-system.service.gov.uk/styles/typography/#links.


#! /bin/sh

# Installed by Chef => graylog2::default.rb

### BEGIN INIT INFO
# Provides:          graylog2-server
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the graylog2 server
# Description:       starts the graylog2 java server using the graylog2 control script
### END INIT INFO

BINDIR=<%= node[:graylog2][:server_home] %>/bin
NAME=graylog2-server
DESC=graylog2-server

test -x /usr/bin/java || exit 0

set -e

case "$1" in
  start)
    echo -n "Starting $DESC: "
    cd $BINDIR
    ./graylog2ctl start
    echo "...started."
  ;;
  stop)
    echo -n "Stopping $DESC: "
    cd $BINDIR
    ./graylog2ctl stop
    echo "...stopped."
  ;;
  status)
    echo -n "Restarting $DESC: "
    cd $BINDIR
    ./graylog2ctl status
  ;;
  restart)
    echo -n "Restarting $DESC: "
    cd $BINDIR
    ./graylog2ctl restart
    echo "...restarted."
  ;;
  *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart}" >&2
    exit 1
  ;;
esac

exit 0

#! /bin/sh

# Installed by Chef => graylog2::default.rb

### BEGIN INIT INFO
# Provides:          graylog2-server
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the graylog2 server
# Description:       starts the graylog2 java server using the graylog2 control script
### END INIT INFO

BINDIR=<%= node[:graylog2][:server_home] %>/bin
NAME=graylog2-server
DESC=graylog2-server

test -x /usr/bin/java || exit 0

set -e

case "$1" in
  start)
    echo -n "Starting $DESC: "
    cd $BINDIR
    su - <%= node[:graylog2][:server_user] %> -c "./graylog2ctl start"
    echo "...started."
  ;;
  stop)
    echo -n "Stopping $DESC: "
    cd $BINDIR
    su - <%= node[:graylog2][:server_user] %> -c "./graylog2ctl stop"
    echo "...stopped."
  ;;
  status)
    echo -n "Restarting $DESC: "
    cd $BINDIR
    su - <%= node[:graylog2][:server_user] %> -c "./graylog2ctl status"
  ;;
  restart)
    echo -n "Restarting $DESC: "
    cd $BINDIR
    su - <%= node[:graylog2][:server_user] %> -c "./graylog2ctl restart"
    echo "...restarted."
  ;;
  *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart}" >&2
    exit 1
  ;;
esac

exit 0

Allow graylog2-server to be started under specified user


Visiting Usergroups

We're collecting a list of all the user groups attending RailsConf:

	  Name
	  Twitter
	  URL
	  Austin on Rails
	  @austinonrails
	  austinonrails.org

   add a user group here!

Visiting Usergroups

We're collecting a list of all the user groups attending RailsConf:

	  Name
	  Twitter
	  URL
	  Austin on Rails
	  @austinonrails
	  austinonrails.org
	  Atlanta Ruby Users Group
	  @atlrug

   add a user group here!

Add ATLRUG to Usergroups page

Add ATLRUG to Usergroups page


<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <% if request.requester == current_user || request.responder == current_user %>
      <%= link_to "Initiate Chat", request_messages_path(request) %>
    <% else %>

Someone is already being a neighbor to <%= request.requester.first_name%>. Thanks for checking!  <%= button_to 'Return to Home', root_path %>
    <% end %>
  <% end %>

<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <%= link_to "Initiate Chat", request_messages_path(request) %>
  <% end %>

Refactor layout in the request partial, using the assumption that 1) the request is active and 2) if the request has two parties, only those belong to that party can see the request.


<%= form_for controller, method: :post, url: url do |f| %>
  <fieldset class="country-picker js-country-picker box font-xsmall">

      <%= f.label :country, 'Trade between the UK and' %>
      <%= f.hidden_field :anchor, value: anchor %>
      <%= f.select :country, f.object.countries.map{ |c| [c.long_description, c.id] }, { include_blank: 'All countries' }, class: 'js-country-picker-select' %>
      Reset to all countries

    <%= f.button 'Set country', class: 'button search-submit' %>
  </fieldset>
<% end %>

<%= form_for controller, method: :post, url: url, namespace: anchor do |f| %>
  <fieldset class="country-picker js-country-picker box font-xsmall">

      <%= f.hidden_field :anchor, value: anchor %>
      <%= f.label :country, 'Trade between the UK and' %>
      <%= f.select :country, f.object.countries.map{ |c| [c.long_description, c.id] }, { include_blank: 'All countries' }, class: 'js-country-picker-select' %>
      Reset to all countries

    <%= f.button 'Set country', class: 'button search-submit' %>
  </fieldset>
<% end %>

Add namespace to avoid id collisions

Add namespace to avoid id collisions


Home page

<%= link_to "Sign in", new_user_session_path %>

This is a default home page.

Add a link to sign up in home page

Add a link to sign up in home page


    <% if student.for_hire? %>

    <% end %>

  <%= student.name %>
  <%= student.skills %>

  <% unless current_user.admin? %>
    <% if current_user.has_contacted? student %>
        <button class="btn disabled">Pending</button>
      <% else %>
        <%= button_to "Contact",
          { controller: "relationships", action: "create", student_id: student.id },
          class: "btn btn-primary", form_class: "contact-button" %>
      <% end %>

  <% end %>

    <% if student.for_hire? %>

    <% end %>

  <%= link_to student.name, student_path(student) %>
  <%= student.skills %>

  <% unless current_user.admin? %>
    <% if current_user.has_contacted? student %>
        <button class="btn disabled">Pending</button>
      <% else %>
        <%= button_to "Contact",
          { controller: "relationships", action: "create", student_id: student.id },
          class: "btn btn-primary", form_class: "contact-button" %>
      <% end %>

  <% end %>

Make student name a link in students index view


Refinery::I18n.frontend_locales.each do |lang|
  I18n.locale = lang

  Refinery::User.find_each do |user|
    user.plugins.where(name: 'refinerycms-<%= namespacing.underscore %>').first_or_create!(
      position: (user.plugins.maximum(:position) || -1) +1
    )
  end if defined?(Refinery::User)

<% unless skip_frontend? -%>
  Refinery::Page.where(link_url: (url = "/<%= [(namespacing.underscore if namespacing.underscore != plural_name), plural_name].compact.join('/') %>")).first_or_create!(
    title: '<%= class_name.pluralize.underscore.titleize %>',
    deletable: false,
    menu_match: "^#{url}(\/|\/.+?|)$"
  ) do |page|
    Refinery::Pages.default_parts.each_with_index do |part, index|
      page.parts.build title: part, body: nil, position: index
    end
  end if defined?(Refinery::Page)
<% end -%>
end

Refinery::I18n.frontend_locales.each do |lang|
  I18n.locale = lang

  Refinery::User.find_each do |user|
    user.plugins.where(name: 'refinerycms-<%= namespacing.underscore %>').first_or_create!(
      position: (user.plugins.maximum(:position) || -1) +1
    )
  end if defined?(Refinery::User)

<% unless skip_frontend? -%>
  Refinery::Page.where(link_url: (url = "/<%= [(namespacing.underscore if namespacing.underscore != plural_name), plural_name].compact.join('/') %>")).first_or_create!(
    title: '<%= class_name.pluralize.underscore.titleize %>',
    deletable: false,
    menu_match: "^#{url}(\/|\/.+?|)$"
  ) do |page|
    Refinery::Pages.default_parts.each_with_index do |part, index|
      page.parts.build title: part[:title], slug: part[:slug], body: nil, position: index
    end
  end if defined?(Refinery::Page)
<% end -%>
end

Add slug in generated seeds

Add slug in generated seeds


---
title: Condition Variables
category:
topic: Concurrency
date: 2016-09-20 06:15:06 UTC
---

## Condition Variables

---
title: Condition Variables
category:
topic: Concurrency
date: 2016-09-20 06:15:06 UTC
published: false
---

## Condition Variables

Unpublish empty post on condition variables


// see https://www.mediawiki.org/wiki/Extension:Flow
$wgFlowForceTemplateRecompile = true; // always recompile in dev mode
$wgFlowContentFormat = 'html'; // Parsoid dependency
$wgFlowOccupyPages = array (
	'Talk:Flow QA', // used by Flow extension's browser tests
	'Talk:Sandbox',
);
$wgFlowOccupyNamespaces = array( NS_USER_TALK );
$wgFlowParsoidURL = 'http://localhost:<%= scope['mediawiki::parsoid::port'] %>';
$wgFlowParsoidPrefix = 'localhost';
$wgFlowParsoidTimeout = 100;

// see https://www.mediawiki.org/wiki/Extension:Flow
$wgFlowServerCompileTemplates = true; // always recompile in dev mode
$wgFlowContentFormat = 'html'; // Parsoid dependency
$wgFlowOccupyPages = array (
	'Talk:Flow QA', // used by Flow extension's browser tests
	'Talk:Sandbox',
);
$wgFlowOccupyNamespaces = array( NS_USER_TALK );
$wgFlowParsoidURL = 'http://localhost:<%= scope['mediawiki::parsoid::port'] %>';
$wgFlowParsoidPrefix = 'localhost';
$wgFlowParsoidTimeout = 100;

Fix Flow config variable for template compilation

Change-Id: If950a2d5bac6234d021a50b7242dc182d7d7d610


# DO NOT EDIT - This file is being maintained by Chef

Host *
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

Host *.oob
    HostKeyAlgorithms ssh-rsa,ssh-dss

Host *.oob.openstreetmap.org
    HostKeyAlgorithms ssh-rsa,ssh-dss

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Protocol 2
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes

Revert to default ssh client configuration

The HP ILO cards that needed custom configuration are long gone.


<%= form_tag(games_path, :method => "get", id: "search-form") do %>

				<%= text_field_tag :query, params[:search], placeholder: "Search Games", class: "form-control" %>

					<%= submit_tag "Search" , class: "btn btn-default"%>

<% end %>

Available Games

<%= form_tag(games_mooch_path, :method => "get") do %>
	<%= select_tag "selectImage", options_for_select(@games.map  { |game| [{ data: { 'img-src': game.url } }, if game.user.username? then "#{game.title}
 #{game.user.username}" else  "#{game.title}
 #{game.user.email}" end , [ 'id' => game.id, 'name' =>  game.title, 'cover' => game.url, 'owner' => game.user.email ] ] }), multiple: true, class: 'image-picker show-labels show-html'%>

		<%= submit_tag "Mooch Games", class: "btn btn-primary btn-lg btn-block" %>

<% end %>

	<%= will_paginate %>

Add search form at games index page

Add search form at games index page


<% if object.present? && object.asset.present? %>
  <% max_img_size = object.max_image_size %>

  <% if object.url.present? %>
    <%= link_to object.url do %>
      <% if object.disallow_resize? %>
        <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
      <% else %>
        <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
      <% end %>
    <% end %>

  <% else %>
    <% if object.disallow_resize? %>
      <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
    <% else %>
      <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
    <% end %>
  <% end %>

  <% if object.caption.present? %>
    <% if Udongo.config.flexible_content.picture_caption_editor? %>

        <%= object.caption.html_safe %>

    <% else %>

        <%= object.caption %>

    <% end %>
  <% end %>
<% end %>

<% if object.present? && object.asset.present? %>
  <% max_img_size = object.max_image_size %>

  <% if object.url.present? %>
    <%= link_to object.url, target: object.target do %>
      <% if object.disallow_resize? %>
        <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
      <% else %>
        <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
      <% end %>
    <% end %>

  <% else %>
    <% if object.disallow_resize? %>
      <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
    <% else %>
      <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
    <% end %>
  <% end %>

  <% if object.caption.present? %>
    <% if Udongo.config.flexible_content.picture_caption_editor? %>

        <%= object.caption.html_safe %>

    <% else %>

        <%= object.caption %>

    <% end %>
  <% end %>
<% end %>

Use the content picture target when there's a link set.


/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.keycloak.qualified_gwt_token_service_impl_name) %>;

@javax.annotation.Generated( "Domgen" )
public class <%= repository.keycloak.gwt_token_service_impl_name %>
  implements <%= repository.keycloak.qualified_gwt_token_service_name %>
{
  @javax.annotation.Nonnull
  private final org.realityforge.gwt.keycloak.Keycloak _keycloak;

  @javax.inject.Inject
  public <%= repository.keycloak.gwt_token_service_impl_name %>( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  {
    _keycloak = java.util.Objects.requireNonNull( keycloak );
  }
<% repository.keycloak.clients.select{|client| !client.bearer_only?}.each do |client| -%>

  @java.lang.Override
  @javax.annotation.Nullable
  public <%= client.qualified_token_name %> find<%= client.qualified_type_name %>Token()
  {
    return _keycloak.getParsedToken();
  }

  @java.lang.Override
  @javax.annotation.Nullable
  public <%= client.qualified_id_token_name %> find<%= client.qualified_type_name %>IdToken()
  {
    return _keycloak.getParsedIDToken();
  }
<% end -%>
}

/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.keycloak.qualified_gwt_token_service_impl_name) %>;

@javax.annotation.Generated( "Domgen" )
public class <%= repository.keycloak.gwt_token_service_impl_name %>
  implements <%= repository.keycloak.qualified_gwt_token_service_name %>
{
  @javax.annotation.Nonnull
  private final org.realityforge.gwt.keycloak.Keycloak _keycloak;

  @javax.inject.Inject
  <%= repository.keycloak.gwt_token_service_impl_name %>( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  {
    _keycloak = java.util.Objects.requireNonNull( keycloak );
  }
<% repository.keycloak.clients.select{|client| !client.bearer_only?}.each do |client| -%>

  @java.lang.Override
  @javax.annotation.Nullable
  public <%= client.qualified_token_name %> find<%= client.qualified_type_name %>Token()
  {
    return _keycloak.getParsedToken();
  }

  @java.lang.Override
  @javax.annotation.Nullable
  public <%= client.qualified_id_token_name %> find<%= client.qualified_type_name %>IdToken()
  {
    return _keycloak.getParsedIDToken();
  }
<% end -%>
}

Remove unnecessary public qualifier from constructor


<%- unless omit_comments? -%>
# ApplicationResource is similar to ApplicationRecord - a base class that
# holds configuration/methods for subclasses.
# All Resources should inherit from ApplicationResource.
<%- end -%>
class ApplicationResource < Graphiti::Resource
  <%- unless omit_comments? -%>
  # Use the ActiveRecord Adapter for all subclasses.
  # Subclasses can still override this default.
  <%- end -%>
  self.abstract_class = true
  self.adapter = Graphiti::Adapters::ActiveRecord
  self.base_url = Rails.application.routes.default_url_options[:host]
  self.endpoint_namespace = '<%= api_namespace %>'

  def self.default_attributes(opts = { })
    begin
      unless opts[:from] <= ApplicationRecord
        raise "Unable to set #{self} default_attributes from #{opts[:from]}. #{opts[:from]} must be a kind of ApplicationRecord"
      end
      klass = opts[:from]
      if klass.table_exists?
        klass.columns.each do |c|
          attribute c.name.to_sym, c.type
        end
      end
    rescue => e
      Rails.logger.error e.message
    end
  end
end

<%- unless omit_comments? -%>
# ApplicationResource is similar to ApplicationRecord - a base class that
# holds configuration/methods for subclasses.
# All Resources should inherit from ApplicationResource.
<%- end -%>
class ApplicationResource < Graphiti::Resource
  <%- unless omit_comments? -%>
  # Use the ActiveRecord Adapter for all subclasses.
  # Subclasses can still override this default.
  <%- end -%>
  self.abstract_class = true
  self.adapter = Graphiti::Adapters::ActiveRecord
  self.base_url = Rails.application.routes.default_url_options[:host]
  self.endpoint_namespace = '<%= api_namespace %>'

  def self.default_attributes(opts = { })
    begin
      unless opts[:from].kind_of?(Class) && opts[:from] <= ApplicationRecord
        raise "Unable to set #{self} default_attributes from #{opts[:from].inspect}. #{opts[:from].inspect} must be a kind of ApplicationRecord"
      end
      klass = opts[:from]
      if klass.table_exists?
        klass.columns.each do |c|
          attribute c.name.to_sym, c.type
        end
      end
    rescue => e
      Rails.logger.error e.message
    end
  end
end

Make sure that the option :from is a Class before comparing


<%= render 'requests/user_actions/menu' %>

<%= @rid.request_type %> <%= @rid.url %>

Request Headers

      <% @request_data['headers'].each do |header_name, header_value| %>

          <%= header_name %>: <%= header_value %>

      <% end %>

Response Headers

      <% @response_data['headers'].each do |header_name, header_value| %>

          <%= format_http_header header_name %>: <%= header_value %>

      <% end %>

    <% unless @request_type == 'HEAD' %>

Body

        <% if json_response? %>

<%= JSON.pretty_generate(JSON.parse(@response_data['body'])) %>

        <% else %>

<%= h @response_data['body'] %>

        <% end %>

    <% end %>

<%= render 'requests/user_actions/menu' %>

<%= @rid.request_type %> <%= @rid.url %>

Request Headers

      <% @request_data['headers'].each do |header_name, header_value| %>

          <%= header_name %>: <%= header_value %>

      <% end %>

Response Headers

      <% @response_data['headers'].each do |header_name, header_value| %>

          <%= format_http_header(header_name) %>: <%= header_value %>

      <% end %>

    <% unless @request_type == 'HEAD' %>

Body

        <% if json_response? %>

<%= JSON.pretty_generate(JSON.parse(@response_data['body'])) %>

        <% else %>

<%= h @response_data['body'] %>

        <% end %>

    <% end %>

Add some parentheses around custom method calls


$(document).ready(function() {
  if ($("#product_taxon_ids").length > 0) {
    $("#product_taxon_ids").select2({
      placeholder: Spree.translations.taxon_placeholder,
      multiple: true,
      initSelection: function(element, callback) {
        return $.getJSON(Spree.routes.taxons_search + "?ids=" + (element.val()), null, function(data) {
          return callback(data);
        })
      },
      ajax: {
        url: Spree.routes.taxons_search,
        datatype: 'json',
        data: function(term, page) {
          return { q: term }
        },
        results: function (data, page) {
          return { results: data }
        }
      },
      formatResult: function(taxon) {
        return taxon.pretty_name
      },
      formatSelection: function(taxon) {
        return taxon.pretty_name
      }
    })
  }
})

$(document).ready(function() {
  if ($("#product_taxon_ids").length > 0) {
    $("#product_taxon_ids").select2({
      placeholder: Spree.translations.taxon_placeholder,
      multiple: true,
      initSelection: function(element, callback) {
        return $.getJSON(Spree.routes.taxons_search + "?ids=" + (element.val()), null, function(data) {
          return callback(data);
        })
      },
      ajax: {
        url: Spree.routes.taxons_search,
        datatype: 'json',
        data: function(term, page) {
          return { q:
            { name_cont: term }
          }
        },
        results: function (data, page) {
          return { results: data }
        }
      },
      formatResult: function(taxon) {
        return taxon.pretty_name
      },
      formatSelection: function(taxon) {
        return taxon.pretty_name
      }
    })
  }
})

Correct parameter parsing for taxon_autocomplete


// ***************** Basic Mixer Settings ***********************
function startMixer(){
  var activeMix = new Wad.Poly({
  })
  return activeMix
}

function loadSound(mix, trackId, divId) {
  //var tracktoAdd =  eventually this will look up track from server based on id

  var trackSource = _.find(sounds, function(sound) {
    return sound.id === trackId
  });

  var trackToAdd = new Wad({
    source: trackSource.src,
    env: {hold: 9001}
  });

  mix.add(trackToAdd);
  mostRecent = _.last(mix.wads);
  mostRecent.label = divId;

  var targetDiv = _.find($("div"), function(div) {
    return Number($(div).attr("id")) === divId;
  });

  $(targetDiv).append("<p>" + trackSource.name + "</p>")
  $(targetDiv).attr("track-id", trackId)
}

var sounds = [];

Fix file additions that were lost in commit


<%# Requires parameter efforts %>

    <%= "#{@presenter.full_name}'s efforts:" %>
    From
    Finish Time
    <% if current_user&.admin? %>
        Actions
    <% end %>

    <% efforts.each do |effort| %>
      <tr class="<%= data_status_text_class[effort.data_status] %>">
      <%= link_to effort.event.name, effort_path(effort) %>
      <%= effort.state_and_country %>
      <%= effort.finish_status %>
      <% if current_user&.admin? %>
          <%= link_to 'Disassociate',
                                             effort_path(effort, effort: {person_id: nil}, button: :disassociate),
                                             method: :patch,
                                             class: 'btn btn-xs btn-danger' %>
      <% end %>

  <% end %>

<%# Requires parameter efforts %>

    <%= "#{@presenter.full_name}'s efforts:" %>
    From
    Finish Time
    <% if current_user&.admin? %>
        Actions
    <% end %>

    <% efforts.each do |effort| %>

      <%= link_to effort.event.name, effort_path(effort) %>
      <%= effort.state_and_country %>
      <%= text_with_status_indicator(effort.finish_status, effort.data_status, data_type: :effort_time_data) %>
      <% if current_user&.admin? %>
          <%= link_to 'Disassociate',
                                             effort_path(effort, effort: {person_id: nil}, button: :disassociate),
                                             method: :patch,
                                             class: 'btn btn-xs btn-danger' %>
      <% end %>

  <% end %>

Remove status color in favor of indicator in efforts list person partial


  <fieldset>

      <%= f.label :question_type %>

      <%= f.select(:question_type, options_for_select(Settings.question_types)) %>

      <%= f.label :question_identifier %>

      <%= f.text_field :question_identifier %>

      <%= f.label :text %>

      <%= f.text_area :text, rows: 4, class: 'form-control' %>

      <%= f.fields_for :options do |builder| %>
        <%= render 'option_fields', f: builder %>
      <% end %>

      <%= link_to_add_fields "Add Option", f, :options, class: 'pull-right btn btn-success' %>
      <%= link_to "Remove Question", '#', class: "btn btn-danger remove_fields" %>

  </fieldset>

  <fieldset>

      <%= f.label :question_type %>

      <%= f.select(:question_type, options_for_select(Settings.question_types, f.object.question_type)) %>

      <%= f.label :question_identifier %>

      <%= f.text_field :question_identifier %>

      <%= f.label :text %>

      <%= f.text_area :text, rows: 4, class: 'form-control' %>

      <%= f.fields_for :options do |builder| %>
        <%= render 'option_fields', f: builder %>
      <% end %>

      <%= link_to_add_fields "Add Option", f, :options, class: 'pull-right btn btn-success' %>
      <%= link_to "Remove Question", '#', class: "btn btn-danger remove_fields" %>

  </fieldset>

Fix question type bug in instrument form


    Challenges

<% if @challenges.empty? %>

 There aren't any publicly visible challenges at this time.

<% else %>

        Challenge
        Status

      <% @challenges.each do |challenge| %>
        <tr class="<%= cycle "odd", "even" %>">
          <%= challenge.i_statement %>
          <%= challenge.status %>

      <% end %>

<% end %>

Create view for publicly visible challenges


  <%= fa_icon 'archive' %>
  <%= link_to 'Package Managers', platforms_path %>

  <% @platforms.each do |platform| %>
    <% next if platform.term.downcase == 'go' %>
    <a class="pictogram tip pictogram-<%= platform.term.downcase %>" href='<%= platform.term %>' title='<%= platform.term %>'>
  <% end %>

  <%= fa_icon 'code' %>
  <%= link_to 'Package Languages', languages_path %>

  <% @languages.each do |language| %>
    <a class="pictogram tip pictogram-<%= language.term.downcase %>" title='<%= language.term %>'>
  <% end %>

  <%= fa_icon 'gavel' %>
  <%= link_to 'Package Licenses', licenses_path %>

<%= render partial: 'licenses/list_license', collection: @licenses, as: :license %>

  <%= fa_icon 'tags' %>
  <%= link_to 'Package Keywords', keywords_path %>

<%= render partial: 'keywords/list_keyword', collection: @keywords, as: :keyword %>

  <%= fa_icon 'archive' %>
  <%= link_to 'Package Managers', platforms_path %>

  <% @platforms.each do |platform| %>
    <% next if platform.term.downcase == 'go' %>
    <a class="pictogram tip pictogram-<%= platform.term.downcase %>" href='<%= platform.term %>' title='<%= platform.term %>'>
  <% end %>

  <%= fa_icon 'code' %>
  <%= link_to 'Popular Languages', languages_path %>

  <% @languages.each do |language| %>
    <a class="pictogram tip pictogram-<%= language.term.downcase %>" title='<%= language.term %>'>
  <% end %>

  <%= fa_icon 'gavel' %>
  <%= link_to 'Popular Licenses', licenses_path %>

<%= render partial: 'licenses/list_license', collection: @licenses, as: :license %>

  <%= fa_icon 'tags' %>
  <%= link_to 'Popular Keywords', keywords_path %>

<%= render partial: 'keywords/list_keyword', collection: @keywords, as: :keyword %>

Fix copy-pasta in explore sidebar

Fix copy-pasta in explore sidebar


<!DOCTYPE html>

  <%= partial "head" %>

    <%= partial "navbar" %>

<%= current_page.data.title %>

<%= current_page.data.date.strftime('%e %B %Y') %> by <a href="/about-me/" alt="<%= blog_author %>" title="<%= blog_author %>"><%= blog_author %> | <a href="<%= URI.join(site_root_uri, current_page.url) %>#disqus_thread">0 comments

<%= partial "facebook" %> <%= partial "twittershare" %> <%= partial "googleplus" %>

        <%= yield %>

<%= partial "facebook" %> <%= partial "twittershare" %> <%= partial "googleplus" %>

        <%= partial "footer" %>

    <%= partial "aside" %>
    <%= partial "scripts" %>
    <%= partial "analytics" %>
    <%= partial "disquscount" %>
    <%= partial "disqusthread" %>

<%= partial "version" %>

<!DOCTYPE html>

  <%= partial "head" %>

    <%= partial "navbar" %>

<%= current_page.data.title %>

<%= current_page.data.description %>

<%= current_page.data.date.strftime('%e %B %Y') %> by <a href="/about-me/" alt="<%= blog_author %>" title="<%= blog_author %>"><%= blog_author %> | <a href="<%= URI.join(site_root_uri, current_page.url) %>#disqus_thread">0 comments

<%= partial "facebook" %> <%= partial "twittershare" %> <%= partial "googleplus" %>

        <%= yield %>

<%= partial "facebook" %> <%= partial "twittershare" %> <%= partial "googleplus" %>

        <%= partial "footer" %>

    <%= partial "aside" %>
    <%= partial "scripts" %>
    <%= partial "analytics" %>
    <%= partial "disquscount" %>
    <%= partial "disqusthread" %>

<%= partial "version" %>

Use Jumbotron for blog post titles and use description as lead text.


<fieldset class="named logo form-horizontal">
  <legend>Logo</legend>

      <%= classification_form.text_field :logo_alt_text %>
      <%= classification_form.file_field :logo %>
      <% if classification_form.object.logo_cache.present? %>
        <%= File.basename(classification_form.object.logo_cache) %> already uploaded
      <% end %>
      <%= classification_form.hidden_field :logo_cache %>

</fieldset>

<fieldset class="named logo form-horizontal">
  <legend>Logo</legend>

    <%= image_tag classification_form.object.logo_url if classification_form.object.logo_url %>
    <%= classification_form.text_field :logo_alt_text, label_text: 'Alt text' %>
    <%= classification_form.label :image, 'File' %>
    <%= classification_form.file_field :logo %>
    <% if classification_form.object.logo_cache.present? %>
      <%= File.basename(classification_form.object.logo_cache) %> already uploaded
    <% end %>
    <%= classification_form.hidden_field :logo_cache %>

</fieldset>

Add user feedback for logos to topical events form

We use the same feedback as the people form.  This may exhibit some
weirdness on live / preview because of the virus checker - but I suspect
it's something we just have to live with for now as it's a problem across
the board, not just localized to this form.


# Hostgroup definitions
#
# Autogenerated by Chef.

define hostgroup {
  hostgroup_name all
  alias all
  members *
}

<% @roles.each do |r| -%>
define hostgroup {
  hostgroup_name <%= r %>
  alias <%= r %>
}

<% end -%>

<% @os.each do |o| -%>
define hostgroup {
  hostgroup_name <%= o %>
  alias <%= o %>
}
<% end -%>

Add host groups for each platform in the chef environment to the host groups file


Currently Online

    <% active_users.each do |user| %>

        <%= user %>

    <% end %>

Currently Online

    <% active_users.each_with_index do |user, index| %>

        <img src="http://api.adorable.io/avatars/40/noreply+<%= index %>@thredded.com.png"
          alt="" class="currently-online--avatar" />

        <%= user %>

    <% end %>

[JRO] Add placeholder avatars for online users

Empty image src tags look a little off so might as well put some fake
stuff in there to flesh it out a little more.


server {
  listen 80 default_server;

  location /__varnish_check__ {
    # This is the varnish upstream defined in the www.gov.uk vhost
    proxy_pass http://varnish;
  }

  location /_healthcheck_www {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck_www-origin {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck_assets-origin {
    return 200;
  }

  # Send the Strict-Transport-Security header
  include /etc/nginx/add-sts.conf;
  # Required for L7 ALB
  location = /_healthcheck {
    return 200;
  }
  location / {
    return 444;
  }
}

server {
  listen 80 default_server;

  location /__varnish_check__ {
    # This is the varnish upstream defined in the www.gov.uk vhost
    proxy_pass http://varnish;
  }

  location /_healthcheck_www {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck-live_www {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck-ready_www {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck_www-origin {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck-live_www-origin {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck-ready_www-origin {
    proxy_pass http://varnish/__varnish_check__;
  }

  location /_healthcheck_assets-origin {
    return 200;
  }

  location /_healthcheck-live_assets-origin {
    return 200;
  }

  location /_healthcheck-ready_assets-origin {
    return 200;
  }

  # Send the Strict-Transport-Security header
  include /etc/nginx/add-sts.conf;
  # Required for L7 ALB
  location = /_healthcheck {
    return 200;
  }
  location = /_healthcheck-live {
    return 200;
  }
  location = /_healthcheck-ready {
    return 200;
  }
  location / {
    return 444;
  }
}

Add healthcheck-live and healthcheck-ready to router default vhost

I don't know if these healthchecks are used anywhere, as there don't
seem to be any alerts in integration that these targets are down (and
www-origin works), but there are AWS LBs configured for them, so let's
add the healthchecks just in case.


<a target="_blank" href="https://sentry.io/govuk/app-<%= @app_name %>/?query=is%3Aunresolved+environment%3A<%= @sentry_environment %>">Errors for <%= @app_name %> (Sentry)

Kibana (Logit)

<a target="_blank" href="https://alert.<%= @app_domain %>/">Icinga

<a target="_blank" href="https://docs.publishing.service.gov.uk/apps/<%= @docs_name %>.html"><%= @app_name %> documentation

Dashboard feedback

Useful links

Useful links

Remove feedback link to deployment dashboards

It doesn't seem to link anywhere and I doubt it's being monitored.


<% text_for :title do %>
  Vaccination status
<% end %>

<% govspeak_for :body do %>
  Approved COVID-19 vaccine programmes
<% end %>

<% text_for :hint do %>
  Select one of the following options:
<% end %>

<% options(
  "3371ccf8123dfadf": "I will have had a second dose of an approved COVID-19 vaccine 14 or more days before I travel",
  "e9e286f8822bc330": "I'm taking part in an approved COVID-19 vaccine trial",
  "529202127233d442": "I cannot have a COVID-19 vaccination for a medical reason approved by a clinician",
  "9ddc7655bfd0d477": "None of the above",
) %>

<% text_for :title do %>
  What is your vaccination status?
<% end %>

<% text_for :hint do %>
  Select one of the following options:
<% end %>

<% options(
  "3371ccf8123dfadf": "I will be fully vaccinated using an approved COVID-19 vaccine 14 or more days before I travel",
  "e9e286f8822bc330": "I'm taking part in an approved COVID-19 vaccine trial",
  "529202127233d442": "I cannot have a COVID-19 vaccination for a medical reason approved by a clinician",
  "9ddc7655bfd0d477": "None of the above",
) %>

<% govspeak_for :post_body do %>
  You do not need a booster vaccine to qualify as fully vaccinated
<% end %>

Update the vaccination status question

Update the vaccination status question


      partial :: <%= link_to 'Conf', '/' %>
      → <%= link_to 'Legal', '/legal' %>
      → <%= link_to 'Conduct', 'http://berlincodeofconduct.org' %>
      → <%= link_to 'Contact', 'mailto:partialconf@gmail.com' %>

      partial :: <%= link_to 'Conf', '/' %>
      → <%= link_to 'Legal', '/legal' %>
      → <%= link_to 'Conduct', 'http://berlincodeofconduct.org' %>
      → <%= link_to 'Contact', 'mailto:hi@partialconf.com' %>

Bring back the fancy mails

Bring back the fancy mails


Add 16-color theme generation for xfce4-terminal.


Designed and developed by

        <%= link_to 'https://sparksolutions.co/', target: :blank, 'aria-label': 'Go to Spark Solutions', rel: :follow do %>
          <%= image_tag 'spark-logo@3x.png', class: 'footer-spree-copyright-logo-spark mx-2', alt: 'Spree Commerce & Ruby on Rails developers', title: 'Spree Commerce & Ruby on Rails developers' %>
        <% end %>

|

        © <%= Time.current.year %>
        <%= link_to current_store.name, "https://#{current_store.url}" %>.
        <%= Spree.t(:all_rights_reserved) %>.

Designed and developed by

        <%= link_to 'https://sparksolutions.co/', target: :_blank, 'aria-label': 'Go to Spark Solutions', rel: :follow do %>
          <%= image_tag 'spark-logo@3x.png', class: 'footer-spree-copyright-logo-spark mx-2', alt: 'Spree Commerce & Ruby on Rails developers', title: 'Spree Commerce & Ruby on Rails developers' %>
        <% end %>

|

        © <%= Time.current.year %>
        <%= link_to current_store.name, "https://#{current_store.url}" %>.
        <%= Spree.t(:all_rights_reserved) %>.

Fix copyright link target attribute

Fix copyright link target attribute

Using just `:blank` doesn't work, it must be `:_blank`.


  <%= user_can_vote answer %>

    <%= raw answer.body %>

     <%= link_to t(:edit, scope: :answers), edit_question_answer_path(answer.question, answer) %>

        <%= t(:asked, scope: :questions, time: time_ago_in_words(answer.created_at.to_datetime)) %>

      <%= answer.user.username %>

      <%= link_to t(:add_comment, scope: :answers), new_question_answer_answer_comment_path(answer.question, answer) %>

      <%= render answer.answer_comments %>

  <%= user_can_vote answer %>

    <%= auto_link(simple_format(answer.body)) %>

     <%= link_to t(:edit, scope: :answers), edit_question_answer_path(answer.question, answer) %>

        <%= t(:asked, scope: :questions, time: time_ago_in_words(answer.created_at.to_datetime)) %>

      <%= answer.user.username %>

      <%= link_to t(:add_comment, scope: :answers), new_question_answer_answer_comment_path(answer.question, answer) %>

      <%= render answer.answer_comments %>

Fix links not working in answers body

Fix links not working in answers body


  Write It
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">

  </button>

      <% if user_signed_in? %>

          Welcome, <%= current_user.username %>!

          <%= link_to("Logout", destroy_user_session_path, method: :delete, class: "nav-link") %>

      <% else %>

          <%= link_to("Log In", new_user_session_path, class: "nav-link") %>

          <%= link_to("Sign Up", new_user_registration_path, class: "nav-link") %>

      <% end %>

Make site title link to index

Make site title link to index


<img src="<%=result[:image]%>">

Restaurant Name

<%=result[:name]%>

Category

		      <%=result[:categories]%>

Location

<%=result[:location][0]%>

<%=result[:location][2]%>

	      Rating
	      <img src="<%=result[:rating]%>">

Current wait time

89

minute(s)

	  <a href="/restaurants/<%= result[:id] %>" class="result-button">Sign Waitlist
	  See More

<img src="<%=result[:image]%>">

Restaurant Name

<%=result[:name]%>

Category

		      <%=result[:categories]%>

Location

<%=result[:location][0]%>

<%=result[:location][2]%>

	      Rating
	      <img src="<%=result[:rating]%>">

Current wait time

89

minute(s)

	  Sign Waitlist
	  <a href="/restaurants/<%= result[:id] %>" class="result-button">See More

Switch button href to proper route

Switch button href to proper route


#!/bin/sh

GOMAXPROCS=<%= node['cpu']['total'] %>

exec 2>&1
exec <%= node['runit']['chpst_bin'] %> \
  -u <%= node['consul']['service_user'] %>:<%= node['consul']['service_group'] %> \
  <%= Chef::Consul.active_binary(node) %> agent -config-dir <%= node['consul']['config_dir'] %>

#!/bin/sh

export GOMAXPROCS=<%= node['cpu']['total'] %>

exec 2>&1
exec <%= node['runit']['chpst_bin'] %> \
  -u <%= node['consul']['service_user'] %>:<%= node['consul']['service_group'] %> \
  <%= Chef::Consul.active_binary(node) %> agent -config-dir <%= node['consul']['config_dir'] %>

Add missing export for GOMAXPROCS

Add missing export for GOMAXPROCS


We can't find whatever it was you were looking for.

In truth, we may never have had what you are looking for, but you should try our search below!

<%= form_tag search_path, method: :get, class: 'search-form', enforce_utf8: false do |f| %>
  <%= text_field_tag 'q', request.original_fullpath.gsub('/', ' '), placeholder: 'Search..', class: 'form-control' %>
<% end %>

Add search box to 404 page

Add search box to 404 page


    <%= image_tag gravatar_for(user), class: "user-image imagecard #{user.role}" %>

    <%= content_tag(:h1, user.full_name, title: user.full_name) %>
    <%= content_tag(:h3, user.role.titlecase) %>
    <%= content_tag(:p, "Available for Hire: #{user.available_for_hire ? 'Yes' : 'No' }") %>

    <%= content_tag(:p, user.bio) %>

    <%= social_icon_links(user) %>

    <%= image_tag gravatar_for(user), class: "user-image imagecard #{user.role}" %>

    <%= content_tag(:h1, user.full_name, title: user.full_name) %>
    <%= content_tag(:h3, user.role.titlecase) %>
    <%= content_tag(:p, ('Hire me!' if user.available_for_hire)) %>

    <%= content_tag(:p, user.bio) %>

    <%= social_icon_links(user) %>

Update hire availability msg in user_card partial


<% summary = local_assigns.fetch :summary, false %>

            <%= link_to article.title, article %>

<%= article_byline article %>

        <% if summary %>
            <%= truncate_html article_body(article), length: 500, omission: ' …'.html_safe %>
        <% else %>
            <%= article_body article %>
        <% end %>

    <% if summary %>

<%= link_to article do %>
                Read the full article
            <% end %>

<%= link_to article_path(article, anchor: 'comments') do %>
                Read the comments (<%= article.comments.count %>)
            <% end %>

    <% end %>

<% summary = local_assigns.fetch :summary, false %>

            <%= link_to article.title, article %>

<%= article_byline article %>

        <% if summary %>
            <%= truncate_html article_body(article), length: 500, omission: ' …'.html_safe %>
        <% else %>
            <%= article_body article %>
        <% end %>

    <% if summary %>

<%= link_to article do %>
                Read the full article
            <% end %>

<%= link_to article_path(article, anchor: 'comment-area') do %>
                Read the comments (<%= article.comments.count %>)
            <% end %>

    <% end %>

Fix the link to the comments.

Fix the link to the comments.


<% if current_subject.pending_contacts? %>

    <%= image_tag('btn/btn_notifications.png', :class => "header_icon") %>

      <%= t 'contact.pending.other' %>

    <%= render :partial => 'contacts/contact', :collection => current_subject.pending_contacts.shuffle.first(2) %>

<% end -%>

Add pending partial removing troublesome line


Appointment Index Page

Show by mentor phase:

    <% 5.times do |i| %>

<%=link_to i, appointments_path(phase: i)%>

    <% end %>

    <%@appointments.each do |appt|%>

<%= appt.start_time%>

<%=link_to appt.start_time, appointment_path(appt) %>

    <% end %>

All Available Appointments

  <%@appointments.each do |appt|%>

<%=link_to appt.start_time, appointment_path(appt) %>

  <% end %>

Appointment Index Page

Show by mentor phase:

    <% 5.times do |i| %>

<%=link_to i, appointments_path(phase: i)%>

    <% end %>

    <%@appointments.each do |appt|%>

<%= appt.start_time%>

<%=link_to appt.start_time, appointment_path(appt) %>

    <% end %>

All Available Appointments

  <%@appointments.each do |appt|%>

<%=link_to appt.start_time, appointment_path(appt) %>

With <%=appt.mentor.full_name%>: Phase <%=appt.phase%>

  <% end %>

Update view for appointment index

Update view for appointment index


<% unless trades.empty? %>

<%= type %> trades

    <% trades.each do |trade| %>

        <%= link_to trade.participants.first.user, user_path(trade.participants.first.user) %>
        and
        <%= link_to trade.participants.second.user, user_path(trade.participants.second.user) %>: <%= link_to trade.agreement, trade_path(trade) %>

    <% end %>

  <%= paginate trades, param_name: pagination_param %>
<% end %>

<% unless trades.empty? %>

<%= type %> trades

    <% trades.each do |trade| %>

        <%= link_to trade.participants.first.user, user_path(trade.participants.first.user) %>
        and
        <%= link_to trade.participants.second.user, user_path(trade.participants.second.user) %><% if trade.agreement? %>: <%= link_to trade.agreement, trade_path(trade) %><% end %>

    <% end %>

  <%= paginate trades, param_name: pagination_param %>
<% end %>

Fix formatting for blank agreements

Fix formatting for blank agreements


<% @title = 'ログイン' %>

<%= @title %>

  <%= form_for @form, url: :staff_sessions do |f| %>

      <%= f.label :email, 'メールアドレス' %>
      <%= f.text_field :email %>

      <%= f.label :password, 'パスワード' %>
      <%= f.password_field :password %>

      <%= f.submit 'ログイン' %>

Add login_form in staff member

Add login_form in staff member


Message:
<%= @community_support_request.email %>
<%= @community_support_request.name %>
<%= @community_support_request.message %>
Betriebssystem Hersteller: <%= @community_support_request.operating_system %>
Betriebssystem Version: <%= @community_support_request.operating_system_version %>
Browser Hersteller: <%= @community_support_request.browser_vendor %>
Browser Version: <%= @community_support_request.browser_version %>
<% if @community_support_request.osm_username %>
  BenutzerIn ist eingeloggt mit: <%= @community_support_request.osm_username %>
<% end %>
Sprache: <%= I18n.locale %>

Email: <%= @community_support_request.email %>
Name: <%= @community_support_request.name %>
Betriebssystem Hersteller: <%= @community_support_request.operating_system %>
Betriebssystem Version: <%= @community_support_request.operating_system_version %>
Browser Hersteller: <%= @community_support_request.browser_vendor %>
Browser Version: <%= @community_support_request.browser_version %>
<% if @community_support_request.osm_username %>
  BenutzerIn ist eingeloggt mit: <%= @community_support_request.osm_username %>
<% end %>
Sprache: <%= I18n.locale %>
Message:
<%= @community_support_request.message %>

Add captions for each entry in the email


<html>

   <head>
      <meta content = 'text/html; charset = UTF-8' http-equiv = 'Content-Type' />
   </head>

   <body>
       <=% @body %>
   </body>
</html>

<html>

   <head>
      <meta content = 'text/html; charset = UTF-8' http-equiv = 'Content-Type' />
   </head>

   <body>
       <%= @body %>
   </body>
</html>

Fix email team template syntax

Fix email team template syntax

Signed-off-by: Colin Schoen <a3acbfc9b5a4c75eeeb7c33280348e7f320f1240@gmail.com>


Welcome <%= @user %>,

Thanks for signing up to the Computers Now Epson consumables ordering system.

Please click on the link below to confirm your new account.
<%= confirm_url(@user.activation_code, :host => Uniform.configuration.domain ) %>

Computers Now also provide:
- Colour Management services
- Apple & HP Hardware
- Certified warranty repairs for Apple, HP & Epson
- Specialist software for the creative industry

Please do contact us regarding any of these services if you would like competitive pricing and excellent service.

For any queries, please email us on <%= Uniform.configuration.mailer_sender %> or call:

02 9951 7979 - NSW
03 9684 3633 - VIC

Welcome <%= @user %>,

Thanks for signing up to the Computers Now customer portal system.

Please click on the link below to confirm your new account.
<%= confirm_url(@user.activation_code, :host => Uniform.configuration.domain ) %>

Once your account is activated you will be able to access both our Epson consumables store http://epson.compnow.com.au/ and our Adobe licensing portal http://adobe.compnow.com.au/

Computers Now also provide:
- Colour Management services
- Apple & HP Hardware
- Certified warranty repairs for Apple, HP & Epson
- Specialist software for the creative industry

Please do contact us regarding any of these services if you would like competitive pricing and excellent service.

For any queries, please email us on customerportal@compnow.com.au or call:

02 9951 7979 - NSW
03 9684 3633 - VIC

Update to the welcome message

Update to the welcome message


<% @transactions.each do |transaction| %>
  <%= render 'transaction.html.erb', transaction: transaction %>
<% end %>

Make each transaction a new list item

Make each transaction a new list item


Sorry, you cannot update the order without JavaScript enabled.

Listing rooms

Drag and drop rooms to reorder list. Note that reordering will trigger a reindex and may take some time to become visible on the frontend.

  <%= form_tag({:controller => "rooms", :action => "update_sort"}, method: :patch, remote: true) do |f| %>

  <% @rooms.each do |room| %>
  	<%= content_tag_for :li, room do %>
  	  <%= hidden_field_tag "rooms[]", room.id %>
      <h4 id="room_span_<%=room.id%>" class="room_header"><%= fa_icon "arrows" %> <%=h room.title %>

  	<% end %>
  <% end %>

  <% end %>

Sorry, you cannot update the order without JavaScript enabled.

Listing rooms

Drag and drop rooms to reorder list. Note that reordering will trigger a reindex and may take some time to become visible on the frontend.

  <%= form_tag({:controller => "rooms", :action => "update_sort"}, method: :patch) do |f| %>

  <% @rooms.each do |room| %>
  	<%= content_tag_for :li, room do %>
  	  <%= hidden_field_tag "rooms[]", room.id %>
      <h4 id="room_span_<%=room.id%>" class="room_header"><%= fa_icon "arrows" %> <%=h room.title %>

  	<% end %>
  <% end %>

  <% end %>

Update sort order of rooms by reloading page, not with remote


JavaScript

Installation:

    Install Node.js

        Installing Node.js via package manager

    Install jasmine-node with
    npm install jasmine-node -g

  Update your PATH to include the npm binaries. Add the
  following to either ~/.bash_profile or ~/.zshrc

$ export PATH=/usr/local/share/npm/bin:$PATH

Running tests:

Execute the tests with:

$ jasmine-node bob_test.spec.js

Making your first node module:

  To create a module that can be loaded with var Bob = require(./bob);,
  put this code in bob.js:

var Bob = function() {};
module.exports = Bob;

  You can find more information about modules in the
  node documentation.

Add example of how to create a basic node module

It's not at all obvious how to get started exporting an object so it can be loaded by node, and the node documentation is confusing.


  <%= link_to(avatar(user, { :size => 64 }), user, {:class => "avatar"}) %>

      ~<%= link_to h(user.login), user -%>

      <% unless user.fullname.blank? %>

          <%= h(user.fullname) -%>

<% end %><% if user.public_email? -%>

          <%= mail_to(user.email, mangled_mail(user.email), :encode => "javascript") -%>

<% end -%><% if user.url %>

          <a rel="me" href="<%=h user.url -%>"><%=h user.url -%>

<% end -%>

        <%= t("views.users.member_for") %> <%= time_ago_in_words(user.created_at) %>
        <% if user.suspended? -%>(suspended)<% end -%>

    <% if is_current_user?(user) -%>

This is your public profile.
(<%= link_to "Go to your dashboard", root_path -%>)

    <% end -%>
    <% if !is_current_user?(user) -%>

        <%= link_button_link_to(t("views.users.send_user_msg", :username=>h(user.login)),
                                new_message_path(:to => user.login), :class => "new_email") -%>

    <% end -%>

    <%= link_to(avatar(user, :size => 128), user, :class => "avatar") %>

        ~<%= link_to h(user.login), user -%>

        <% unless user.fullname.blank? %>

            <%= h(user.fullname) -%>

<% end %><% if user.public_email? -%>

            <%= mail_to(user.email, mangled_mail(user.email), :encode => "javascript") -%>

<% end -%><% if user.url %>

            <a rel="me" href="<%=h user.url -%>"><%=h user.url -%>

<% end -%>

          <%= t("views.users.member_for") %> <%= time_ago_in_words(user.created_at) %>
          <% if user.suspended? -%>(suspended)<% end -%>

Set grid in user profile

Set grid in user profile


<tr id="<%= dom_id(bank_transaction) %>" class="<%= dom_class(bank_transaction) %>">
  <abbr title="<%= bank_transaction.posted_on.to_s(:db) %>"><%= i18n_date(bank_transaction.posted_on) %>

    <%=h bank_transaction.bank_account %>

<%= [bank_transaction.name, bank_transaction.memo].reject(&:blank?).join("
") %>

  <%= format_money(bank_transaction.amount) %>
  <%=h bank_transaction.auto_account %>

    <% form_for(@import) do |_| %>
      <%= hidden_field_tag :bank_transaction_id, bank_transaction.id %>
      <%= submit_tag "Accepter" %>
    <% end %>
    <% form_for(@import, :method => :delete) do |_| %>
      <%= hidden_field_tag :bank_transaction_id, bank_transaction.id %>
      <%= submit_tag "Rejeter" %>
    <% end %>

<tr id="<%= dom_id(bank_transaction) %>" class="<%= dom_class(bank_transaction) %>">
  <abbr title="<%= bank_transaction.posted_on.to_s(:db) %>"><%= i18n_date(bank_transaction.posted_on) %>

    <%=h bank_transaction.bank_account %>

<%= [bank_transaction.name, bank_transaction.memo].reject(&:blank?).join("
") %>

  <%= format_money(bank_transaction.amount) %>
  <%=h bank_transaction.auto_account %>

    <% form_for(@import) do |_| %>
      <%= hidden_field_tag :bank_transaction_id, bank_transaction.id %>
      <%= submit_tag "Accepter" %>
    <% end %>
    <% form_for(@import, :html => {:method => :delete}) do |_| %>
      <%= hidden_field_tag :bank_transaction_id, bank_transaction.id %>
      <%= submit_tag "Rejeter" %>
    <% end %>

Use the correct option name.

Use the correct option name.


<%= form_for [@comment.pin, @comment] do |f| %>
  <% if @comment.errors.any? %>

<%= pluralize(comment.errors.count, "error") %> prohibited this comment from being saved:

      <% @comment.errors.full_messages.each do |message| %>

<%= message %>

      <% end %>

  <% end %>

    <%= f.label :content %>
    <%= f.text_field :content %>

    <%= f.hidden_field :pin_id, :value => @comment.pin.id %>

    <%= f.submit %>

<% end %>

<%= form_for [@pin, @comment] do |f| %>
  <% if @comment.errors.any? %>

<%= pluralize(comment.errors.count, "error") %> prohibited this comment from being saved:

      <% @comment.errors.full_messages.each do |message| %>

<%= message %>

      <% end %>

  <% end %>

    <%= f.label :content %>
    <%= f.text_field :content %>

    <%= f.hidden_field :pin_id, :value => @pin.id %>

    <%= f.hidden_field :user_id, :value => current_user.id %>
    <%= f.submit %>

<% end %>

Add user hidden field to apply user id to new comment


    <% @messages.each do |message| %>
      <li data-id="<%= message.id %>"><%= message.content %>

    <% end %>

  <form action="/requests/1/messages" method="post">

      Message:
      <input type="text" name="message[content]" id="message">

  </form>

Add text area for user to input message.

NOTE: The action for the form has been hard-coded. This is only for
demonstration purposes.


Bunny sign-up

<%= standard_flashes %>
<%= error_messages_for :bunny -%>

<% form_for :bunny, :url => secret_new_bunny_path do |f| -%>

What's your username on MeCha?

  <%= f.text_field :username %>

Choose a password:

  <%= f.password_field :password %>

Confirm that password:

  <%= f.password_field :password_confirmation %>

<%= submit_tag "Sign me up for Valentiney goodness!" %>

<% end -%>

Already signed up? Then <%= link_to("log in here", new_bunny_session_path) %>.

Add login link to the sign up page

Add login link to the sign up page

git-svn-id: 801577a2cbccabf54a3a609152c727abd26e524a@1217 a18515e9-6cfd-0310-9624-afb4ebaee84e


Edit Group

      <%= form_for @group do |f| %>

          <%= f.label :name %>
          <%= f.text_field :name, autofocus: true, value: @group.name %>

          <%= f.label :description %>
          <%= f.text_area :description, autofocus: true, value: @group.description %>

          <%= f.label 'Upload a new group photo' %>
          <img class="photoPreview" src="<%= @group.photo %>">
          <%= f.file_field :photo, autofocus: true, class: "uploadFile" %>

          <%= f.label :kind %>
          <%= f.select(:kind, @kinds.reject {|i|  i == 'announcement' }, autofocus: true, value: @group.kind) %>

          <%= f.label :neighborhood_id %>
          <%= f.select(:neighborhood_id, @neighborhoods, autofocus: true, value: @group.neighborhood_id) %>

          <%= f.submit "Update", class: 'button success radius small' %>

      <% end %>

Edit Group

      <%= form_for @group do |f| %>

          <%= f.label 'Group Name' %>
          <%= f.text_field :name, autofocus: true, value: @group.name %>

          <%= f.label 'Group Description' %>
          <%= f.text_area :description, autofocus: true, value: @group.description %>

          <%= f.label 'Upload a new group photo' %>
          <img class="photoPreview" src="<%= @group.photo %>">
          <%= f.file_field :photo, autofocus: true, class: "uploadFile" %>

          <%= f.label 'Kind of Group' %>
          <%= f.select(:kind, @kinds.reject {|i|  i == 'announcement' }, autofocus: true, value: @group.kind) %>

          <%= f.label 'Neighborhood of Group' %>
          <%= f.select(:neighborhood_id, @neighborhoods, autofocus: true, value: @group.neighborhood_id) %>

          <%= f.submit "Update", class: 'button success radius small' %>

      <% end %>

Change label in edit group

Change label in edit group


      <%= t 'layouts.application.github' %>

<%= javascript_include_tag '//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js' %>
<%= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' %>
<%= javascript_include_tag '//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js' %>
<%= javascript_include_tag 'application' %>

      <%= t 'layouts.application.github' %>

<%= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' %>
<%= javascript_include_tag '//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js' %>
<%= javascript_include_tag '//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js' %>
<%= javascript_include_tag 'application' %>

Load the JQuery file before the angularJS file, so that JQuery is used instead of JQLite included with AngularJS.


Listing Users

    User

<% @users.each do |user| %>

    <%= user.email %>
    <%= link_to 'Edit', edit_admin_user_path(user) %>
    <%= link_to 'Destroy', admin_user_path(user), method: :delete, data: { confirm: 'Are you sure?' } %>

<% end %>

<%= link_to 'New User', new_admin_user_path %>

Hide non-functional "new user" link

Hide non-functional "new user" link


Hey $Chris!

We’re processing your last week of check ins now and will email you a summary of your weekly carbon emissions shortly.

It’s just a bit of fun, based on some massive generalisations about how people travel, but we hope it might spark your interest in your footprint and what you can do about it.

Happy check ins!

The AMEE team

Hey <%= current_user.first_name %>!

We’re processing your last week of check ins now and will email you a summary of your weekly carbon emissions shortly.

It’s just a bit of fun, based on some massive generalisations about how people travel, but we hope it might spark your interest in your footprint and what you can do about it.

Happy check ins!

The AMEE team

Remove hard coded name from thanks page

Remove hard coded name from thanks page


<%= f.input :text %>

<% if params[:reply_to_id] %>
  <%= f.hidden_field :reply_to_id, :value => params[:reply_to_id] %>
<% end %>

  <%= f.label :text, :class => 'control-label' %>

    <%= f.input :text , label: false, input_html: {:class => 'text_area span7 html-editor'} %>

<% if params[:reply_to_id] %>
  <%= f.hidden_field :reply_to_id, :value => params[:reply_to_id] %>
<% end %>

Use HTML5 wysiwyg editor for forum posts


<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <%= link_to "Initiate Chat", request_messages_path(request) %>
  <% end %>

<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% end %>

  <% unless request.responder.nil? %>
    <%= link_to "Initiate Chat", request_messages_path(request) %>
  <% end %>

Change logic on what to display in the request partial.


  <% if !task.new_record? and current_user.can?(task.project, "work") %>
    <%= pause_task_link(task) %>
    <%= start_stop_work_link(task) %>
    <%= cancel_work_link(task) %>
    <%= add_work_link(task) %>
  <% end -%>

  <% if !task.new_record? and current_user.can?(task.project, "work") %>
    <%= pause_task_link(task) %>
    <%= start_stop_work_link(task) %>
    <%= cancel_work_link(task) %>
  <% end -%>

Remove uneeded link to create worklog from task body.


Port 22
ListenAddress ::
ListenAddress 0.0.0.0
Protocol 2

Banner /etc/banner

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
<% if @osfamily == 'debian' %>
HostKey /etc/ssh/ssh_host_ecdsa_key
<% end %>
UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 768

SyslogFacility AUTH
LogLevel INFO

LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication <%= @external_host ? 'no' : 'yes' %>

X11Forwarding yes
X11DisplayOffset 10
PermitTunnel yes
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
UseDNS no

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes
AuthorizedKeysFile %h/.ssh/authorized_keys
AuthorizedKeysFile /etc/ssh/keys/%u

Port 22
ListenAddress ::
ListenAddress 0.0.0.0
Protocol 2

Banner /etc/banner

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
<% if @osfamily == 'Debian' %>
HostKey /etc/ssh/ssh_host_ecdsa_key
<% end %>
UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 768

SyslogFacility AUTH
LogLevel INFO

LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication <%= @external_host ? 'no' : 'yes' %>

X11Forwarding yes
X11DisplayOffset 10
PermitTunnel yes
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
UseDNS no

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes
<% if @osfamily == 'Debian' %>
AuthorizedKeysFile /etc/ssh/keys/%u .ssh/authorized_keys
<% else %>
AuthorizedKeysFile %h/.ssh/authorized_keys
<% end %>

Fix for sshd config options

Fix for sshd config options

Change-Id: I690d2bd2c1c3f8885bcc0f814483facdc6f2443f
Signed-off-by: Igor Shishkin <754e6e0fd0f692545d04d1591d9a3de62bb04f84@mirantis.com>


<%- case @markup
    when :markdown -%>
  case RUBY_PLATFORM
  when 'java'
    gem 'maruku'
  else
    gem 'bluecloth', '>= 2.0.0'
  end
<%- when :textile -%>
  gem 'RedCloth'
<%- end -%>
  gem 'yard', '<%= @yard_dependency %>'

<%- case @markup
    when :markdown -%>
  platforms :jruby do
    gem 'maruku'
  end

  platforms :ruby do
    gem 'bluecloth', '>= 2.0.0'
  end
<%- when :textile -%>
  gem 'RedCloth'
<%- end -%>
  gem 'yard', '<%= @yard_dependency %>'

Use platforms :jruby and platforms :ruby to separate JRuby deps from non-JRuby deps.


require "spec_helper"

describe Endpoints::<%= plural_class_name %> do
  include Rack::Test::Methods

  def app
    Endpoints::<%= plural_class_name %>
  end

  describe "GET <%= url_path %>" do
    it "succeeds" do
      get "<%= url_path %>"
      expect(last_response.status).to eq(200)
    end
  end
end

Fix missing newline in template

Fix missing newline in template


set :application, 'avservis_facility'
set :repo_url,    'git@github.com:blueberryapps/avservis-facility.git'
set :branch,      'master'
set :scm,         :git

set :format, :pretty
set :log_level, :debug

set :linked_files, %w(config/database.yml)
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

set :rbenv_type, :system
set :rbenv_ruby, `git show #{fetch(:branch)}:.ruby-version`

set :keep_releases, 5

namespace :deploy do

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :finishing, 'deploy:cleanup'

end

set :application, '<%= app_name %>'
set :repo_url,    'git@github.com:blueberryapps/<%= app_name %>.git'
set :branch,      'master'
set :scm,         :git

set :format, :pretty
set :log_level, :debug

set :linked_files, %w(config/database.yml)
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

set :rbenv_type, :system
set :rbenv_ruby, `git show #{fetch(:branch)}:.ruby-version`

set :keep_releases, 5

namespace :deploy do

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :finishing, 'deploy:cleanup'

end

Use app_name in deploy config

Use app_name in deploy config


Welcome to Twitter!

        <form class="form-inline" action="/login" method="post">

            <input type="text" name="username" class="form-control" id="exampleInputEmail3" placeholder="Username">

            <input type="password" name="password" placeholder="Password" class="form-control" id="exampleInputPassword3" placeholder="Password">

          <button type="submit" class="btn btn-default" value="Login">Sign in</button>
        </form>

        Register

Welcome to Britter!

        <form class="form-inline" action="/login" method="post">

            <input type="text" name="username" class="form-control" id="exampleInputEmail3" placeholder="Username">

            <input type="password" name="password" placeholder="Password" class="form-control" id="exampleInputPassword3" placeholder="Password">

          <button type="submit" class="btn btn-default" value="Login">Sign in</button>
        </form>

        Register

Change name from Twitter to Britter.

Change name from Twitter to Britter.


# DO NOT EDIT - This file is being maintained by Chef

00 02 * * 1 osmbackup /usr/local/bin/backup-db

# DO NOT EDIT - This file is being maintained by Chef

MAILTO=admins@openstreetmap.org

00 02 * * 1 osmbackup /usr/local/bin/backup-db

Send output from the database script to admins


---
layout: post
title:  "Welcome to Jekyll!"
date:   <%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>
categories: jekyll update
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Jekyll also offers powerful support for code snippets:

{% highlight ruby %}
def print_hi(name)
  puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll’s dedicated Help repository][jekyll-help].

[jekyll-docs]: http://jekyllrb.com/docs/home
[jekyll-gh]:   https://github.com/jekyll/jekyll
[jekyll-help]: https://github.com/jekyll/jekyll-help

---
layout: post
title:  "Welcome to Jekyll!"
date:   <%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>
categories: jekyll update
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Jekyll also offers powerful support for code snippets:

{% highlight ruby %}
def print_hi(name)
  puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].

[jekyll-docs]: http://jekyllrb.com/docs/home
[jekyll-gh]:   https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/

Update link in welcome post to talk.jekyllrb.com Previously the link pointed to the jekyll-help repository on github which no longer accepts issues.


<% content_for :page_title do %>
  <%= "#{this_blog.blog_name} - #{t('.sign_up', default: 'Sign up')}" %>
<% end %>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>

    <%= f.label :login %>
    <%= f.text_field :login, class: 'form-control', autofocus: true %>

    <%= f.label :email %>
    <%= f.email_field :email, class: 'form-control' %>

    <%= f.label :password %>
    <% if @minimum_password_length %>
      (<%= t('devise_custom.characters_minimum', min: @minimum_password_length) %>)

    <% end %>
    <%= f.password_field :password, class: 'form-control', autofocus: true, autocomplete: 'off' %>

    <%= f.label :password_confirmation %>

    <%= f.password_field :password_confirmation, class: 'form-control', autocomplete: 'off' %>

    <%= f.submit t('.sign_up'), class: 'btn btn-lg btn-success btn-block' %>

<% end %>

<%= render 'devise/shared/links' %>

<% content_for :page_title do %>
  <%= "#{this_blog.blog_name} - #{t('.sign_up', default: 'Sign up')}" %>
<% end %>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
  <%= render "devise/shared/error_messages", resource: resource %>

    <%= f.label :login %>
    <%= f.text_field :login, class: 'form-control', autofocus: true %>

    <%= f.label :email %>
    <%= f.email_field :email, class: 'form-control' %>

    <%= f.label :password %>
    <% if @minimum_password_length %>
      (<%= t('devise_custom.characters_minimum', min: @minimum_password_length) %>)

    <% end %>
    <%= f.password_field :password, class: 'form-control', autofocus: true, autocomplete: 'off' %>

    <%= f.label :password_confirmation %>

    <%= f.password_field :password_confirmation, class: 'form-control', autocomplete: 'off' %>

    <%= f.submit t('.sign_up'), class: 'btn btn-lg btn-success btn-block' %>

<% end %>

<%= render 'devise/shared/links' %>

Use new way to render Devise error messages in view override

This silences a deprecation warning about #devise_error_messages.


html {
  height: 100%;
}

body {
  height: 100%;
  background-repeat: repeat;
  background-image: url(<%= asset_path 'spree/frontend/bg.png' %>);
}

.container {
  height: 100%;
  box-sizing: border-box;
  border-top: 6px solid #bbb;
  background-color: #fff;

  -moz-box-shadow:    0px 0px 10px 10px #ccc;
  -webkit-box-shadow: 0px 0px 10px 10px #ccc;
  box-shadow:         0px 0px 10px 10px #ccc;
}

footer#footer {
  border-top: 6px solid #bbb;
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #eee;
  height: 100px;
  position: absolute;
  bottom: 0;
}

footer h2 {
  font-size: 1.3em;
}

footer div#contents {
  margin-left: 50px;
}

html {
  height: 100%;
}

a:hover {
  color: #808080;
}

body {
  height: 100%;
  background-repeat: repeat;
  background-image: url(<%= asset_path 'spree/frontend/bg.png' %>);
}

.container {
  height: 100%;
  box-sizing: border-box;
  border-top: 6px solid #bbb;
  background-color: #fff;

  -moz-box-shadow:    0px 0px 10px 10px #ccc;
  -webkit-box-shadow: 0px 0px 10px 10px #ccc;
  box-shadow:         0px 0px 10px 10px #ccc;
}

ul#main-nav-bar {
  font-family: georgia;
}

footer#footer {
  border-top: 6px solid #bbb;
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #eee;
  height: 100px;
  position: absolute;
  bottom: 0;
}

footer h2 {
  font-size: 1.3em;
}

footer div#contents {
  margin-left: 50px;
}

Change link colours in nav.

Change link colours in nav.


<% content_for :head do %>
  <%= render partial: 'labels_print_styles' %>
<% end %>

Return Form and Address Labels

Print out this page and cut along the dotted lines.

Fill out the Return Form to indicate which items you are returning, and how many, and include it inside the box with the items you are returning.

Please place the Address Label on outside of the box.

<%= render partial: 'printable_return_form' %>

<%= render partial: 'printable_address_label' %>

Make first divider in printable return form part of instructions so it will be hidden when printing


  Kontostand (per <%= @bookings.last.value_date.strftime("%d.%m.%Y") %>)

  <%= currency_fmt(@account.saldo(@bookings.last)) %>

  Kontostand (per <%= @bookings.last.value_date %>)

  <%= currency_fmt(@account.saldo(@bookings.last)) %>

Drop date formatting from view as a plugin will handle that globally.


<% content_for :heading do -%><%= t("myplaceonline.paid_taxes.totals") %><% end -%>

<%= t("myplaceonline.paid_taxes.totals") %>

<%= flashes! %>

<%= data_row(heading: t("myplaceonline.paid_taxes.total_agi"), prefix_heading: true, content: Myp.number_to_currency(@total_agi), wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_taxes_paid"), prefix_heading: true, content: Myp.number_to_currency(@total_taxes), wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_percent"), prefix_heading: true, content: @percent_paid, wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_donations"), prefix_heading: true, content: @total_donations, wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_donations_percent"), prefix_heading: true, content: @total_donations_percent, wrap: false) %>

<%=
  render(partial: "shared/footer", locals: {
    items: [
      {
        title: I18n.t("myplaceonline.general.back"),
        link: controller.index_path,
        icon: "back"
      },
    ]
  })
%>

<% content_for :heading do -%><%= t("myplaceonline.paid_taxes.totals") %><% end -%>

<%= t("myplaceonline.paid_taxes.totals") %>

<%= flashes! %>

<%= data_row(heading: t("myplaceonline.paid_taxes.total_agi"), prefix_heading: true, content: Myp.number_to_currency(@total_agi), wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_taxes_paid"), prefix_heading: true, content: Myp.number_to_currency(@total_taxes), wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_percent"), prefix_heading: true, content: @percent_paid, wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_donations"), prefix_heading: true, content: Myp.number_to_currency(@total_donations), wrap: false) %>
<%= data_row(heading: t("myplaceonline.paid_taxes.total_donations_percent"), prefix_heading: true, content: @total_donations_percent, wrap: false) %>

<%=
  render(partial: "shared/footer", locals: {
    items: [
      {
        title: I18n.t("myplaceonline.general.back"),
        link: controller.index_path,
        icon: "back"
      },
    ]
  })
%>

Add donations to paid tax totals

Add donations to paid tax totals


<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% end %>

  <% unless request.responder.nil? %>
    <%= link_to "Initiate Chat", request_messages_path(request) %>
  <% end %>

<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.responder != nil %>

<%= request.responder.first_name %> has responded to the request!

  <% end %>
  <% if request.is_fulfilled %>

 <%=request.responder.first_name %> has fulfilled <%=request.requester.first_name%>'s request!

  <% end %>

  <% if !request.is_fulfilled %>
    <% if request.requester == current_user && request.responder == nil %>
      <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
    <% elsif request.responder == nil && current_user != request.requester %>
      <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
    <% elsif request.responder != nil && current_user == request.requester %>
      <%= button_to 'Request fulfilled!', request, class: 'button', method: 'patch' %>
    <% end %>

    <% unless request.responder.nil? %>
      <%= link_to "Initiate Chat", request_messages_path(request) %>
    <% end %>
  <% end %>

Add fulfillment button and remove all views upon fulfillment


<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <% if request.requester == current_user || request.responder == current_user %>
      <%= link_to "Initiate Chat", request_messages(request) %>
    <% else %>

Someone is already being a neighbor to <%= request.requester.first_name%>. Thanks for checking!  <%= button_to 'Return to Home', root_path %>
    <% end %>
  <% end %>

<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <% if request.requester == current_user || request.responder == current_user %>
      <%= link_to "Initiate Chat", request_messages_path(request) %>
    <% else %>

Someone is already being a neighbor to <%= request.requester.first_name%>. Thanks for checking!  <%= button_to 'Return to Home', root_path %>
    <% end %>
  <% end %>

Fix bug in the url fed to the link_to method.


Build state can be one of `scheduled`, `running`, `passed`, `failed`, `blocked`, `canceling`, `canceled`, `skipped`, `not_run`, or `finished`.
`finished` is a shortcut for a build of `passed`, `failed`, `blocked`, and `canceled` state.

Build state can be one of `creating`, `scheduled`, `running`, `passed`, `failed`, `blocked`, `canceling`, `canceled`, `skipped`, `not_run`, or `finished`.
`finished` is a shortcut for a build of `passed`, `failed`, `blocked`, and `canceled` state.

Include new `creating` build state

Include new `creating` build state


---
- scm:
    name: govuk-content-api-docs
    scm:
      - git:
          url: git@github.com:alphagov/govuk-content-api-docs.git
          basedir: govuk-content-api-docs
          branches:
            - master
- job:
    name: govuk-content-api-docs
    display-name: Publish GOV.UK Content API Docs
    project-type: freestyle
    description: |
      Builds and publishes the govuk-content-api-docs.
    scm:
      - govuk-content-api-docs
    logrotate:
      numToKeep: 10
      artifactDaysToKeep: 3
    triggers:
      - timed: 'H H * * *'
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          #!/bin/bash
          set -eu

          cd "${WORKSPACE}"

          rm -rf content-store

          git clone -b deployed-to-production https://github.com/alphagov/content-store.git

          cd govuk-content-api-docs

          export BUNDLE_PATH="${HOME}/bundles/${JOB_NAME}"
          make publish API_SPEC=../content-store/openapi.yaml

          cd ..

          rm -rf content-store

---
- scm:
    name: govuk-content-api-docs
    scm:
      - git:
          url: git@github.com:alphagov/govuk-content-api-docs.git
          basedir: govuk-content-api-docs
          branches:
            - master
- job:
    name: govuk-content-api-docs
    display-name: Publish GOV.UK Content API Docs
    project-type: freestyle
    description: |
      Builds and publishes the govuk-content-api-docs.
    scm:
      - govuk-content-api-docs
    logrotate:
      numToKeep: 10
      artifactDaysToKeep: 3
    triggers:
      - timed: 'H H * * *'
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          #!/bin/bash
          set -eux

          cd "${WORKSPACE}"

          rm -rf content-store

          git clone -b deployed-to-production https://github.com/alphagov/content-store.git

          cd govuk-content-api-docs

          export BUNDLE_PATH="${HOME}/bundles/${JOB_NAME}"
          mkdir -p $BUNDLE_PATH

          make publish API_SPEC=../content-store/openapi.yaml

          cd ..

          rm -rf content-store

Create bundle path for Jenkins

Create bundle path for Jenkins

Turns out the reason this task was failing was because the directory
referred to by the BUNDLE_PATH env var didn't exist. By creating it this
starts working again.