        <%= form_for @result,
          :remote => true,
          :url => { :action => 'update_overall_comment', :id => @result.id } do |f| %>
          <%= f.text_area :overall_comment,
            :cols => 50,
            :rows => 5,
            :id => 'overall_comment_text_area',
            :onkeydown => "$('overall_comment_submit').enable();" %>

         <%= f.submit t(:save_changes),
           :disable_with => I18n.t('working'),
           :disabled => true,
           :id => "overall_comment_submit" %>

      <% end %>

        <%= form_for result,
          :remote => true,
          :url => { :action => 'update_overall_comment', :id => result.id } do |f| %>
          <%= f.text_area :overall_comment,
            :cols => 50,
            :rows => 5,
            :id => 'overall_comment_text_area',
            :onkeydown => "$('overall_comment_submit').enable();" %>

         <%= f.submit t(:save_changes),
           :disable_with => I18n.t('working'),
           :disabled => true,
           :id => "overall_comment_submit" %>

      <% end %>

Fix updating of annotation overall comment

This fixes #1431. The instance variable `@result` is always the new
result of the remark, not the original old result. The caller of the
template passes the old result correctly as a local variable `result`,
but the template is not using it.

Tested:
- local server
- rake test:unit
- rake test:functional


<%= form_for(@housing_form) do |f| %>
  <% if @housing_form.errors.any? %>

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

      <% @housing_form.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label :name %>

    <%= f.text_field :name %>

    <%= f.label :location %>

    <%= f.text_field :location %>

    <%= f.label :lat, "Latitude" %>

    <%= f.text_field :lat %>

    <%= f.label :long, "Longitude" %>

    <%= f.text_field :long %>

    <%= f.submit %>

<% end %>

<%= bootstrap_form_for(@housing_form) do |f| %>
  <% if @housing_form.errors.any? %>

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

      <% @housing_form.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.text_field :name %>

    <%= f.text_field :location %>

    <%= f.text_field :lat %>

    <%= f.text_field :long %>

    <%= f.submit %>

<% end %>

Use bootstrap for housing form edits

Use bootstrap for housing form edits


/* DO NOT EDIT: File is auto-generated */
package <%= repository.gwt.client_ioc_package %>;

