diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:07:50 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:25:15 -0400 |
commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /app/models/commit.rb | |
parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) | |
download | gitlab-ce-775418918782d5284000ed0bfea364458c748567.tar.gz |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 |