Skip to content

Commit

Permalink
Merge branch 'release/0.45.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Feb 6, 2025
2 parents e8af0b3 + 603dfaa commit f317736
Show file tree
Hide file tree
Showing 59 changed files with 238 additions and 251 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.10.0)
rdoc (6.11.0)
psych (>= 4.0.0)
recaptcha (5.18.0)
redcarpet (3.6.0)
Expand Down Expand Up @@ -731,4 +731,4 @@ DEPENDENCIES
zip_tricks (~> 5.6.0)

BUNDLED WITH
2.4.19
2.6.2
2 changes: 0 additions & 2 deletions app/models/announcement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# user_id :integer not null
# created_at :datetime not null
# updated_at :datetime not null
# title :string
# content :text
#

class Announcement < ApplicationRecord
Expand Down
3 changes: 2 additions & 1 deletion app/models/blog/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
#
# Table name: blog_posts
#
# id :bigint not null, primary key
# id :integer not null, primary key
# title :string
# url :string
# data :jsonb
# created_at :datetime not null
# updated_at :datetime not null
#

class Blog::Post < ApplicationRecord
include Taggable

Expand Down
4 changes: 1 addition & 3 deletions app/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
#
# Table name: categories
#
# id :bigint not null, primary key
# id :integer not null, primary key
# category_tag :string
# created_at :datetime not null
# updated_at :datetime not null
# title :string
# description :string
#

##
Expand Down
2 changes: 1 addition & 1 deletion app/models/category_relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Table name: category_relationships
#
# id :bigint not null, primary key
# id :integer not null, primary key
# parent_id :integer not null
# child_id :integer not null
# position :integer
Expand Down
8 changes: 4 additions & 4 deletions app/models/citation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#
# Table name: citations
#
# id :bigint not null, primary key
# user_id :bigint
# id :integer not null, primary key
# user_id :integer
# citable_type :string
# citable_id :bigint
# citable_id :integer
# source_url :string
# type :string
# created_at :datetime not null
Expand Down Expand Up @@ -72,7 +72,7 @@ def applies_to_batch_request?
citable.is_a?(InfoRequestBatch)
end

def as_json(_options)
def as_json
citable_path = case citable
when InfoRequest
request_path(citable)
Expand Down
4 changes: 2 additions & 2 deletions app/models/dataset/key_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#
# Table name: dataset_key_sets
#
# id :bigint not null, primary key
# id :integer not null, primary key
# resource_type :string
# resource_id :bigint
# resource_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
6 changes: 3 additions & 3 deletions app/models/dataset/value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#
# Table name: dataset_values
#
# id :bigint not null, primary key
# dataset_value_set_id :bigint
# dataset_key_id :bigint
# id :integer not null, primary key
# dataset_value_set_id :integer
# dataset_key_id :integer
# value :string
# notes :string
# created_at :datetime not null
Expand Down
6 changes: 3 additions & 3 deletions app/models/dataset/value_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#
# Table name: dataset_value_sets
#
# id :bigint not null, primary key
# id :integer not null, primary key
# resource_type :string
# resource_id :bigint
# dataset_key_set_id :bigint
# resource_id :integer
# dataset_key_set_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
4 changes: 1 addition & 3 deletions app/models/outgoing_message/snippet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
#
# Table name: outgoing_message_snippets
#
# id :bigint not null, primary key
# id :integer not null, primary key
# created_at :datetime not null
# updated_at :datetime not null
# name :string
# body :text
#