<%= description_javadoc_for(repository, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public class <%= repository.gwt.mock_services_module_name %>
  extends com.google.inject.AbstractModule
{
  @Override
  protected void configure()
  {
<%
  repository.data_modules.select{|data_module| data_module.gwt?}.each do |data_module|
    data_module.services.select{|service| service.gwt?}.each do |service|
%>
    bind( <%= service.gwt.qualified_async_rpc_service_name %>.class ).toInstance( org.mockito.Mockito.mock( <%= service.gwt.qualified_async_rpc_service_name %>.class ) );
<%
    end
  end
%>  }
}

/* DO NOT EDIT: File is auto-generated */
package <%= repository.gwt.client_ioc_package %>;

<%= description_javadoc_for(repository, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public class <%= repository.gwt.mock_services_module_name %>
  extends com.google.inject.AbstractModule
{
  @Override
  protected void configure()
  {
<%
  repository.data_modules.select{|data_module| data_module.gwt?}.each do |data_module|
    data_module.services.select{|service| service.gwt?}.each do |service|
%>
    bind( <%= service.gwt.qualified_async_rpc_service_name %>.class ).toInstance( org.mockito.Mockito.mock( <%= service.gwt.qualified_async_rpc_service_name %>.class ) );
    bind( <%= service.gwt.qualified_facade_service_name %>.class ).toInstance( org.mockito.Mockito.mock( <%= service.gwt.qualified_facade_service_name %>.class ) );
<%
    end
  end
%>  }
}

Add the facade to the test service module


<!doctype html>

    <%= render :partial => 'spree/shared/head' %>

  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">

      <%= render :partial => 'spree/shared/header' %>

          <%= breadcrumbs(@taxon) %>
        <%= render :partial => 'spree/shared/sidebar' if content_for? :sidebar %>
        <div id="content" class="columns <%= !content_for?(:sidebar) ? "sixteen" : "twelve" %>" data-hook>
          <%= flash_messages %>
          <%= yield %>

      <%= render :partial => 'spree/shared/footer' %>

    <%= render :partial => 'spree/shared/google_analytics' %>

<!doctype html>

<html lang="<%= I18n.locale %>">

    <%= render :partial => 'spree/shared/head' %>

  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">

      <%= render :partial => 'spree/shared/header' %>

        <%= breadcrumbs(@taxon) %>

        <%= render :partial => 'spree/shared/sidebar' if content_for? :sidebar %>

        <div id="content" class="columns <%= !content_for?(:sidebar) ? "sixteen" : "twelve" %>" data-hook>
          <%= flash_messages %>
          <%= yield %>

      <%= render :partial => 'spree/shared/footer' %>

    <%= render :partial => 'spree/shared/google_analytics' %>

Set locale correctly in frontend layout

Set locale correctly in frontend layout

Fixes #2106


set_error_handler( function( $errno, $errstr, $errfile, $errline, $errcontext ) {
	$err = "Error: $errstr";
	if ( $errfile ) {
		$err .= " in $errfile";
		if ( $errline ) {
			$err .= ", line $errline";
		}
	}
	$err .= '.';
	die( $err );
}, E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE );

set_error_handler( function( $errno, $errstr, $errfile, $errline, $errcontext ) {
	$err = "Error: $errstr";
	if ( $errfile ) {
		$err .= " in $errfile";
		if ( $errline ) {
			$err .= ", line $errline";
		}
	}
	$err .= ".\n";
	die( $err );
}, E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE );

Add a newline after warnings_as_errors messages

Change-Id: Ie6ca2fa4b56282ad2282388376f90e7f4a4e60e2


<% message.subject = "#{@entry.node.name} #{t('ezine.entry_type.' + @entry.entry_type)}確認" %>
メールアドレスの<%= t('ezine.entry_type.' + @entry.entry_type) %>を受け付けました。
以下のアドレスをクリックして<%= t('ezine.entry_type.' + @entry.entry_type) %>を完了してください。
<%= "#{@entry.node.full_url}entry/verification?token=#{@entry.verification_token}" %>

メールアドレス: <%= @entry.email %>
配信形式: <%= @entry.email_type %>

このメールに心当たりのない方はお手数ですが本メールを破棄してください。

<% message.subject = "[#{@entry.node.name}] #{t('ezine.entry_type.' + @entry.entry_type)}確認" %>
メールアドレスの<%= t('ezine.entry_type.' + @entry.entry_type) %>を受け付けました。
以下のアドレスをクリックして<%= t('ezine.entry_type.' + @entry.entry_type) %>を完了してください。
<%= "#{@entry.node.full_url}entry/verification?token=#{@entry.verification_token}" %>

メールアドレス: <%= @entry.email %>
配信形式: <%= @entry.email_type %>

このメールに心当たりのない方はお手数ですが本メールを破棄してください。

Add [ ] to verifcation mail subject

Add [ ] to verifcation mail subject


# NOTE! This file is generated!

apiVersion: v1
kind: Service
metadata:
  name: infra-fake-component
  annotations:
    dns.alpha.kubernetes.io/external: "infra-fake-component.<%= ENV["TF_VAR_cluster_name"] %>"
spec:
  selector:
    app: infra-fake-component
  ports:
  - port: 80
  type: LoadBalancer # exposed externally

# NOTE! This file is generated!

apiVersion: v1
kind: Service
metadata:
  name: infra-fake-component
  annotations:
    dns.alpha.kubernetes.io/external: "infra-fake-component.<%= ENV["TF_VAR_cluster_name"] %>"
  <% if ENV["TF_VAR_cluster_name"] == "stg.gpii.net" %>
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
    # Hardcoded reference to *.stg.gpii.net cert in ACM.
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:478785806711:certificate/6b326073-a2a2-4c92-b5b5-addd302ad79c"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
  <% end %>
spec:
  selector:
    app: infra-fake-component
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 80
  <% if ENV["TF_VAR_cluster_name"] == "stg.gpii.net" %>
    - name: https
      protocol: TCP
      port: 443
      targetPort: 80
  <% end %>
  type: LoadBalancer # exposed externally

Add SSL via hardcoded ARN to cert in ACM. stg only for now (cert is *.stg.gpii.net).


  <%= form_for [@question, @answer] do |f| %>
    <%= f.label :answer %>:
    <%= f.text_field :content %>

    <%= f.submit %>
  <% end %>

  <%= form_for [@question, @answer] do |f| %>
    <%= f.label :answer %>:
    <%= f.text_area :content, :size => "50X10" %>

    <%= f.submit %>
  <% end %>

Change answer input from text_filed to larger text_area


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

About you

  <%= f.fields_for :identity do |builder|  %>

      <%= render partial: "person_form", locals: { builder: builder } %>

  <% end %>
  <%= f.button("Update") %>

Houshold members

  <%= f.fields_for :household_members do |builder|  %>

      <%= render partial: "person_form", locals: { builder: builder } %>

  <% end %>
  <%= f.button("Update") %>

Your landlords

  <%= f.fields_for :landlords do |builder|  %>

      <%= render partial: "person_form", locals: { builder: builder } %>

  <% end %>
  <%= f.button("Update") %>

<% end %>
<%= button_to 'Download forms', "/download" %>

Remove some <p> tags from the main form

Remove some <p> tags from the main form

I don't know why those are there.


<%
  text = resource.send(name)
  if name =~ /_id$/
    if resource.class.respond_to?(:reflect_on_association)
      # FIXME what if association was set with :foreign_key option
      rel_name = name.sub(/_id$/, '').to_sym
      if resource.class.reflect_on_association(rel_name)
        text = resource_to_text(resource.send(rel_name))
      end
    end
  elsif name =~ /(thumbnail|image|photo|picture|avatar|logo|icon)_uid$/
    unless resource.send(name).blank?
      text = image_tag resource.send(name.sub(/_uid$/, '')).thumb('x16').url, :alt => ''
    else
      text = ""
    end
  elsif text.is_a? TrueClass or text.is_a? FalseClass
    text = t(text ? 'yes' : 'no', :scope => 'admin.global')
  end
%>

  <% if @features[:edit] %>
  <a class="main" href="<%= url_for( :action => :edit, :id => resource.id ) %>"><%= text %>
  <% else %>
  <%= text %>
  <% end %>

<%
  text = resource.send(name)
  if name =~ /_id$/
    if resource.class.respond_to?(:reflect_on_association)
      # FIXME what if association was set with :foreign_key option
      rel_name = name.sub(/_id$/, '').to_sym
      if resource.class.reflect_on_association(rel_name)
        text = resource_to_text(resource.send(rel_name))
      end
    end
  elsif name =~ /(thumbnail|image|photo|picture|avatar|logo|icon)_uid$/
    unless resource.send(name).blank?
      text = image_tag resource.send(name.sub(/_uid$/, '')).thumb('x16').url, :alt => ''
    else
      text = ""
    end
  elsif text.is_a? TrueClass or text.is_a? FalseClass
    text = t(text ? 'yes' : 'no', :scope => 'admin.global')
  elsif text.is_a? Time
    text = I18n.l(text, :format => :default)
  end
%>

  <% if @features[:edit] %>
  <a class="main" href="<%= url_for( :action => :edit, :id => resource.id ) %>"><%= text %>
  <% else %>
  <%= text %>
  <% end %>

Format time value with i18n time :default


<%= notice %>

  Identity:
  <%= @applicant.description %>

Add a placeholder applicants/show view

Add a placeholder applicants/show view

This'll probably become the main page for getting to all the other
sections of the form.


Asciicasts by ~<%= @user.nickname %>

      <%= render :partial => 'asciicasts/previews' %>
      <%= paginate @asciicasts %>

      <% if @asciicasts.size == 0 %>
        <% if current_user && current_user.id == @user.id -%>
          You haven't recorded anything yet. <%= link_to 'Record now', record_path %>
        <% else -%>
          <%= @user.nickname %> hasn't recorded anything yet.
        <% end -%>
      <% end -%>

<%= @user.nickname %>

<%= @user.avatar_img %>

<%= @user.asciicasts_count %> asciicasts

      <% if current_user %>

<%= link_to 'Settings', edit_user_path %>

      <% end %>

Asciicasts by ~<%= @user.nickname %>

      <%= render :partial => 'asciicasts/previews' %>
      <%= paginate @asciicasts %>

      <% if @asciicasts.size == 0 %>
        <% if current_user && current_user.id == @user.id -%>
          You haven't recorded anything yet.
          <%= link_to 'Record now', docs_path(:record) %>
        <% else -%>
          <%= @user.nickname %> hasn't recorded anything yet.
        <% end -%>
      <% end -%>

<%= @user.nickname %>

<%= @user.avatar_img %>

<%= @user.asciicasts_count %> asciicasts

      <% if current_user %>

<%= link_to 'Settings', edit_user_path %>

      <% end %>

Fix record link on ~user page

Fix record link on ~user page


<%= render "form_javascripts" %>

<%= form_for @item, :url => options, :html => { :class => "resource form-stacked", :multipart => true } do |form| %>

  <%= render "helpers/admin/resources/errors" %>

  <fieldset>
    <%= build_form(fields, form) %>

    <div class="actions">
      <% build_save_options.each do |key, value, special| %>
        <%
          message = Typus::I18n.t(value)
          options = { :name => key,
                      :onclick => "Typus.setConfirmUnload(false);",
                      'data-disable-with' => message,
                      :class => "btn" }
        %>
        <%= submit_tag message, options %>
      <% end %>
    </div>
  </fieldset>

<% end %>

<%= render "form_javascripts" %>

<%= form_for @item, :url => options, :html => { :class => "resource form-stacked", :multipart => true } do |form| %>

  <%= render "helpers/admin/resources/errors" %>

  <fieldset>
    <%= build_form(fields, form) %>

    <div class="actions">
      <% build_save_options.each do |key, value, special| %>
        <% klass = key.eql?("_save") ? 'btn primary' : 'btn'  %>
        <%
          message = Typus::I18n.t(value)
          options = { :name => key,
                      :onclick => "Typus.setConfirmUnload(false);",
                      'data-disable-with' => message,
                      :class => klass }
        %>
        <%= submit_tag message, options %>
      <% end %>
    </div>
  </fieldset>

<% end %>

Mark _save button as primary

Mark _save button as primary


About

    This is a sample application designed to demonstrate how to use <%= link_to "Spreedly", "https://spreedly.com" %> to collect money for one-off purchases using credit cards.

It uses the spreedly gem to talk to the Spreedly API.

    It's all open source and on Github for you to use.  We also have a number of other sample applications you might find useful.

Update link to sample apps page

Update link to sample apps page


Hello!

<%= @comment.user.email %> just left a comment on <%= link_to "Note ##{@note.number}", [@book, @note] %> for <%= @book.title %>:

<%= raw(RDiscount.new(@comment.text).to_html) %>

Love,

The Twist Bot.

Hello!

<%= @comment.user.email %> just left a comment on <%= link_to "Note ##{@note.number}", book_note_url(@book, @note) %> for <%= @book.title %>:

<%= raw(RDiscount.new(@comment.text).to_html) %>

Love,

The Twist Bot.

Use full URL in comment notification

Use full URL in comment notification


<%= @taxon.name %>

<% content_for :sidebar do %>

    <%= render :partial => 'spree/shared/taxonomies' %>
    <%= render :partial => 'spree/shared/filters' if @taxon.children.empty? %>

<% end %>

<% cache @taxon do %>

    <%= render :partial => 'spree/shared/products', :locals => { :products => @products, :taxon => @taxon } %>

  <% unless params[:keywords].present? %>

      <%= render :partial => 'taxon', :collection => @taxon.children %>

  <% end %>
<% end %>

<%= @taxon.name %>

<% content_for :sidebar do %>

    <%= render :partial => 'spree/shared/taxonomies' %>
    <%= render :partial => 'spree/shared/filters' if @taxon.children.empty? %>

<% end %>

  <%= render :partial => 'spree/shared/products', :locals => { :products => @products, :taxon => @taxon } %>

<% cache @taxon do %>
  <% unless params[:keywords].present? %>

      <%= render :partial => 'taxon', :collection => @taxon.children %>

  <% end %>
<% end %>

Remove taxon cache wrapping around products in taxons/show, as they are cached on their own


<%= notice %>

  Name:
  <%= @subject.name %>

<% if @subject.neighborhood_id != nil %>

    Neighborhood:
    <%= @subject.neighborhood.name %>

<% end %>

  Type:
  <%= @subject.type %>

<%= link_to 'Edit', edit_subject_path(@subject) %> |
<%= link_to 'Back', subjects_path %>

<%= notice %>

  Name:
  <%= @subject.name %>

<% if @subject.type == "Property" %>

    Neighborhood:
    <%= @subject.neighborhood.name %>

<% end %>

  Type:
  <%= @subject.type %>

<%= link_to 'Edit', edit_subject_path(@subject) %> |
<%= link_to 'Back', subjects_path %>

Change view conditional to ask if it is a property


  <%= erb :"onboarding/progress_bar", locals: {step: dashboard.next_action} %>

More Conversations

Now that you've completed an exercise, you will see that a "Nitpick" menu has appeared. This lets you see exercises that other people are working on. Look at their code and think about what you see there. Is anything more complicated than it needs to be? Is there something that is unclear or confusing? Ask questions, wonder out loud.

  <%= erb :"onboarding/progress_bar", locals: {step: dashboard.next_action} %>

More Conversations

If you've submitted Hello World as your first exercise, complete the next exercise in the sequence to unlock the ability to comment on code.

Once you've unlocked commenting, you will see that an "Exercises" menu has appeared. This lets you see exercises that other people are working on. Look at their code and think about what you see there. Is anything more complicated than it needs to be? Is there something that is unclear or confusing? Ask questions, wonder out loud.

We will suggest five different exercises for you to comment on every day. You don't have to comment on them, but getting in the habit of giving feedback frequently will help you think critically about your own code while you write it.

Update language in onboarding to reflect new exercises menu


server {
  listen 51000;
  server_name <%= all_domains.join(" ") %>;

  # Write the real client IP when it's passed via X-Forwarded-For from HAProxy.
  set_real_ip_from 127.0.0.1;
  real_ip_header X-Forwarded-For;

  access_log <%= current_path %>/log/access.log combined;
  error_log <%= current_path %>/log/error.log;

  root <%= current_path %>/public;

  # Allow for larger request bodies to allow for huge documentation pages.
  client_max_body_size 10m;

  <% torquebox_apps.each do |app| %>
    # Serve non-static resources with Torquebox.
    try_files $uri/index.html $uri.html $uri @app;
    location @app {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Host $http_host;
      proxy_redirect off;
      proxy_pass http://<%= app[:host] %>:<%= torquebox_http_port %>;
    }
  <% end %>
}

server {
  listen 51000;
  server_name <%= all_domains.join(" ") %>;

  # Write the real client IP when it's passed via X-Forwarded-For from HAProxy.
  set_real_ip_from 127.0.0.1;
  real_ip_header X-Forwarded-For;

  access_log <%= current_path %>/log/access.log combined;
  error_log <%= current_path %>/log/error.log;

  root <%= current_path %>/public;

  # Allow for larger request bodies to allow for huge documentation pages.
  client_max_body_size 10m;

  <% torquebox_apps.each do |app| %>
    # Serve non-static resources with Torquebox.
    try_files $uri/index.html $uri.html $uri @app;
    location @app {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Host $http_host;
      proxy_redirect off;

      proxy_set_header  Host <%= app[:host] %>;
      proxy_pass http://127.0.0.1:<%= torquebox_http_port %>;
    }
  <% end %>
}

Fix proxying to torquebox when dynamic, internal domains don't resolve.


# This example config should work with Ubuntu 12.04+.  It
# allows you to manage Sidekiq instances with
# Upstart, Ubuntu's native service management tool.
#
# NOTE: This is heavily inspired by Sidekiq's example sidekiq.conf
#
# Save this config as /etc/init/sidekiq-APPNAME.conf then mange sidekiq with:
#   sudo start sidekiq-APPNAME
#   sudo stop sidekiq-APPNAME
#   sudo status sidekiq-APPNAME
#
# or use the service command:
#   sudo service sidekiq-APPNAME {start,stop,restart,status}

description "Sidekiq Background Worker"

# no "start on", we don't want to automatically start
stop on (stopping workers or runlevel [06])

# change to match your deployment user
setuid deploy
setgid deploy

respawn
respawn limit 3 30

# TERM is sent by sidekiqctl when stopping sidekiq.  Without declaring these as normal exit codes, it just respawns.
normal exit 0 TERM

script
exec /bin/bash <<EOT
  exec "cd #{@release_path} ; nohup bundle exec sidekiq -e #{@sidekiq_env} -C #{@release_path}/config/sidekiq.yml -P #{@release_path}/tmp/pids/sidekiq.pid >> /dev/null 2>&1 &"
EOT
end script

pre-stop script
exec /bin/bash <<EOT
  exec "cd #{@release_path} && if [ -f #{@release_path}/tmp/pids/sidekiq.pid ]; then bundle exec sidekiqctl stop #{@release_path}/tmp/pids/sidekiq.pid 60 ; fi"
EOT
end script

# This example config should work with Ubuntu 12.04+.  It
# allows you to manage Sidekiq instances with
# Upstart, Ubuntu's native service management tool.
#
# NOTE: This is heavily inspired by Sidekiq's example sidekiq.conf
#
# Save this config as /etc/init/sidekiq-APPNAME.conf then mange sidekiq with:
#   sudo start sidekiq-APPNAME
#   sudo stop sidekiq-APPNAME
#   sudo status sidekiq-APPNAME
#
# or use the service command:
#   sudo service sidekiq-APPNAME {start,stop,restart,status}

description "Sidekiq Background Worker"

# no "start on", we don't want to automatically start
stop on (stopping workers or runlevel [06])

# change to match your deployment user
setuid deploy
setgid www-data

respawn
respawn limit 3 30

# TERM and USR1 are sent by sidekiqctl when stopping sidekiq.  Without declaring these as normal exit codes, it just respawns.
normal exit 0 TERM USR1

chdir "<%= @release_path %>"

script
  exec bundle exec sidekiq -e <%= @sidekiq_env %> -C config/sidekiq.yml
end script

Revert to old sidekiq upstart syntax

Revert to old sidekiq upstart syntax


<% content_for :head do %>
  <%= javascript_include_tag states_url(:format => :js) %>
  <%= javascript_include_tag countries_url(:format => :js) %>
<% end %>

<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @address } %>
<%= form_for @address, :html => {:id => "checkout_form_address"} do |f| %>
<fieldset>
  <%= content_tag(:legend, t(:new_shipping_address, :scope => :address_book)) %>
  <div class="inner">
    <%= render :partial => 'spree/addresses/form', :locals => {
      :address_name => 'address',
      :address_form => f,
      :address_type => 'shipping',
      :address => @address
    } %>
  </div>
  <%= f.submit t(:save, :scope => :address_book) %>
</fieldset>
<% end %>

Remove not found javascript files

Remove not found javascript files


Rainbows! do
  use :ThreadPool # concurrency model to use
  worker_connections 400
  keepalive_requests 666 # default:100
end

worker_processes 4
listen "<%= @web_host %>:<%= @web_port %>"
user("<%= @user %>","<%= @group || nil %>")
stderr_path "<%= @logfile %>"
stdout_path "<%= @logfile %>"
working_directory "<%= @app_location %>"

Add a rainbows configuration template

Add a rainbows configuration template


export HOMEBREW_ROOT=<%= @installdir %>
export HOMEBREW_CACHE=<%= @cachedir %>

export BOXEN_HOMEBREW_BOTTLE_URL=<%= scope.lookupvar("::homebrew_bottle_url") %>

<% if @set_cflags %>
export CFLAGS="-I$HOMEBREW_ROOT/include"
<% end %>

<% if @set_ldflags %>
export LDFLAGS="-L$HOMEBREW_ROOT/lib"
<% end %>

# Add homebrew'd stuff to the path.

export PATH=$HOMEBREW_ROOT/bin:$HOMEBREW_ROOT/sbin:$PATH

# Add homebrew'd stuff to the manpath.

export MANPATH=$HOMEBREW_ROOT/share/man:$MANPATH

Add homebrew's bin/sbin to PATH, and man to MANPATH


<%= submission.language %>: <%= submission.slug %>

<%= submission.code %>

Nits

  <% submission.nits.each do |nit| %>

      <%= nit.comment %>

      <%= nit.user.username %>

  <% end %>

<%= submission.language %>: <%= submission.slug %>

<%= Markdown.render("```#{submission.language}\n#{submission.code}\n```") %>

Nits

  <% submission.nits.each do |nit| %>

      <%= nit.comment %>

      <%= nit.user.username %>

  <% end %>

Add syntax highlighting to code on submission page


<% @times.each do |hours| %>
  <div style="float:left;display:inline-block;padding:0 0.5em;width:<%= 100 / @times.to_a.length.to_f %>%;font-size:0.01em;height:10vh;"><%= hours %>

<% end %>

Fix regression in sky_color_test from new JSON


---
- job:
    name: integration-licensify-deploy
    display-name: integration-licensify-deploy
    project-type: freestyle
    description: "Kicks off a Licensify deploy in the Integration environment"
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          JSON="{\"parameter\": [{\"name\": \"BETA_PAYMENT_ACCOUNTS\", \"value\": \"false\"}, {\"name\": \"artefact_number\", \"value\": \"$artefact_number\"}, {\"name\": \"app_version\", \"value\": \"$app_version\"}, {\"name\": \"CI_JOB_NAME\", \"value\": \"master\"}, {\"name\": \"ARTIFACT_PATH\", \"value\": \"target/universal\"}], \"\": \"\"}"

          # Deploy to integration environment
          curl -v -f -XPOST https://<%= @jenkins_integration_api_user %>:<%= @jenkins_integration_api_password %>@ci-deploy.integration.publishing.service.gov.uk/job/Licensify_Deploy/build --data-urlencode json="$JSON"
    wrappers:
        - ansicolor:
            colormap: xterm
    parameters:
        - string:
            name: artefact_number
            description: artefact number as provided by the CI after successful build
        - string:
            name: app_version
            description: version of the app to be deployed
            default: '1.1.1'

---
- job:
    name: integration-licensify-deploy
    display-name: integration-licensify-deploy
    project-type: freestyle
    description: 'Kicks off a Licensify deploy in the Integration environment'
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          #!/bin/bash

          # Deploy TARGET_APPLICATION to the AWS Integration environment.
          function deploy {
            read -rd '' JSON <<-EOF
              {"parameter": [
                {"name": "TAG", "value": "$TAG"},
                {"name": "TARGET_APPLICATION", "value": "$TARGET_APPLICATION"},
                {"name": "DEPLOY_TASK", "value": "deploy"},
              ]}
          EOF

            CRUMB=$(curl https://<%= @jenkins_integration_aws_api_user %>:<%= @jenkins_integration_aws_api_password %>@<%= @aws_deploy_url %>/crumbIssuer/api/json | jq --raw-output '. | .crumb')

            curl -fX POST -H "Jenkins-Crumb:$CRUMB" -d token=<%= @puppet_auth_token %> --data-urlencode json="$JSON" https://<%= @jenkins_integration_aws_api_user %>:<%= @jenkins_integration_aws_api_password %>@<%= @aws_deploy_url %>/job/Deploy_App/build
          }

          # Deploy each Licensify app (licensify, licensify-admin, licensify-feed).
          TARGET_APPLICATION=licensify deploy
          TARGET_APPLICATION=licensify-admin deploy
          TARGET_APPLICATION=licensify-feed deploy
    wrappers:
        - ansicolor:
            colormap: xterm
    parameters:
        - string:
            name: TAG
            description: 'Git tag/committish to deploy'
            default: release

Deploy Licensify CI builds to AWS Integration instead of Carrenza.

This is in preparation for migrating Licensify to AWS.

`integration-licensify-deploy` now starts three Deploy_App Jenkins jobs
on the AWS deploy.integration Jenkins: one for each of the Licensify
apps. We also change the parameters of `integration-licensify-deploy` to
take a Git "committish" (release tag) rather than artefact_number.

These changes make the Licensify deployments more conistent with other
GOV.UK apps.


<%= form_for(applicant) do |f| %>

About you

  <%= f.fields_for :identity do |builder| %>
    <%= render partial: "people/person_fields", locals: { builder: builder } %>

  <% end %>
  <%= f.button("Update") %>

Houshold members

  <%= f.fields_for :household_members do |builder| %>
    <%= render partial: "people/person_fields", locals: { builder: builder } %>

  <% end %>
  <%= link_to("Add a household member", new_household_member_path) %>

  <%= f.button("Update") %>

Your landlords

  <%= f.fields_for :landlords do |builder| %>
    <%= render partial: "people/person_fields", locals: { builder: builder } %>

  <% end %>
  <%= link_to("Add a landlord", new_landlord_path) %>

  <%= f.button("Update") %>

<% end %>
<%= button_to 'Download forms', "/download" %>

<%= form_for(applicant, remote: true) do |f| %>

About you

  <%= f.fields_for :identity do |builder| %>
    <%= render partial: "people/person_fields", locals: { builder: builder } %>

  <% end %>
  <%= f.button("Update") %>

Houshold members

  <%= f.fields_for :household_members do |builder| %>
    <%= render partial: "people/person_fields", locals: { builder: builder } %>

  <% end %>
  <%= link_to("Add a household member", new_household_member_path) %>

  <%= f.button("Update") %>

Your landlords

  <%= f.fields_for :landlords do |builder| %>
    <%= render partial: "people/person_fields", locals: { builder: builder } %>

  <% end %>
  <%= link_to("Add a landlord", new_landlord_path) %>

  <%= f.button("Update") %>

<% end %>
<%= button_to 'Download forms', "/download" %>

Revert "Disable AJAX form updates"

Revert "Disable AJAX form updates"

This reverts commit 83b191c69496e73f7c36ceeac0248e07a5d8877d.


<%= content_tag :div, :id => 'outer_wrapper', :data => {:theme => entry.theming.theme.name} do %>
  <%= render 'pageflow/entries/skip_links' %>

<%= entry.title %>

  <img src="<%= image_path("pageflow/themes/#{entry.theming.theme.directory_name}/logo_print.png") %>" class="print_image" alt="Logo image for print version">
  <%= request.original_url %>
  <%= content_tag :div, :id => 'content', :class => 'entry', :data => {:role => 'slideshow'} do %>
    <%= render entry.pages %>

Scrollen, um weiterzulesen

Wischen um Text wieder einzublenden

  <% end %>

  <%= render 'pageflow/entries/header', :entry => entry %>
  <%= render 'pageflow/entries/navigation', :entry => entry %>
  <%= render 'pageflow/entries/overview', :entry => entry %>
<% end %>

Add `data-theme` Attribute to Outer Wrapper

Required by `pageflow-chart` gem to apply theme class to chart body.


Active Threads

Threads with new replies in the past 7 days

  <% @active_threads.each do |post, date| %>
    <%= render :partial => 'activity_row', :locals =>
      { :post => post, :date => date, :unread => post.thread_unread_for_user?(@current_user) } %>
  <% end %>

New Threads

Threads started in the past 7 days with no replies yet

  <% @recent_threads.each do |post| %>
    <%= render :partial => 'activity_row', :locals =>
      { :post => post, :date => post.date, :unread => post.unread_for_user?(@current_user) } %>
  <% end %>

Control groups, mailing list groups, and csh.test are excluded from these feeds.

Add explanation of excluded groups in activity feeds


import os

from twisted.application import service
from buildbot.master import BuildMaster

basedir = '.'

rotateLength = 10000000
maxRotatedFiles = 10
configfile = 'master.cfg'

# Default umask for server
umask = 002

# if this is a relocatable tac file, get the directory containing the TAC
if basedir == '<%= @buildbot_base_dir %>':
    import os.path
    basedir = os.path.abspath(os.path.dirname(__file__))

# note: this line is matched against to check that this is a buildmaster
# directory; do not edit it.
application = service.Application('<%= @username %>')
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
                                maxRotatedFiles=maxRotatedFiles)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)

m = BuildMaster(basedir, configfile, umask)
m.setServiceParent(application)
m.log_rotation.rotateLength = rotateLength
m.log_rotation.maxRotatedFiles = maxRotatedFiles

import os

### WARNING THIS FILE IS IN PUPPET ###
### See buildbot_asf module ###

from twisted.application import service
from buildbot.master import BuildMaster

basedir = '.'

rotateLength = 10000000
maxRotatedFiles = 10
configfile = 'master.cfg'

# Default umask for server
umask = 002

# if this is a relocatable tac file, get the directory containing the TAC
if basedir == '<%= @buildbot_base_dir %>':
    import os.path
    basedir = os.path.abspath(os.path.dirname(__file__))

# note: this line is matched against to check that this is a buildmaster
# directory; do not edit it.
application = service.Application('<%= @username %>')
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
                                maxRotatedFiles=maxRotatedFiles)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)

m = BuildMaster(basedir, configfile, umask)
m.setServiceParent(application)
m.log_rotation.rotateLength = rotateLength
m.log_rotation.maxRotatedFiles = maxRotatedFiles

Add more stuff to remove from svn

Add more stuff to remove from svn


        <%= charset_and_ie_support_tags %>
        <title><%= @params[:title] || "#{c '$MODULE_NAME$'} - #{c '$SITE_NAME$'}" %></title>
        <%= meta_tags %>
        <%= c '$GLOBAL_AJAXJS$' %>
        <%= stylesheet_link_tag %>
        <%= javascript_include_tag %>

            <%= c '$GLOBAL_HEADER$' %>

                <main class="wide_content bordered<%= ' vk-init' if @params[:vk][:init] %>">
                    <% yield if block_given? %>

            <%= c '$GLOBAL_FOOTER$' %>

        <%= charset_and_ie_support_tags %>
        <title><%= @params[:title] || "#{c '$MODULE_NAME$'} - #{c '$SITE_NAME$'}" %></title>
        <%= meta_tags %>
        <%= c '$GLOBAL_AJAXJS$' %>
        <%= stylesheet_link_tag %>
        <%= javascript_include_tag %>

            <%= c '$GLOBAL_HEADER$' %>

                <main class="wide_content<%= ' vk-init' if @params[:vk][:init] %>">
                    <% yield if block_given? %>

            <%= c '$GLOBAL_FOOTER$' %>

Remove `bordered` class from wide_content layout.


    <%= link_to admin_job.title, admin_job, class: 'link' %>

    <%= admin_job.company_name %>

    <%= boolean_icon(admin_job.approved?) %>

    <%= job_creator_name(admin_job) %>

    <%= time_ago_in_words(admin_job.created_at) %>

    <% if (user_signed_in?) %>
      <% if admin_job.draft? || admin_job.under_review? %>
        <%= link_to "Edit Job", edit_job_path(admin_job), :class => "button button-3d button-mini button-rounded button-blue", target: '_blank' %>
      <% elsif admin_job.approved? %>
        <%= link_to "Take down", take_down_job_path(admin_job), class: "button button-3d button-mini button-rounded button-red", method: :put %>
      <% elsif admin_job.disabled? %>
        <%= link_to "Publish", publish_job_path(admin_job), class: "button button-3d button-mini button-rounded button-green", method: :put %>
      <% end %>
    <% end %>

    <%= link_to admin_job.title, admin_job, class: 'link' %>

    <%= admin_job.company_name %>

    <%= boolean_icon(admin_job.approved?) %>

    <%= job_creator_name(admin_job) %>

    <%= time_ago_in_words(admin_job.created_at) %>

    <% if (user_signed_in?) %>
      <% if admin_job.draft? || admin_job.under_review? %>
        <%= link_to "Edit Job", edit_job_path(admin_job), :class => "button button-3d button-mini button-rounded button-blue", target: '_blank' %>
      <% end %>
    <% end %>

Remove inline admin actions when listing jobs


    产品管理
    <%= link_to "创建新产品", new_admin_product_path, class: "btn btn-primary" %>

      名称
      描述
      价格
      详情

    <% @products.each do |product| %>

        product.name
        product.description
        product.price
        product.details

    <% end %>

Complete the admin products index page

Complete the admin products index page


<%= @question.title %>

<%= @question.content %>

<% if @question.author_id == session[:user_id] %>

<%= link_to 'Edit', edit_question_path(@question) %>

<% end %>

Answers

<% @question.answers.each do |answer| %>

  <%= answer.content %>
<% end %>

<%= answer.content %>

<%= link_to 'Edit', edit_answer_path(answer) %>

<% end %>
<%= link_to 'Back', questions_path %>

<%= render partial: "answers/new", locals: {answer: @answer} %>

Fix merge conflict in questions show

Fix merge conflict in questions show


source 'https://rubygems.org'

ruby '<%= RUBY_VERSION %>'

gem 'airbrake'
gem 'bourbon'
gem 'coffee-rails'
gem 'delayed_job_active_record', '>= 4.0.0'
gem 'email_validator'
gem 'flutie'
gem 'high_voltage'
gem 'jquery-rails'
gem 'neat'
gem 'pg'
gem 'rack-timeout'
gem 'rails', '>= 4.0.3'
gem 'recipient_interceptor'
gem 'sass-rails', '>= 4.0.2'
gem 'simple_form'
gem 'title'
gem 'uglifier'
gem 'unicorn'

