diff --git a/README.md b/README.md index 2ca6e9e8..6eb6d178 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Resume -This started as just a simple place to store a markdown format of my resume, -and now it's turned into an easy way to host your resume using [sinatra][s], -[github-pages][gp] or [Heroku][h]. +This started as just a simple place to store a markdown format of my resume, and now it's turned into an easy way to host your resume using [sinatra][s], [github-pages][gp] or [Heroku][h]. [gp]: http://pages.github.com/ [h]: http://heroku.com/ @@ -14,11 +12,15 @@ and now it's turned into an easy way to host your resume using [sinatra][s], 3. Modify config.yaml so that the data represents you, not icco. 4. Edit views/style.less to make your resume look pretty. 5. Install the gems [sinatra][s], [github-markup][gm], [git][g], [rack-test][rt], [heroku][h] and [less][l] + * install the correct parser for [github-markup][gm], such as [rdiscount][r] for [Markdown][md]. + 6. type `rake local` or `./resume.rb` to run locally. 7. To deploy to Heroku + * Run `heroku create` * `rake deploy` to push your resume to the internet. + 8. To deploy to [github-pages][gp], run `rake github`. [g]: http://github.com/schacon/ruby-git @@ -31,17 +33,12 @@ and now it's turned into an easy way to host your resume using [sinatra][s], ## Other cool stuff -My idea is pretty simple, I just wanted a plain text resume and an easy way to -host it. [Dan Mayer][dm] took this idea and ran with it. He made a lot of -really cool changes, and although I love simplicity, what I really love is how -much he abstracted my original design. You should really check out his resume, -and some of the forks of it. +My idea is pretty simple, I just wanted a plain text resume and an easy way to host it. [Dan Mayer][dm] took this idea and ran with it. He made a lot of really cool changes, and although I love simplicity, what I really love is how much he abstracted my original design. You should really check out his resume, and some of the forks of it. [dm]: http://github.com/danmayer/Resume ## License -resume.md is property of Nathaniel "Nat" Welch. You are welcome to use it as a -base structure for your resume, but don't forget, you are not him. +resume.md is property of Nathaniel "Nat" Welch. You are welcome to use it as a base structure for your resume, but don't forget, you are not him. The rest of the code is licensed CC-GPL. Remember sharing is caring. diff --git a/Rakefile b/Rakefile index 12dfc183..e7c62a10 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# The Rakefile does all of the real work. + task :default => [:github, :heroku] desc "Run your resume locally." @@ -7,8 +9,6 @@ end desc "Deploy to Heroku." task :heroku do - #`git push heroku master` - puts "Currently heroku deployment is broken.\n" end @@ -60,4 +60,3 @@ task :github do puts '--> Commit and Push successful.' end - diff --git a/config.ru b/config.ru index d624bacf..90bf47f7 100644 --- a/config.ru +++ b/config.ru @@ -1,5 +1,3 @@ - ## Just run the application -require 'resume' +require './resume' run Sinatra::Application - diff --git a/resume.rb b/resume.rb index 22bf5a5e..d3e991e2 100755 --- a/resume.rb +++ b/resume.rb @@ -10,12 +10,7 @@ end # Check all of the gems we need are there. -[ - "sinatra", - "less", - "github/markup", - "yaml" -].each {|gem| +[ "sinatra", "less", "github/markup", "yaml" ].each {|gem| begin require gem rescue LoadError @@ -24,10 +19,12 @@ end } +# Include our configurations from config.yaml configure do set :config, YAML.load_file('config.yaml')['user_config'] end +# Render the main page. get '/index.html' do rfile = settings.config['file'] name = settings.config['name'] @@ -42,16 +39,17 @@ } end +# We do this for our static site rendering. get '/' do redirect '/index.html' end +# For the plain text version of our resumes get '/resume.txt' do content_type 'text/plain', :charset => 'utf-8' File.read(settings.config['file']) end - get '/style.css' do content_type 'text/css', :charset => 'utf-8' less :style @@ -61,4 +59,3 @@ content_type 'text/css', :charset => 'utf-8' less :print end -