Skip to content

Commit

Permalink
the basics
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Jun 20, 2013
1 parent a6349d7 commit 1fb434b
Show file tree
Hide file tree
Showing 13 changed files with 17,376 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
neo4j

17 changes: 17 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source 'https://rubygems.org'

# Stack
gem 'foreman'
gem 'thin'

# Sinatra
gem 'sinatra', :require => 'sinatra/base'
gem 'sinatra-contrib'
gem 'sinatra-assetpack', :require => 'sinatra/assetpack'

# Databases
gem 'neography'

# Others
gem 'oj'
gem 'haml'
65 changes: 65 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
GEM
remote: https://rubygems.org/
specs:
backports (3.3.2)
daemons (1.1.9)
dotenv (0.8.0)
eventmachine (1.0.3)
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
haml (4.0.3)
tilt
httpclient (2.3.3)
jsmin (1.0.1)
json (1.8.0)
multi_json (1.7.7)
neography (1.1.0)
httpclient (>= 2.3.3)
json (>= 1.7.7)
multi_json (>= 1.3.2)
os (>= 0.9.6)
rubyzip (>= 0.9.7)
oj (2.1.1)
os (0.9.6)
rack (1.5.2)
rack-protection (1.5.0)
rack
rack-test (0.6.2)
rack (>= 1.0)
rubyzip (0.9.9)
sinatra (1.4.3)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sinatra-assetpack (0.2.6)
jsmin
rack-test
sinatra
tilt (>= 1.3.0)
sinatra-contrib (1.4.0)
backports (>= 2.0)
eventmachine
rack-protection
rack-test
sinatra (~> 1.4.2)
tilt (~> 1.3)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.1)
tilt (1.4.1)

PLATFORMS
ruby

DEPENDENCIES
foreman
haml
neography
oj
sinatra
sinatra-assetpack
sinatra-contrib
thin
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'neography'
require 'neography/tasks'
8 changes: 8 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- encoding: utf-8 -*-
$:.unshift File.dirname(__FILE__)

require 'neovs_app'

map '/' do
run App
end
26 changes: 26 additions & 0 deletions neovs_app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require 'bundler'
Bundler.require(:default, (ENV["RACK_ENV"]|| 'development').to_sym)

require 'sinatra/base'

$neo = Neography::Rest.new

class App < Sinatra::Base

configure :development do |config|
register Sinatra::Reloader
end

set :haml, :format => :html5
set :app_file, __FILE__

get '/' do
haml :index
end

get '/facets' do
content_type :json

$neo.list_labels.to_json
end
end
Loading

0 comments on commit 1fb434b

Please sign in to comment.