Skip to content

Commit

Permalink
Merge branch 'spelling' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Aug 14, 2023
2 parents b1c1d11 + 6905123 commit 648ad8e
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/admin/_print_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ tfoot {

// This will avoid fieldset element to have a page-break.
// The fieldset have a display: none on line 21m I'm leaving this code in case
// we decide to make the elemnets visible again.
// we decide to make the elements visible again.
fieldset {
page-break-inside: avoid;
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/responsive/_new_request_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
padding-left: 20px;

input[type="radio"] {
// Margin-left: Prevents double line questions to have an uneven vertical aligment.
// Margin-left: Prevents double line questions to have an uneven vertical alignment.
// Margin-bottom: Fixes the large gap between a question with two lines.
margin: 0 3px 0 -20px;
}
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# controllers/admin.rb:
# All admin controllers are dervied from this.
# All admin controllers are derived from this.
#
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: [email protected]; WWW: http://www.mysociety.org/
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/admin_general_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def get_events_title
def get_timestamps
# Get an array of event attributes within the timespan in the format
# [id, type_of_model, event_timestamp]
# Note that the relevent date for InfoRequestEvents is creation, but
# for PublicBodyVersions is update thoughout
# Note that the relevant date for InfoRequestEvents is creation, but
# for PublicBodyVersions is update throughout
connection = InfoRequestEvent.connection
authority_change_clause = "SELECT id, 'PublicBodyVersion',
updated_at AS timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def receive
store_unhandled_webhook
end

# send a 200 ok to acknowlege receipt of the webhook
# send a 200 ok to acknowledge receipt of the webhook
# https://stripe.com/docs/webhooks#responding-to-a-webhook
render json: { message: 'OK' }, status: 200
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def perform_search(models, query, sortby, collapse, per_page = 25, this_page = n
# Work out sorting method
order, ascending = order_to_sort_by(@sortby)

# Peform the search
# Perform the search
@per_page = per_page
@page = this_page || get_search_page_from_params

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/general_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def search
@max_users = (@xapian_users.matches_estimated > MAX_RESULTS) ? MAX_RESULTS : @xapian_users.matches_estimated
end

# Spelling and highight words are same for all three queries
# Spelling and highlight words are same for all three queries
@highlight_words = @request_for_spelling.words_to_highlight(regex: true, include_original: true)
unless @request_for_spelling.spelling_correction =~ /[a-z]+:/
@spelling_correction = @request_for_spelling.spelling_correction
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/track_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# app/controllers/track_controller.rb:
# Publically visible email alerts and RSS - think an alert system crossed with
# Publicly visible email alerts and RSS - think an alert system crossed with
# social bookmarking.
#
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def check_can_send_messages

def check_logged_in
# You *must* be logged into send a message to another user. (This is
# partly to avoid spam, and partly to have some equanimity of openess
# partly to avoid spam, and partly to have some equanimity of openness
# between the two users)
#
# "authenticated?" has done the redirect to signin page for us
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def theme_asset_exists?(asset_path)
end

# Note that if the admin interface is proxied via another server, we can't
# rely on a sesssion being shared between the front end and admin interface,
# rely on a session being shared between the front end and admin interface,
# so need to check the status of the user.
def is_admin?
!session[:using_admin].nil? || (!@user.nil? && @user.is_admin?)
Expand Down
2 changes: 1 addition & 1 deletion app/models/dataset/value_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ class Dataset::ValueSet < ApplicationRecord

def check_at_least_one_value_is_present
return unless values.map(&:value).all?(&:blank?)
errors.add :values, :emtpy
errors.add :values, :empty
end
end
2 changes: 1 addition & 1 deletion app/models/info_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def self.holding_pen_request
om = OutgoingMessage.new({
status: 'ready',
message_type: 'initial_request',
body: 'This is the holding pen request. It shows responses that were sent to invalid addresses, and need moving to the correct request by an adminstrator.',
body: 'This is the holding pen request. It shows responses that were sent to invalid addresses, and need moving to the correct request by an administrator.',
last_sent_at: Time.zone.now,
what_doing: 'normal_sort'

Expand Down
4 changes: 2 additions & 2 deletions app/models/mail_server_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def self.scan_for_postfix_queue_ids(f)
result
end

# Retuns nil if there is no queue id
# Returns nil if there is no queue id
def self.extract_postfix_queue_id_from_syslog_line(line)
# Assume the log file was written using syslog and parse accordingly
m = SyslogProtocol.parse("<13>" + line).content.match(/^\S+: (\S+):/)
Expand Down Expand Up @@ -170,7 +170,7 @@ def self.request_postfix_sent?(ir)
# no request- email in it?
#
# NB: There can be several emails involved in a request. This just checks that
# at least one of them has been succesfully sent.
# at least one of them has been successfully sent.
#
def self.check_recent_requests_have_been_sent
# Get all requests sent for from 2 to 10 days ago. The 2 day gap is
Expand Down
2 changes: 1 addition & 1 deletion app/models/public_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def editor
# tags contain the given query
#
# query - String to query the searchable fields
# locale - String to specify the language of the seach query
# locale - String to specify the language of the search query
# (default: AlaveteliLocalization.locale)
#
# Returns an ActiveRecord::Relation
Expand Down
2 changes: 1 addition & 1 deletion app/views/request/_citations.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%# FIXME: Slighly messy logic, but can be cleaned up when we allow any user to
<%# FIXME: Slightly messy logic, but can be cleaned up when we allow any user to
add citations %>
<% if can? :create_citation, info_request %>
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Application < Rails::Application
ENV['RECAPTCHA_SITE_KEY'] = AlaveteliConfiguration.recaptcha_site_key
ENV['RECAPTCHA_SECRET_KEY'] = AlaveteliConfiguration.recaptcha_secret_key

# Insert a bit of middleware code to prevent uneeded cookie setting.
# Insert a bit of middleware code to prevent unneeded cookie setting.
require "#{Rails.root}/lib/strip_empty_sessions"
config.middleware.insert_before ::ActionDispatch::Cookies, StripEmptySessions, key: '_wdtk_cookie_session', path: "/", httponly: true

Expand Down
4 changes: 2 additions & 2 deletions config/general.yml-example
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ DOMAIN: 'www.example.org'
# ---
FORCE_SSL: true

# ISO country code of country currrently deployed in
# ISO country code of country currently deployed in
# (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
#
# ISO_COUNTRY_CODE - String country code (default: GB)
Expand Down Expand Up @@ -147,7 +147,7 @@ TWITTER_USERNAME: ''
TWITTER_WIDGET_ID: ''

# The locales you want your site to support. If there is more than one, use
# spaces betwween the entries.
# spaces between the entries.
#
# AVAILABLE_LOCALES – String of space-separated locales (default: en)
#
Expand Down
2 changes: 1 addition & 1 deletion config/httpd.conf-example
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
AddHandler fastcgi-script .cgi
</Directory>

# Favicon in the Rails asset pipline are served from /assets/favicon.ico yet we
# Favicon in the Rails asset pipeline are served from /assets/favicon.ico yet we
# still get requests for it in the root directory.
RewriteRule ^/favicon\.ico$ /assets/favicon.ico [L]

Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def matches?(request)

root to: 'general#frontpage'

#### General contoller
#### General controller
root :to => 'general#frontpage',
:as => :frontpage,
:via => :get
Expand Down
2 changes: 1 addition & 1 deletion config/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DOMAIN: 'test.host'
# so that logins can't be intercepted by naughty people.
FORCE_SSL: false

# ISO country code of country currrently deployed in
# ISO country code of country currently deployed in
# (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
ISO_COUNTRY_CODE: DE

Expand Down
2 changes: 1 addition & 1 deletion config/varnish-alaveteli.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ sub vcl_recv {
error 405 "Not allowed.";
}

# For an explanation of the followng roundabout way of defining
# For an explanation of the following roundabout way of defining
# ban lists, see
# http://kristianlyng.wordpress.com/2010/07/28/smart-bans-with-varnish/

Expand Down
2 changes: 1 addition & 1 deletion lib/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../commonlib/rblib/config'

# Load intial mySociety config
# Load initial mySociety config
if ENV["RAILS_ENV"] == "test"
MySociety::Config.set_file(File.join(File.dirname(__FILE__), '..', 'config', 'test'), true)
else
Expand Down
8 changes: 4 additions & 4 deletions lib/stripe_mock_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def self.mark_subscription_as_past_due(subscription)

module RequestHandlers::Subscriptions
# copies current method and adds a call to our
# set_custom_status_from_metatdata method to set the status
# from the stored info in the subscription metatdata when the
# set_custom_status_from_metadata method to set the status
# from the stored info in the subscription metadata when the
# subscription is retrieved (including calling #refresh)
def retrieve_subscription(route, method_url, _params, _headers)
route =~ method_url
Expand All @@ -22,8 +22,8 @@ def retrieve_subscription(route, method_url, _params, _headers)
end

# copies current method and adds a call to our
# set_custom_status_from_metatdata method to set the status
# from the stored info in the subscription metatdata when multiple
# set_custom_status_from_metadata method to set the status
# from the stored info in the subscription metadata when multiple
# subscriptions are retrieved (including from `Subscription::List`)
def retrieve_subscriptions(route, method_url, params, _headers)
route =~ method_url
Expand Down
2 changes: 1 addition & 1 deletion script/rails-post-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# rails-post-deploy
# For Ruby on Rails, this used to be run in exec_extras in vhosts.pl;
# however, now we use exec_before_down and exec_while_down instead, so
# this is here for compatability with alternative deploy scripts that
# this is here for compatibility with alternative deploy scripts that
# still call rails-post-deploy.
#
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion script/site-specific-install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# Set IDEAL_VERSION to the commitish we want to check out; typically
# Set IDEAL_VERSION to the committish we want to check out; typically
# this is the version tag. Since this may not exist before release,
# fall back to the master branch:
VERSIONS="origin/install-script 0.15 origin/master"
Expand Down
2 changes: 1 addition & 1 deletion script/update-rubocop-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ def write_config(config)
end

write_config(merge_config(default_config, current_config))
puts "RuboCop configuation at #{File.expand_path(CONFIG_FILE)} has been updated"
puts "RuboCop configuration at #{File.expand_path(CONFIG_FILE)} has been updated"
puts "Please manually check cops which have been renamed"
2 changes: 1 addition & 1 deletion spec/mailers/outgoing_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
expect(ir.email_subject_request(html: false)).to eq("Freedom of Information request - Why do you have & such a fancy dog?")
end

it "should use 'Re:' and inital request subject for followups which aren't replies to particular messages" do
it "should use 'Re:' and initial request subject for followups which aren't replies to particular messages" do
ir = info_requests(:fancy_dog_request)
om = outgoing_messages(:useless_outgoing_message)

Expand Down
6 changes: 3 additions & 3 deletions spec/mailers/request_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
deliveries.clear
end

it "should store mail in holding pen and send to admin when the from email is empty and only authorites can reply" do
it "should store mail in holding pen and send to admin when the from email is empty and only authorities can reply" do
ir = info_requests(:fancy_dog_request)
ir.allow_new_responses_from = 'authority_only'
ir.handle_rejected_responses = 'holding_pen'
Expand All @@ -136,7 +136,7 @@
deliveries.clear
end

it "should store mail in holding pen and send to admin when the from email is unknown and only authorites can reply" do
it "should store mail in holding pen and send to admin when the from email is unknown and only authorities can reply" do
ir = info_requests(:fancy_dog_request)
ir.allow_new_responses_from = 'authority_only'
ir.handle_rejected_responses = 'holding_pen'
Expand Down Expand Up @@ -1016,7 +1016,7 @@ def force_updated_at_to_past(request)
end

it "should send an alert when there are two new comments" do
# add two comments - the second one sould be ignored, as is by the user who made the request.
# add two comments - the second one should be ignored, as is by the user who made the request.
# the new comment here, will cause the one in the fixture to be picked up as a new comment by alert_comment_on_request also.
new_comment = info_requests(:fancy_dog_request).add_comment('Not as daft as this one', users(:silly_name_user))
new_comment = info_requests(:fancy_dog_request).add_comment('Or this one!!!', users(:bob_smith_user))
Expand Down
2 changes: 1 addition & 1 deletion spec/models/info_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
expected_message = 'This is the holding pen request. It shows ' \
'responses that were sent to invalid addresses, ' \
'and need moving to the correct request by an ' \
'adminstrator.'
'administrator.'
expect(@holding_pen.outgoing_messages.first.body).
to eq(expected_message)
end
Expand Down

0 comments on commit 648ad8e

Please sign in to comment.