Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmthakur committed Dec 9, 2014
0 parents commit 04161bb
Show file tree
Hide file tree
Showing 8 changed files with 227 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
source 'https://rubygems.org'

gem 'sinatra'
gem 'sinatra-session'
gem 'sinatra-accept-params'
gem 'sinatra-flash'
gem "rack"
gem "rack-contrib"

gem 'tux'
gem 'colorize'

gem 'json'
gem 'rake'
gem 'activerecord'
gem 'httparty'

gem 'geoip', '~> 1.4.0'

gem 'puma'


group :development, :test do
gem 'pry'
gem 'pry-nav'
gem 'rack-test'
gem 'rspec'
gem 'shoulda-matchers'
gem 'database_cleaner'
gem 'guard-rspec', require: false
gem 'shotgun'
gem 'simplecov', require: false
end
153 changes: 153 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
activerecord (4.1.8)
activemodel (= 4.1.8)
activesupport (= 4.1.8)
arel (~> 5.0.0)
activesupport (4.1.8)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
bond (0.5.1)
builder (3.2.2)
celluloid (0.16.0)
timers (~> 4.0.0)
coderay (1.1.0)
colorize (0.7.3)
database_cleaner (1.3.0)
diff-lcs (1.2.5)
docile (1.1.5)
ffi (1.9.6)
formatador (0.2.5)
geoip (1.4.0)
guard (2.10.2)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-compat (0.3.0)
guard-rspec (4.4.2)
guard (~> 2.1)
guard-compat (~> 0.1)
rspec (>= 2.99.0, < 4.0)
hitimes (1.2.2)
httparty (0.13.3)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.6.11)
json (1.8.1)
listen (2.8.3)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
minitest (5.4.3)
multi_json (1.10.1)
multi_xml (0.5.5)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-nav (0.2.4)
pry (>= 0.9.10, < 0.11.0)
puma (2.10.2)
rack (>= 1.1, < 2.0)
rack (1.5.2)
rack-contrib (1.2.0)
rack (>= 0.9.1)
rack-protection (1.5.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rake (10.4.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
ripl (0.7.1)
bond (~> 0.5.1)
ripl-multi_line (0.3.1)
ripl (>= 0.3.6)
ripl-rack (0.2.1)
rack (>= 1.0)
rack-test (~> 0.6.2)
ripl (>= 0.7.0)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
shotgun (0.9)
rack (>= 1.0)
shoulda-matchers (2.7.0)
activesupport (>= 3.0.0)
simplecov (0.9.1)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sinatra-accept-params (0.1.0)
sinatra-flash (0.3.0)
sinatra (>= 1.0.0)
sinatra-session (1.0.0)
sinatra (>= 1.0)
slop (3.6.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
timers (4.0.1)
hitimes
tux (0.3.0)
ripl (>= 0.3.5)
ripl-multi_line (>= 0.2.4)
ripl-rack (>= 0.2.0)
sinatra (>= 1.2.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
activerecord
colorize
database_cleaner
geoip (~> 1.4.0)
guard-rspec
httparty
json
pry
pry-nav
puma
rack
rack-contrib
rack-test
rake
rspec
shotgun
shoulda-matchers
simplecov
sinatra
sinatra-accept-params
sinatra-flash
sinatra-session
tux
Empty file added README.md
Empty file.
3 changes: 3 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bundler.require
require "sinatra/activerecord/rake"
require "./app"
26 changes: 26 additions & 0 deletions app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require 'rubygems'
require 'sinatra'
require 'redis'
require 'json'
require 'logger'
require 'colorize'

Dir[File.dirname(__FILE__) + '/lib/*.rb'].sort.each {|file| require file}
I18n.enforce_available_locales = false
I18n.locale = :en

module LocationTracker
class App < Sinatra::Base
set :logging, true
set :raise_errors, true
set :show_exceptions, false


get '/' do

end

end


end
6 changes: 6 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require 'logger'
use Rack::CommonLogger, logger

require File.join(File.dirname(__FILE__), 'app.rb')

run Rack::URLMap.new('/' => LocationTracker::App )
Binary file added lib/GeoIP.dat
Binary file not shown.
6 changes: 6 additions & 0 deletions lib/tracker.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Tracker

def self.get_location(ip)

end
end

0 comments on commit 04161bb

Please sign in to comment.