zresume 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.
data/examples/zhubo.rb CHANGED
@@ -1,3 +1,4 @@
1
+ #gem install zresume
1
2
  require 'zresume'
2
3
  class YourName
3
4
  include Zresume::Person
@@ -5,6 +5,10 @@ module Zresume
5
5
  include Zresume::Printable
6
6
  def self.included(base)
7
7
  base.extend(Core)
8
+ base.class_eval do
9
+ info :name
10
+ name self.to_s.downcase
11
+ end
8
12
  end
9
13
 
10
14
  module Core
@@ -1,12 +1,13 @@
1
1
  #coding: utf-8
2
2
  require 'erb'
3
+ require 'yaml'
3
4
  module Zresume
4
5
  module Printable
5
6
  def to_file(format = 'yaml')
6
- # file_name = "#{name}.#{format}"
7
- # File.open(file_name, 'w') do |out|
8
- # out.puts self.to_yaml
9
- # end
7
+ file_name = "#{name}.#{format}"
8
+ File.open(file_name, 'w') do |out|
9
+ out.puts self.to_yaml
10
+ end
10
11
  #pending
11
12
  end
12
13
 
@@ -1,3 +1,3 @@
1
1
  module Zresume
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/spec/person_spec.rb CHANGED
@@ -22,7 +22,8 @@ describe Zresume::Person do
22
22
  it 'Test the list items added by block' do
23
23
  class Kids
24
24
  include Zresume::Person
25
- info(:experience, :works, :delete)
25
+ info(:name, :experience, :works, :delete)
26
+ name 'kids'
26
27
  experience do
27
28
  item 'Web Master & Programmer' do
28
29
  company "Shenzhen Goldsan electronic STD"
@@ -40,6 +41,7 @@ describe Zresume::Person do
40
41
  end
41
42
  end
42
43
  z = Kids.new
44
+ z.to_file
43
45
  z.experience.item[0].company.should == "Shenzhen Goldsan electronic STD"
44
46
  z.works.item.should == ['http://www.tevogroup.com/', 'http://edu.tevogroup.com/', 'http://www.jndchina.com/']
45
47
  z.works.url.should == 'example.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zresume
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-02 00:00:00.000000000 Z
12
+ date: 2013-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler