myprecious 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/myprecious.rb +7 -12
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a55fed5ca4a8913d4d264bf5308755d6d615dcc
4
- data.tar.gz: b9733177f029ecf21273f635c2023b92612f9bce
3
+ metadata.gz: ced07b0dd9cf34ff71b1284ee5f6869b1136524b
4
+ data.tar.gz: 00ab489774c7dbbdeab4f062c6525f489231e5e1
5
5
  SHA512:
6
- metadata.gz: e6b5bfa7d14ae97a644c802d95cada854c7881f2ee7db30bfa1cbe47ecbec6e16ebc8e3615c5badb789274c2dd27aac649a9d532dffa3e0061cf29279bd5f7f8
7
- data.tar.gz: f7b74a56254661eefd49f2ce89139d1d05c4502af57dec7f100b4dfc13ebec7126d0a2c9556a403a4d41259b3d742704c23f3bc6ef9d601f88093a9f1bb89da1
6
+ metadata.gz: 71a804e5f5aed017859b9b12a428d45429e5df07fe5c2cf7e65dd23b28e6c9040ff15fbad769090c4b03c66d88dd2c07104627a564b166250d0c84e09ba2a845
7
+ data.tar.gz: 5558b007a05a0f64f40f0f1a2d0e63a797c24594aee546e0d3939d60e37bf76eb5b0ef5541cc916a93d8a6987d57a3c72f640c72f169fdf394a565eb917a74d6
data/lib/myprecious.rb CHANGED
@@ -6,8 +6,8 @@ class MyPrecious
6
6
  file = File.new("Gemfile", "r")
7
7
 
8
8
  File.open('myprecious.md', 'w') { |write_file|
9
- write_file.puts "gem | Our Version | Latest Version | Date available | Age (in days) | Home Page | Change Log"
10
- write_file.puts "--- | --- | --- | --- | --- | --- | ---"
9
+ write_file.puts "gem | Our Version | Latest Version | Date available | Age (in days) | Change Log"
10
+ write_file.puts "--- | --- | --- | --- | --- | ---"
11
11
  while (line = file.gets)
12
12
  gem_line = line.strip
13
13
  if (gem_line.include? 'gem') && !gem_line.start_with?('#') && !gem_line.start_with?('source')
@@ -20,23 +20,18 @@ class MyPrecious
20
20
  gems_info = Gems.versions name
21
21
  gems_latest_info = Gems.info name
22
22
  latest_build = ''
23
- #write_file.puts "Gem Name: " + name
24
- #write_file.puts "Current Version: " + current_version.to_s
25
- #write_file.puts "Latest Version: " + gems_latest_info["version"].to_s
26
- #write_file.puts "Home Page Url: " + gems_latest_info["homepage_uri"].to_s
27
- #write_file.puts "Change log: " + gems_latest_info["changelog_uri"].to_s
23
+
28
24
  gems_info.each do |gem_info|
29
25
  if gem_info["number"].to_s == gems_latest_info["version"].to_s
30
26
  latest_build = Date.parse gem_info["built_at"]
31
- #write_file.puts "Latest Version Date: " + (latest_build).to_s
32
27
  end
33
28
  if gem_info["number"].to_s == current_version.to_s
34
29
  current_build = Date.parse gem_info["built_at"]
35
30
  days_complete = latest_build - current_build
36
- #write_file.puts name + ":" + days_complete.to_i.to_s
37
- write_file.puts name + "|" + current_version.to_s + "|" + gems_latest_info["version"].to_s + "|" +
38
- (latest_build).to_s + "|" + days_complete.to_i.to_s + "|" +
39
- gems_latest_info["homepage_uri"].to_s + "|" + gems_latest_info["changelog_uri"].to_s
31
+ write_file.puts "[" + name + "]" + "(" + gems_latest_info["homepage_uri"].to_s + ")" +
32
+ "|" + current_version.to_s + "|" + gems_latest_info["version"].to_s + "|" +
33
+ (latest_build).to_s + "|" + days_complete.to_i.to_s +
34
+ "|" + gems_latest_info["changelog_uri"].to_s
40
35
  end
41
36
  end
42
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myprecious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Balki Kodarapu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-23 00:00:00.000000000 Z
11
+ date: 2017-04-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple, markdown generated with information about your gems
14
14
  email: balki.kodarapu@gmail.com