##
Expand Down
8 changes: 4 additions & 4 deletions app/models/project/membership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#
# Table name: project_memberships
#
# id :bigint not null, primary key
# project_id :bigint
# user_id :bigint
# role_id :bigint
# id :integer not null, primary key
# project_id :integer
# user_id :integer
# role_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
6 changes: 3 additions & 3 deletions app/models/project/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#
# Table name: project_resources
#
# id :bigint not null, primary key
# project_id :bigint
# id :integer not null, primary key
# project_id :integer
# resource_type :string
# resource_id :bigint
# resource_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
10 changes: 5 additions & 5 deletions app/models/project/submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#
# Table name: project_submissions
#
# id :bigint not null, primary key
# project_id :bigint
# user_id :bigint
# id :integer not null, primary key
# project_id :integer
# user_id :integer
# resource_type :string
# resource_id :bigint
# resource_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# info_request_id :bigint
# info_request_id :integer
#

##
Expand Down
2 changes: 0 additions & 2 deletions app/models/public_body_category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# category_tag :text not null
# created_at :datetime
# updated_at :datetime
# title :text
# description :text
#

class PublicBodyCategory < ApplicationRecord
Expand Down
1 change: 0 additions & 1 deletion app/models/public_body_heading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# display_order :integer
# created_at :datetime
# updated_at :datetime
# name :text
#

class PublicBodyHeading < ApplicationRecord
Expand Down
4 changes: 2 additions & 2 deletions app/models/user/sign_in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# Table name: user_sign_ins
#
# id :bigint not null, primary key
# user_id :bigint
# id :integer not null, primary key
# user_id :integer
# ip :inet
# created_at :datetime not null
# updated_at :datetime not null
Expand Down
5 changes: 3 additions & 2 deletions app/models/user_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
#
# Table name: user_messages
#
# id :bigint not null, primary key
# user_id :bigint
# id :integer not null, primary key
# user_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#

class UserMessage < ApplicationRecord
belongs_to :user,
inverse_of: :user_messages,
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Log to STDOUT with the current request id as a default log tag.
config.log_tags = [ :request_id ]
config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
# config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)

# Change to "debug" to log everything (including potentially personally-identifiable information!)
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
Expand Down
1 change: 1 addition & 0 deletions config/initializers/regexp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Regexp.timeout = 60.0
12 changes: 12 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 0.45.3.1

## Highlighted Features

* Updated translations from Transifex (Graeme Porteous)
* Fixes for post Rails 8 upgrade issues:
* Fix Pro metric report email for new Stripe price IDs (Graeme Porteous)
* Fix STDOUT logging (Graeme Porteous)
* Fix citations JSON view (Graeme Porteous)
* Fix set reject incoming at mta rake task (Graeme Porteous)
* Fix regular expression timeouts (Graeme Porteous)

# 0.45.3.0

## Highlighted Features
Expand Down
8 changes: 1 addition & 7 deletions lib/alaveteli_pro/metrics_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,7 @@ def number_of_expired_embargoes_this_week
end

def stripe_plans
prefix =
if AlaveteliConfiguration.stripe_namespace.blank?
''
else
"#{AlaveteliConfiguration.stripe_namespace}-"
end
["#{prefix}pro", "#{prefix}pro-annual-billing"]
AlaveteliConfiguration.stripe_prices.keys
end

def new_stripe_users
Expand Down
6 changes: 3 additions & 3 deletions lib/tasks/config_files.rake
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ namespace :config_files do
check_for_env_vars(%w[REJECTED_THRESHOLD AGE_IN_MONTHS], example)
dryrun = ENV['DRYRUN'] != '0'
STDERR.puts "Only a dry run; info_requests will not be updated" if dryrun
options = { rejection_threshold: ENV['REJECTED_THRESHOLD'],
age_in_months: ENV['AGE_IN_MONTHS'],
dryrun: dryrun }
options = { rejection_threshold: ENV['REJECTED_THRESHOLD'].to_i,
age_in_months: ENV['AGE_IN_MONTHS'].to_i,
dryrun: dryrun }

updated_count = InfoRequest.reject_incoming_at_mta(options) do |ids|
puts "Info Request\tRejected incoming count\tLast updated"
Expand Down
Loading

0 comments on commit f317736

Please sign in to comment.