Skip to content

Commit

Permalink
Reformat for Ruby line length of 120
Browse files Browse the repository at this point in the history
The rubocop community has decided to standardize on 120 characters for
default line length.

rubocop/rubocop#7952

Update rubocop and reformat ruby files to embrace this convention.
  • Loading branch information
mattbrictson committed May 23, 2020
1 parent 2836392 commit b145338
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Expand Up @@ -3,6 +3,9 @@ AllCops:
DisplayStyleGuide: true
TargetRubyVersion: 2.6

Layout/LineLength:
Max: 120

Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space

Expand Down
3 changes: 1 addition & 2 deletions bin/cci
Expand Up @@ -9,8 +9,7 @@ def open_circle_ci
repo = origin[%r{(:|/)(.*?/.*?)\.git$}, 2]
branch = capture("git rev-parse --abbrev-ref HEAD").chomp

url = "https://app.circleci.com/pipelines/#{brand}/#{repo}"\
"?branch=#{CGI.escape(branch)}"
url = "https://app.circleci.com/pipelines/#{brand}/#{repo}?branch=#{CGI.escape(branch)}"
system "open", url
end

Expand Down
8 changes: 2 additions & 6 deletions bin/outdated-projects
Expand Up @@ -17,9 +17,7 @@ PSTORE = PStore.new(File.expand_path("~/.cache/outdated-projects"))

class Project
def self.all
gems = JSON.parse(
URI.open("https://rubygems.org/api/v1/owners/mattbrictson/gems.json").read
)
gems = JSON.parse(URI.open("https://rubygems.org/api/v1/owners/mattbrictson/gems.json").read)
gems.map { |g| new(g) }
end

Expand Down Expand Up @@ -72,9 +70,7 @@ class Project
end

def latest_release_html
@_latest_release_html ||= begin
Nokogiri::HTML(URI.open(releases_url)).css(".release.label-latest").first
end
@_latest_release_html ||= Nokogiri::HTML(URI.open(releases_url)).css(".release.label-latest").first
end

def latest_unreleased_commit_at
Expand Down
7 changes: 3 additions & 4 deletions bin/sup
Expand Up @@ -35,10 +35,9 @@ ARGV.each_with_index do |host, i|

if ubuntu16?(host)
run host, "sudo DEBIAN_FRONTEND=noninteractive apt-get -q -q -y update"
run host,
"sudo DEBIAN_FRONTEND=noninteractive apt-get -q -q "\
'-o DPkg::options::="--force-confdef" '\
'-o DPkg::options::="--force-confold" dist-upgrade'
run host, "sudo DEBIAN_FRONTEND=noninteractive apt-get -q -q "\
'-o DPkg::options::="--force-confdef" '\
'-o DPkg::options::="--force-confold" dist-upgrade'
else
run host, "DEBIAN_FRONTEND=noninteractive sudo aptitude -q -q -y update"
run host, "DEBIAN_FRONTEND=noninteractive sudo aptitude -q -q safe-upgrade"
Expand Down

0 comments on commit b145338

Please sign in to comment.