Skip to content

Commit

Permalink
Merge branch 'release/0.31.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lizconlan committed Jan 26, 2018
2 parents 616d80b + 2ba1afb commit 3187642
Show file tree
Hide file tree
Showing 547 changed files with 30,394 additions and 5,441 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
.vagrant.yml
*#*#
TAGS
/lib/themes
/lib/themes/*
!/lib/themes/.keep
/locale/model_attributes.rb
/files/
/public/download
Expand Down
7 changes: 0 additions & 7 deletions .pryrc

This file was deleted.

1 change: 1 addition & 0 deletions .rubocop.yml
119 changes: 56 additions & 63 deletions .ruby-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Layout/CommentIndentation:
Layout/DotPosition:
Description: 'Checks the position of the dot in multi-line method calls.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
Enabled: false
Enabled: true
EnforcedStyle: 'trailing'

Layout/ElseAlignment:
Description: 'Align elses and elsifs correctly.'
Expand Down Expand Up @@ -239,13 +240,13 @@ Layout/SpaceBeforeBlockBraces:

Layout/SpaceBeforeComma:
Description: 'No spaces before commas.'
Enabled: false
Enabled: true

Layout/SpaceBeforeComment:
Description: >-
Checks for missing space between code and a comment on the
same line.
Enabled: false
Enabled: true

Layout/SpaceBeforeSemicolon:
Description: 'No spaces before semicolons.'
Expand Down Expand Up @@ -327,11 +328,6 @@ Layout/TrailingWhitespace:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
Enabled: true

Style/AccessorMethodName:
Description: Check the naming of accessor methods for get_/set_.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names'
Enabled: false

Style/Alias:
Description: 'Use alias instead of alias_method.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
Expand All @@ -352,11 +348,6 @@ Style/AsciiComments:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
Enabled: false

Style/AsciiIdentifiers:
Description: 'Use only ascii symbols in identifiers.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
Enabled: true

Style/Attr:
Description: 'Checks for uses of Module#attr.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
Expand Down Expand Up @@ -401,11 +392,6 @@ Style/CharacterLiteral:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
Enabled: true

Style/ClassAndModuleCamelCase:
Description: 'Use CamelCase for classes and modules.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
Enabled: true

Style/ClassAndModuleChildren:
Description: 'Checks style of children classes and modules.'
Enabled: false
Expand Down Expand Up @@ -448,11 +434,6 @@ Style/ConditionalAssignment:
of assigning that variable inside of each branch.
Enabled: false

Style/ConstantName:
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
Enabled: true

Style/DefWithParentheses:
Description: 'Use def with parentheses when there are arguments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
Expand All @@ -473,7 +454,7 @@ Style/Documentation:
Style/DoubleNegation:
Description: 'Checks for uses of double negation (!!).'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
Enabled: false
Enabled: true

Style/EachForSimpleLoop:
Description: >-
Expand All @@ -499,13 +480,9 @@ Style/EmptyLiteral:
Enabled: false

Style/Encoding:
Description: Use UTF-8 as the source file encoding.
Description: 'Use UTF-8 as the source file encoding.'
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
Enabled: true
EnforcedStyle: always
SupportedStyles:
- when_needed
- always
Enabled: false

Style/EndBlock:
Description: 'Avoid the use of END blocks.'
Expand All @@ -517,11 +494,6 @@ Style/EvenOdd:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
Enabled: false

Style/FileName:
Description: 'Use snake_case for source file names.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
Enabled: true

Style/FrozenStringLiteralComment:
Description: >-
Add the frozen_string_literal comment to the top of files
Expand Down Expand Up @@ -622,11 +594,6 @@ Style/MethodDefParentheses:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
Enabled: false

Style/MethodName:
Description: 'Use the configured style when naming methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
Enabled: true

Style/ModuleFunction:
Description: 'Checks for usage of `extend self` in modules.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
Expand All @@ -647,7 +614,7 @@ Style/MultilineTernaryOperator:
Avoid multi-line ?: (the ternary operator);
use if/unless instead.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
Enabled: false
Enabled: true

Style/MutableConstant:
Description: 'Do not assign mutable objects to constants.'
Expand Down Expand Up @@ -720,11 +687,6 @@ Style/OneLineConditional:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
Enabled: false

Style/OpMethod:
Description: 'When defining binary operators, name the argument other.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
Enabled: false

Style/OptionalArguments:
Description: >-
Checks for optional arguments that do not appear at the end
Expand Down Expand Up @@ -761,11 +723,6 @@ Style/PerlBackrefs:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
Enabled: false

Style/PredicateName:
Description: 'Check the names of predicate methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
Enabled: false

Style/Proc:
Description: 'Use proc instead of Proc.new.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
Expand Down Expand Up @@ -924,11 +881,6 @@ Style/VariableInterpolation:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
Enabled: false

Style/VariableName:
Description: 'Use the configured style when naming variables.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
Enabled: false

Style/WhenThen:
Description: 'Use when x then ... for one-line cases.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
Expand All @@ -955,6 +907,53 @@ Style/ZeroLengthPredicate:
Description: 'Use #empty? when testing for objects of length 0.'
Enabled: false

#################### Naming #################################

Naming/AccessorMethodName:
Description: Check the naming of accessor methods for get_/set_.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names'
Enabled: false

Naming/AsciiIdentifiers:
Description: 'Use only ascii symbols in identifiers.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
Enabled: true

Naming/ClassAndModuleCamelCase:
Description: 'Use CamelCase for classes and modules.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
Enabled: true

Naming/ConstantName:
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
Enabled: true

Naming/FileName:
Description: 'Use snake_case for source file names.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
Enabled: true

Naming/MethodName:
Description: 'Use the configured style when naming methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
Enabled: true

Naming/BinaryOperatorParameterName:
Description: 'When defining binary operators, name the argument other.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
Enabled: false

Naming/PredicateName:
Description: 'Check the names of predicate methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
Enabled: false

Naming/VariableName:
Description: 'Use the configured style when naming variables.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
Enabled: false

#################### Metrics ################################

Metrics/AbcSize:
Expand Down Expand Up @@ -1138,13 +1137,7 @@ Lint/InheritException:
Description: 'Avoid inheriting from the `Exception` class.'
Enabled: false

Lint/InvalidCharacterLiteral:
Description: >-
Checks for invalid character literals with a non-escaped
whitespace character.
Enabled: false

Lint/LiteralInCondition:
Lint/LiteralAsCondition:
Description: 'Checks of literals used in conditions.'
Enabled: false

Expand Down
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ branches:
only:
- master
- develop
- alaveteli-pro-develop
rvm:
- 1.9.3
- 2.0.0
- 2.1.5
- 2.3.0
- 2.0.0 # Ubuntu Trusty
- 2.1.5 # Debian Jessie
- 2.3.3 # Debian Stretch
- 2.3.0 # Ubuntu Xenial
- 2.3.1 # Ubuntu Xenial
- 2.3.5 # Latest Official 2.3.x
matrix:
fast_finish: true
allow_failures:
- rvm: 2.3.0 # Ubuntu Xenial
- rvm: 2.3.1 # Ubuntu Xenial
- rvm: 2.3.5 # Latest Official 2.3.x
env:
global:
- S3_REGION=us-east-1
Expand All @@ -27,8 +34,6 @@ before_install:
- sudo locale-gen --no-archive en_GB
- sudo locale-gen --no-archive en_GB.UTF-8
- sudo update-locale
- gem install bundler
- gem install rake --version=0.9.2.2
- git submodule update --init --recursive
- psql -c "create database template_utf8 template template0 encoding 'UTF-8';" -U postgres
- psql -c "update pg_database set datistemplate=true where datname='template_utf8';" -U postgres
Expand Down
5 changes: 3 additions & 2 deletions .vagrant.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ fqdn: alaveteli.10.10.10.30.xip.io
ip: 10.10.10.30
memory: 1536
themes_dir: ../alaveteli-themes
os: wheezy64
os: jessie64
use_nfs: false
show_settings: false
cpus: 2 # By default this is calculated dynamically
# By default CPU count is calculated dynamically
cpus: 2
11 changes: 6 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
# the new version. It is always preferable to upgrade our code.
source 'https://rubygems.org'

gem 'rails', '4.2.9'
gem 'rails', '4.2.10'

gem 'pg', '~> 0.18.0', '< 0.19.0'

Expand All @@ -104,8 +104,6 @@ gem 'holidays', '~> 2.2.0', '< 3.0.0'
gem 'iso_country_codes', '~> 0.7.0'
gem 'mahoro', '~> 0.4'
gem 'newrelic_rpm'
gem 'net-http-local', '~> 0.1.0', :platforms => [:ruby_19]
gem 'net-purge', '~> 0.1.0'
gem 'nokogiri', '~> 1.6.0', '< 1.7'
gem 'open4', '~> 1.3.0'
gem 'rack', '~> 1.6.0'
Expand All @@ -116,17 +114,18 @@ gem 'recaptcha', '~> 0.4.0', '< 0.5.0', :require => 'recaptcha/rails'
gem 'rmagick', '~> 2.16.0'
gem 'rolify', '~> 5.1.0'
gem 'ruby-msg', '~> 1.5.0', :git => 'https://github.com/mysociety/ruby-msg.git', :branch => 'ascii-encoding'
gem 'rubyzip', '~> 1.2.0'
gem 'sass', '3.4.21'
gem 'secure_headers', '~> 3.6.0'
gem 'statistics2', '~> 0.54'
gem 'strip_attributes', :git => 'https://github.com/mysociety/strip_attributes.git', :ref => 'c1c14da'
gem 'stripe', '~> 3.4.1'
gem 'syslog_protocol', '~> 0.9.0'
gem 'thin', '~> 1.5.0', '< 1.6.0'
gem 'vpim', '~> 13.11.11'
gem 'will_paginate', '~> 3.1.0'
gem 'xapian-full-alaveteli', '~> 1.2.21.1'
gem 'xml-simple', '~> 1.1.0', :require => 'xmlsimple'
gem 'zip', '~> 2.0.0'

# Gems only used by the research export task
gem 'gender_detector', '~> 1.0.0'
Expand All @@ -140,6 +139,7 @@ gem 'locale', '~> 2.0.0', '< 2.1.0'
gem 'routing-filter', '~> 0.5.0', '< 0.6.0'
gem 'unicode', '~> 0.4.0'
gem 'unidecoder', '~> 1.1.0'
gem 'money', '~> 6.10.0'

# mime-types 3.0.0 requires Ruby 2.0.0, and _something_ is trying to update it
gem 'mime-types', '< 3.0.0', require: false
Expand All @@ -162,6 +162,7 @@ group :test do
gem 'term-ansicolor', '~> 1.3.0', '< 1.4'
gem 'capybara', '~> 2.15.0'
gem 'delorean', '~> 2.1.0'
gem 'stripe-ruby-mock', '~> 2.5.0'
gem 'test_after_commit', '~> 0.4.2'
end

Expand All @@ -172,7 +173,7 @@ group :test, :development do
gem 'rspec-activemodel-mocks', '~> 1.0.0'
gem 'rspec-rails', '~> 3.5.0'
gem 'pry', '~> 0.10.0'
gem 'pry-debugger', '~> 0.2.0', :platforms => :ruby_19
gem 'pry-byebug', '~> 3.4.0'
gem 'public_suffix', '~> 1.4.0', '< 1.5.0'
end

Expand Down
Loading

0 comments on commit 3187642

Please sign in to comment.