Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit of sinatra_social FB experimentation

  • Loading branch information...
commit 0a32764d15e29b3b8457511f0a13f70545f73b4d 1 parent 6a0bad5
@zmcartor authored
View
8 sinatra_social/Gemfile
@@ -0,0 +1,8 @@
+source :gemcutter
+
+gem "sinatra"
+gem "koala"
+gem "json"
+gem "httparty"
+gem "thin"
+gem 'sinatra-assetpack', :require => 'sinatra/assetpack'
View
51 sinatra_social/Gemfile.lock
@@ -0,0 +1,51 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ addressable (2.2.8)
+ daemons (1.1.8)
+ eventmachine (0.12.10)
+ faraday (0.7.6)
+ addressable (~> 2.2)
+ multipart-post (~> 1.1)
+ rack (~> 1.1)
+ httparty (0.8.3)
+ multi_json (~> 1.0)
+ multi_xml
+ jsmin (1.0.1)
+ json (1.7.3)
+ koala (1.4.1)
+ faraday (~> 0.7.0)
+ multi_json (~> 1.3.0)
+ multi_json (1.3.5)
+ multi_xml (0.5.1)
+ multipart-post (1.1.5)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-assetpack (0.0.11)
+ jsmin
+ rack-test
+ sinatra
+ tilt (>= 1.3.0)
+ thin (1.3.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ tilt (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ httparty
+ json
+ koala
+ sinatra
+ sinatra-assetpack
+ thin
View
18 sinatra_social/app.rb
@@ -0,0 +1,18 @@
+require 'sinatra/base'
+require './mid'
+class Social < Sinatra::Base
+
+ use Middleware_basic
+
+ set :rdoc, :layout_engine => :erb
+ set :public_folder, File.dirname(__FILE__) + '/public'
+
+ set :blah , 0
+
+ get '/' do
+ 'oks then'
+ end
+
+
+end
+
View
2  sinatra_social/config.ru
@@ -0,0 +1,2 @@
+require './app'
+run Social
View
14 sinatra_social/mid.rb
@@ -0,0 +1,14 @@
+require 'sinatra/base'
+
+class Middleware_basic < Sinatra::Base
+ get "/clear" do
+
+ #the app variable is the wrapped sinatra endpoint that
+ #uses this middleware. app.settings.app_file is our app class
+ #this can be re-initialized.
+ app.settings.reset!
+ load app.settings.app_file
+ content_type :txt
+ "Ok reloaded!"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.