This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Vagrantfile b/Vagrantfile | |
| index 82d0f6a0a..d80575e22 100644 | |
| --- a/Vagrantfile | |
| +++ b/Vagrantfile | |
| @@ -117,7 +117,7 @@ end | |
| SUPPORTED_OPERATING_SYSTEMS = { | |
| 'trusty64' => 'https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20160714.0.0/providers/virtualbox.box', | |
| - 'jessie64' => 'https://atlas.hashicorp.com/puppetlabs/boxes/debian-8.2-64-nocm', | |
| + 'jessie64' => 'https://app.vagrantup.com/puppetlabs/boxes/debian-8.2-64-nocm', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A | |
| it 'renders a 404 when redirecting to an embargoed request that is not yours' do | |
| embargoed_request = FactoryGirl.create(:embargoed_request) | |
| get signin_path, r: show_request_path(embargoed_request.url_title) | |
| follow_redirect! | |
| expect(response.status).to eq(404) | |
| end | |
| # B | |
| it 'renders a 404 when redirecting to an embargoed request that is not yours' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/config/packages b/config/packages.generic | |
| index 55af9f249..2bdf581b8 100644 | |
| --- a/config/packages | |
| +++ b/config/packages.generic | |
| @@ -1,6 +1,6 @@ | |
| -# please note that this package list currently forms part of the | |
| -# mysociety deployment infrastructure -- please discuss on the | |
| -# alavateli mailing list if you want to change it | |
| + | |
| + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def start_and_end_of_month(date) | |
| [date.beginning_of_month, | |
| date.end_of_month] | |
| end | |
| def collect_dates(start_date, end_date = Time.zone.now.last_month.end_of_month, memo = []) | |
| if start_date < end_date | |
| memo << start_and_end_of_month(start_date) | |
| collect_dates(start_date.next_month, end_date, memo) | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Print column 1 | |
| awk '{print $1}' FILE | |
| # Print column 1 and 2, separated by '/' | |
| awk '{print $1 "/" $2}' FILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Save the Atom RELAX NG Compact Schema locally | |
| # https://xml2rfc.tools.ietf.org/public/rfc/html/rfc4287.html#schema | |
| # Just pasted in to `atom.rnc` | |
| # Save the feed output locally | |
| wget -O request_events.atom "https://www.whatdotheyknow.com/api/v2/body/71/request_events.atom?k=REDACTED&since_date=2017-09-15" | |
| # Install a tool to convert comtact syntax to XML syntax | |
| # Via https://stackoverflow.com/a/45979608/387558 | |
| brew install jing-trang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rspec/rails' | |
| require 'factory_bot' | |
| require Rails.root.join('spec', 'support', 'load_file_fixtures') | |
| require Rails.root.join('spec', 'support', 'email_helpers') | |
| RSpec.configure do |config| | |
| config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
| end | |
| factory_users = User.pluck(:id) - [1,2,3,4,5,6,7] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- encoding : utf-8 -*- | |
| require 'rspec/rails' | |
| require Rails.root.join("spec", "support", "load_file_fixtures") | |
| require Rails.root.join("spec", "support", "email_helpers") | |
| RSpec.configure do |config| | |
| config.fixture_path = Rails.root.join("spec","fixtures") | |
| end | |
| namespace :factory_girl do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/rails/rails/issues/15331 | |
| Comment.connection.unprepared_statement do | |
| puts Comment.where(attention_requested: true).not_embargoed.to_sql | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # bin/rails c | |
| # | |
| I18n.available_locales | |
| # => [:en, :es] | |
| Assembly.destroy_all | |
| Part.destroy_all |