resumator 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +3 -0
- data/LICENSE +22 -0
- data/README.md +51 -0
- data/Rakefile +15 -0
- data/lib/resumator.rb +17 -0
- data/lib/resumator/config.rb +21 -0
- data/lib/resumator/resume.rb +42 -0
- data/lib/resumator/server.rb +53 -0
- data/lib/resumator/version.rb +3 -0
- data/test/test_helper.rb +3 -0
- data/test/test_resumator.rb +11 -0
- metadata +85 -0
data/History.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2010 Joshua Priddle
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Resumator
|
2
|
+
Resumator is a Ruby gem designed to help you maintain and publish your
|
3
|
+
resume. Write it with your favorite text editor and maintain it with
|
4
|
+
your favorite VCS.
|
5
|
+
|
6
|
+
|
7
|
+
## About
|
8
|
+
Resumes are a pain to write and maintain. Word Processing programs are no fun.
|
9
|
+
Resumator aims to alleviate some of this pain by providing an easy way to
|
10
|
+
write your resume.
|
11
|
+
|
12
|
+
Resumator compiles your resume from Markdown to HTML using Rdiscount. HTML
|
13
|
+
is served using Sinatra. A basic template is provided or you can write your
|
14
|
+
own custom template. It's encouraged that you use your own template - you're
|
15
|
+
most likely a coder of some sort if you're using this, so don't be afraid
|
16
|
+
to show off your web skills. Instead of having to mess around with HTML
|
17
|
+
every time you need to adjust your resume, you just edit a Markdown file
|
18
|
+
and push the changes to your site.
|
19
|
+
|
20
|
+
More importantly, you can use git (or any VCS) to _manage_ your resume. A
|
21
|
+
resume should be considered a never-ending, constantly updated document. How
|
22
|
+
can git help with maintaining a resume?
|
23
|
+
|
24
|
+
* You have a detailed history of **every** change made to your resume
|
25
|
+
* Manage resumes tailored for specific fields easily via branches
|
26
|
+
* Tags can be used to denote "versions" of your resume that landed a job
|
27
|
+
|
28
|
+
|
29
|
+
## Setup
|
30
|
+
* Clone the template: `git clone git://github.com/itspriddle/resumator-template`
|
31
|
+
* Edit files in app/resume
|
32
|
+
* Edit HTML in app/views
|
33
|
+
* Edit CSS in public/css
|
34
|
+
* Commit changes and push to Heroku (or your Sinatra enabled host)
|
35
|
+
* Profit
|
36
|
+
|
37
|
+
|
38
|
+
## Configuration
|
39
|
+
To specify custom configuration options, call `Resumator.configure` before
|
40
|
+
the `Resumator::Server` is created. See lib/resumator/config.rb for
|
41
|
+
configuration options.
|
42
|
+
|
43
|
+
|
44
|
+
## TODO
|
45
|
+
* Better docs
|
46
|
+
* Tests
|
47
|
+
* PDF export/download
|
48
|
+
|
49
|
+
|
50
|
+
## License
|
51
|
+
See LICENSE file
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
$LOAD_PATH.unshift 'lib'
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
|
5
|
+
desc "Push a new version to Gemcutter"
|
6
|
+
task :publish do
|
7
|
+
require 'resumator/version'
|
8
|
+
|
9
|
+
sh "gem build resumator.gemspec"
|
10
|
+
sh "gem push resumator-#{Resumator::Version}.gem"
|
11
|
+
sh "git tag v#{Resumator::Version}"
|
12
|
+
sh "git push origin v#{Resumator::Version}"
|
13
|
+
sh "git push origin master"
|
14
|
+
sh "git clean -fd"
|
15
|
+
end
|
data/lib/resumator.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
$:.unshift(File.dirname(__FILE__)) unless
|
2
|
+
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
|
+
|
4
|
+
require 'resumator/version'
|
5
|
+
require 'resumator/config'
|
6
|
+
require 'resumator/resume'
|
7
|
+
|
8
|
+
module Resumator
|
9
|
+
class << self
|
10
|
+
attr_accessor :configuration
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.configure
|
14
|
+
self.configuration ||= Resumator::Config.new
|
15
|
+
yield(configuration)
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Resumator
|
2
|
+
class Config
|
3
|
+
class HTML
|
4
|
+
attr_accessor :title
|
5
|
+
end
|
6
|
+
|
7
|
+
class Sinatra
|
8
|
+
attr_accessor :view_path
|
9
|
+
attr_accessor :public_path
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_reader :sinatra, :html
|
13
|
+
|
14
|
+
attr_accessor :name, :resume_path
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@html = HTML.new
|
18
|
+
@sinatra = Sinatra.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'rdiscount'
|
2
|
+
|
3
|
+
module Resumator
|
4
|
+
class Resume
|
5
|
+
attr_accessor :sections, :order
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@order = []
|
9
|
+
@sections = {}
|
10
|
+
@path = Resumator.configuration.resume_path
|
11
|
+
parse!
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_html
|
15
|
+
@html ||= self.order.map do |section|
|
16
|
+
self.sections[section]
|
17
|
+
end.join("\n")
|
18
|
+
end
|
19
|
+
|
20
|
+
def [](section)
|
21
|
+
@sections[section.to_sym]
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def parse!
|
27
|
+
Dir.chdir(@path) do
|
28
|
+
Dir["*"].each do |file|
|
29
|
+
if file =~ /([0-9]+)_([\w]+)\.(md|markdown)/
|
30
|
+
key = $2.to_sym
|
31
|
+
self.order << key
|
32
|
+
self.sections[key] = format_piece(file)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def format_piece(file)
|
39
|
+
RDiscount.new(File.read(file), :smart).to_html
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'sinatra/base'
|
2
|
+
|
3
|
+
module Resumator
|
4
|
+
class Server < Sinatra::Base
|
5
|
+
set :views, Resumator.configuration.sinatra.view_path
|
6
|
+
set :public, Resumator.configuration.sinatra.public_path
|
7
|
+
set :static, true
|
8
|
+
|
9
|
+
# Most of these are copied from Resque (http://github.com/defunk/resque)
|
10
|
+
helpers do
|
11
|
+
include Rack::Utils
|
12
|
+
alias_method :h, :escape_html
|
13
|
+
|
14
|
+
def current_page
|
15
|
+
url request.path_info.sub('/', '')
|
16
|
+
end
|
17
|
+
|
18
|
+
def url(*path_parts)
|
19
|
+
[ path_prefix, path_parts ].join("/").squeeze('/')
|
20
|
+
end
|
21
|
+
alias_method :u, :url
|
22
|
+
|
23
|
+
def path_prefix
|
24
|
+
request.env['SCRIPT_NAME']
|
25
|
+
end
|
26
|
+
|
27
|
+
def class_if_current(path = '')
|
28
|
+
'class="current"' if current_page[0, path.size] == path
|
29
|
+
end
|
30
|
+
|
31
|
+
def partial?
|
32
|
+
@partial
|
33
|
+
end
|
34
|
+
|
35
|
+
def partial(template, local_vars = {})
|
36
|
+
@partial = true
|
37
|
+
erb(template.to_sym, {:layout => false}, local_vars)
|
38
|
+
ensure
|
39
|
+
@partial = false
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def show(page, layout = true)
|
44
|
+
erb page.to_sym, {:layout => layout}
|
45
|
+
end
|
46
|
+
|
47
|
+
get '/' do
|
48
|
+
@resume = Resumator::Resume.new
|
49
|
+
show :index
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: resumator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Joshua Priddle
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-06-06 00:00:00 -04:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Programmatically create and maintain your resume
|
22
|
+
email: itspriddle@nevercraft.net
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- LICENSE
|
29
|
+
- README.md
|
30
|
+
- lib/resumator.rb
|
31
|
+
- lib/resumator/config.rb
|
32
|
+
- lib/resumator/resume.rb
|
33
|
+
- lib/resumator/server.rb
|
34
|
+
- lib/resumator/version.rb
|
35
|
+
files:
|
36
|
+
- History.md
|
37
|
+
- LICENSE
|
38
|
+
- README.md
|
39
|
+
- Rakefile
|
40
|
+
- lib/resumator.rb
|
41
|
+
- lib/resumator/config.rb
|
42
|
+
- lib/resumator/resume.rb
|
43
|
+
- lib/resumator/server.rb
|
44
|
+
- lib/resumator/version.rb
|
45
|
+
- test/test_helper.rb
|
46
|
+
- test/test_resumator.rb
|
47
|
+
has_rdoc: true
|
48
|
+
homepage: http://github.com/itspriddle/resumator
|
49
|
+
licenses: []
|
50
|
+
|
51
|
+
post_install_message:
|
52
|
+
rdoc_options:
|
53
|
+
- --line-numbers
|
54
|
+
- --inline-source
|
55
|
+
- --title
|
56
|
+
- Resumator
|
57
|
+
- --main
|
58
|
+
- README.md
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
segments:
|
73
|
+
- 1
|
74
|
+
- 2
|
75
|
+
version: "1.2"
|
76
|
+
requirements: []
|
77
|
+
|
78
|
+
rubyforge_project: resumator
|
79
|
+
rubygems_version: 1.3.6
|
80
|
+
signing_key:
|
81
|
+
specification_version: 3
|
82
|
+
summary: Programmatically create and maintain your resume
|
83
|
+
test_files:
|
84
|
+
- test/test_helper.rb
|
85
|
+
- test/test_resumator.rb
|