group :development do
  gem 'foreman'
  gem 'spring'
  gem 'spring-commands-rspec'
end

group :development, :test do
  gem 'awesome_print'
  gem 'dotenv-rails'
  gem 'factory_girl_rails'
  gem 'pry-rails'
  gem 'rspec-rails', '>= 2.14'
end

group :test do
  gem 'capybara-webkit', '>= 1.0.0'
  gem 'database_cleaner'
  gem 'launchy'
  gem 'shoulda-matchers'
  gem 'simplecov', require: false
  gem 'timecop'
  gem 'webmock'
end

group :staging, :production do
  gem 'newrelic_rpm', '>= 3.7.3'
end

source 'https://rubygems.org'

ruby '<%= RUBY_VERSION %>'

gem 'airbrake'
gem 'bourbon'
gem 'coffee-rails'
gem 'delayed_job_active_record'
gem 'email_validator'
gem 'flutie'
gem 'high_voltage'
gem 'jquery-rails'
gem 'neat'
gem 'pg'
gem 'rack-timeout'
gem 'rails', '>= 4.0.3'
gem 'recipient_interceptor'
gem 'sass-rails', '>= 4.0.2'
gem 'simple_form'
gem 'title'
gem 'uglifier'
gem 'unicorn'

group :development do
  gem 'foreman'
  gem 'spring'
  gem 'spring-commands-rspec'
end

group :development, :test do
  gem 'awesome_print'
  gem 'dotenv-rails'
  gem 'factory_girl_rails'
  gem 'pry-rails'
  gem 'rspec-rails', '>= 2.14'
end

group :test do
  gem 'capybara-webkit', '>= 1.0.0'
  gem 'database_cleaner'
  gem 'launchy'
  gem 'shoulda-matchers'
  gem 'simplecov', require: false
  gem 'timecop'
  gem 'webmock'
end

group :staging, :production do
  gem 'newrelic_rpm', '>= 3.7.3'
end

Fix Delayed::Job <-> Rails 4.1 dependency conflict

Fixes:

    Bundler could not find compatible versions for gem "activerecord":
      In Gemfile:
        delayed_job_active_record (>= 4.0.0) ruby depends on
          activerecord (< 4.1, >= 3.0) ruby

        rails (>= 4.0.3) ruby depends on
          activerecord (4.1.0)

https://github.com/collectiveidea/delayed_job_active_record/pull/86


asciidoc
bash
bzip2
cmake3
cowsay
emacs-common
fail2ban
figlet
fortune-mod
gcc
httpd
httpd-itk
ipset
iptables
kernel
mariadb
mariadb-server
memcached
mg
nano
net-tools
nginx
ntp
ntpdate
openssh
openssh-server
openssl
php
php-mysql
postgresql
postgresql-server
ruby
rubygems
screen
socat
sysstat
tcpdump
vim
xmlto
zlib
zlib-devel
zsh

asciidoc
bash
bzip2
cmake3
cowsay
emacs-common
fail2ban
figlet
fortune-mod
gcc
httpd
httpd-itk
ipset
iptables
kernel
mariadb
mariadb-server
memcached
mg
nano
net-tools
nginx
ntp
ntpdate
openssh
openssh-server
openssl
php
php-mysql
postgresql
postgresql-server
python-devel
python2-pip
ruby
rubygems
screen
socat
sysstat
tcpdump
vim
xmlto
zlib
zlib-devel
zsh

Add python-devel & pip, since architect needs them for graphite


this is "home"

<% if current_admin %>
  <%= link_to("Admin Logout", destroy_admin_session_path, method: "delete") %>

<% else %>
  <%= link_to("Admin Login", new_admin_session_path) %>

<% end %>

<%if current_client  %>
  <%= link_to("Client Logout", destroy_client_session_path, method: "delete") %>

<% else %>
  <%= link_to("Client Login", new_client_session_path) %>

<% end %>

<%if current_shipper  %>
  <%= link_to("Shipper Logout", destroy_shipper_session_path, method: "delete") %>

<% else %>
  <%= link_to("Shipper Login", new_shipper_session_path) %>

<% end %>

Add provisional links to login and logout


        <%= comment.author.username %>
          <%= comment.created_at %>

<%= comment.content %>

  <% if comment.author_id == session[:user_id] %>

<%= link_to 'Edit', edit_comment_path(comment) %>

<% end %>

Add link to add comment to comments

Add link to add comment to comments


<% promotion_action.promotion_action_line_items.each do |item| %>
  <%= item.quantity %> x <%= item.variant.product.name %>
  <%= item.variant.options_text %>
<% end %>

<% if promotion_action.promotion_action_line_items.empty? %>
  <% line_items = promotion_action.promotion_action_line_items %>
  <% line_items.build %>

  <% line_items.each_with_index do |line_item, index| %>

          <% line_item_prefix = "#{param_prefix}[promotion_action_line_items_attributes][#{index}]" %>
          <%= hidden_field_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, :class => "variant_autocomplete fullwidth" %>

          <%= number_field_tag "#{line_item_prefix}[quantity]", line_item.quantity, :min => 1, :class => 'fullwidth' %>

  <% end %>
<% end %>

[backend] Make variant selection in _create_line_items wider


Organizations#show

Find me in app/views/organizations/show.html.erb

Name: <%= @organization.name %>

Avatar: <img src="<%= @organization.avatar %>">

Address: <%= @organization.address %>

Bio: <%= @organization.bio %>

Scenes
  <% @organization.orgscenes.each do |scene| %>

<img src="<%= scene.img %>">

  <% end %>

Social Media

<%= @organization.facebook %>

<%= @organization.twitter %>

Email: <%= @organization.email %>

Add show view, needs orgscenes fix

Add show view, needs orgscenes fix


<% # TODO Fix correctly %>

<% message.subject = 'Verification Email' %>

<%= @entry.node.name %>

<%= @entry.email %>

<%= @entry.email_type %>

<%= @entry.entry_type %>

<% # TODO Set correct verification URL %>
<%= "http://example.com/foo/bar?token=#{@entry.verification_token}" %>

<% # TODO Fix correctly %>

<% message.subject = 'Verification Email' %>

<%= @entry.node.name %>

<%= @entry.email %>

<%= @entry.email_type %>

<%= @entry.entry_type %>

<%= "#{@entry.node.full_url}entry/verification?token=#{@entry.verification_token}" %>

Fix the URL of verification mail

Fix the URL of verification mail


#raw
echo \$template LogToMaster, "<%%PRI%>1 %\$NOW%T%TIMESTAMP:8:\$%Z %HOSTNAME% %APP-NAME% %PROCID% %MSGID% -%msg%" >> /target/etc/rsyslog.d/10-logs2master.conf && \
echo "*.* @$server;LogToMaster" >> /target/etc/rsyslog.d/10-logs2master.conf && \
#end raw

#raw
echo \$template LogToMaster, "<%%PRI%>1 %\$NOW%T%TIMESTAMP:8:\$%Z %HOSTNAME% %APP-NAME% %PROCID% %MSGID% -%msg%" >> /target/etc/rsyslog.d/10-logs2master.conf && \
#end raw
echo "*.* @$server;LogToMaster" >> /target/etc/rsyslog.d/10-logs2master.conf && \

Fix Ubuntu syslogging snippet Cheetah error

Change-Id: I02bf28a2a37dbfb9f9404cc5640ba69dff073056
Closes-bug: #1282814


<%= form_for(@key_pair) do |f| %>
  <% if @key_pair.errors.any? %>

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

      <% @key_pair.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label t('key_pairs.file') %>

    <%= f.file_field :file %>

<%= t('key_pairs.or') %>

    <%= f.label t('key_pairs.copy_paste_key') %>

    <textarea cols="55" rows="14" id="key_pair_key_string" name="key_pair[key_string]"></textarea>

    <%= f.submit(t('key_pairs.create_key_pair')) %>

<% end %>

<%= form_for(@key_pair) do |f| %>
  <% if flash[:error] %>

<%= flash[:error] %>

  <% end %>
  <% if @key_pair.errors.any? %>

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

      <% @key_pair.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label t('key_pairs.file') %>

    <%= f.file_field :file %>

<%= t('key_pairs.or') %>

    <%= f.label t('key_pairs.copy_paste_key') %>

    <textarea cols="55" rows="14" id="key_pair_key_string" name="key_pair[key_string]"></textarea>

    <%= f.submit(t('key_pairs.create_key_pair')) %>

<% end %>

Allow new key_pair form to display flash messages


# Listen on TCP.
$ModLoad imtcp

# Server side SSL.
$DefaultNetstreamDriver gtls

# Self-signed, CA == Cert.
$DefaultNetstreamDriverCAFile <%= @cert_file %>
$DefaultNetstreamDriverCertFile <%= @cert_file %>
$DefaultNetstreamDriverKeyFile <%= @key_file %>

# Verify server, not client.
$InputTCPServerStreamDriverMode 1
$InputTCPServerStreamDriverAuthMode anon

# Temporarily disable message de-dupe.
$RepeatedMsgReduction off

# Switch to remote ruleset
$RuleSet cdn

# Record raw message content without leading space.
$template NoFormat,"%msg:2:$:%\n"

# Log everything from this source.
*.* -<%= @log_dir -%>/bouncer_and_redirector.log;NoFormat

# Switch back to default ruleset
$RuleSet RSYSLOG_DefaultRuleset

$InputTCPServerBindRuleset cdn
$InputTCPServerRun <%= @port %>

# Restore message de-dupe.
$RepeatedMsgReduction on

# Use the same max-line-length as Fastly
$MaxMessageSize 16k

Increase rsyslog max line length

Increase rsyslog max line length

Fastly's max line length is 16k, the default rsyslog is 2k, so we are inserting
a line break at 2k.

This is a problem when we try to process the logs with awk.


<%=h I18n.t("students.create_new") %>

  <%= render :partial => "student_form", :locals => {:action => 'create'} -%>

<%=h I18n.t("students.create_new") %>

  <%= render :partial => "student_form", :locals => {:action => 'create'} %>

FIX - Minor styling issue

FIX - Minor styling issue


/* DO NOT EDIT: File is auto-generated */
package <%= repository.imit.ioc_package %>;

<%= description_javadoc_for(repository, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public class <%= repository.imit.services_module_name %>
  extends com.google.gwt.inject.client.AbstractGinModule
{
  @Override
  protected void configure()
  {
    bind( org.realityforge.replicant.client.ChangeMapper.class ).to( <%= repository.imit.qualified_change_mapper_name %>.class );
<%
  repository.data_modules.select{|data_module| data_module.imit? && data_module.gwt_rpc?}.each do |data_module|
    data_module.services.select{|service| service.imit? && service.gwt_rpc?}.each do |service|
%>    bind( <%= service.imit.qualified_name %>.class ).to( <%= service.imit.qualified_proxy_name %>.class );
<%
    end
  end
%>  }
}

/* DO NOT EDIT: File is auto-generated */
package <%= repository.imit.ioc_package %>;

<%= description_javadoc_for(repository, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public class <%= repository.imit.services_module_name %>
  extends org.realityforge.replicant.client.json.gwt.ReplicantGinModule
{
  @Override
  protected void configure()
  {
    super.configure();
    bind( org.realityforge.replicant.client.ChangeMapper.class ).to( <%= repository.imit.qualified_change_mapper_name %>.class );
<%
  repository.data_modules.select{|data_module| data_module.imit? && data_module.gwt_rpc?}.each do |data_module|
    data_module.services.select{|service| service.imit? && service.gwt_rpc?}.each do |service|
%>    bind( <%= service.imit.qualified_name %>.class ).to( <%= service.imit.qualified_proxy_name %>.class );
<%
    end
  end
%>  }
}

Make the imitation module extend the module provided by the replicant library


Invoices#index

Find me in app/views/invoices/index.html.erb

<%
	image = RTesseract.new("images/ocrtext.png")
	imagetext = image.to_s

%>
<%=
	imagetext
%>

Remove tesseract logic from invoices index view


--enable-intl
--with-openssl
--without-pear
--with-gd
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-freetype-dir=/usr
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-mcrypt=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-curl=/usr
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-shmop
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--with-gmp

--enable-intl
--with-openssl
--without-pear
--with-gd
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-freetype-dir=/usr
--with-freetype
--enable-exif
--enable-zip
--with-zlib
--with-zlib-dir=/usr
--with-mcrypt=/usr
--with-pdo-sqlite
--enable-soap
--enable-xmlreader
--with-xsl
--enable-ftp
--with-curl=/usr
--with-tidy
--with-xmlrpc
--enable-sysvsem
--enable-sysvshm
--enable-shmop
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--enable-pcntl
--with-readline
--enable-mbstring
--with-curl
--with-pgsql
--with-pdo-pgsql
--with-gettext
--enable-sockets
--with-bz2
--enable-bcmath
--enable-calendar
--with-libdir=lib
--enable-fpm
--enable-maintainer-zts
--with-gmp

Enable Zend Thread Safety for PHP.

Enable Zend Thread Safety for PHP.

Fixes travis-ci/travis-ci#917.


<% if @taxon.hero %>
<div class='hero-image' style="background-image: url(<%= @taxon.hero.url %>)">

<% end %>

<% if @taxon.hero && @taxon.hero.url %>
<div class='hero-image' style="background-image: url(<%= @taxon.hero.url %>)">

<% end %>

Fix display of taxons without a hero image.


<%= @chapter.book.title %>

<%= @chapter.title %>

<%= render_elements(@chapter.elements) %>

<%= @chapter.book.title %> - Chapter <%= @chapter.position %> - <%= @chapter.title %>

<%= render_elements(@chapter.elements) %>

Put chapter title all on one line

Put chapter title all on one line


<img src="google.png" />
<script type="text/javascript" charset="utf-8" src="retina.js"></script>

Add comparison image to test

Add comparison image to test


.table
{
  width: 100%;
  border-collapse:collapse;
  font-size: 13px;
  border: 1px solid #d4d4d4;
  border-top: none;
}
.table th,
.table td
{
  border-left: 1px solid #d4d4d4;
  border-right: 1px solid #d4d4d4;
}
.table tr th
{
  text-align: center;
  font-weight: bold;
}

.table tr:nth-child(odd) td
{
  background-color: #f3f1f1;
}

.table tr:hover td{
  background-color: #d0eeec;
}
.table td a {
  text-decoration: none;
  color: #1d1d1d;
  display: inline-block;
  height:100%;
  width:100%;
}
.table th,
.table td:not(.tools) a
{
  padding: 5px 0;
}
.table th span,
.table td a > span,
.table td > span
{
  display: inline-block;
  padding: 0 6px;
}
.table td > span
{
  padding: 5px 6px;
}

.table th span
{
  display: block;
}

.table
{
  width: 100%;
  border-collapse:collapse;
  font-size: 13px;
  border: 1px solid #d4d4d4;
  border-top: none;
}
.table th,
.table td
{
  border-left: 1px solid #d4d4d4;
  border-right: 1px solid #d4d4d4;
}
.table tr th
{
  text-align: center;
  font-weight: bold;
}

.table tr:nth-child(odd) td
{
  background-color: #f3f1f1;
}

.table tr:hover td{
  background-color: #d0eeec;
}
.table td > a {
  text-decoration: none;
  color: #1d1d1d;
  display: inline-block;
  height:100%;
  width:100%;
}
.table th,
.table td:not(.tools) a
{
  padding: 5px 0;
}
.table th span,
.table td a > span,
.table td > span
{
  display: inline-block;
  padding: 0 6px;
}
.table td > span
{
  padding: 5px 6px;
}

.table th span
{
  display: block;
}

Apply style only on cell link

Apply style only on cell link


  <% @body_id = 'product-details' %>

          <%= render :partial => 'image' %>

          <%= render :partial => 'thumbnails', :locals => { :product => @product } %>

        <%= render :partial => 'properties' %>

<%= accurate_title %>

          <%= product_description(@product) rescue t(:product_has_no_description) %>

          <%= render :partial => 'cart_form' %>

      <%= render :partial => 'taxons' %>

Add more data-hooks for theming

Add more data-hooks for  theming


<% %i(
  first_name
  middle_name
  last_name
  cell_phone
  home_phone
  work_phone
  citizenship
  nationality
  email
  race
  student_status
  marital_status
).each do |person_attribute| %>
  <%= labeled_text_field builder, person_attribute %>
<% end %>

<%= labeled_text_field builder, :ssn, "Social security number" %>
<%= builder.label :dob, "Date of Birth" %>
<%= builder.date_field :dob %>

<%= builder.fields_for :residence do |residence_builder| %>
  <%= residence_builder.label :street, "Street" %>
  <%= residence_builder.text_field :street %>

  <%= residence_builder.label :city, "City" %>
  <%= residence_builder.text_field :city %>

  <%= residence_builder.label :state, "State" %>
  <%= residence_builder.text_field :state %>

  <%= residence_builder.label :zip, "Zip" %>
  <%= residence_builder.text_field :zip %>

<% end %>

<%= builder.check_box :_destroy %>
<%= builder.label :_destroy, "Remove person" %>

Add a line break between person fields

Add a line break between person fields


  Hello <%= @job.user.first_name.humanize %>,

  A new job has been posted on <%= link_to 'MENAdevs.com', AppSettings.mail_domain, class: "contact-link" %>

Job details

  <%= @job.title %> at <%= @job.company_name %>

    Employment type: <%= @job.employment_type.try(:humanize) %>

    Experience: <%= @job.experience.try(:humanize) %>

    Salary: <%= @job.salary_to_s %>

    Remote: <%= @job.remote? ? 'Yes' : 'No' %>

  <%= link_to 'Full details are found here', job_url(@job), class: "contact-link" %>

    You're receiving this email because you opted-in to receive job alert emails from <%= link_to 'MENAdevs.com', AppSettings.mail_domain, class: "contact-link" %>.

    If you wish to opt-out, please update your email settings from the account settings section.

  Hello <%= @subscriber.first_name.humanize %>,

  A new job has been posted on <%= link_to 'MENAdevs.com', AppSettings.mail_domain, class: "contact-link" %>

Job details

  <%= @job.title %> at <%= @job.company_name %>

    Employment type: <%= @job.employment_type.try(:humanize) %>

    Experience: <%= @job.experience.try(:humanize) %>

    Salary: <%= @job.salary_to_s %>

    Remote: <%= @job.remote? ? 'Yes' : 'No' %>

  <%= link_to 'Full details are found here', job_url(@job), class: "contact-link" %>

    You're receiving this email because you opted-in to receive job alert emails from <%= link_to 'MENAdevs.com', AppSettings.mail_domain, class: "contact-link" %>.

    If you wish to opt-out, please update your email settings from the account settings section.

Fix a typo in receiver's name on job alerts


  <% if Rails.application.routes.routes.map(&:name).include?(:root) %>
    <%= link_to Typus.admin_title, root_path %>
  <% else %>
    <%= Typus.admin_title %>
  <% end %>

  <% if Rails.application.routes.routes.map(&:name).include?(:root) %>
    <%= link_to Typus.admin_title, root_path, :title => _("View site") %>
  <% else %>
    <%= Typus.admin_title %>
  <% end %>

Include title on app_name link.

Include title on app_name link.


<% content_for :title_bar do %>

Listing projects

<% end %>

<%= link_to 'New Project', new_project_path, :class => :button %>

  <% @projects.each do |project| %>

<%= project.name %>

      Started at:
      <%= project.start_date %>

        The iteration starts on <%= Date::DAYNAMES[project.iteration_start_day].pluralize %> with length of <%= project.iteration_length %> week(s)

        <%= link_to 'Show', project %>
        <%= link_to 'Edit', edit_project_path(project) %>
        <%= link_to 'Members', project_users_path(project) %>

  <% end %>

<%= link_to 'New Project', new_project_path, :class => :button %>

<% content_for :title_bar do %>

Listing projects

<% end %>

<%= link_to 'New Project', new_project_path, :class => :button %>

  <% @projects.each do |project| %>

<%= link_to project.name, project %>

      Started at:
      <%= project.start_date %>

        The iteration starts on <%= Date::DAYNAMES[project.iteration_start_day].pluralize %> with length of <%= project.iteration_length %> week(s)

        <%= link_to 'Edit', edit_project_path(project) %>
        <%= link_to 'Members', project_users_path(project) %>

  <% end %>

<%= link_to 'New Project', new_project_path, :class => :button %>

Make project title a link on index page

Make project title a link on index page


<% if !@settings.google_id.blank? %>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(
    ['_setAccount', 'UA-38090057-1'],
    ['_setDomainName', 'crowdhoster.com'],
    ['_trackPageview'],
    ['b._setAccount', '<%= @site.google_id %>'],
    ['b._trackPageview']
  );

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<% end %>

<script type="text/javascript">
  <% if Rails.env.development? %>
  window['ga-disable-UA-38090057-1'] = true;
  <% if !@settings.google_id.blank? %>
  window['ga-disable-<%= @settings.google_id %>'] = true;
  <% end %>
  <% end %>

  var _gaq = _gaq || [];
  _gaq.push(
    ['_setAccount', 'UA-38090057-1'],
    ['_setDomainName', 'crowdhoster.com'],
    ['_trackPageview']<% if !@settings.google_id.blank? %>,
    ['b._setAccount', '<%= @settings.google_id %>'],
    ['b._trackPageview']<% end %>
  );

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    <% if Rails.env.development? %>
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/u/ga_debug.js';
    <% else %>
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    <% end %>
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

Enable tracking of sites even w/o custom GA ID, and configure dev settings


<nav id="menu">
  <% ::Refinery::Plugins.active.in_menu.each do |plugin| -%>
    <%= link_to plugin.title, plugin.url,
                :class => ("active" if plugin.highlighted?(params)),
                :id => "plugin_#{plugin.name}" %>
  <% end -%>
  <% if ::Refinery::Plugins.active.in_menu.many? -%>
    <%= link_to refinery_icon_tag('arrow_switch.png'), "",
                :id => "menu_reorder",
                :title => t('.reorder_menu') %>

    <%= link_to refinery_icon_tag('tick.png'), "",
                :id => "menu_reorder_done",
                :title => t('.reorder_menu_done'),
                :style => "display: none;" %>
  <% end %>
</nav>

<nav id="menu">
  <% ::Refinery::Plugins.active.in_menu.each do |plugin| -%>
    <%= link_to plugin.title, main_app.url_for(plugin.url),
                :class => ("active" if plugin.highlighted?(params)),
                :id => "plugin_#{plugin.name}" %>
  <% end -%>
  <% if ::Refinery::Plugins.active.in_menu.many? -%>
    <%= link_to refinery_icon_tag('arrow_switch.png'), "",
                :id => "menu_reorder",
                :title => t('.reorder_menu') %>

    <%= link_to refinery_icon_tag('tick.png'), "",
                :id => "menu_reorder_done",
                :title => t('.reorder_menu_done'),
                :style => "display: none;" %>
  <% end %>
</nav>

Fix plugins that specify their url with a hash by calling main_app.url_for() around it.


deb http://apt.wikimedia.org/wikimedia <%= scope['::lsbdistcodename'] %>-wikimedia main universe non-free
deb-src http://apt.wikimedia.org/wikimedia <%= scope['::lsbdistcodename'] %>-wikimedia main universe non-free

deb http://apt.wikimedia.org/wikimedia <%= scope['::lsbdistcodename'] %>-wikimedia main universe thirdparty
deb-src http://apt.wikimedia.org/wikimedia <%= scope['::lsbdistcodename'] %>-wikimedia main universe thirdparty

Replace non-free with thirdparty to wikimedia apt

Without this you can't install elasticsearch and the cirrus role is very sad.
This also makes vagrant match how it is configured in production.

Change-Id: I7be7e86880d2c8fbc91bb8c18726d95eaa692f72


#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth<%= options[:interface] %>
iface eth<%= options[:interface] %> inet dhcp
<% if !options[:use_dhcp_assigned_default_route] %>
    post-up route del default dev $IFACE || true
<% else %>
    # We need to disable eth0, see GH-2648
    post-up route del default dev eth0
    post-up dhclient $IFACE
    pre-down route add default dev eth0
<% end %>
#VAGRANT-END

#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth<%= options[:interface] %>
iface eth<%= options[:interface] %> inet dhcp
<% if !options[:use_dhcp_assigned_default_route] %>
    post-up route del default dev $IFACE || true
<% else %>
    # We need to disable eth0, see GH-2648
    post-up route del default dev eth0 || true
    post-up dhclient $IFACE
    pre-down route add default dev eth0
<% end %>
#VAGRANT-END

Make sure debian net post-up never returns an error code.

Inspired by e7dce43af3905a7a986ef6e3402bf6809ab90f16.

I'm using this configuration in my Vagrantfile:
config.vm.network :public_network, use_dhcp_assigned_default_route: true

Every once in a while the secondary network interface would not come
up properly and cause the init scripts to wait for ~ 3 minutes before
giving up and continue with booting.


Housing Locations

<%= @applicant %> can apply to live at these places

<%= render 'location_table', locations: @housing_forms_available %>

Housing locations with no PDF yet

Have a PDF for one of these places?  Click "Edit/Replace" to upload it!

<%= render 'location_table', locations: @housing_forms_unavailable %>

Don't see your location here?  You can upload it anyway.  Click the button below to add a new location.

<%= link_to 'Add a housing form', new_housing_form_path, class: "btn btn-lg btn-default" %>

<%= render 'location_modal' %>

Housing Locations

<%= render 'location_table', locations: @housing_forms_available %>

Housing locations with no PDF yet

Have a PDF for one of these places?  Click "Edit/Replace" to upload it!

<%= render 'location_table', locations: @housing_forms_unavailable %>

Don't see your location here?  You can upload it anyway.  Click the button below to add a new location.

<%= link_to 'Add a housing form', new_housing_form_path, class: "btn btn-lg btn-default" %>

<%= render 'location_modal' %>

Remove Housing Locations subtitle text

Remove Housing Locations subtitle text


<!DOCTYPE html>

<!-- Render the normal application layout template -->
<%= render :template => 'layouts/application' %>

<!-- Put any static-pages-specific code here -->

<%= render :template => 'layouts/application' %>  <!-- Render the normal application layout template -->

<!-- Put any static-pages-specific code here -->

Fix the extra DOCTYPE in static pages

Fix the extra DOCTYPE in static pages


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

    <%= f.email_field :email, autofocus: true %>

    <% if @minimum_password_length %>
    (<%= @minimum_password_length %> characters minimum)
    <% end %>

    <%= f.password_field :password, autocomplete: "off" %>

    <%= f.password_field :password_confirmation, autocomplete: "off" %>

    <%= f.submit "Join us" %>

<% end %>

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

    <%= f.email_field :email, autofocus: true %>

    <% if @minimum_password_length %>
    (<%= @minimum_password_length %> characters minimum)
    <% end %>

    <%= f.password_field :password, autocomplete: "off" %>

    <%= f.password_field :password_confirmation, autocomplete: "off" %>

    <%= f.submit "Join us", :class => "btn custom-btn-1 btn-block btn-default" %>

<% end %>

Modify 'Join us' button style

Modify 'Join us' button style


<% cache(:action_suffix => RefinerySetting.find_or_set(:refinery_menu_cache_action_suffix, "site_menu")) do %>
  <ul id='<%= dom_id ||= "menu" %>' class='menu clearfix'>
    <%= render :partial => "/shared/menu_branch", :collection => @menu_pages, :locals => {
      :hide_children => RefinerySetting.find_or_set(:menu_hide_children, false),
      :sibling_count => @menu_pages.size-1
    } -%>
  </ul>
<% end %>

<% cache(:action_suffix => RefinerySetting.find_or_set(:refinery_menu_cache_action_suffix, "site_menu")) do %>
  <ul id='<%= dom_id ||= "menu" %>' class='menu clearfix'>
    <%= render :partial => "/shared/menu_branch", :collection => (collection ||= @menu_pages), :locals => {
      :hide_children => RefinerySetting.find_or_set(:menu_hide_children, false),
      :sibling_count => (collection ||= @menu_pages).size-1
    } -%>
  </ul>
<% end %>

Add flexibility to be able to pass in another collection (of pages at this stage) to the menu


#!/bin/sh

RUN_AS_USER=confluence
CONFLUENCE_INSTALL=/x1/cwiki/current

start() {
        echo "Starting Confluence: "
        umask 002
        if [ "x$USER" != "x$RUN_AS_USER" ]; then
          su - $RUN_AS_USER -c "cd $CONFLUENCE_INSTALL/bin && ./startup.sh"
        else
          $CONFLUENCE_INSTALL/bin/startup.sh
        fi
        echo "done."
}
stop() {
        echo "Shutting down Confluence: "
        if [ "x$USER" != "x$RUN_AS_USER" ]; then
          su - $RUN_AS_USER -c "cd $CONFLUENCE_INSTALL/bin && ./shutdown.sh"
        else
          $CONFLUENCE_INSTALL/bin/shutdown.sh
        fi
        echo "done."
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 8
        start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
esac

exit 0

Add init script raw, ready to template

Add init script raw, ready to template


  location <%= @location %> {
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
    <%= key %>  <%= value %>;<% end -%><% end -%>
    stub_status on;
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
    <%= key %>  <%= value %>;<% end -%><% end -%>
  }

  location <%= @location %> {
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
    <%= key %>  <%= value %>;
<% end -%><% end -%>
    stub_status on;
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
    <%= key %>  <%= value %>;
<% end -%><% end -%>
  }

Fix stub_status location so it has line breaks.


memory_limit  = <%= @memory_limit %>
date.timezone = "<%= @timezone %>"

mysql.default_socket=/var/run/mysqld/mysqld.sock
mysqli.default_socket=/var/run/mysqld/mysqld.sock
pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock

memory_limit  = <%= @memory_limit %>
date.timezone = "<%= @timezone %>"
phar.readonly = 0

mysql.default_socket=/var/run/mysqld/mysqld.sock
mysqli.default_socket=/var/run/mysqld/mysqld.sock
pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock

Set phar.readonly setting to 0 for phar generation testing concerns.


<% @full_page = true %>

<%= link_to @note.chapter.book.title, @note.chapter.book %> - <%= link_to @note.chapter.title, [@note.chapter.book, @note.chapter] %>

Note #<%= @note.number %> - <%= state(@note) %>

<%= render_element(@note.element) %>
<%= link_to "View this element within chapter", book_chapter_path(@book, @chapter, :anchor => @note.element.xml_id) %>

  <%= comment(@note, 'started a discussion', :class => 'review-note') %>

  <%= render @comments.select(&:persisted?) %>

<%= render "comments/form" %>

<% @full_page = true %>

<%= link_to @note.chapter.book.title, @note.chapter.book %> - <%= link_to "#{@note.chapter.number}: #{@note.chapter.title}", [@note.chapter.book, @note.chapter] %>

Note #<%= @note.number %> - <%= state(@note) %>

<%= render_element(@note.element) %>
<%= link_to "View this element within chapter", book_chapter_path(@book, @chapter, :anchor => @note.element.xml_id) %>

  <%= comment(@note, 'started a discussion', :class => 'review-note') %>

  <%= render @comments.select(&:persisted?) %>

<%= render "comments/form" %>

INclude chapter number in notes/show tittle


# Listen on TCP.
$ModLoad imtcp

# Server side SSL.
$DefaultNetstreamDriver gtls

# Self-signed, CA == Cert.
$DefaultNetstreamDriverCAFile <%= @cert_file %>
$DefaultNetstreamDriverCertFile <%= @cert_file %>
$DefaultNetstreamDriverKeyFile <%= @key_file %>

# Verify server, not client.
$InputTCPServerStreamDriverMode 1
$InputTCPServerStreamDriverAuthMode anon

# Temporarily disable message de-dupe.
$RepeatedMsgReduction off

# Switch to remote ruleset
$RuleSet cdn

# Record raw message content without leading space.
$template NoFormat,"%msg:2:$:%\n"

# Log everything from this source.
*.* -<%= @log_dir -%>/bouncer_and_redirector.log;NoFormat

# Switch back to default ruleset
$RuleSet RSYSLOG_DefaultRuleset

$InputTCPServerBindRuleset cdn
$InputTCPServerRun <%= @port %>

# Restore message de-dupe.
$RepeatedMsgReduction on

# Use the same max-line-length as Fastly
$MaxMessageSize 16k

# Listen on TCP.
$ModLoad imtcp

# Server side SSL.
$DefaultNetstreamDriver gtls

# Self-signed, CA == Cert.
$DefaultNetstreamDriverCAFile <%= @cert_file %>
$DefaultNetstreamDriverCertFile <%= @cert_file %>
$DefaultNetstreamDriverKeyFile <%= @key_file %>

# Verify server, not client.
$InputTCPServerStreamDriverMode 1
$InputTCPServerStreamDriverAuthMode anon

# Temporarily disable message de-dupe.
$RepeatedMsgReduction off

# Switch to remote ruleset
$RuleSet cdn

# Record raw message content without leading space.
$template NoFormat,"%msg:2:$:%\n"

# Use the same max-line-length as Fastly
$MaxMessageSize 16k

# Log everything from this source.
*.* -<%= @log_dir -%>/bouncer_and_redirector.log;NoFormat

# Switch back to default ruleset
$RuleSet RSYSLOG_DefaultRuleset

$InputTCPServerBindRuleset cdn
$InputTCPServerRun <%= @port %>

# Restore message de-dupe.
$RepeatedMsgReduction on

Move MaxMessageSize directive to before output line

We think that the order of directives may make a difference. It wasn't working
where it was.


  #<%= note.number %> <%= link_to strip_tags(markdown(note.text)), [@book, @chapter, note] %>

  By <%= note.user.email %>

Change notes/_note class so that it doesn't conflict with book note


  <% @images.each do |image| -%>
		<li id="image_<%= image.id %>" <%= "class='row-end'" if (@images.index(image)+1) % 4 == 0 %>>
			<%= image_fu image, :grid, :title => image.title %>

		    <%= link_to image_tag('refinery/icons/application_edit.png'), edit_admin_image_path(image),
		                          	:title => 'Edit this image' %>
		    <%= link_to image_tag('refinery/icons/delete.png'), admin_image_path(image),
		                           	:confirm => "Are you sure you want to delete #{image.title}?",
		                           	:class => "cancel", :method => :delete,
		                           	:title => "Remove this image forever" %>

  <% end -%>

  <% @images.each do |image| -%>
		<li id="image_<%= image.id %>" <%= "class='row-end'" if (@images.index(image)+1) % 4 == 0 %>>
			<%= image_fu image, :grid, :title => image.title %>

				<%= link_to image_tag('refinery/icons/eye.png'), image.public_filename,
                              :target => "_blank", :title => "Click to view '#{image.title}'
Opens in a new window" %>
		    <%= link_to image_tag('refinery/icons/application_edit.png'), edit_admin_image_path(image),
		                          	:title => 'Edit this image' %>
		    <%= link_to image_tag('refinery/icons/delete.png'), admin_image_path(image),
		                           	:confirm => "Are you sure you want to delete #{image.title}?",
		                           	:class => "cancel", :method => :delete,
		                           	:title => "Remove this image forever" %>

  <% end -%>

Add a view button to see fullsize image.


  <% household_member.person.attribute_names.reject { |a|
    %w(created_at updated_at applicant_id id).include? a
  }.each do |attribute_name| %>
    <% case attribute_name %>
    <% when 'mail_address_id' %>
      <%= render partial: 'maybe', locals: { attribute: attribute_as_label(attribute_name), object: household_member.person.mail_address.full } %>
    <% when 'dob' %>
      <%= render partial: 'maybe', locals: { attribute: attribute_as_label(attribute_name), object: household_member.person.dob_date } %>
    <% else %>
      <%= render partial: 'maybe', locals: { attribute: attribute_as_label(attribute_name), object: household_member.person[attribute_name] } %>
    <% end %>
  <% end %>
  <%= render partial: 'maybe', locals: { attribute: 'Relationship', object: household_member.relationship } %>

<% [column_1_attributes, column_2_attributes, column_3_attributes].each do |attr_list| %>
  <% attr_list.each do |attribute_name| %>
  <%= render partial: 'maybe', locals: {
    attribute: attribute_as_label(attribute_name),
    object: display_value_for_attribute(household_member.person, attribute_name) } %>
  <% end %>
<% end %>
<%= render partial: 'maybe', locals: { attribute: 'Relationship', object: household_member.relationship } %>

Implement hh member summary as in hh head


worker_processes 1;
error_log stderr;
pid nginx.pid;
daemon off;

events {
	worker_connections 768;
}

http {
	include mime.types;
	server {
		listen <%= ENV['PORT'] %>;
		server_name  _;
		root /app/www;
		index index.html;
	}
}

worker_processes 1;
error_log stderr;
pid nginx.pid;
daemon off;
types_hash_max_size 2048;

events {
	worker_connections 768;
}

http {
	include mime.types;
	server {
		listen <%= ENV['PORT'] %>;
		server_name  _;
		root /app/www;
		index index.html;
	}
}

Set types_hash_max_size large enough for default mime.types


<% menus.each do |menu| %>
  <div
    class="col-xs-12 col-md-6 col-lg-4 <%= 'editable' if admin? %>"
    <% if admin? %>
      data-url="<%= url_for edit_menu_path(menu) %>"
    <% end %>
  >

<%= menu.name %> <%= menu.price %> €

<%= menu.content %>

<% end %>

<% menus.each do |menu| %>
  <div
    class="col-xs-12 col-md-6 col-lg-4 <%= 'editable' if admin? %>"
    <% if admin? %>
      data-url="<%= url_for edit_menu_path(menu) %>"
    <% end %>
  >

<%= menu.name %> <%= menu.price %> €

      <%= menu.content.each_line do |line| %>
        <%= line %>

      <% end %>

<% end %>

Set free text for menu content

Set free text for menu content


---
description: |
    Provisioners use builtin and third-party software to install and configure the
    machine image after booting.
layout: docs
page_title: Provisioners
sidebar_current: 'docs-provisioners'
---

# Provisioners

Provisioners use builtin and third-party software to install and configure the
machine image after booting. Provisioners prepare the system for use, so common
use cases for provisioners include:

-   installing packages
-   patching the kernel
-   creating users
-   downloading application code

These are just a few examples, and the possibilities for provisioners are
endless.

---
description: |
    Provisioners use builtin and third-party software to install and configure the
    machine image after booting.
layout: docs
page_title: Provisioners
sidebar_current: 'docs-provisioners'
---

# Provisioners

Provisioners use builtin and third-party software to install and configure the
machine image after booting. Provisioners prepare the system for use, so common
use cases for provisioners include:

-   installing packages
-   patching the kernel
-   creating users
-   downloading application code

See [Template Provisioners](/docs/templates/provisioners.html) to learn more
about working with provisioners. For information on an individual provisioner,
choose it from the sidebar.

docs/provisioners/index: Add link to Template Provisioners section


<title><%= title %></title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<%== meta_data_tags %>
<%= stylesheet_link_tag 'store/all', :media => 'screen' %>
<%= csrf_meta_tags %>
<%= javascript_include_tag 'store/all' %>
<%= yield :head %>

<title><%= title %></title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<%= meta_data_tags %>
<%= stylesheet_link_tag 'store/all', :media => 'screen' %>
<%= csrf_meta_tags %>
<%= javascript_include_tag 'store/all' %>
<%= yield :head %>

Fix typo in shared/_head template.

Fix typo in shared/_head template.


Hello,

There is a new job posted online for your attention.

<%= job_url(@job) %>

Approve it so that it goes online

<%= approve_job_url(@job) %>

  Hello admin,

  A new job has been posted on the job board.

Job details

  <%= @job.title %> at <%= @job.company_name %>

    Employment type: <%= @job.employment_type.try(:humanize) %>

    Experience: <%= @job.experience.try(:humanize) %>

    Salary: <%= @job.salary_to_s %>

    Remote: <%= @job.remote? ? 'Yes' : 'No' %>

  <%= link_to 'Full details are found here', job_url(@job), class: "contact-link" %>

  Please review and approve it if it fits the requirements:

  <%= link_to "Approve", approve_job_url(@job), class: "contact-link" %>

Modify content of email to admin when a job is posted online


#!/bin/sh
cd <%= node['jenkins']['server']['home'] %>
touch jenkins.start
exec chpst -u <%= node['jenkins']['server']['user'] %> -U <%= node['jenkins']['server']['user'] %> \
  env HOME=<%= node['jenkins']['server']['home'] %> \
  JENKINS_HOME=<%= node['jenkins']['server']['home'] %> \
  java <%= node['jenkins']['server']['jvm_options'] %> -jar jenkins.war \
  -Xloggc:<%= node['jenkins']['server']['log_dir'] %>/gclog.log \
  --httpPort=<%= node['jenkins']['server']['port'] %>

#!/bin/sh
exec 2>&1
cd <%= node['jenkins']['server']['home'] %>
touch jenkins.start
exec chpst -u <%= node['jenkins']['server']['user'] %> -U <%= node['jenkins']['server']['user'] %> \
  env HOME=<%= node['jenkins']['server']['home'] %> \
  JENKINS_HOME=<%= node['jenkins']['server']['home'] %> \
  java <%= node['jenkins']['server']['jvm_options'] %> -jar jenkins.war \
  -Xloggc:<%= node['jenkins']['server']['log_dir'] %>/gclog.log \
  --httpPort=<%= node['jenkins']['server']['port'] %>

Fix jenkins service run script to log all output instead of just stdout


<%= provide(:title, "#{@cookbook.name} Cookbook") %>
<%= provide(:description, @cookbook.description) %>

<div class="cookbook_show">
  <%= render 'cookbooks/main', cookbook: @cookbook, version: @version, cookbook_versions: @cookbook_versions %>
  <%= render 'cookbooks/sidebar', cookbook: @cookbook, version: @version, supported_platforms: @supported_platforms, owner: @owner, collaborators: @collaborators %>
</div>

<%= provide(:title, "#{@cookbook.name} Cookbook") %>
<%= provide(:description, @cookbook.description) %>

<div class="cookbook_show" data-equalizer>
  <%= render 'cookbooks/main', cookbook: @cookbook, version: @version, cookbook_versions: @cookbook_versions %>
  <%= render 'cookbooks/sidebar', cookbook: @cookbook, version: @version, supported_platforms: @supported_platforms, owner: @owner, collaborators: @collaborators %>
</div>

Add data-equalizer to cookbook version show.

Ensure that the cookbook show and cookbook version show are the same views.


# This file is being maintained by Puppet.
# DO NOT EDIT
#
###########################################################################

#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
report_safe <%= @report_safe %>

#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
#
<% @trusted_networks.each do |val| -%>
trusted_networks <%= val %>
<% end -%>

use_bayes <%= @use_bayes %>
#use_auto_whitelist 0
required_hits <%= @required_hits %>
lock_method flock
skip_rbl_checks <%= skip_rbl_checks %>
#check_mx_attempts 0
report_safe <%= report_safe %>
use_pyzor <%= use_pyzor %>
use_razor2 <%= use_razor2 %>
dns_available <%= dns_available %>
remove_header all Report

## Custom Scoring
<% @custom_scoring.each do |val| -%>
score <%= val %>
<% end -%>

## Custom Rules
<% @custom_rules.each do |val| -%>
<%= val %>
<% end -%>

# This file is being maintained by Puppet.
# DO NOT EDIT
#
###########################################################################

#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
report_safe <%= @report_safe %>

#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
<% if @trusted_networks %>
<% @trusted_networks.each do |val| -%>
trusted_networks <%= val %>
<% end -%>
<% end %>

use_bayes <%= @use_bayes %>
#use_auto_whitelist 0
required_hits <%= @required_hits %>
lock_method flock
skip_rbl_checks <%= skip_rbl_checks %>
#check_mx_attempts 0
report_safe <%= report_safe %>
use_pyzor <%= use_pyzor %>
use_razor2 <%= use_razor2 %>
dns_available <%= dns_available %>
remove_header all Report

## Custom Scoring
<% @custom_scoring.each do |val| -%>
score <%= val %>
<% end -%>

## Custom Rules
<% @custom_rules.each do |val| -%>
<%= val %>
<% end -%>

Add some if logic to prevent barfing on empty strings in a loop


  <%= form_for(:user, url: login_path) do |f| %>
   <%= f.label :username %>
   <%= f.text_field :username %>
   <%= f.label :password %>
   <%= f.password_field :password %>
   <%= f.submit "Login" %>
  <% end %>

Create directory for session view. Create basic sessions view


#!upstart
description "Node.js Application Server"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on [!12345]

console log

<% @environment.each do |key, value| -%>
env <%= key %>="<%= value %>"
<% end -%>
<% unless @user.nil? -%>
setuid <%= @user %>
<% end -%>
<% unless @group.nil? -%>
setuid <%= @group %>
<% end -%>
chdir <%= @app_dir %>
exec <%= @node_dir %>/bin/node <%= @entry %>

#!upstart
description "Node.js Application Server"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on [!12345]

console log

<% @environment.each do |key, value| -%>
env <%= key %>="<%= value %>"
<% end -%>
<% unless @user.nil? -%>
setuid <%= @user %>
<% end -%>
<% unless @group.nil? -%>
setgid <%= @group %>
<% end -%>
chdir <%= @app_dir %>
exec <%= @node_dir %>/bin/node <%= @entry %>

Make sure Upstart template uses setgid

Make sure Upstart template uses setgid

It was using setuid to set the group, previously. Oops.


Help Triage Github Issues With Your Favorite Projects

<% if current_user %>
  You are signed in as <%= "@#{current_user.github}"  %> from Github
  <% if @repos_subs.present? %>

    <%= render 'repo_subscriptions/list' %>
  <% end -%>
<% else %>
  <%= render 'sign_in' %>
<% end %>

Repos needing the most help

  (Ordered by issue count.  Numbers updated every 24 hours)

<%= render 'shared/repos', repos: @repos %>

  <%= link_to "View All Repos", repos_path, :class => 'btn btn-success' %>
  <%= link_to "Add a Repo", new_repo_path, :class => 'btn btn-success' %>

  <%# link_to "How does issue triage work?", page_path(:how), :class => 'btn btn-success ' %>

Help Triage Github Issues With Your Favorite Projects

<% if user_signed_in? %>
  <% if @repos_subs.present? %>

    <%= render 'repo_subscriptions/list' %>
  <% end -%>
<% else %>
  <%= render 'sign_in' %>
<% end %>

Repos needing the most help

  (Ordered by issue count.  Numbers updated every 24 hours)

<%= render 'shared/repos', repos: @repos %>

  <%= link_to "View All Repos", repos_path, :class => 'btn btn-success' %>
  <%= link_to "Add a Repo", new_repo_path, :class => 'btn btn-success' %>

  <%# link_to "How does issue triage work?", page_path(:how), :class => 'btn btn-success ' %>

Remove signed in message, it's in the header already


/* DO NOT EDIT: File is auto-generated */
package <%= service.data_module.ejb.service_package %>;

<%= description_javadoc_for(service, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
@javax.ejb.<%= service.ejb.local? ? "Local" : "Remove" %>
public interface <%= service.ejb.facade_interface_name %>
{
  String EJB_NAME = "<%= service.ejb.facade_name %>";

<% service.methods.each do |method|
%><%= description_javadoc_for(method)
%>  <%= annotated_type(method.return_value, :ejb, :boundary) %> <%= Domgen::Naming.camelize(method.name) %>(<%= method.parameters.collect{|p| "#{annotated_type(p, :ejb, :boundary)} #{Domgen::Naming.camelize(p.name)}" }.join(', ') %>)<%=
    method.exceptions.empty? ? '' : "\n    throws #{method.exceptions.collect{|e| e.ejb.qualified_name}.join(', ')}"
%>;

<% end %>}

/* DO NOT EDIT: File is auto-generated */
package <%= service.data_module.ejb.service_package %>;

<%= description_javadoc_for(service, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
@javax.ejb.<%= service.ejb.local? ? "Local" : "Remote" %>
public interface <%= service.ejb.facade_interface_name %>
{
  String EJB_NAME = "<%= service.ejb.facade_name %>";

<% service.methods.each do |method|
%><%= description_javadoc_for(method)
%>  <%= annotated_type(method.return_value, :ejb, :boundary) %> <%= Domgen::Naming.camelize(method.name) %>(<%= method.parameters.collect{|p| "#{annotated_type(p, :ejb, :boundary)} #{Domgen::Naming.camelize(p.name)}" }.join(', ') %>)<%=
    method.exceptions.empty? ? '' : "\n    throws #{method.exceptions.collect{|e| e.ejb.qualified_name}.join(', ')}"
%>;

<% end %>}

Correct the generated annotation for remote facades


<%
  @title  = 'Featured Reporting'
  @header = 'What can I do with DocumentCloud?'
%>
<%= auto_discovery_link_tag(:rss, :format=>:rss ) %>

    This is a sampling of some of the thousands of documents that newsrooms have published with DocumentCloud. Find many more by searching our public catalog for published documents.

<% @reports.each do | report | %>

    <a href="<%= report.url %>"><%= report.title %>
    <%= report.organization %>, <%= report.article_date.strftime('%B %e, %Y') %>

  <%= report.writeup_html %>
<% end %>

<%
  @title  = 'Featured Reporting'
  @header = 'What can I do with DocumentCloud?'
%>
<%= auto_discovery_link_tag(:rss, :format=>:rss ) %>

    Here are just a few highlights of stories and interactive applications that made significant use of DocumentCloud. Visit our public catalog to search hundreds of thousands more documents uploaded by our users.

<% @reports.each do | report | %>

    <a href="<%= report.url %>"><%= report.title %>
    <%= report.organization %>, <%= report.article_date.strftime('%B %e, %Y') %>

  <%= report.writeup_html %>
<% end %>

Edit intro copy on Featured Reporting page.


before_install:
  - "echo '--colour' > ~/.rspec"
  - "echo 'gem: --no-document' > ~/.gemrc"
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
before_script:
  - cp .sample.env .env
  <% if options[:database] == 'postgresql' %>
  - psql -c 'create database "<%= app_name %>_test";' -U postgres
  <% end %>
branches:
  only:
    - master
cache:
  - bundler
language:
  - ruby
notifications:
  campfire:
    on_failure:
      - always
    on_success:
      - change
    template:
      - '(%{branch} - %{author}): %{message} - %{build_url}'
  email:
    - false
rvm:
  - <%= Suspenders::RUBY_VERSION %>
addons:
  postgresql: "9.3"

before_install:
  - "echo '--colour' > ~/.rspec"
  - "echo 'gem: --no-document' > ~/.gemrc"
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
before_script:
  - cp .sample.env .env
  <% if options[:database] == 'postgresql' %>
  - psql -c 'create database "<%= app_name %>_test";' -U postgres
  <% end %>
branches:
  only:
    - master
cache:
  - bundler
language:
  - ruby
notifications:
  email:
    - false
rvm:
  - <%= Suspenders::RUBY_VERSION %>
addons:
  postgresql: "9.3"

Remove Campfire in favor of Slack

Remove Campfire in favor of Slack

We don't need a placeholder for Slack because we'll typically add it using the
CLI:

    travis encrypt "thoughtbot:123abc" --add notifications.slack

http://blog.travis-ci.com/2014-03-13-slack-notifications/


	<%= content_for :export_links %>
	<% measureTitle = "#{@definition['endorser']}#{@definition['id']} #{@definition['name']}" %>
	<% if @definition['sub_id'] %>
  <%   measureTitle = "#{measureTitle} - (#{@definition['sub_id']}) #{@definition['subtitle']}" %>
  <% end %>

Measure Name:

<%= measureTitle %>

Effective Date:

      07/01/2010 - 09/30/2010

Description:

       <%= @definition['description'] %>

	<%= content_for :export_links %>
	<% measureTitle = "#{@definition['endorser']}#{@definition['id']} #{@definition['name']}" %>
	<% if @definition['sub_id'] %>
  <%   measureTitle = "#{measureTitle} - (#{@definition['sub_id']}) #{@definition['subtitle']}" %>
  <% end %>

Measure Name:

<%= measureTitle %>

Reporting Period:

      07/01/2010 - 09/30/2010

Description:

       <%= @definition['description'] %>

Switch effective date to reporting period on patient list and parameters views


Welcome <%= @resource.email %>!

You can confirm your account through the link below:

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %>

Welcome <%= @resource.name %>!

<% if @resource.unconfirmed_email.present? %>

You can confirm your email (<%= @resource.unconfirmed_email %>) through the link below:

<% else %>

You can confirm your account through the link below:

<% end %>

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %>

Improve email with confirmation instructions

Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>


Remove 'member for 3 months' from user details


<%= @book.title %>

<%= link_to "All notes for this book", book_notes_path(@book) %>

  <% @book.chapters.each do |chapter| %>

<%= link_to chapter.title, [@book, chapter] %>

  <% end %>

  <%= link_to "All notes for this book", book_notes_path(@book) %>

<%= @book.title %>

  <% @book.chapters.each do |chapter| %>

<%= link_to chapter.title, [@book, chapter] %>

  <% end %>

Add book notes link to sidebar to match it up with chapter


<div class="<%= classified_classes(classified, classified_counter) %>">

<%= classified.title %> <%= link_to('(edit)', edit_classified_path(classified)) if classified.placer == @authenticated %>

<%= classified.description %>

      <% if classified.offered? %>
        Offered
      <% else %>
        Wanted
      <% end %>
      by <%= link_to classified.placer.name, "http://twitter.com/#{classified.placer.username}" %>

<div class="<%= classified_classes(classified, classified_counter) %>">

<%= classified.title %> <%= link_to('(edit)', edit_classified_path(classified)) if classified.placer == @authenticated %>

<%= simple_format auto_link(classified.description) %>

      <% if classified.offered? %>
        Offered
      <% else %>
        Wanted
      <% end %>
      by <%= link_to classified.placer.name, "http://twitter.com/#{classified.placer.username}" %>

Add basic formating on classified body

Add basic formating on classified body


<%= provide(:title, "CCLA Invitations for #{@organization.name}") %>

<%= @organization.name %> Organization Management

  <%= render "ccla_signatures/organization_tabs", ccla_signature: @organization.latest_ccla_signature %>

As an admin you may combine an organization with another in the event that a duplicate organization was created in error. Note that all contributors will be transferred to the selected organization and this organization will be deleted. Alternatively you can simply delete this organization.

      <%= form_for @organization, url: { action: 'combine' }, method: :put do |f| %>

            <%= f.hidden_field :combine_with_id, class: 'transfer-ccla-organization', 'data-url' => organizations_path(exclude_id: @organization) %>

            <%= f.submit 'Combine', class: 'button postfix radius' %>

      <% end %>

      <%= link_to 'Delete this Organization', organization_path(@organization), method: :delete, data: { confirm: 'This will permanently delete this organization and all of its signatures. Are you sure?' }, class: 'button alert radius small' %>

<%= provide(:title, "CCLA Invitations for #{@organization.name}") %>

<%= @organization.name %> Organization Management

  <%= render "ccla_signatures/organization_tabs", ccla_signature: @organization.latest_ccla_signature %>

Select an organization that you would like to merge into this organization. All contributors will be transferred to this organization. Admins of the merged organization will be stripped of their admin role. Alternatively, you can delete this organization.

      <%= form_for @organization, url: { action: 'combine' }, method: :put do |f| %>

            <%= f.hidden_field :combine_with_id, class: 'transfer-ccla-organization', 'data-url' => organizations_path(exclude_id: @organization) %>

            <%= f.submit 'Combine', class: 'button postfix radius' %>

      <% end %>

      <%= link_to 'Delete this Organization', organization_path(@organization), method: :delete, data: { confirm: 'This will permanently delete this organization and all of its signatures. Are you sure?' }, class: 'button alert radius small' %>

Update the org merge copy to be more accurate.

The selected org gets merged into the one that the admin is viewing.


description "start and stop <%= @title %> in docker"
author "Gareth Rushgrove"

start on (started docker)
stop on runlevel [!2345]

expect daemon

setuid root

respawn
respawn limit 5 20

exec docker run -d -u '<%= @username %>' -h '<%= @hostname %>'<% if @dns %><% @dns_array.each do |address| %> -dns <%= address %><% end %><% end %><% if @env %><% @env_array.each do |env| %> -e <%= env %><% end %><% end %><% if @ports %><% @ports_array.each do |port| %> -p <%= port %><% end %><% end %><% if @volumes %><% @volumes_array.each do |volume| %> -v <%= volume %><% end %><% end %><% if @volumes_from %> -volumes-from <%= @volumes_from %><% end %> -m <%= @memory_limit %> <% if @links %><%= @links_array.map {|link| "-link #{link}" }.join(' ') %> <% end %><% if @use_name %>-name <%= @name %><% end %> <%= @image %> <% if @command %><%= @command %><% end %>

description "start and stop <%= @title %> in docker"
author "Gareth Rushgrove"

start on (started docker)
stop on runlevel [!2345]

setuid root

respawn
respawn limit 5 20

exec docker run -u '<%= @username %>' -h '<%= @hostname %>'<% if @dns %><% @dns_array.each do |address| %> -dns <%= address %><% end %><% end %><% if @env %><% @env_array.each do |env| %> -e <%= env %><% end %><% end %><% if @ports %><% @ports_array.each do |port| %> -p <%= port %><% end %><% end %><% if @volumes %><% @volumes_array.each do |volume| %> -v <%= volume %><% end %><% end %><% if @volumes_from %> -volumes-from <%= @volumes_from %><% end %> -m <%= @memory_limit %> <% if @links %><%= @links_array.map {|link| "-link #{link}" }.join(' ') %> <% end %><% if @use_name %>-name <%= @name %><% end %> <%= @image %> <% if @command %><%= @command %><% end %>

Stop using daemon mode in upstart scripts.

In daemon mode then upstart never detects if the container craps out / exits,
and therefore never respawns correctly (at least in the upstart version
in precise)..

I'd at least like to run containers not as a daemon - let me know if you
feel strongly about this, as I'm happy to supply an alternate patch allowing
both behaviours if there are cases where daemon mode is a good thing that
I'm not seeing ;)


<% if authenticated? %>
You have <%= @todays_commits %> commits today, compared to <%= @yesterdays_commits %> yesterday!

<%= @message %>
<% else %>
Login with GitHub

<% end %>

<% if authenticated? %>
You have <%= @todays_commits %> commits today, compared to <%= @yesterdays_commits %> yesterday!

<%= @message %>
<% else %>
The gitometer is a motivational speaker.

Login with GitHub

<% end %>

Add creepy text on landing page.

Add creepy text on landing page.


<a name='post-<%= post.id %>'>
<tr id='post_<%= post.id %>' class='post <%= cycle('odd', 'even') -%>'>
  <%= render :partial => 'forem/posts/user_details', :locals => { :user => post.user } %>

    <time datetime="<%= post.created_at.to_s(:db) -%>"><%= time_ago_in_words(post.created_at) -%> ago</time>

      <%= forem_markdown(post.text) %>

    <% if post.reply_to %>
      <%= link_to "In reply to #{post.reply_to.user}", "#post-#{post.reply_to.id}" %>
    <% end %>

      <% if current_user %>
        <% if @topic.can_be_replied_to? %>

<%= link_to "Reply", new_topic_post_path(@topic, :reply_to_id => post.id) %>

        <% end %>

<%= link_to "Delete", topic_post_path(@topic, post), :method => :delete, :confirm => "Are you sure?" %>

      <% end %>

Use ERB tags, not interpolation for post.id


<% @page_heading = _('Theme editor') %>
<% subtabs_for(:themes) %>

<% form_tag do %>

Stylesheets

		<%= fetch_stylesheets %>

Layout

		<%= fetch_layouts %>

  <textarea id="theme_body" name="theme_body" class='large' rows='25'>
  <%= @file %>
  </textarea>
  <%= hidden_field_tag 'type', params[:type] %>
  <%= hidden_field_tag 'file', params[:file] %>

  <%= cancel_or_save %>

<% end %>

Fix mismatched HTML tags in themes editor template.


<%

  attachment = attribute.split('_file_name').first

  unless @item.send(attribute).blank?
    item = @item.send(attachment)
    preview = if @item.send("#{attachment}_content_type") =~ /^image\/.+/ && item.styles.member?(:typus_thumbnail)
                image_tag item.url(:typus_thumbnail)
              else
                link_to @item.send(attribute), item.url
              end
  end

%>

<label for="item_<%= attribute %>"><%= _(attachment.humanize) %>
<%= file_field :item, attachment, :disabled => attribute_disabled?(attribute) %>
<%= preview %>

<%- content_for :stylesheets do -%>
  <%= stylesheet_link_tag 'admin/jquery.fancybox', :media => 'screen' %>
<%- end -%>

<%- content_for :javascripts do -%>

  <%= javascript_include_tag 'admin/jquery-1.3.2.min' %>
  <%= javascript_include_tag 'admin/jquery.fancybox-1.2.1.min' %>

<%- end -%>

<%

  attachment = attribute.split('_file_name').first

  unless @item.send(attribute).blank?
    item = @item.send(attachment)
    preview = if @item.send("#{attachment}_content_type") =~ /^image\/.+/ && item.styles.member?(:typus_thumbnail)
                <<-HTML

#{image_tag item.url(:typus_thumbnail)}

                HTML
              else
                <<-HTML
#{link_to @item.send(attribute), item.url}
                HTML
              end
  end

%>

<label for="item_<%= attribute %>"><%= _(attachment.humanize) %>
<%= file_field :item, attachment, :disabled => attribute_disabled?(attribute) %>
<%= preview %>

Use fancybox to display images.

Use fancybox to display images.