linkedin2cv 0.0.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.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.buildpacks +2 -0
  3. data/.bundle/config +1 -0
  4. data/.gitignore +7 -0
  5. data/.node +1 -0
  6. data/.travis.yml +21 -0
  7. data/Gemfile +5 -0
  8. data/Gemfile.lock +119 -0
  9. data/Procfile +3 -0
  10. data/README.md +32 -0
  11. data/Rakefile +6 -0
  12. data/Vagrantfile +16 -0
  13. data/app/routes/api.rb +101 -0
  14. data/app/routes/web.rb +132 -0
  15. data/app/views/hello.erb +36 -0
  16. data/app/views/home.erb +12 -0
  17. data/app/views/index.haml +11 -0
  18. data/app.rb +26 -0
  19. data/config.ru +6 -0
  20. data/config.yml +31 -0
  21. data/lib/linkedin2cv/cli/command.rb +46 -0
  22. data/lib/linkedin2cv/converter.rb +116 -0
  23. data/lib/linkedin2cv/logging.rb +35 -0
  24. data/lib/linkedin2cv/renderer/latex_renderer.rb +64 -0
  25. data/lib/linkedin2cv/version.rb +3 -0
  26. data/linkedin2cv.gemspec +49 -0
  27. data/public/.bowerrc +3 -0
  28. data/public/.editorconfig +21 -0
  29. data/public/.gitattributes +1 -0
  30. data/public/.gitignore +5 -0
  31. data/public/.jshintrc +24 -0
  32. data/public/.travis.yml +7 -0
  33. data/public/Gruntfile.js +487 -0
  34. data/public/app/.buildignore +1 -0
  35. data/public/app/.htaccess +543 -0
  36. data/public/app/404.html +157 -0
  37. data/public/app/favicon.ico +0 -0
  38. data/public/app/images/yeoman.png +0 -0
  39. data/public/app/index.html +73 -0
  40. data/public/app/robots.txt +3 -0
  41. data/public/app/scripts/app.js +20 -0
  42. data/public/app/scripts/controllers/main.js +21 -0
  43. data/public/app/scripts/services/linkedin2cv.js +93 -0
  44. data/public/app/styles/main.scss +95 -0
  45. data/public/app/views/main.html +23 -0
  46. data/public/bower.json +19 -0
  47. data/public/karma-e2e.conf.js +54 -0
  48. data/public/karma.conf.js +56 -0
  49. data/public/package.json +41 -0
  50. data/public/test/.jshintrc +36 -0
  51. data/public/test/runner.html +10 -0
  52. data/public/test/spec/controllers/main.js +22 -0
  53. data/public/test/spec/services/happyapi.js +18 -0
  54. data/public/test/spec/services/happyservice.js +18 -0
  55. data/spec/converter_spec.rb +83 -0
  56. data/spec/mocks/config.yml +31 -0
  57. data/spec/mocks/profile.json +866 -0
  58. data/spec/spec_helper.rb +13 -0
  59. data/templates/cv.erb +327 -0
  60. data/templates/foo.asciidoc +11 -0
  61. data/templates/foo.latex +230 -0
  62. data/test.rb +109 -0
  63. data/test.sh +6 -0
  64. data/teust.rb +75 -0
  65. metadata +434 -0
