From 775418918782d5284000ed0bfea364458c748567 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 10 Aug 2012 18:07:50 -0400 Subject: Fully embrace Ruby 1.9 hash syntax Didn't bother with files in db/, config/, or features/ --- app/models/commit.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index 71c41350c95..5c6b4d88d96 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -20,7 +20,7 @@ class Commit :tree, :id, :to_patch, - :to => :commit + to: :commit class << self @@ -57,7 +57,7 @@ class Commit def commits_since(repo, date) commits = repo.heads.map do |h| - repo.log(h.name, nil, :since => date).each { |c| Commit.new(c, h) } + repo.log(h.name, nil, since: date).each { |c| Commit.new(c, h) } end.flatten.uniq { |c| c.id } commits.sort! do |x, y| @@ -69,7 +69,7 @@ class Commit def commits(repo, ref, path = nil, limit = nil, offset = nil) if path - repo.log(ref, path, :max_count => limit, :skip => offset) + repo.log(ref, path, max_count: limit, skip: offset) elsif limit && offset repo.commits(ref, limit, offset) else @@ -86,9 +86,9 @@ class Commit last = project.commit(from.try(:strip)) result = { - :commits => [], - :diffs => [], - :commit => nil + commits: [], + diffs: [], + commit: nil } if first && last -- cgit v1.2.1