Skip to content
Browse files

Fixed syntax errors

  • Loading branch information...
1 parent fa149f4 commit e93939511753067a076e47c81bc7648e6a12300c @keithpitt keithpitt committed Jan 13, 2011
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/commands/commands.rb
  2. +4 −4 lib/commands/helpers.rb
  3. +2 −2 lib/github/command.rb
View
2 lib/commands/commands.rb
@@ -54,7 +54,7 @@
puts "== Info for #{helper.project}"
puts "You are #{helper.owner}"
puts "Currently tracking:"
- helper.tracking.sort { |(a,),(b,)| a == helper.origin ? -1 : b == helper.origin ? 1 : a.to_s <=> b.to_s }.each do |(name,user_or_url)|
+ helper.tracking.sort { |a, b| a == helper.origin ? -1 : b == helper.origin ? 1 : a.to_s <=> b.to_s }.each do |(name,user_or_url)|
puts " - #{user_or_url} (as #{name})"
end
end
View
8 lib/commands/helpers.rb
@@ -2,10 +2,10 @@
helper :user_and_repo_from do |url|
case url
- when %r|^git://github\.com/([^/]+/[^/]+)$|: $1.split('/')
- when %r|^https?://github\.com/([^/]+/[^/]+)$|: $1.split('/')
- when %r|^(?:git\+ssh://)?(?:git@)?github\.com/([^/]+/[^/]+)$|: $1.split('/')
- when %r|^(?:ssh://)?(?:git@)?github\.com:([^/]+/[^/]+)$|: $1.split('/')
+ when %r|^git://github\.com/([^/]+/[^/]+)$| then $1.split('/')
+ when %r|^https?://github\.com/([^/]+/[^/]+)$| then $1.split('/')
+ when %r|^(?:git\+ssh://)?(?:git@)?github\.com/([^/]+/[^/]+)$| then $1.split('/')
+ when %r|^(?:ssh://)?(?:git@)?github\.com:([^/]+/[^/]+)$| then $1.split('/')
end
end
View
4 lib/github/command.rb
@@ -99,8 +99,8 @@ def run
err = perr.read.strip
end
- replace @error = err if err.any?
- replace @out = out if out.any?
+ replace @error = err unless err.empty?
+ replace @out = out unless out.empty?
self
end

0 comments on commit e939395

Please sign in to comment.
Something went wrong with that request. Please try again.