@@ -0,0 +1,83 @@
1
+ require 'rspec'
2
+ require 'linkedin2cv/cli/command'
3
+ require 'linkedin2cv/converter'
4
+ require 'spec_helper'
5
+ require 'linkedin-oauth2'
6
+
7
+ describe Linkedin2CV::Converter do
8
+
9
+ before do
10
+ @client = Linkedin2CV::Converter.new
11
+ @profile = @client.get_profile
12
+ @config = YAML.load_file(__dir__ + "/mocks/config.yml")
13
+
14
+ end
15
+
16
+ it 'Should Fetch skills' do
17
+ # puts @profile.member_url_resources
18
+ # @profile.skills.all.map do |skill|
19
+ # puts skill.skill.name
20
+ # end
21
+
22
+ # Should get back a Mash of objects
23
+ expect(@profile.skills).to be_an_instance_of(LinkedIn::Mash)
24
+ end
25
+
26
+ it 'Should Fetch education' do
27
+ expect(@profile.educations).to be_an_instance_of(LinkedIn::Mash)
28
+ end
29
+
30
+ it 'Should Fetch associations' do
31
+ expect(@profile.associations).to be_an_instance_of(String)
32
+ end
33
+
34
+ it 'Should Fetch interests' do
35
+ expect(@profile.interests).to be_an_instance_of(String)
36
+ end
37
+
38
+ it 'Should Fetch recommendations' do
39
+ expect(@profile.recommendations_received).to be_an_instance_of(LinkedIn::Mash)
40
+ end
41
+
42
+ it 'Should Fetch jobs' do
43
+ expect(@profile.job_bookmarks).to be_an_instance_of(LinkedIn::Mash)
44
+ end
45
+
46
+ it 'Should Fetch current jobs' do
47
+ expect(@profile.three_current_positions).to be_an_instance_of(LinkedIn::Mash)
48
+ end
49
+
50
+ it 'Should Fetch past jobs' do
51
+ expect(@profile.three_past_positions).to be_an_instance_of(LinkedIn::Mash)
52
+ end
53
+
54
+ it 'Should Fetch URLs' do
55
+ expect(@profile.member_url_resources).to be_an_instance_of(LinkedIn::Mash)
56
+ end
57
+
58
+ it 'Should compile latex on the CLI' do
59
+
60
+ end
61
+
62
+
63
+ it 'Should create a latex Resume' do
64
+ @client.create_resume(@config)
65
+
66
+ # @config['skills']['extra'].each do |k|
67
+ # # puts k
68
+ # k.keys.each do |category|
69
+ # k[category].each do |v|
70
+ # puts v
71
+ # end
72
+ # end
73
+ # end
74
+
75
+ end
76
+
77
+ it 'Should monkey patch the ERB Compiler to escape LaTeX special chars' do
78
+ # puts ERB.new('<%=@profile.location.name %>')
79
+ replaced = ERB.new("<%= 'this & interesting' %><%= 'I have lots of $$ which is >= Bill Gates but < some Middle Eastern oil tychoons ~ net % of the detail' %>").result
80
+ expect(replaced).to eql('this \& interestingI have lots of \$\$ which is \textgreater= Bill Gates but \textless some Middle Eastern oil tychoons \textasciitilde net \% of the detail')
81
+ end
82
+
83
+ end
@@ -0,0 +1,31 @@
1
+ home_phone: +61 3 1234 5678
2
+ mobile_phone: +61 422 123 456
3
+
4
+ references:
5
+ - bill:
6
+ projects: ["Melbourne IT AWS Migration \\ \"DevOps\""]
7
+ roles: ["Manager, Digital"]
8
+ first_name: Bill
9
+ last_name: Murry
10
+ phone: +61 3 0987 6543
11
+ email: bill@foobar.com
12
+
13
+ skills:
14
+ max: 10
15
+ extra:
16
+ - technical: [Solution Design & Architecture, REST, APIs, AWS, Puppet, Automation]
17
+ - languages: [Java, PHP, Ruby, Scala]
18
+
19
+ other:
20
+ interests: [The Internet, Human Computer Interaction & Usability, Basketball, Waterskiing\Wakeboarding, Snowboarding]
21
+
22
+ projects:
23
+ - "Melbourne IT AWS Migration \\ \"DevOps\"": "Melbourne IT"
24
+ - "Melbourne IT Website Refresh (In Progress)": "Melbourne IT"
25
+ - "Startup - Mobile App (Advertising)": "Freelance"
26
+ - "Transformation": "Melbourne IT"
27
+ - "Renewal - Conversion Rate Optimisation": "Melbourne IT"
28
+ - "Skylock - Cloud-based GPS Security Portal": "Freelance"
29
+ - "Substantiate - GPS logbook solutions": "Freelance"
30
+ - "Auto-renewal": "Melbourne IT"
31
+ - "Business Transformation Programme (IWS)": "Melbourne IT"