Class: SedgeApi::GitController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- SedgeApi::GitController
- Defined in:
- app/controllers/sedge_cms/sedge_api/git_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/sedge_cms/sedge_api/git_controller.rb', line 5 def index commits = [] g = Git.open(Rails.root, :log => Logger.new(STDOUT)) g.log.each_with_index do |commit, index| commits.push({:name => commit.committer.name, :message => commit., :commited_at => commit.committer_date}) if index == 10 break end end render :json => commits end |