GitCV 0.0.0 → 0.6.9

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/GitCV.rb +13 -7
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a107849383a487718650d9aa00145b9fdc594c3c
4
- data.tar.gz: 2cbda16f0f6d72785703dc5c7cceddf8f667004a
3
+ metadata.gz: a07021484ae30bdefbe07bb988b34f2bc665e9b4
4
+ data.tar.gz: 1b19143dd2cf461128138a47545ff622a3274d10
5
5
  SHA512:
6
- metadata.gz: e8dc5eb7c622b8d9871ca61d9c9e24e6d0cf886d2968f4f25bd92db46b77453d022c300e7d8b4ec32506751889dcbf47f36204a08ce5fa4c511aa70091431236
7
- data.tar.gz: 8b377d7c2feab3661f04ac81be9c573a81199006894a95092fe191068730ca137beaaaec492a3a70deb28cc86d9dc45da55dca9a36a3cddaddfc7d1397208d1c
6
+ metadata.gz: 6a2aa9545b8184c59b66bf2809e371079e02a8ece019c92212e8a28be2fd808b0b4b31bf977b4acefd85516650a28afea32690425711887ebe8474c9121fc708
7
+ data.tar.gz: f0bb1cc15412ebfe01544d1f070a47881bce843c628705f06c368951b15be6683100286e81d1270063c4b0bf9ffd39c24d1cd30c34aabec6ca37e72398748aae
@@ -1,16 +1,22 @@
1
1
  require 'prawn'
2
2
  require 'octokit'
3
+ require 'open-uri'
3
4
 
4
5
  class GitCV
5
- def self.create(username)
6
+ def self.create(username,dir)
6
7
  user = Octokit.user "#{username}"
7
- puts "For user : #{user.name}"
8
- puts "#{user.fields} \n public repositories : "
9
- puts "#{user[:public_repos]} \n followers : #{user[:followers]} \n following #{user[:following]}"
10
- puts "Account created at : #{user[:created_at]} \n pub link : #{user.rels[:gists].href}"
8
+ githubImage = open("https://avatars.githubusercontent.com/#{username}?s=150")
9
+ profileImage = File.open("#{dir}/profile.jpg",'w')
11
10
 
12
- Prawn::Document.generate("#{user.name}.pdf") do
13
- text "Username : #{user.name} \n Followers : #{user[:followers]}
11
+ githubImage.each do |pixel|
12
+ profileImage.write(pixel)
13
+ end
14
+
15
+ profileImage.close
16
+
17
+ Prawn::Document.generate("#{dir}/#{user.name}.pdf") do
18
+ image "#{dir}/profile.jpg"
19
+ text "Username : #{user.name} \n Followers : #{user[:followers]}
14
20
  \n email : #{user[:email]} \n Hireable : #{user[:hireable]} \n Company : #{user[:Company]}
15
21
  \n Following : #{user[:following]} \n Location #{user[:location]}
16
22
  \n Public repositories : #{user[:public_repos]} \n contributions : #{user[:contributions]}
metadata CHANGED
@@ -1,23 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: GitCV
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guga katsiashvili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-20 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: A simple gem to make cv (in pdf) out from github page GITCV
13
+ description: 'GitCV , generating cv-s from github profile pages xD #FirstGem'
14
14
  email: guga.katsiashvili@gmail.com
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/GitCV.rb
20
- homepage: http://rubygems.org/gems/TommyGun
20
+ homepage: http://rubygems.org/gems/GitCV
21
21
  licenses:
22
22
  - MIT
23
23
  metadata: {}
@@ -40,5 +40,5 @@ rubyforge_project:
40
40
  rubygems_version: 2.4.8
41
41
  signing_key:
42
42
  specification_version: 4
43
- summary: TommyGun!
43
+ summary: generate cv-s from github profile page xD much wow
44
44
  test_files: []