@@ -31,7 +31,7 @@ is set to `http://localhost:4567`. Let's fill in the callback URL as `http://loc
3131
3232## Accepting user authorization
3333
34- Now, let's start filling out our simple server. Create a file called _ server.rb _ and paste this into it:
34+ Now, let's start filling out our simple server. Create a file called ` server.rb ` and paste this into it:
3535
3636 require 'sinatra'
3737 require 'rest-client'
@@ -47,7 +47,7 @@ Your client ID and client secret keys come from [your application's configuratio
4747GitHub--or any other public place, for that matter. We recommend storing them as
4848[ environment variables] [ about env vars ] --which is exactly what we've done here.
4949
50- Next, in _ views /index.erb _ , paste this content:
50+ Next, in ` views /index.erb ` , paste this content:
5151
5252
5353 <html>
@@ -77,7 +77,7 @@ the app. Let's fix that now!
7777
7878### Providing a callback
7979
80- In _ server.rb _ , add a route to specify what the callback should do:
80+ In ` server.rb ` , add a route to specify what the callback should do:
8181
8282 get '/callback' do
8383 # get temporary GitHub code...
@@ -104,7 +104,7 @@ the logged in user:
104104
105105 erb :basic, :locals => {:auth_result => auth_result}
106106
107- We can do whatever we want with our results. In this case, we'll just dump them straight into _ basic.erb _ :
107+ We can do whatever we want with our results. In this case, we'll just dump them straight into ` basic.erb ` :
108108
109109 <p>Okay, here's a JSON dump:</p>
110110 <p>
@@ -128,7 +128,7 @@ into our Sinatra app. On top of that, we're going to be using a middleware calle
128128[ sinatra-auth-github] [ sinatra auth github ] (which was written by a GitHubber).
129129This will make authentication transparent to the user.
130130
131- After you run ` gem install sinatra_auth_github ` , create a file called _ advanced_server.rb _ ,
131+ After you run ` gem install sinatra_auth_github ` , create a file called ` advanced_server.rb ` ,
132132and paste these lines into it:
133133
134134 require 'sinatra/auth/github'
@@ -196,7 +196,7 @@ we're establishing them through the `:github_options` symbol. Passing your clien
196196and client secret, and calling ` register Sinatra::Auth::Github ` , is everything you need
197197to simplify your authentication.
198198
199- We must also create a _ config.ru _ config file, which Rack will use for its configuration
199+ We must also create a ` config.ru ` config file, which Rack will use for its configuration
200200options:
201201
202202 ENV['RACK_ENV'] ||= 'development'
@@ -207,7 +207,7 @@ options:
207207
208208 run Example::MyBasicApp
209209
210- Next, create a file in _ views _ called _ advanced.erb _ , and paste this markup into it:
210+ Next, create a file in ` views ` called ` advanced.erb ` , and paste this markup into it:
211211
212212 <html>
213213 <head>
@@ -221,10 +221,10 @@ From the command line, call `rackup -p 4567`, which starts up your
221221Rack server on port ` 4567 ` --the same port we used when we had a simple Sinatra app.
222222When you navigate to ` http://localhost:4567 ` , the app calls ` authenticate! ` --another
223223internal ` sinatra-auth-github ` method--which redirects you to ` /callback ` . ` /callback `
224- then sends us back to ` / ` , and since we've been authenticated, renders _ advanced.erb _ .
224+ then sends us back to ` / ` , and since we've been authenticated, renders ` advanced.erb ` .
225225
226226We could completely simplify this roundtrip routing by simply changing our callback
227- URL in GitHub to ` / ` . But, since both _ server.rb _ and _ advanced.rb _ are relying on
227+ URL in GitHub to ` / ` . But, since both ` server.rb ` and ` advanced.rb ` are relying on
228228the same callback URL, we've got to do a little bit of wonkiness to make it work.
229229
230230Also, if we had never authorized this Rack application to access our GitHub data,
0 commit comments