Skip to content

Commit

Permalink
Fix rubocop violations
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu committed Jun 28, 2016
1 parent 23b0f76 commit e9454f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

# Offense count: 11
Metrics/AbcSize:
Max: 36
Max: 39

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 212
Max: 226

# Offense count: 3
Metrics/CyclomaticComplexity:
Expand All @@ -22,7 +22,7 @@ Metrics/CyclomaticComplexity:
# Offense count: 10
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 30
Max: 40

# Offense count: 1
# Configuration parameters: CountKeywordArgs.
Expand All @@ -31,4 +31,4 @@ Metrics/ParameterLists:

# Offense count: 2
Metrics/PerceivedComplexity:
Max: 8
Max: 9
6 changes: 3 additions & 3 deletions lib/xcode/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def list_versions

def prereleases
body = spaceship.send(:request, :get, '/download/').body

links = body.scan(%r{<a.+?href="(.+?.dmg)".*>(.*)</a>})
links = links.map do |link|
parent = link[0].scan(%r{path=(/.*/.*/)}).first.first
Expand All @@ -280,7 +280,7 @@ def prereleases
links = links.map { |pre| Xcode.new_prerelease(pre[1].strip.gsub(/.*Xcode /, ''), pre[0], pre[2]) }

if links.count == 0
version = body.scan(%r{Xcode.* beta}).last.sub(/<.*?>/, '').gsub(/.*Xcode /, '')
version = body.scan(/Xcode.* beta/).last.sub(/<.*?>/, '').gsub(/.*Xcode /, '')
link = body.scan(%r{<button .*"(.+?.xip)".*</button>}).first.first
notes = body.scan(%r{<a.+?href="(/go/\?id=xcode-.+?)".*>(.*)</a>}).first.first
links << Xcode.new(version, link, notes)
Expand Down Expand Up @@ -490,7 +490,7 @@ class Xcode
attr_reader :release_notes_url

def initialize(json, url = nil, release_notes_url = nil)
unless url
if url.nil?
@date_modified = json['dateModified'].to_i
@name = json['name'].gsub(/^Xcode /, '')
@path = json['files'].first['remotePath']
Expand Down

0 comments on commit e9454f3

Please sign in to comment.