Permalink
Browse files

Switching from 3 space indenting to 2. Sorry this will be a bitch to …

…merge...
  • Loading branch information...
icco committed May 11, 2012
1 parent dbcbdcf commit 564fcb46f04b8b26a1348fec0a37392b8fa4587b
Showing with 333 additions and 334 deletions.
  1. +56 −56 Rakefile
  2. +10 −11 config.yaml
  3. +111 −111 public/print.less
  4. +104 −105 public/style.less
  5. +26 −25 resume.rb
  6. +26 −26 views/index.erb
View
112 Rakefile
@@ -4,88 +4,88 @@ task :default => [:github, :heroku]
desc "Run your resume locally."
task :local do
- exec('./resume.rb')
+ exec('./resume.rb')
end
# Based off of http://railspikes.com/2010/2/13/rake-task-for-deploying-to-heroku
desc "Deploy to Heroku."
task :heroku do
- [ 'heroku', 'heroku/command', 'git' ].each {|gem|
- begin
- require gem
- rescue LoadError
- puts "The gem #{gem} is not installed.\n"
- exit
- end
- }
+ [ 'heroku', 'heroku/command', 'git' ].each {|gem|
+ begin
+ require gem
+ rescue LoadError
+ puts "The gem #{gem} is not installed.\n"
+ exit
+ end
+ }
- puts 'Deploying to Heroku. If you haven\'t run heroku create before, this will fail.'
+ puts 'Deploying to Heroku. If you haven\'t run heroku create before, this will fail.'
- # Get users credentials
- user, pass = File.read(File.expand_path("~/.heroku/credentials")).split("\n")
- heroku = Heroku::Client.new(user, pass)
+ # Get users credentials
+ user, pass = File.read(File.expand_path("~/.heroku/credentials")).split("\n")
+ heroku = Heroku::Client.new(user, pass)
- cmd = Heroku::Command::BaseWithApp.new([])
- remotes = cmd.git_remotes '.'
- remote, app = remotes.detect {|key, value| value == (ENV['APP'] || cmd.app)}
+ cmd = Heroku::Command::BaseWithApp.new([])
+ remotes = cmd.git_remotes '.'
+ remote, app = remotes.detect {|key, value| value == (ENV['APP'] || cmd.app)}
- if remote.nil?
- raise "Could not find a git remote for the '#{ENV['APP']}' app"
- end
+ if remote.nil?
+ raise "Could not find a git remote for the '#{ENV['APP']}' app"
+ end
- g = Git.open('.')
- g.push(g.remote(remote))
+ g = Git.open('.')
+ g.push(g.remote(remote))
- heroku.rake(app, "db:migrate")
- heroku.restart(app)
+ heroku.rake(app, "db:migrate")
+ heroku.restart(app)
- puts '--> Heroku Push successful.'
+ puts '--> Heroku Push successful.'
end
# TODO: Make this dynamically figure out all of the files needed from Sinatra.
desc "Deploy to remote defined in config.yaml"
task :github do
- require File.expand_path('../resume',__FILE__)
- require 'rubygems'
+ require File.expand_path('../resume',__FILE__)
+ require 'rubygems'
- # Nice Error checking for gems.
- [ 'git', 'rack/test', 'logger' ].each {|gem|
- begin
- require gem
- rescue LoadError
- puts "The gem #{gem} is not installed.\n"
- exit
- end
- }
+ # Nice Error checking for gems.
+ [ 'git', 'rack/test', 'logger' ].each {|gem|
+ begin
+ require gem
+ rescue LoadError
+ puts "The gem #{gem} is not installed.\n"
+ exit
+ end
+ }
- remote = YAML.load_file('config.yaml')['github']['remote']
+ remote = YAML.load_file('config.yaml')['github']['remote']
- browser = Rack::Test::Session.new(Rack::MockSession.new(Sinatra::Application))
+ browser = Rack::Test::Session.new(Rack::MockSession.new(Sinatra::Application))
- files = [
- 'index.html',
- 'resume.txt',
- ]
+ files = [
+ 'index.html',
+ 'resume.txt',
+ ]
- files = files + Dir.entries("public").keep_if {|file| File.file? "public/#{file}"}
+ files = files + Dir.entries("public").keep_if {|file| File.file? "public/#{file}"}
- root = "/tmp/checkout-#{Time.now.to_i}"
- g = Git.clone(remote, root, :log => Logger.new(STDOUT))
+ root = "/tmp/checkout-#{Time.now.to_i}"
+ g = Git.clone(remote, root, :log => Logger.new(STDOUT))
- # Make sure this actually switches branches.
- g.checkout(g.branch('gh-pages'))
+ # Make sure this actually switches branches.
+ g.checkout(g.branch('gh-pages'))
- files.each {|file|
- browser.get file
- content = browser.last_response.body
- File.open("#{root}/#{file}", 'w') {|f| f.write(content) }
- g.add(File.basename(file))
- }
+ files.each {|file|
+ browser.get file
+ content = browser.last_response.body
+ File.open("#{root}/#{file}", 'w') {|f| f.write(content) }
+ g.add(File.basename(file))
+ }
- g.commit('Regenerating Github Pages.')
+ g.commit('Regenerating Github Pages.')
- # PUSH!
- g.push(g.remote('origin'), g.branch('gh-pages'))
+ # PUSH!
+ g.push(g.remote('origin'), g.branch('gh-pages'))
- puts '--> GitHub Pages Commit and Push successful.'
+ puts '--> GitHub Pages Commit and Push successful.'
end
View
@@ -2,21 +2,20 @@
# Stuff about you.
user_config:
- # Your Name. This will be used for the page title
- name: 'Nathaniel Welch'
+ # Your Name. This will be used for the page title
+ name: 'Nathaniel Welch'
- # The file you want to parse to be your resume
- # Must be a format supported by github-markup
- file: 'resume.md'
+ # The file you want to parse to be your resume
+ # Must be a format supported by github-markup
+ file: 'resume.md'
- # A picture of you. Should be a complete url
- pic: 'http://farm5.static.flickr.com/4044/4529365975_dd958b4ba1.jpg'
+ # A picture of you. Should be a complete url
+ pic: 'http://farm5.static.flickr.com/4044/4529365975_dd958b4ba1.jpg'
- # The google analytics key you wish to use.
- gkey: 'UA-333449-7'
+ # The google analytics key you wish to use.
+ gkey: 'UA-333449-7'
# For github pages to work, this needs to be the GitHub repository this file is
# stored in.
github:
- remote: 'git@github.com:icco/Resume.git'
-
+ remote: 'git@github.com:icco/Resume.git'
Oops, something went wrong.

2 comments on commit 564fcb4

@mgius

This comment has been minimized.

Show comment
Hide comment
@mgius

mgius May 11, 2012

Why 2 spaces?

Why 2 spaces?

@icco

This comment has been minimized.

Show comment
Hide comment
@icco

icco May 11, 2012

Owner

It's what I'm using for everything else these days (it's Google code style) and it was frustrating me.

Owner

icco replied May 11, 2012

It's what I'm using for everything else these days (it's Google code style) and it was frustrating me.

Please sign in to comment.