Class: RackCommitStats::App
- Inherits:
-
Object
- Object
- RackCommitStats::App
- Defined in:
- lib/rack-commit-stats/app.rb
Class Method Summary collapse
Class Method Details
.call(env) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/rack-commit-stats/app.rb', line 5 def self.call(env) status = 200 headers = {"Content-Type" => "application/json"} [status, headers, [response]] end |
.commit ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/rack-commit-stats/app.rb', line 24 def commit if RackCommitStats.config.file_mode? @_commit ||= CommitFromEnv.new else @_commit ||= Commit.new end @_commit end |
.response ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rack-commit-stats/app.rb', line 13 def response { branch: commit.branch, commit: { revision: commit.revision, message: commit., author: commit. } }.to_json end |