Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Attempt to fix failng Rubocop lint checks #190

Merged
merged 1 commit into from
Jan 7, 2016

Conversation

juniorsysadmin
Copy link
Member

No description provided.

@juniorsysadmin juniorsysadmin force-pushed the fix-rubocop branch 2 times, most recently from 8b15c4f to 707aafb Compare January 7, 2016 14:01
if /#{resource[:name]}@([\d\.]+)/ =~ npm('outdated', '--global', resource[:name])
@latest = $1
if /#{resource[:name]}@([\d\.]+)/ =~ npm('outdated', '--global', resource[:name])
@latest = Regexp.last_match(1)
else
@property_hash[:ensure] unless @property_hash[:ensure].is_a? Symbol
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole function feels very unruby… not sure ow to make it better
or simplify it for that matter
perhaps split is all we need

so, basically,

def latest
  outdated = npm('outdated', '--global', resource[:name]).split('@', 1) # no idea what i'm doing
  return outdated if outdated =~ /^(\d\.)+$/ # n.b.: this doesn't match builds, alpha's rcs, etc…
  return @property_hash[:ensure] unless @property_hash[:ensure].is_a? Symbol # why? we could just to_s
  # cuz otherwise this returns nil
end

@igalic
Copy link
Contributor

igalic commented Jan 7, 2016

merging this for now, thank you @juniorsysadmin!

igalic added a commit that referenced this pull request Jan 7, 2016
WIP: Attempt to fix failng Rubocop lint checks
@igalic igalic merged commit cf06a87 into voxpupuli:master Jan 7, 2016
@igalic
Copy link
Contributor

igalic commented Jan 7, 2016

i'll do the rest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants