lib/pairing_matrix/server/server.rb in pairing_matrix-0.1.2 vs lib/pairing_matrix/server/server.rb in pairing_matrix-1.0
- old
+ new
@@ -7,9 +7,10 @@
set :bind, '0.0.0.0'
config_reader = PairingMatrix::ConfigReader.new('pairing_matrix.yml')
config = config_reader.config
commit_reader = PairingMatrix::CommitReader.new(config)
+ commit_reader = PairingMatrix::GithubCommitReader.new(config) if config.fetch_from_github?
get '/data/:days' do
commit_reader.authors_with_commits(params['days'].to_i).to_json
end
\ No newline at end of file