yaml-cv 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 417f601294b5c11b34efa0e476da2ebdc93a44147a734f10f4883e003e00ccfa
4
- data.tar.gz: 29535ef8d332911a517962ca62e042d011fd6f5905aacb1a4a2f028cdf6cb420
3
+ metadata.gz: 7e9478dcd593d43edfd3c6f74842fe45492b7dacdd99931d92d798543a112de9
4
+ data.tar.gz: 0e596fcfca64831fc75d7c614460a9dae35a1f77b9ab5014c82d4cc14f2de12c
5
5
  SHA512:
6
- metadata.gz: 16224a46cc10eb7710fe9aa03ad1ef7395f6c6e8dcb4c5f7f7013d3ba9afdca5255567e8403d68d6ce40e0df516d7fab29892bf8a1cf12ffebd5cb04f94a7fb6
7
- data.tar.gz: 28522fc7481a06ef7c614df6cf4ae29c75760b36403566e51290db7a451556572c7e3f6f0492e21e8e479e3e4d1f804249755b6c77b504445db47db0f44ee1ee
6
+ metadata.gz: c1785ad9b33c63b9bb9a51b9ef9b069560776a6a063ca844fbb63c6f6815dc4849a8f51c7d6792170510e2e6a6ee14f9fe4e4de2d03a41499cdd2e3c4904afd4
7
+ data.tar.gz: 243166d88d051b6602307623272fdd2c53def51482709467166e769c2d58b1f9adea05f83bb065e74083cee3b1720d0046aa3fdc78a52681b23c8ade30d2481b
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # yaml-cv
1
+ yaml-cv
2
+ [![ ](https://api.travis-ci.com/gmantaos/yaml-cv.svg?branch=master) ](https://travis-ci.com/gmantaos/yaml-cv)
3
+ [![ ](https://img.shields.io/gem/dt/yaml-cv.svg)](https://rubygems.org/gems/yaml-cv)
4
+ [![ ](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
+ =====================
2
6
 
3
7
  Static CV generator from a YAML file, in HTML or PDF format.
4
8
 
@@ -12,6 +16,8 @@ Static CV generator from a YAML file, in HTML or PDF format.
12
16
  $ gem install yaml-cv
13
17
  ```
14
18
 
19
+ **Disclaimer:** On versions `0.1` PDF generation will be a little rough, since I implemented the release system before getting around to that.
20
+
15
21
  ## Usage
16
22
 
17
23
  By default, the output will be printed to stdout in HTML format.
@@ -24,7 +24,7 @@ class Options
24
24
 
25
25
  OptionParser.new do |opts|
26
26
 
27
- opts.banner = "Usage: yaml-cv <path to yml file> [options]"
27
+ opts.banner = "Usage: yaml-cv <yml file> [options]"
28
28
 
29
29
  opts.on("-w", "--watch", "Watch the input file for changes and automatically regenerate the CV.") do |watch|
30
30
 
@@ -44,7 +44,7 @@ class Options
44
44
  opts.on_tail("-h", "--help", "Print this message and exit.") do
45
45
 
46
46
  puts opts
47
- exit
47
+ exit 1
48
48
  end
49
49
 
50
50
  end
@@ -59,7 +59,10 @@ class Options
59
59
 
60
60
  @@options.file_name = ARGV.pop
61
61
 
62
- raise "Please specify an input yml file." unless @@options.file_name
62
+ if !@@options.file_name
63
+ puts self.parser
64
+ exit 1
65
+ end
63
66
  end
64
67
 
65
68
  def self.options
@@ -135,9 +135,11 @@ ____________ ___________ _____ _ _____
135
135
  </td>
136
136
  <td class="period-wrapper">
137
137
  <p>
138
- {{ from.month }} <b>{{ from.year }}</b> -
138
+ {{# from}}
139
+ {{ from.month }} <b>{{ from.year }}</b> -
139
140
  {{# to}}{{ to.month }} <b>{{ to.year }}</b>{{/ to}}
140
141
  {{^ to}}Present{{/ to}}
142
+ {{/ from}}
141
143
  </p>
142
144
  </td>
143
145
  </tr>
@@ -64,6 +64,10 @@ class CV < Mustache
64
64
  end
65
65
 
66
66
  def sections
67
+ if !@cv["sections"]
68
+ return
69
+ end
70
+
67
71
  @cv["sections"].map { |s|
68
72
  s["items"] = format_subsections s["items"]
69
73
  s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml-cv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Mantaos