Skip to content

Commit

Permalink
some fixes to get server to run, still does not work with bin file
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun McCormick committed Jul 8, 2013
1 parent f39c746 commit 3acb6ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/kag-server
Expand Up @@ -4,7 +4,7 @@ require 'bundler/setup'

lib_path = File.expand_path('lib')

if File.exists? lib_path
if File.directory? lib_path
$LOAD_PATH.unshift lib_path
end

Expand Down
3 changes: 3 additions & 0 deletions kag-gather.gemspec
Expand Up @@ -16,6 +16,9 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = '>= 1.9.2'
gem.required_rubygems_version = '>= 1.3.6'

gem.executables = ['kag-gather','kag-server']
gem.default_executable = 'kag-gather'

gem.files = Dir['readme.md', 'lib/**/*', 'config/config.sample.json']
gem.require_path = 'lib'

Expand Down
10 changes: 5 additions & 5 deletions lib/server.rb
Expand Up @@ -11,7 +11,7 @@

env = KAG::Config.instance[:branch].to_sym
set :environment, env
set :root, File.dirname(__FILE__)+'/lib'
set :root, File.dirname(__FILE__)+'/'

if env == :production
set :logging, false
Expand All @@ -20,18 +20,18 @@
set :server, %w[thin mongrel webrick]
set :port, 50313

get "/*" do
get '/*' do
KAG::API::Controller::Base.route('get',params)
end

post "/*" do
post '/*' do
KAG::API::Controller::Base.route('post',params)
end

put "/*" do
put '/*' do
KAG::API::Controller::Base.route('put',params)
end

delete "/*" do
delete '/*' do
KAG::API::Controller::Base.route('delete',params)
end

0 comments on commit 3acb6ac

Please sign in to comment.