forked from alphagov/govuk-dependencies
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update govuk-lint and auto-correct linting offences
- Loading branch information
Bevan Loon
committed
Oct 10, 2019
1 parent
9dad4ed
commit 5774909
Showing
50 changed files
with
968 additions
and
964 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
ruby File.read('.ruby-version').chomp | ||
ruby File.read(".ruby-version").chomp | ||
|
||
gem 'bundler-audit', git: 'https://github.com/rubysec/bundler-audit', branch: 'master' | ||
gem 'octokit', '~> 4.3' | ||
gem 'rake', '~> 12.3.0' | ||
gem 'sinatra' | ||
gem 'slack-poster', '~> 2.2' | ||
gem "bundler-audit", git: "https://github.com/rubysec/bundler-audit", branch: "master" | ||
gem "octokit", "~> 4.3" | ||
gem "rake", "~> 12.3.0" | ||
gem "sinatra" | ||
gem "slack-poster", "~> 2.2" | ||
|
||
group :production, :staging do | ||
gem 'unicorn' | ||
gem "unicorn" | ||
end | ||
|
||
group :development, :test do | ||
gem 'govuk-lint' | ||
gem "govuk-lint" | ||
end | ||
|
||
group :test do | ||
gem 'climate_control', '~> 0.2' | ||
gem 'pry', '~> 0.11.3' | ||
gem 'rack-test', '~> 0.8.0' | ||
gem 'rspec', '~> 3.7.0' | ||
gem 'timecop', '~> 0.9.1' | ||
gem 'vcr' | ||
gem 'webmock' | ||
gem "climate_control", "~> 0.2" | ||
gem "pry", "~> 0.11.3" | ||
gem "rack-test", "~> 0.8.0" | ||
gem "rspec", "~> 3.7.0" | ||
gem "timecop", "~> 0.9.1" | ||
gem "vcr" | ||
gem "webmock" | ||
end |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
require './app' | ||
require "./app" | ||
run GovukDependencies |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
require_relative 'lib/loader' | ||
require_relative "lib/loader" | ||
|
||
class Dependapanda | ||
def send_simple_message | ||
UseCases::Slack::SendMessages.new( | ||
message_presenter: Presenters::Slack::SimpleMessage.new, | ||
scheduler: UseCases::Slack::Schedulers::Weekday.new | ||
scheduler: UseCases::Slack::Schedulers::Weekday.new, | ||
).execute | ||
end | ||
|
||
def send_full_message | ||
UseCases::Slack::SendMessages.new( | ||
message_presenter: Presenters::Slack::FullMessage.new, | ||
scheduler: UseCases::Slack::Schedulers::Weekday.new | ||
scheduler: UseCases::Slack::Schedulers::Weekday.new, | ||
).execute | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require 'bundler/setup' | ||
require "bundler/setup" | ||
|
||
APP_ENV = ENV['RACK_ENV'] || 'development' | ||
APP_ENV = ENV["RACK_ENV"] || "development" | ||
|
||
Bundler.require :default, APP_ENV.to_sym |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
def cache(name, cache_duration_seconds = 120) | ||
return yield unless ENV['RACK_ENV'] == 'production' | ||
return yield unless ENV["RACK_ENV"] == "production" | ||
|
||
UseCases::Cache.new( | ||
path: "#{Dir.pwd}/public/cache/#{name}.html" | ||
path: "#{Dir.pwd}/public/cache/#{name}.html", | ||
).execute(cache_duration_seconds: cache_duration_seconds) { yield } | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module Gateways | ||
class File | ||
def write(path, content) | ||
::File.open(path, 'w') { |f| f.write(content) } | ||
::File.open(path, "w") { |f| f.write(content) } | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
module Gateways | ||
class PullRequestCount | ||
def initialize | ||
@octokit = Octokit::Client.new(access_token: ENV['GITHUB_TOKEN']) | ||
@octokit = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"]) | ||
end | ||
|
||
def execute | ||
@octokit.search_issues('is:pr user:alphagov author:app/dependabot-preview').total_count | ||
@octokit.search_issues("is:pr user:alphagov author:app/dependabot-preview").total_count | ||
end | ||
end | ||
end |
Oops, something went wrong.